API: added GET /sdrangel/featurepresets and DELETE /sdrangel/featurepreset

pull/1005/head
f4exb 2021-09-04 05:58:06 +02:00
rodzic bd47ba524f
commit e1c3726a27
22 zmienionych plików z 3115 dodań i 2 usunięć

Wyświetl plik

@ -4834,6 +4834,66 @@ margin-bottom: 20px;
}
},
"description" : "Summarized information about feature plugin"
};
defs.FeaturePresetGroup = {
"required" : [ "groupName", "nbPresets" ],
"properties" : {
"groupName" : {
"type" : "string",
"description" : "Name of the preset group"
},
"nbPresets" : {
"type" : "integer",
"description" : "Number of presets in the group"
},
"presets" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/FeaturePresetItem"
}
}
},
"description" : "Group of feature presets"
};
defs.FeaturePresetIdentifier = {
"required" : [ "description", "groupName" ],
"properties" : {
"groupName" : {
"type" : "string",
"description" : "Name of the feature preset group"
},
"description" : {
"type" : "string",
"description" : "Descriptive name of the preset"
}
},
"description" : "Feature settings preset item"
};
defs.FeaturePresetItem = {
"required" : [ "description" ],
"properties" : {
"description" : {
"type" : "string",
"description" : "Descriptive name of the preset"
}
},
"description" : "Feature settings preset item"
};
defs.FeaturePresets = {
"required" : [ "nbGroups" ],
"properties" : {
"nbGroups" : {
"type" : "integer",
"description" : "Number of preset groups"
},
"groups" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/FeaturePresetGroup"
}
}
},
"description" : "Feature settings presets"
};
defs.FeatureReport = {
"required" : [ "featureType" ],
@ -12635,6 +12695,12 @@ margin-bottom: 20px;
<li data-group="Instance" data-name="instanceDevices" class="">
<a href="#api-Instance-instanceDevices">instanceDevices</a>
</li>
<li data-group="Instance" data-name="instanceFeaturePresetDelete" class="">
<a href="#api-Instance-instanceFeaturePresetDelete">instanceFeaturePresetDelete</a>
</li>
<li data-group="Instance" data-name="instanceFeaturePresetGet" class="">
<a href="#api-Instance-instanceFeaturePresetGet">instanceFeaturePresetGet</a>
</li>
<li data-group="Instance" data-name="instanceFeatureSetsGet" class="">
<a href="#api-Instance-instanceFeatureSetsGet">instanceFeatureSetsGet</a>
</li>
@ -40393,6 +40459,814 @@ except ApiException as e:
</article>
</div>
<hr>
<div id="api-Instance-instanceFeaturePresetDelete">
<article id="api-Instance-instanceFeaturePresetDelete-0" data-group="User" data-name="instanceFeaturePresetDelete" data-version="0">
<div class="pull-left">
<h1>instanceFeaturePresetDelete</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">Deletes a feature preset</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/sdrangel/featurepreset</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-instanceFeaturePresetDelete-0-curl">Curl</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-java">Java</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-android">Android</a></li>
<!--<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-csharp">C#</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-php">PHP</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-perl">Perl</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-Instance-instanceFeaturePresetDelete-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/sdrangel/featurepreset"</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-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();
FeaturePresetIdentifier body = ; // FeaturePresetIdentifier | delete this feature preset
try {
FeaturePresetIdentifier result = apiInstance.instanceFeaturePresetDelete(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceFeaturePresetDelete");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-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();
FeaturePresetIdentifier body = ; // FeaturePresetIdentifier | delete this feature preset
try {
FeaturePresetIdentifier result = apiInstance.instanceFeaturePresetDelete(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceFeaturePresetDelete");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-objc">
<pre class="prettyprint"><code class="language-cpp">FeaturePresetIdentifier *body = ; // delete this feature preset
InstanceApi *apiInstance = [[InstanceApi alloc] init];
[apiInstance instanceFeaturePresetDeleteWith:body
completionHandler: ^(FeaturePresetIdentifier output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-javascript">
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
var api = new SdRangel.InstanceApi()
var body = ; // {FeaturePresetIdentifier} delete this feature preset
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.instanceFeaturePresetDelete(body, callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-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 instanceFeaturePresetDeleteExample
{
public void main()
{
var apiInstance = new InstanceApi();
var body = new FeaturePresetIdentifier(); // FeaturePresetIdentifier | delete this feature preset
try
{
FeaturePresetIdentifier result = apiInstance.instanceFeaturePresetDelete(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling InstanceApi.instanceFeaturePresetDelete: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-php">
<pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\InstanceApi();
$body = ; // FeaturePresetIdentifier | delete this feature preset
try {
$result = $api_instance->instanceFeaturePresetDelete($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstanceApi->instanceFeaturePresetDelete: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-perl">
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use SWGSDRangel::Configuration;
use SWGSDRangel::InstanceApi;
my $api_instance = SWGSDRangel::InstanceApi->new();
my $body = SWGSDRangel::Object::FeaturePresetIdentifier->new(); # FeaturePresetIdentifier | delete this feature preset
eval {
my $result = $api_instance->instanceFeaturePresetDelete(body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling InstanceApi->instanceFeaturePresetDelete: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-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()
body = # FeaturePresetIdentifier | delete this feature preset
try:
api_response = api_instance.instance_feature_preset_delete(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling InstanceApi->instanceFeaturePresetDelete: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<div class="methodsubtabletitle">Body parameters</div>
<table id="methodsubtable">
<tr>
<th width="150px">Name</th>
<th>Description</th>
</tr>
<tr><td style="width:150px;">body <span style="color:red;">*</span></td>
<td>
<script>
$(document).ready(function() {
var schemaWrapper = {
"in" : "body",
"name" : "body",
"description" : "delete this feature preset",
"required" : true,
"schema" : {
"$ref" : "#/definitions/FeaturePresetIdentifier"
}
};
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);
});
}
var view = new JSONSchemaView(schema,2,{isBodyParam: true});
var result = $('#d2e199_instanceFeaturePresetDelete_body');
result.empty();
result.append(view.render());
});
</script>
<div id="d2e199_instanceFeaturePresetDelete_body"></div>
</td>
</tr>
</table>
<h2>Responses</h2>
<h3> Status: 202 - On successful sending of the message the selected feature preset identification is returned </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeaturePresetDelete-202-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetDelete-202-schema">
<div id='responses-instanceFeaturePresetDelete-202-schema-202' 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" : "On successful sending of the message the selected feature preset identification is returned",
"schema" : {
"$ref" : "#/definitions/FeaturePresetIdentifier"
}
};
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-instanceFeaturePresetDelete-202-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetDelete-202-schema-202');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetDelete-202-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 400 - Invalid JSON request </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeaturePresetDelete-400-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetDelete-400-schema">
<div id='responses-instanceFeaturePresetDelete-400-schema-400' 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" : "Invalid JSON request",
"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-instanceFeaturePresetDelete-400-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetDelete-400-schema-400');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetDelete-400-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 404 - Preset not found </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeaturePresetDelete-404-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetDelete-404-schema">
<div id='responses-instanceFeaturePresetDelete-404-schema-404' 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" : "Preset not found",
"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-instanceFeaturePresetDelete-404-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetDelete-404-schema-404');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetDelete-404-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-instanceFeaturePresetDelete-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetDelete-500-schema">
<div id='responses-instanceFeaturePresetDelete-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-instanceFeaturePresetDelete-500-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetDelete-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetDelete-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-instanceFeaturePresetDelete-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetDelete-501-schema">
<div id='responses-instanceFeaturePresetDelete-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-instanceFeaturePresetDelete-501-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetDelete-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetDelete-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
<div id="api-Instance-instanceFeaturePresetGet">
<article id="api-Instance-instanceFeaturePresetGet-0" data-group="User" data-name="instanceFeaturePresetGet" data-version="0">
<div class="pull-left">
<h1>instanceFeaturePresetGet</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">List all feature presets in the instance</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/sdrangel/featurepresets</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-instanceFeaturePresetGet-0-curl">Curl</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-java">Java</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-android">Android</a></li>
<!--<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-csharp">C#</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-php">PHP</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-perl">Perl</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-Instance-instanceFeaturePresetGet-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/sdrangel/featurepresets"</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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 {
FeaturePresets result = apiInstance.instanceFeaturePresetGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceFeaturePresetGet");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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 {
FeaturePresets result = apiInstance.instanceFeaturePresetGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceFeaturePresetGet");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-0-objc">
<pre class="prettyprint"><code class="language-cpp">
InstanceApi *apiInstance = [[InstanceApi alloc] init];
[apiInstance instanceFeaturePresetGetWithCompletionHandler:
^(FeaturePresets output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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.instanceFeaturePresetGet(callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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 instanceFeaturePresetGetExample
{
public void main()
{
var apiInstance = new InstanceApi();
try
{
FeaturePresets result = apiInstance.instanceFeaturePresetGet();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling InstanceApi.instanceFeaturePresetGet: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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->instanceFeaturePresetGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstanceApi->instanceFeaturePresetGet: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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->instanceFeaturePresetGet();
print Dumper($result);
};
if ($@) {
warn "Exception when calling InstanceApi->instanceFeaturePresetGet: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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_feature_preset_get()
pprint(api_response)
except ApiException as e:
print("Exception when calling InstanceApi->instanceFeaturePresetGet: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<h2>Responses</h2>
<h3> Status: 200 - On success return feature preset list </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeaturePresetGet-200-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetGet-200-schema">
<div id='responses-instanceFeaturePresetGet-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" : "On success return feature preset list",
"schema" : {
"$ref" : "#/definitions/FeaturePresets"
}
};
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-instanceFeaturePresetGet-200-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetGet-200-schema-200');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetGet-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-instanceFeaturePresetGet-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetGet-500-schema">
<div id='responses-instanceFeaturePresetGet-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-instanceFeaturePresetGet-500-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetGet-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetGet-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-instanceFeaturePresetGet-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetGet-501-schema">
<div id='responses-instanceFeaturePresetGet-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-instanceFeaturePresetGet-501-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetGet-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetGet-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
<div id="api-Instance-instanceFeatureSetsGet">
<article id="api-Instance-instanceFeatureSetsGet-0" data-group="User" data-name="instanceFeatureSetsGet" data-version="0">
<div class="pull-left">
@ -48111,7 +48985,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2021-08-31T23:36:40.361+02:00
Generated 2021-09-03T22:11:29.377+02:00
</div>
</div>
</div>

Wyświetl plik

@ -883,6 +883,57 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/featurepresets:
x-swagger-router-controller: instance
get:
description: List all feature presets in the instance
operationId: instanceFeaturePresetGet
tags:
- Instance
responses:
"200":
description: On success return feature preset list
schema:
$ref: "#/definitions/FeaturePresets"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featurepreset:
x-swagger-router-controller: instance
delete:
description: Deletes a feature preset
operationId: instanceFeaturePresetDelete
tags:
- Instance
consumes:
- application/json
parameters:
- name: body
in: body
description: delete this feature preset
required: true
schema:
$ref: "#/definitions/FeaturePresetIdentifier"
responses:
"202":
description: On successful sending of the message the selected feature preset identification is returned
schema:
$ref: "#/definitions/FeaturePresetIdentifier"
"400":
description: Invalid JSON request
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Preset not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/devicesets:
x-swagger-router-controller: instance
get:
@ -3031,6 +3082,58 @@ definitions:
preset:
$ref: "#/definitions/PresetIdentifier"
FeaturePresets:
description: "Feature settings presets"
required:
- nbGroups
properties:
nbGroups:
description: "Number of preset groups"
type: integer
groups:
type: array
items:
$ref: "#/definitions/FeaturePresetGroup"
FeaturePresetGroup:
description: "Group of feature presets"
required:
- groupName
- nbPresets
properties:
groupName:
description: "Name of the preset group"
type: string
nbPresets:
description: "Number of presets in the group"
type: integer
presets:
type: array
items:
$ref: "#/definitions/FeaturePresetItem"
FeaturePresetItem:
description: "Feature settings preset item"
required:
- description
properties:
description:
description: "Descriptive name of the preset"
type: string
FeaturePresetIdentifier:
description: "Feature settings preset item"
required:
- groupName
- description
properties:
groupName:
description: "Name of the feature preset group"
type: string
description:
description: "Descriptive name of the preset"
type: string
responses:
Response_500:

Wyświetl plik

@ -71,6 +71,10 @@
#include "SWGLimeRFEDevices.h"
#include "SWGLimeRFESettings.h"
#include "SWGLimeRFEPower.h"
#include "SWGFeaturePresets.h"
#include "SWGFeaturePresetGroup.h"
#include "SWGFeaturePresetItem.h"
#include "SWGFeaturePresetIdentifier.h"
#include "SWGFeatureSetList.h"
#include "SWGFeatureSettings.h"
#include "SWGFeatureReport.h"
@ -1406,6 +1410,75 @@ int WebAPIAdapter::instancePresetDelete(
return 202;
}
int WebAPIAdapter::instanceFeaturePresetsGet(
SWGSDRangel::SWGFeaturePresets& response,
SWGSDRangel::SWGErrorResponse& error)
{
(void) error;
int nbPresets = m_mainCore->m_settings.getFeatureSetPresetCount();
int nbGroups = 0;
int nbPresetsThisGroup = 0;
QString groupName;
response.init();
QList<SWGSDRangel::SWGFeaturePresetGroup*> *groups = response.getGroups();
QList<SWGSDRangel::SWGFeaturePresetItem*> *swgPresets = 0;
int i = 0;
// Presets are sorted by group first
for (; i < nbPresets; i++)
{
const FeatureSetPreset *preset = m_mainCore->m_settings.getFeatureSetPreset(i);
if ((i == 0) || (groupName != preset->getGroup())) // new group
{
if (i > 0) { groups->back()->setNbPresets(nbPresetsThisGroup); }
groups->append(new SWGSDRangel::SWGFeaturePresetGroup);
groups->back()->init();
groupName = preset->getGroup();
*groups->back()->getGroupName() = groupName;
swgPresets = groups->back()->getPresets();
nbGroups++;
nbPresetsThisGroup = 0;
}
swgPresets->append(new SWGSDRangel::SWGFeaturePresetItem);
swgPresets->back()->init();
*swgPresets->back()->getDescription() = preset->getDescription();
nbPresetsThisGroup++;
}
if (i > 0) { groups->back()->setNbPresets(nbPresetsThisGroup); }
response.setNbGroups(nbGroups);
return 200;
}
int WebAPIAdapter::instanceFeaturePresetDelete(
SWGSDRangel::SWGFeaturePresetIdentifier& response,
SWGSDRangel::SWGErrorResponse& error)
{
const FeatureSetPreset *selectedPreset = m_mainCore->m_settings.getFeatureSetPreset(*response.getGroupName(),
*response.getDescription());
if (selectedPreset == nullptr)
{
error.init();
*error.getMessage() = QString("There is no feature preset [%1, %2]")
.arg(*response.getGroupName())
.arg(*response.getDescription());
return 404;
}
*response.getGroupName() = selectedPreset->getGroup();
*response.getDescription() = selectedPreset->getDescription();
MainCore::MsgDeleteFeatureSetPreset *msg = MainCore::MsgDeleteFeatureSetPreset::create(const_cast<FeatureSetPreset*>(selectedPreset));
m_mainCore->m_mainMessageQueue->push(msg);
return 202;
}
int WebAPIAdapter::instanceDeviceSetsGet(
SWGSDRangel::SWGDeviceSetList& response,
SWGSDRangel::SWGErrorResponse& error)

Wyświetl plik

@ -195,6 +195,14 @@ public:
SWGSDRangel::SWGPresetIdentifier& response,
SWGSDRangel::SWGErrorResponse& error);
virtual int instanceFeaturePresetsGet(
SWGSDRangel::SWGFeaturePresets& response,
SWGSDRangel::SWGErrorResponse& error);
virtual int instanceFeaturePresetDelete(
SWGSDRangel::SWGFeaturePresetIdentifier& response,
SWGSDRangel::SWGErrorResponse& error);
virtual int instanceDeviceSetsGet(
SWGSDRangel::SWGDeviceSetList& response,
SWGSDRangel::SWGErrorResponse& error);

Wyświetl plik

@ -40,6 +40,8 @@ QString WebAPIAdapterInterface::instanceLimeRFEPowerURL = "/sdrangel/limerfe/pow
QString WebAPIAdapterInterface::instancePresetsURL = "/sdrangel/presets";
QString WebAPIAdapterInterface::instancePresetURL = "/sdrangel/preset";
QString WebAPIAdapterInterface::instancePresetFileURL = "/sdrangel/preset/file";
QString WebAPIAdapterInterface::instanceFeaturePresetsURL = "/sdrangel/featurepresets";
QString WebAPIAdapterInterface::instanceFeaturePresetURL = "/sdrangel/featurepreset";
QString WebAPIAdapterInterface::instanceDeviceSetsURL = "/sdrangel/devicesets";
QString WebAPIAdapterInterface::instanceDeviceSetURL = "/sdrangel/deviceset";
QString WebAPIAdapterInterface::instanceFeatureSetsURL = "/sdrangel/featuresets";

Wyświetl plik

@ -63,6 +63,8 @@ namespace SWGSDRangel
class SWGChannelReport;
class SWGChannelActions;
class SWGSuccessResponse;
class SWGFeaturePresets;
class SWGFeaturePresetIdentifier;
class SWGFeatureSetList;
class SWGFeatureSet;
class SWGFeatureSettings;
@ -649,6 +651,34 @@ public:
return 501;
}
/**
* Handler of /sdrangel/featurepresets (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels
* returns the Http status code (default 501: not implemented)
*/
virtual int instanceFeaturePresetsGet(
SWGSDRangel::SWGFeaturePresets& response,
SWGSDRangel::SWGErrorResponse& error)
{
(void) response;
error.init();
*error.getMessage() = QString("Function not implemented");
return 501;
}
/**
* Handler of /sdrangel/featurepreset (DELETE) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels
* returns the Http status code (default 501: not implemented)
*/
virtual int instanceFeaturePresetDelete(
SWGSDRangel::SWGFeaturePresetIdentifier& response,
SWGSDRangel::SWGErrorResponse& error)
{
(void) response;
error.init();
*error.getMessage() = QString("Function not implemented");
return 501;
}
/**
* Handler of /sdrangel/devicesets (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels
* returns the Http status code (default 501: not implemented)
@ -1389,6 +1419,8 @@ public:
static QString instancePresetsURL;
static QString instancePresetURL;
static QString instancePresetFileURL;
static QString instanceFeaturePresetsURL;
static QString instanceFeaturePresetURL;
static QString instanceDeviceSetsURL;
static QString instanceDeviceSetURL;
static QString instanceFeatureSetsURL;

Wyświetl plik

@ -53,6 +53,8 @@
#include "SWGChannelActions.h"
#include "SWGSuccessResponse.h"
#include "SWGErrorResponse.h"
#include "SWGFeaturePresets.h"
#include "SWGFeaturePresetIdentifier.h"
#include "SWGFeatureSetList.h"
#include "SWGFeatureSettings.h"
#include "SWGFeatureReport.h"
@ -150,6 +152,10 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http
instancePresetService(request, response);
} else if (path == WebAPIAdapterInterface::instancePresetFileURL) {
instancePresetFileService(request, response);
} else if (path == WebAPIAdapterInterface::instanceFeaturePresetsURL) {
instanceFeaturePresetsService(request, response);
} else if (path == WebAPIAdapterInterface::instanceFeaturePresetURL) {
instanceFeaturePresetService(request, response);
} else if (path == WebAPIAdapterInterface::instanceDeviceSetsURL) {
instanceDeviceSetsService(request, response);
} else if (path == WebAPIAdapterInterface::instanceDeviceSetURL) {
@ -1367,6 +1373,78 @@ void WebAPIRequestMapper::instancePresetFileService(qtwebapp::HttpRequest& reque
}
}
void WebAPIRequestMapper::instanceFeaturePresetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
{
SWGSDRangel::SWGErrorResponse errorResponse;
response.setHeader("Content-Type", "application/json");
response.setHeader("Access-Control-Allow-Origin", "*");
if (request.getMethod() == "GET")
{
SWGSDRangel::SWGFeaturePresets normalResponse;
int status = m_adapter->instanceFeaturePresetsGet(normalResponse, errorResponse);
response.setStatus(status);
if (status/100 == 2) {
response.write(normalResponse.asJson().toUtf8());
} else {
response.write(errorResponse.asJson().toUtf8());
}
}
}
void WebAPIRequestMapper::instanceFeaturePresetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
{
SWGSDRangel::SWGErrorResponse errorResponse;
response.setHeader("Content-Type", "application/json");
response.setHeader("Access-Control-Allow-Origin", "*");
if (request.getMethod() == "DELETE")
{
SWGSDRangel::SWGFeaturePresetIdentifier normalResponse;
QString jsonStr = request.getBody();
QJsonObject jsonObject;
if (parseJsonBody(jsonStr, jsonObject, response))
{
normalResponse.fromJson(jsonStr);
if (validateFeaturePresetIdentifer(normalResponse))
{
int status = m_adapter->instanceFeaturePresetDelete(normalResponse, errorResponse);
response.setStatus(status);
if (status/100 == 2) {
response.write(normalResponse.asJson().toUtf8());
} else {
response.write(errorResponse.asJson().toUtf8());
}
}
else
{
response.setStatus(400,"Invalid JSON request");
errorResponse.init();
*errorResponse.getMessage() = "Invalid JSON request";
response.write(errorResponse.asJson().toUtf8());
}
}
else
{
response.setStatus(400,"Invalid JSON format");
errorResponse.init();
*errorResponse.getMessage() = "Invalid JSON format";
response.write(errorResponse.asJson().toUtf8());
}
}
else
{
response.setStatus(405,"Invalid HTTP method");
errorResponse.init();
*errorResponse.getMessage() = "Invalid HTTP method";
response.write(errorResponse.asJson().toUtf8());
}
}
void WebAPIRequestMapper::instanceDeviceSetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
{
SWGSDRangel::SWGErrorResponse errorResponse;
@ -2990,6 +3068,11 @@ bool WebAPIRequestMapper::validatePresetIdentifer(SWGSDRangel::SWGPresetIdentifi
return (presetIdentifier.getGroupName() && presetIdentifier.getName() && presetIdentifier.getType());
}
bool WebAPIRequestMapper::validateFeaturePresetIdentifer(SWGSDRangel::SWGFeaturePresetIdentifier& presetIdentifier)
{
return (presetIdentifier.getGroupName() && presetIdentifier.getDescription());
}
bool WebAPIRequestMapper::validatePresetExport(SWGSDRangel::SWGPresetExport& presetExport)
{
if (presetExport.getFilePath() == 0) {

Wyświetl plik

@ -76,6 +76,8 @@ private:
void instancePresetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instancePresetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instancePresetFileService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instanceFeaturePresetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instanceFeaturePresetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instanceDeviceSetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instanceDeviceSetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instanceFeatureSetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
@ -115,6 +117,7 @@ private:
bool validateDeviceActions(SWGSDRangel::SWGDeviceActions& deviceActions, QJsonObject& jsonObject, QStringList& deviceActionsKeys);
bool validateChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings, QJsonObject& jsonObject, QStringList& channelSettingsKeys);
bool validateChannelActions(SWGSDRangel::SWGChannelActions& channelActions, QJsonObject& jsonObject, QStringList& channelActionsKeys);
bool validateFeaturePresetIdentifer(SWGSDRangel::SWGFeaturePresetIdentifier& presetIdentifier);
bool validateFeatureSettings(SWGSDRangel::SWGFeatureSettings& featureSettings, QJsonObject& jsonObject, QStringList& featureSettingsKeys);
bool validateFeatureActions(SWGSDRangel::SWGFeatureActions& featureActions, QJsonObject& jsonObject, QStringList& featureActionsKeys);
bool validateAudioInputDevice(SWGSDRangel::SWGAudioInputDevice& audioInputDevice, QJsonObject& jsonObject, QStringList& audioInputDeviceKeys);

Wyświetl plik

@ -1054,6 +1054,14 @@ bool MainWindow::handleMessage(const Message& cmd)
m_mainCore->m_settings.deletePreset(presetToDelete);
return true;
}
else if (MainCore::MsgDeleteFeatureSetPreset::match(cmd))
{
MainCore::MsgDeleteFeatureSetPreset& notif = (MainCore::MsgDeleteFeatureSetPreset&) cmd;
const FeatureSetPreset *presetToDelete = notif.getPreset();
// remove preset from settings
m_mainCore->m_settings.deleteFeatureSetPreset(presetToDelete);
return true;
}
else if (MainCore::MsgAddDeviceSet::match(cmd))
{
MainCore::MsgAddDeviceSet& notif = (MainCore::MsgAddDeviceSet&) cmd;

Wyświetl plik

@ -883,6 +883,57 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/featurepresets:
x-swagger-router-controller: instance
get:
description: List all feature presets in the instance
operationId: instanceFeaturePresetGet
tags:
- Instance
responses:
"200":
description: On success return feature preset list
schema:
$ref: "#/definitions/FeaturePresets"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featurepreset:
x-swagger-router-controller: instance
delete:
description: Deletes a feature preset
operationId: instanceFeaturePresetDelete
tags:
- Instance
consumes:
- application/json
parameters:
- name: body
in: body
description: delete this feature preset
required: true
schema:
$ref: "#/definitions/FeaturePresetIdentifier"
responses:
"202":
description: On successful sending of the message the selected feature preset identification is returned
schema:
$ref: "#/definitions/FeaturePresetIdentifier"
"400":
description: Invalid JSON request
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Preset not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/devicesets:
x-swagger-router-controller: instance
get:
@ -3031,6 +3082,58 @@ definitions:
preset:
$ref: "#/definitions/PresetIdentifier"
FeaturePresets:
description: "Feature settings presets"
required:
- nbGroups
properties:
nbGroups:
description: "Number of preset groups"
type: integer
groups:
type: array
items:
$ref: "#/definitions/FeaturePresetGroup"
FeaturePresetGroup:
description: "Group of feature presets"
required:
- groupName
- nbPresets
properties:
groupName:
description: "Name of the preset group"
type: string
nbPresets:
description: "Number of presets in the group"
type: integer
presets:
type: array
items:
$ref: "#/definitions/FeaturePresetItem"
FeaturePresetItem:
description: "Feature settings preset item"
required:
- description
properties:
description:
description: "Descriptive name of the preset"
type: string
FeaturePresetIdentifier:
description: "Feature settings preset item"
required:
- groupName
- description
properties:
groupName:
description: "Name of the feature preset group"
type: string
description:
description: "Descriptive name of the preset"
type: string
responses:
Response_500:

Wyświetl plik

@ -4834,6 +4834,66 @@ margin-bottom: 20px;
}
},
"description" : "Summarized information about feature plugin"
};
defs.FeaturePresetGroup = {
"required" : [ "groupName", "nbPresets" ],
"properties" : {
"groupName" : {
"type" : "string",
"description" : "Name of the preset group"
},
"nbPresets" : {
"type" : "integer",
"description" : "Number of presets in the group"
},
"presets" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/FeaturePresetItem"
}
}
},
"description" : "Group of feature presets"
};
defs.FeaturePresetIdentifier = {
"required" : [ "description", "groupName" ],
"properties" : {
"groupName" : {
"type" : "string",
"description" : "Name of the feature preset group"
},
"description" : {
"type" : "string",
"description" : "Descriptive name of the preset"
}
},
"description" : "Feature settings preset item"
};
defs.FeaturePresetItem = {
"required" : [ "description" ],
"properties" : {
"description" : {
"type" : "string",
"description" : "Descriptive name of the preset"
}
},
"description" : "Feature settings preset item"
};
defs.FeaturePresets = {
"required" : [ "nbGroups" ],
"properties" : {
"nbGroups" : {
"type" : "integer",
"description" : "Number of preset groups"
},
"groups" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/FeaturePresetGroup"
}
}
},
"description" : "Feature settings presets"
};
defs.FeatureReport = {
"required" : [ "featureType" ],
@ -12635,6 +12695,12 @@ margin-bottom: 20px;
<li data-group="Instance" data-name="instanceDevices" class="">
<a href="#api-Instance-instanceDevices">instanceDevices</a>
</li>
<li data-group="Instance" data-name="instanceFeaturePresetDelete" class="">
<a href="#api-Instance-instanceFeaturePresetDelete">instanceFeaturePresetDelete</a>
</li>
<li data-group="Instance" data-name="instanceFeaturePresetGet" class="">
<a href="#api-Instance-instanceFeaturePresetGet">instanceFeaturePresetGet</a>
</li>
<li data-group="Instance" data-name="instanceFeatureSetsGet" class="">
<a href="#api-Instance-instanceFeatureSetsGet">instanceFeatureSetsGet</a>
</li>
@ -40393,6 +40459,814 @@ except ApiException as e:
</article>
</div>
<hr>
<div id="api-Instance-instanceFeaturePresetDelete">
<article id="api-Instance-instanceFeaturePresetDelete-0" data-group="User" data-name="instanceFeaturePresetDelete" data-version="0">
<div class="pull-left">
<h1>instanceFeaturePresetDelete</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">Deletes a feature preset</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/sdrangel/featurepreset</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-instanceFeaturePresetDelete-0-curl">Curl</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-java">Java</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-android">Android</a></li>
<!--<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-csharp">C#</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-php">PHP</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-perl">Perl</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetDelete-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-Instance-instanceFeaturePresetDelete-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/sdrangel/featurepreset"</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-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();
FeaturePresetIdentifier body = ; // FeaturePresetIdentifier | delete this feature preset
try {
FeaturePresetIdentifier result = apiInstance.instanceFeaturePresetDelete(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceFeaturePresetDelete");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-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();
FeaturePresetIdentifier body = ; // FeaturePresetIdentifier | delete this feature preset
try {
FeaturePresetIdentifier result = apiInstance.instanceFeaturePresetDelete(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceFeaturePresetDelete");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-objc">
<pre class="prettyprint"><code class="language-cpp">FeaturePresetIdentifier *body = ; // delete this feature preset
InstanceApi *apiInstance = [[InstanceApi alloc] init];
[apiInstance instanceFeaturePresetDeleteWith:body
completionHandler: ^(FeaturePresetIdentifier output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-javascript">
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
var api = new SdRangel.InstanceApi()
var body = ; // {FeaturePresetIdentifier} delete this feature preset
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.instanceFeaturePresetDelete(body, callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-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 instanceFeaturePresetDeleteExample
{
public void main()
{
var apiInstance = new InstanceApi();
var body = new FeaturePresetIdentifier(); // FeaturePresetIdentifier | delete this feature preset
try
{
FeaturePresetIdentifier result = apiInstance.instanceFeaturePresetDelete(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling InstanceApi.instanceFeaturePresetDelete: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-php">
<pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\InstanceApi();
$body = ; // FeaturePresetIdentifier | delete this feature preset
try {
$result = $api_instance->instanceFeaturePresetDelete($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstanceApi->instanceFeaturePresetDelete: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-0-perl">
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use SWGSDRangel::Configuration;
use SWGSDRangel::InstanceApi;
my $api_instance = SWGSDRangel::InstanceApi->new();
my $body = SWGSDRangel::Object::FeaturePresetIdentifier->new(); # FeaturePresetIdentifier | delete this feature preset
eval {
my $result = $api_instance->instanceFeaturePresetDelete(body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling InstanceApi->instanceFeaturePresetDelete: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetDelete-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()
body = # FeaturePresetIdentifier | delete this feature preset
try:
api_response = api_instance.instance_feature_preset_delete(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling InstanceApi->instanceFeaturePresetDelete: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<div class="methodsubtabletitle">Body parameters</div>
<table id="methodsubtable">
<tr>
<th width="150px">Name</th>
<th>Description</th>
</tr>
<tr><td style="width:150px;">body <span style="color:red;">*</span></td>
<td>
<script>
$(document).ready(function() {
var schemaWrapper = {
"in" : "body",
"name" : "body",
"description" : "delete this feature preset",
"required" : true,
"schema" : {
"$ref" : "#/definitions/FeaturePresetIdentifier"
}
};
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);
});
}
var view = new JSONSchemaView(schema,2,{isBodyParam: true});
var result = $('#d2e199_instanceFeaturePresetDelete_body');
result.empty();
result.append(view.render());
});
</script>
<div id="d2e199_instanceFeaturePresetDelete_body"></div>
</td>
</tr>
</table>
<h2>Responses</h2>
<h3> Status: 202 - On successful sending of the message the selected feature preset identification is returned </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeaturePresetDelete-202-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetDelete-202-schema">
<div id='responses-instanceFeaturePresetDelete-202-schema-202' 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" : "On successful sending of the message the selected feature preset identification is returned",
"schema" : {
"$ref" : "#/definitions/FeaturePresetIdentifier"
}
};
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-instanceFeaturePresetDelete-202-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetDelete-202-schema-202');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetDelete-202-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 400 - Invalid JSON request </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeaturePresetDelete-400-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetDelete-400-schema">
<div id='responses-instanceFeaturePresetDelete-400-schema-400' 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" : "Invalid JSON request",
"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-instanceFeaturePresetDelete-400-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetDelete-400-schema-400');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetDelete-400-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 404 - Preset not found </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeaturePresetDelete-404-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetDelete-404-schema">
<div id='responses-instanceFeaturePresetDelete-404-schema-404' 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" : "Preset not found",
"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-instanceFeaturePresetDelete-404-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetDelete-404-schema-404');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetDelete-404-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-instanceFeaturePresetDelete-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetDelete-500-schema">
<div id='responses-instanceFeaturePresetDelete-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-instanceFeaturePresetDelete-500-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetDelete-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetDelete-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-instanceFeaturePresetDelete-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetDelete-501-schema">
<div id='responses-instanceFeaturePresetDelete-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-instanceFeaturePresetDelete-501-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetDelete-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetDelete-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
<div id="api-Instance-instanceFeaturePresetGet">
<article id="api-Instance-instanceFeaturePresetGet-0" data-group="User" data-name="instanceFeaturePresetGet" data-version="0">
<div class="pull-left">
<h1>instanceFeaturePresetGet</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">List all feature presets in the instance</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/sdrangel/featurepresets</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-instanceFeaturePresetGet-0-curl">Curl</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-java">Java</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-android">Android</a></li>
<!--<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-csharp">C#</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-php">PHP</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-perl">Perl</a></li>
<li class=""><a href="#examples-Instance-instanceFeaturePresetGet-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-Instance-instanceFeaturePresetGet-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/sdrangel/featurepresets"</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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 {
FeaturePresets result = apiInstance.instanceFeaturePresetGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceFeaturePresetGet");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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 {
FeaturePresets result = apiInstance.instanceFeaturePresetGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceFeaturePresetGet");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-0-objc">
<pre class="prettyprint"><code class="language-cpp">
InstanceApi *apiInstance = [[InstanceApi alloc] init];
[apiInstance instanceFeaturePresetGetWithCompletionHandler:
^(FeaturePresets output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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.instanceFeaturePresetGet(callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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 instanceFeaturePresetGetExample
{
public void main()
{
var apiInstance = new InstanceApi();
try
{
FeaturePresets result = apiInstance.instanceFeaturePresetGet();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling InstanceApi.instanceFeaturePresetGet: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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->instanceFeaturePresetGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstanceApi->instanceFeaturePresetGet: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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->instanceFeaturePresetGet();
print Dumper($result);
};
if ($@) {
warn "Exception when calling InstanceApi->instanceFeaturePresetGet: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceFeaturePresetGet-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_feature_preset_get()
pprint(api_response)
except ApiException as e:
print("Exception when calling InstanceApi->instanceFeaturePresetGet: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<h2>Responses</h2>
<h3> Status: 200 - On success return feature preset list </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeaturePresetGet-200-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetGet-200-schema">
<div id='responses-instanceFeaturePresetGet-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" : "On success return feature preset list",
"schema" : {
"$ref" : "#/definitions/FeaturePresets"
}
};
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-instanceFeaturePresetGet-200-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetGet-200-schema-200');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetGet-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-instanceFeaturePresetGet-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetGet-500-schema">
<div id='responses-instanceFeaturePresetGet-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-instanceFeaturePresetGet-500-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetGet-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetGet-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-instanceFeaturePresetGet-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeaturePresetGet-501-schema">
<div id='responses-instanceFeaturePresetGet-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-instanceFeaturePresetGet-501-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeaturePresetGet-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeaturePresetGet-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
<div id="api-Instance-instanceFeatureSetsGet">
<article id="api-Instance-instanceFeatureSetsGet-0" data-group="User" data-name="instanceFeatureSetsGet" data-version="0">
<div class="pull-left">
@ -48111,7 +48985,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2021-08-31T23:36:40.361+02:00
Generated 2021-09-03T22:11:29.377+02:00
</div>
</div>
</div>

Wyświetl plik

@ -0,0 +1,162 @@
/**
* 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: 6.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#include "SWGFeaturePresetGroup.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGFeaturePresetGroup::SWGFeaturePresetGroup(QString* json) {
init();
this->fromJson(*json);
}
SWGFeaturePresetGroup::SWGFeaturePresetGroup() {
group_name = nullptr;
m_group_name_isSet = false;
nb_presets = 0;
m_nb_presets_isSet = false;
presets = nullptr;
m_presets_isSet = false;
}
SWGFeaturePresetGroup::~SWGFeaturePresetGroup() {
this->cleanup();
}
void
SWGFeaturePresetGroup::init() {
group_name = new QString("");
m_group_name_isSet = false;
nb_presets = 0;
m_nb_presets_isSet = false;
presets = new QList<SWGFeaturePresetItem*>();
m_presets_isSet = false;
}
void
SWGFeaturePresetGroup::cleanup() {
if(group_name != nullptr) {
delete group_name;
}
if(presets != nullptr) {
auto arr = presets;
for(auto o: *arr) {
delete o;
}
delete presets;
}
}
SWGFeaturePresetGroup*
SWGFeaturePresetGroup::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGFeaturePresetGroup::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&group_name, pJson["groupName"], "QString", "QString");
::SWGSDRangel::setValue(&nb_presets, pJson["nbPresets"], "qint32", "");
::SWGSDRangel::setValue(&presets, pJson["presets"], "QList", "SWGFeaturePresetItem");
}
QString
SWGFeaturePresetGroup::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGFeaturePresetGroup::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(group_name != nullptr && *group_name != QString("")){
toJsonValue(QString("groupName"), group_name, obj, QString("QString"));
}
if(m_nb_presets_isSet){
obj->insert("nbPresets", QJsonValue(nb_presets));
}
if(presets && presets->size() > 0){
toJsonArray((QList<void*>*)presets, obj, "presets", "SWGFeaturePresetItem");
}
return obj;
}
QString*
SWGFeaturePresetGroup::getGroupName() {
return group_name;
}
void
SWGFeaturePresetGroup::setGroupName(QString* group_name) {
this->group_name = group_name;
this->m_group_name_isSet = true;
}
qint32
SWGFeaturePresetGroup::getNbPresets() {
return nb_presets;
}
void
SWGFeaturePresetGroup::setNbPresets(qint32 nb_presets) {
this->nb_presets = nb_presets;
this->m_nb_presets_isSet = true;
}
QList<SWGFeaturePresetItem*>*
SWGFeaturePresetGroup::getPresets() {
return presets;
}
void
SWGFeaturePresetGroup::setPresets(QList<SWGFeaturePresetItem*>* presets) {
this->presets = presets;
this->m_presets_isSet = true;
}
bool
SWGFeaturePresetGroup::isSet(){
bool isObjectUpdated = false;
do{
if(group_name && *group_name != QString("")){
isObjectUpdated = true; break;
}
if(m_nb_presets_isSet){
isObjectUpdated = true; break;
}
if(presets && (presets->size() > 0)){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

Wyświetl plik

@ -0,0 +1,73 @@
/**
* 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: 6.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/*
* SWGFeaturePresetGroup.h
*
* Group of feature presets
*/
#ifndef SWGFeaturePresetGroup_H_
#define SWGFeaturePresetGroup_H_
#include <QJsonObject>
#include "SWGFeaturePresetItem.h"
#include <QList>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGFeaturePresetGroup: public SWGObject {
public:
SWGFeaturePresetGroup();
SWGFeaturePresetGroup(QString* json);
virtual ~SWGFeaturePresetGroup();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGFeaturePresetGroup* fromJson(QString &jsonString) override;
QString* getGroupName();
void setGroupName(QString* group_name);
qint32 getNbPresets();
void setNbPresets(qint32 nb_presets);
QList<SWGFeaturePresetItem*>* getPresets();
void setPresets(QList<SWGFeaturePresetItem*>* presets);
virtual bool isSet() override;
private:
QString* group_name;
bool m_group_name_isSet;
qint32 nb_presets;
bool m_nb_presets_isSet;
QList<SWGFeaturePresetItem*>* presets;
bool m_presets_isSet;
};
}
#endif /* SWGFeaturePresetGroup_H_ */

Wyświetl plik

@ -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: 6.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#include "SWGFeaturePresetIdentifier.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGFeaturePresetIdentifier::SWGFeaturePresetIdentifier(QString* json) {
init();
this->fromJson(*json);
}
SWGFeaturePresetIdentifier::SWGFeaturePresetIdentifier() {
group_name = nullptr;
m_group_name_isSet = false;
description = nullptr;
m_description_isSet = false;
}
SWGFeaturePresetIdentifier::~SWGFeaturePresetIdentifier() {
this->cleanup();
}
void
SWGFeaturePresetIdentifier::init() {
group_name = new QString("");
m_group_name_isSet = false;
description = new QString("");
m_description_isSet = false;
}
void
SWGFeaturePresetIdentifier::cleanup() {
if(group_name != nullptr) {
delete group_name;
}
if(description != nullptr) {
delete description;
}
}
SWGFeaturePresetIdentifier*
SWGFeaturePresetIdentifier::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGFeaturePresetIdentifier::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&group_name, pJson["groupName"], "QString", "QString");
::SWGSDRangel::setValue(&description, pJson["description"], "QString", "QString");
}
QString
SWGFeaturePresetIdentifier::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGFeaturePresetIdentifier::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(group_name != nullptr && *group_name != QString("")){
toJsonValue(QString("groupName"), group_name, obj, QString("QString"));
}
if(description != nullptr && *description != QString("")){
toJsonValue(QString("description"), description, obj, QString("QString"));
}
return obj;
}
QString*
SWGFeaturePresetIdentifier::getGroupName() {
return group_name;
}
void
SWGFeaturePresetIdentifier::setGroupName(QString* group_name) {
this->group_name = group_name;
this->m_group_name_isSet = true;
}
QString*
SWGFeaturePresetIdentifier::getDescription() {
return description;
}
void
SWGFeaturePresetIdentifier::setDescription(QString* description) {
this->description = description;
this->m_description_isSet = true;
}
bool
SWGFeaturePresetIdentifier::isSet(){
bool isObjectUpdated = false;
do{
if(group_name && *group_name != QString("")){
isObjectUpdated = true; break;
}
if(description && *description != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

Wyświetl plik

@ -0,0 +1,65 @@
/**
* 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: 6.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/*
* SWGFeaturePresetIdentifier.h
*
* Feature settings preset item
*/
#ifndef SWGFeaturePresetIdentifier_H_
#define SWGFeaturePresetIdentifier_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGFeaturePresetIdentifier: public SWGObject {
public:
SWGFeaturePresetIdentifier();
SWGFeaturePresetIdentifier(QString* json);
virtual ~SWGFeaturePresetIdentifier();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGFeaturePresetIdentifier* fromJson(QString &jsonString) override;
QString* getGroupName();
void setGroupName(QString* group_name);
QString* getDescription();
void setDescription(QString* description);
virtual bool isSet() override;
private:
QString* group_name;
bool m_group_name_isSet;
QString* description;
bool m_description_isSet;
};
}
#endif /* SWGFeaturePresetIdentifier_H_ */

Wyświetl plik

@ -0,0 +1,110 @@
/**
* 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: 6.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#include "SWGFeaturePresetItem.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGFeaturePresetItem::SWGFeaturePresetItem(QString* json) {
init();
this->fromJson(*json);
}
SWGFeaturePresetItem::SWGFeaturePresetItem() {
description = nullptr;
m_description_isSet = false;
}
SWGFeaturePresetItem::~SWGFeaturePresetItem() {
this->cleanup();
}
void
SWGFeaturePresetItem::init() {
description = new QString("");
m_description_isSet = false;
}
void
SWGFeaturePresetItem::cleanup() {
if(description != nullptr) {
delete description;
}
}
SWGFeaturePresetItem*
SWGFeaturePresetItem::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGFeaturePresetItem::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&description, pJson["description"], "QString", "QString");
}
QString
SWGFeaturePresetItem::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGFeaturePresetItem::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(description != nullptr && *description != QString("")){
toJsonValue(QString("description"), description, obj, QString("QString"));
}
return obj;
}
QString*
SWGFeaturePresetItem::getDescription() {
return description;
}
void
SWGFeaturePresetItem::setDescription(QString* description) {
this->description = description;
this->m_description_isSet = true;
}
bool
SWGFeaturePresetItem::isSet(){
bool isObjectUpdated = false;
do{
if(description && *description != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

Wyświetl plik

@ -0,0 +1,59 @@
/**
* 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: 6.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/*
* SWGFeaturePresetItem.h
*
* Feature settings preset item
*/
#ifndef SWGFeaturePresetItem_H_
#define SWGFeaturePresetItem_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGFeaturePresetItem: public SWGObject {
public:
SWGFeaturePresetItem();
SWGFeaturePresetItem(QString* json);
virtual ~SWGFeaturePresetItem();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGFeaturePresetItem* fromJson(QString &jsonString) override;
QString* getDescription();
void setDescription(QString* description);
virtual bool isSet() override;
private:
QString* description;
bool m_description_isSet;
};
}
#endif /* SWGFeaturePresetItem_H_ */

Wyświetl plik

@ -0,0 +1,137 @@
/**
* 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: 6.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#include "SWGFeaturePresets.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGFeaturePresets::SWGFeaturePresets(QString* json) {
init();
this->fromJson(*json);
}
SWGFeaturePresets::SWGFeaturePresets() {
nb_groups = 0;
m_nb_groups_isSet = false;
groups = nullptr;
m_groups_isSet = false;
}
SWGFeaturePresets::~SWGFeaturePresets() {
this->cleanup();
}
void
SWGFeaturePresets::init() {
nb_groups = 0;
m_nb_groups_isSet = false;
groups = new QList<SWGFeaturePresetGroup*>();
m_groups_isSet = false;
}
void
SWGFeaturePresets::cleanup() {
if(groups != nullptr) {
auto arr = groups;
for(auto o: *arr) {
delete o;
}
delete groups;
}
}
SWGFeaturePresets*
SWGFeaturePresets::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGFeaturePresets::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&nb_groups, pJson["nbGroups"], "qint32", "");
::SWGSDRangel::setValue(&groups, pJson["groups"], "QList", "SWGFeaturePresetGroup");
}
QString
SWGFeaturePresets::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGFeaturePresets::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_nb_groups_isSet){
obj->insert("nbGroups", QJsonValue(nb_groups));
}
if(groups && groups->size() > 0){
toJsonArray((QList<void*>*)groups, obj, "groups", "SWGFeaturePresetGroup");
}
return obj;
}
qint32
SWGFeaturePresets::getNbGroups() {
return nb_groups;
}
void
SWGFeaturePresets::setNbGroups(qint32 nb_groups) {
this->nb_groups = nb_groups;
this->m_nb_groups_isSet = true;
}
QList<SWGFeaturePresetGroup*>*
SWGFeaturePresets::getGroups() {
return groups;
}
void
SWGFeaturePresets::setGroups(QList<SWGFeaturePresetGroup*>* groups) {
this->groups = groups;
this->m_groups_isSet = true;
}
bool
SWGFeaturePresets::isSet(){
bool isObjectUpdated = false;
do{
if(m_nb_groups_isSet){
isObjectUpdated = true; break;
}
if(groups && (groups->size() > 0)){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

Wyświetl plik

@ -0,0 +1,66 @@
/**
* 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: 6.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/*
* SWGFeaturePresets.h
*
* Feature settings presets
*/
#ifndef SWGFeaturePresets_H_
#define SWGFeaturePresets_H_
#include <QJsonObject>
#include "SWGFeaturePresetGroup.h"
#include <QList>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGFeaturePresets: public SWGObject {
public:
SWGFeaturePresets();
SWGFeaturePresets(QString* json);
virtual ~SWGFeaturePresets();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGFeaturePresets* fromJson(QString &jsonString) override;
qint32 getNbGroups();
void setNbGroups(qint32 nb_groups);
QList<SWGFeaturePresetGroup*>* getGroups();
void setGroups(QList<SWGFeaturePresetGroup*>* groups);
virtual bool isSet() override;
private:
qint32 nb_groups;
bool m_nb_groups_isSet;
QList<SWGFeaturePresetGroup*>* groups;
bool m_groups_isSet;
};
}
#endif /* SWGFeaturePresets_H_ */

Wyświetl plik

@ -1056,6 +1056,113 @@ SWGInstanceApi::instanceDevicesCallback(SWGHttpRequestWorker * worker) {
}
}
void
SWGInstanceApi::instanceFeaturePresetDelete(SWGFeaturePresetIdentifier& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featurepreset");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "DELETE");
QString output = body.asJson();
input.request_body.append(output);
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGInstanceApi::instanceFeaturePresetDeleteCallback);
worker->execute(&input);
}
void
SWGInstanceApi::instanceFeaturePresetDeleteCallback(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);
SWGFeaturePresetIdentifier* output = static_cast<SWGFeaturePresetIdentifier*>(create(json, QString("SWGFeaturePresetIdentifier")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit instanceFeaturePresetDeleteSignal(output);
} else {
emit instanceFeaturePresetDeleteSignalE(output, error_type, error_str);
emit instanceFeaturePresetDeleteSignalEFull(worker, error_type, error_str);
}
}
void
SWGInstanceApi::instanceFeaturePresetGet() {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featurepresets");
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::instanceFeaturePresetGetCallback);
worker->execute(&input);
}
void
SWGInstanceApi::instanceFeaturePresetGetCallback(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);
SWGFeaturePresets* output = static_cast<SWGFeaturePresets*>(create(json, QString("SWGFeaturePresets")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit instanceFeaturePresetGetSignal(output);
} else {
emit instanceFeaturePresetGetSignalE(output, error_type, error_str);
emit instanceFeaturePresetGetSignalEFull(worker, error_type, error_str);
}
}
void
SWGInstanceApi::instanceFeatureSetsGet() {
QString fullPath;

Wyświetl plik

@ -23,6 +23,8 @@
#include "SWGDVSerialDevices.h"
#include "SWGDeviceSetList.h"
#include "SWGErrorResponse.h"
#include "SWGFeaturePresetIdentifier.h"
#include "SWGFeaturePresets.h"
#include "SWGFeatureSetList.h"
#include "SWGInstanceChannelsResponse.h"
#include "SWGInstanceConfigResponse.h"
@ -76,6 +78,8 @@ public:
void instanceDelete();
void instanceDeviceSetsGet();
void instanceDevices(qint32 direction);
void instanceFeaturePresetDelete(SWGFeaturePresetIdentifier& body);
void instanceFeaturePresetGet();
void instanceFeatureSetsGet();
void instanceFeatures();
void instanceLimeRFEConfigGet(QString* serial);
@ -116,6 +120,8 @@ private:
void instanceDeleteCallback (SWGHttpRequestWorker * worker);
void instanceDeviceSetsGetCallback (SWGHttpRequestWorker * worker);
void instanceDevicesCallback (SWGHttpRequestWorker * worker);
void instanceFeaturePresetDeleteCallback (SWGHttpRequestWorker * worker);
void instanceFeaturePresetGetCallback (SWGHttpRequestWorker * worker);
void instanceFeatureSetsGetCallback (SWGHttpRequestWorker * worker);
void instanceFeaturesCallback (SWGHttpRequestWorker * worker);
void instanceLimeRFEConfigGetCallback (SWGHttpRequestWorker * worker);
@ -156,6 +162,8 @@ signals:
void instanceDeleteSignal(SWGInstanceSummaryResponse* summary);
void instanceDeviceSetsGetSignal(SWGDeviceSetList* summary);
void instanceDevicesSignal(SWGInstanceDevicesResponse* summary);
void instanceFeaturePresetDeleteSignal(SWGFeaturePresetIdentifier* summary);
void instanceFeaturePresetGetSignal(SWGFeaturePresets* summary);
void instanceFeatureSetsGetSignal(SWGFeatureSetList* summary);
void instanceFeaturesSignal(SWGInstanceFeaturesResponse* summary);
void instanceLimeRFEConfigGetSignal(SWGLimeRFESettings* summary);
@ -195,6 +203,8 @@ signals:
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);
void instanceFeaturePresetDeleteSignalE(SWGFeaturePresetIdentifier* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeaturePresetGetSignalE(SWGFeaturePresets* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeatureSetsGetSignalE(SWGFeatureSetList* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeaturesSignalE(SWGInstanceFeaturesResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceLimeRFEConfigGetSignalE(SWGLimeRFESettings* summary, QNetworkReply::NetworkError error_type, QString& error_str);
@ -234,6 +244,8 @@ signals:
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);
void instanceFeaturePresetDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeaturePresetGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeatureSetsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeaturesSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceLimeRFEConfigGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);

Wyświetl plik

@ -104,6 +104,10 @@
#include "SWGFeatureActions.h"
#include "SWGFeatureConfig.h"
#include "SWGFeatureListItem.h"
#include "SWGFeaturePresetGroup.h"
#include "SWGFeaturePresetIdentifier.h"
#include "SWGFeaturePresetItem.h"
#include "SWGFeaturePresets.h"
#include "SWGFeatureReport.h"
#include "SWGFeatureSet.h"
#include "SWGFeatureSetList.h"
@ -734,6 +738,26 @@ namespace SWGSDRangel {
obj->init();
return obj;
}
if(QString("SWGFeaturePresetGroup").compare(type) == 0) {
SWGFeaturePresetGroup *obj = new SWGFeaturePresetGroup();
obj->init();
return obj;
}
if(QString("SWGFeaturePresetIdentifier").compare(type) == 0) {
SWGFeaturePresetIdentifier *obj = new SWGFeaturePresetIdentifier();
obj->init();
return obj;
}
if(QString("SWGFeaturePresetItem").compare(type) == 0) {
SWGFeaturePresetItem *obj = new SWGFeaturePresetItem();
obj->init();
return obj;
}
if(QString("SWGFeaturePresets").compare(type) == 0) {
SWGFeaturePresets *obj = new SWGFeaturePresets();
obj->init();
return obj;
}
if(QString("SWGFeatureReport").compare(type) == 0) {
SWGFeatureReport *obj = new SWGFeatureReport();
obj->init();