1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-07 08:24:43 -04:00

Web API: entry point to get all channel reports at once

This commit is contained in:
f4exb
2018-03-19 00:08:38 +01:00
parent d4e1521c90
commit 6fbbd14fd1
17 changed files with 1506 additions and 6 deletions
+485 -1
View File
@@ -807,6 +807,9 @@ margin-bottom: 20px;
"deltaFrequency" : {
"type" : "integer",
"description" : "Channel shift frequency in Hz from the center of baseband"
},
"report" : {
"$ref" : "#/definitions/ChannelReport"
}
},
"description" : "Channel summarized information"
@@ -882,6 +885,23 @@ margin-bottom: 20px;
}
},
"description" : "Base channel settings. The specific channel settings present depends on channelType."
};
defs.ChannelsDetail = {
"required" : [ "channelcount" ],
"properties" : {
"channelcount" : {
"type" : "integer",
"description" : "Number of channels in the set"
},
"channels" : {
"type" : "array",
"description" : "Channels list",
"items" : {
"$ref" : "#/definitions/Channel"
}
}
},
"description" : "All channels detailed information"
};
defs.DVSeralDevices = {
"required" : [ "nbDevices" ],
@@ -1756,6 +1776,9 @@ margin-bottom: 20px;
<li data-group="DeviceSet" data-name="devicesetChannelSettingsPut" class="">
<a href="#api-DeviceSet-devicesetChannelSettingsPut">devicesetChannelSettingsPut</a>
</li>
<li data-group="DeviceSet" data-name="devicesetChannelsReportGet" class="">
<a href="#api-DeviceSet-devicesetChannelsReportGet">devicesetChannelsReportGet</a>
</li>
<li data-group="DeviceSet" data-name="devicesetDevicePut" class="">
<a href="#api-DeviceSet-devicesetDevicePut">devicesetDevicePut</a>
</li>
@@ -4971,6 +4994,467 @@ $(document).ready(function() {
</article>
</div>
<hr>
<div id="api-DeviceSet-devicesetChannelsReportGet">
<article id="api-DeviceSet-devicesetChannelsReportGet-0" data-group="User" data-name="devicesetChannelsReportGet" data-version="0">
<div class="pull-left">
<h1>devicesetChannelsReportGet</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">get channels report</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/sdrangel/deviceset/{deviceSetIndex}/channels/report</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-DeviceSet-devicesetChannelsReportGet-0-curl">Curl</a></li>
<li class=""><a href="#examples-DeviceSet-devicesetChannelsReportGet-0-java">Java</a></li>
<li class=""><a href="#examples-DeviceSet-devicesetChannelsReportGet-0-android">Android</a></li>
<!--<li class=""><a href="#examples-DeviceSet-devicesetChannelsReportGet-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-DeviceSet-devicesetChannelsReportGet-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-DeviceSet-devicesetChannelsReportGet-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-DeviceSet-devicesetChannelsReportGet-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-DeviceSet-devicesetChannelsReportGet-0-csharp">C#</a></li>
<li class=""><a href="#examples-DeviceSet-devicesetChannelsReportGet-0-php">PHP</a></li>
<li class=""><a href="#examples-DeviceSet-devicesetChannelsReportGet-0-perl">Perl</a></li>
<li class=""><a href="#examples-DeviceSet-devicesetChannelsReportGet-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-DeviceSet-devicesetChannelsReportGet-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/channels/report"</code></pre>
</div>
<div class="tab-pane" id="examples-DeviceSet-devicesetChannelsReportGet-0-java">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.*;
import SWGSDRangel.auth.*;
import SWGSDRangel.model.*;
import SWGSDRangel.api.DeviceSetApi;
import java.io.File;
import java.util.*;
public class DeviceSetApiExample {
public static void main(String[] args) {
DeviceSetApi apiInstance = new DeviceSetApi();
Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
try {
ChannelsDetail result = apiInstance.devicesetChannelsReportGet(deviceSetIndex);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DeviceSetApi#devicesetChannelsReportGet");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-DeviceSet-devicesetChannelsReportGet-0-android">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.api.DeviceSetApi;
public class DeviceSetApiExample {
public static void main(String[] args) {
DeviceSetApi apiInstance = new DeviceSetApi();
Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
try {
ChannelsDetail result = apiInstance.devicesetChannelsReportGet(deviceSetIndex);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DeviceSetApi#devicesetChannelsReportGet");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-DeviceSet-devicesetChannelsReportGet-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-DeviceSet-devicesetChannelsReportGet-0-objc">
<pre class="prettyprint"><code class="language-cpp">Integer *deviceSetIndex = 56; // Index of device set in the device set list
DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
[apiInstance devicesetChannelsReportGetWith:deviceSetIndex
completionHandler: ^(ChannelsDetail output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-DeviceSet-devicesetChannelsReportGet-0-javascript">
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
var api = new SdRangel.DeviceSetApi()
var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.devicesetChannelsReportGet(deviceSetIndex, callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-DeviceSet-devicesetChannelsReportGet-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-DeviceSet-devicesetChannelsReportGet-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 devicesetChannelsReportGetExample
{
public void main()
{
var apiInstance = new DeviceSetApi();
var deviceSetIndex = 56; // Integer | Index of device set in the device set list
try
{
ChannelsDetail result = apiInstance.devicesetChannelsReportGet(deviceSetIndex);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DeviceSetApi.devicesetChannelsReportGet: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-DeviceSet-devicesetChannelsReportGet-0-php">
<pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DeviceSetApi();
$deviceSetIndex = 56; // Integer | Index of device set in the device set list
try {
$result = $api_instance->devicesetChannelsReportGet($deviceSetIndex);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DeviceSetApi->devicesetChannelsReportGet: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-DeviceSet-devicesetChannelsReportGet-0-perl">
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use SWGSDRangel::Configuration;
use SWGSDRangel::DeviceSetApi;
my $api_instance = SWGSDRangel::DeviceSetApi->new();
my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
eval {
my $result = $api_instance->devicesetChannelsReportGet(deviceSetIndex => $deviceSetIndex);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DeviceSetApi->devicesetChannelsReportGet: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-DeviceSet-devicesetChannelsReportGet-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.DeviceSetApi()
deviceSetIndex = 56 # Integer | Index of device set in the device set list
try:
api_response = api_instance.deviceset_channels_report_get(deviceSetIndex)
pprint(api_response)
except ApiException as e:
print("Exception when calling DeviceSetApi->devicesetChannelsReportGet: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<div class="methodsubtabletitle">Path parameters</div>
<table id="methodsubtable">
<tr>
<th width="150px">Name</th>
<th>Description</th>
</tr>
<tr><td style="width:150px;">deviceSetIndex*</td>
<td>
<div id="d2e199_devicesetChannelsReportGet_deviceSetIndex">
<div class="json-schema-view">
<div class="primitive">
<span class="type">
Integer
</span>
<div class="inner description">
Index of device set in the device set list
</div>
</div>
<div class="inner required">
Required
</div>
</div>
</div>
</td>
</tr>
</table>
<h2>Responses</h2>
<h3> Status: 200 - On success return channels report information </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-devicesetChannelsReportGet-200-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-devicesetChannelsReportGet-200-schema">
<div id='responses-devicesetChannelsReportGet-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 channels report information",
"schema" : {
"$ref" : "#/definitions/ChannelsDetail"
}
};
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-devicesetChannelsReportGet-200-schema-data').val(stringify(schema));
var result = $('#responses-devicesetChannelsReportGet-200-schema-200');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-devicesetChannelsReportGet-200-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 400 - Invalid device set index </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-devicesetChannelsReportGet-400-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-devicesetChannelsReportGet-400-schema">
<div id='responses-devicesetChannelsReportGet-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 device set index",
"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-devicesetChannelsReportGet-400-schema-data').val(stringify(schema));
var result = $('#responses-devicesetChannelsReportGet-400-schema-400');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-devicesetChannelsReportGet-400-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 404 - Device not found </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-devicesetChannelsReportGet-404-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-devicesetChannelsReportGet-404-schema">
<div id='responses-devicesetChannelsReportGet-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" : "Device 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-devicesetChannelsReportGet-404-schema-data').val(stringify(schema));
var result = $('#responses-devicesetChannelsReportGet-404-schema-404');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-devicesetChannelsReportGet-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-devicesetChannelsReportGet-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-devicesetChannelsReportGet-500-schema">
<div id='responses-devicesetChannelsReportGet-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-devicesetChannelsReportGet-500-schema-data').val(stringify(schema));
var result = $('#responses-devicesetChannelsReportGet-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-devicesetChannelsReportGet-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-devicesetChannelsReportGet-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-devicesetChannelsReportGet-501-schema">
<div id='responses-devicesetChannelsReportGet-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-devicesetChannelsReportGet-501-schema-data').val(stringify(schema));
var result = $('#responses-devicesetChannelsReportGet-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-devicesetChannelsReportGet-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
<div id="api-DeviceSet-devicesetDevicePut">
<article id="api-DeviceSet-devicesetDevicePut-0" data-group="User" data-name="devicesetDevicePut" data-version="0">
<div class="pull-left">
@@ -17472,7 +17956,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2018-03-18T11:03:22.829+01:00
Generated 2018-03-18T22:42:33.187+01:00
</div>
</div>
</div>