diff --git a/httpserver/httpdocrootsettings.h b/httpserver/httpdocrootsettings.h index 3946f6b19..ebcc73bff 100644 --- a/httpserver/httpdocrootsettings.h +++ b/httpserver/httpdocrootsettings.h @@ -8,6 +8,8 @@ #ifndef HTTPSERVER_HTTPDOCROOTSETTINGS_H_ #define HTTPSERVER_HTTPDOCROOTSETTINGS_H_ +#include + namespace qtwebapp { struct HttpDocrootSettings diff --git a/httpserver/staticfilecontroller.cpp b/httpserver/staticfilecontroller.cpp index 56dc8255e..bdc8929d0 100644 --- a/httpserver/staticfilecontroller.cpp +++ b/httpserver/staticfilecontroller.cpp @@ -61,7 +61,13 @@ StaticFileController::StaticFileController(const HttpDocrootSettings& settings, void StaticFileController::service(HttpRequest& request, HttpResponse& response) { - QByteArray path=request.getPath(); + QByteArray path = request.getPath(); + service(path, response); +} + +void StaticFileController::service(QByteArray& path, HttpResponse& response) +{ + //QByteArray path=request.getPath(); // Check if we have the file in cache qint64 now=QDateTime::currentMSecsSinceEpoch(); mutex.lock(); @@ -114,7 +120,8 @@ void StaticFileController::service(HttpRequest& request, HttpResponse& response) entry->created=now; entry->filename=path; mutex.lock(); - cache.insert(request.getPath(),entry,entry->document.size()); + //cache.insert(request.getPath(),entry,entry->document.size()); + cache.insert(path,entry,entry->document.size()); mutex.unlock(); } else diff --git a/httpserver/staticfilecontroller.h b/httpserver/staticfilecontroller.h index d7e5d4361..f369181e3 100644 --- a/httpserver/staticfilecontroller.h +++ b/httpserver/staticfilecontroller.h @@ -55,9 +55,12 @@ public: /** Constructor with settings structure */ StaticFileController(const HttpDocrootSettings& settings, QObject* parent = NULL); - /** Generates the response */ + /** Generates the response from HTTP request */ void service(HttpRequest& request, HttpResponse& response); + /** Generates the response directly from the path */ + void service(QByteArray& path, HttpResponse& response); + private: /** Encoding of text files */ diff --git a/sdrbase/CMakeLists.txt b/sdrbase/CMakeLists.txt index bb0f15be0..87da8ceec 100644 --- a/sdrbase/CMakeLists.txt +++ b/sdrbase/CMakeLists.txt @@ -234,9 +234,16 @@ endif (BUILD_DEBIAN) add_definitions(${QT_DEFINITIONS}) add_definitions(-DQT_SHARED) +set(sdrbase_RESOURCES + resources/res.qrc +) + +qt5_add_resources(sdrbase_RESOURCES_RCC ${sdrbase_RESOURCES}) + add_library(sdrbase SHARED ${sdrbase_SOURCES} ${sdrbase_HEADERS_MOC} + ${sdrbase_RESOURCES_RCC} ) include_directories( diff --git a/sdrbase/resources/index.html b/sdrbase/resources/index.html new file mode 100644 index 000000000..e4e111799 --- /dev/null +++ b/sdrbase/resources/index.html @@ -0,0 +1,9045 @@ + + + + + SDRangel + + + + + + + + + + + + + + + + +
+
+ +
+
+
+

SDRangel

+
+
+
+ +
+
+

Default

+
+
+
+

instanceAudioGet

+

+
+
+
+

+

Get audio devices list available to this instance

+

+
+
/sdrangel/audio
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET "http://localhost:10010/sdrangel/audio"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            AudioDevices result = apiInstance.instanceAudioGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceAudioGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            AudioDevices result = apiInstance.instanceAudioGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceAudioGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceAudioGetWithCompletionHandler: 
+              ^(AudioDevices output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceAudioGet(callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceAudioGetExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                AudioDevices result = apiInstance.instanceAudioGet();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceAudioGet: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+
+try {
+    $result = $api_instance->instanceAudioGet();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceAudioGet: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+
+eval { 
+    my $result = $api_instance->instanceAudioGet();
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceAudioGet: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+
+try: 
+    api_response = api_instance.instance_audio_get()
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceAudioGet: %s\n" % e)
+
+
+ +

Parameters

+ + + + + + +

Responses

+

Status: 200 - Success

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceAudioPatch

+

+
+
+
+

+

Set audio devices

+

+
+
/sdrangel/audio
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X PATCH "http://localhost:10010/sdrangel/audio"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        AudioDevicesSelect body = ; // AudioDevicesSelect | Select audio devices to use for this instance
+        try {
+            AudioDevicesSelect result = apiInstance.instanceAudioPatch(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceAudioPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        AudioDevicesSelect body = ; // AudioDevicesSelect | Select audio devices to use for this instance
+        try {
+            AudioDevicesSelect result = apiInstance.instanceAudioPatch(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceAudioPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
AudioDevicesSelect *body = ; // Select audio devices to use for this instance
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceAudioPatchWith:body
+              completionHandler: ^(AudioDevicesSelect output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var body = ; // {AudioDevicesSelect} Select audio devices to use for this instance
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceAudioPatch(body, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceAudioPatchExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new AudioDevicesSelect(); // AudioDevicesSelect | Select audio devices to use for this instance
+
+            try
+            {
+                AudioDevicesSelect result = apiInstance.instanceAudioPatch(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceAudioPatch: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$body = ; // AudioDevicesSelect | Select audio devices to use for this instance
+
+try {
+    $result = $api_instance->instanceAudioPatch($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceAudioPatch: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $body = WWW::SwaggerClient::Object::AudioDevicesSelect->new(); # AudioDevicesSelect | Select audio devices to use for this instance
+
+eval { 
+    my $result = $api_instance->instanceAudioPatch(body => $body);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceAudioPatch: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+body =  # AudioDevicesSelect | Select audio devices to use for this instance
+
+try: 
+    api_response = api_instance.instance_audio_patch(body)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceAudioPatch: %s\n" % e)
+
+
+ +

Parameters

+ + + +
Body parameters
+ + + + + + + + + +
NameDescription
body * + + + +
+
+ + + +

Responses

+

Status: 200 - Success

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceChannels

+

+
+
+
+

+

Get a list of channel plugins available in this instance

+

+
+
/sdrangel/channels
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET "http://localhost:10010/sdrangel/channels?tx="
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for Tx channels
+        try {
+            InstanceChannelsResponse result = apiInstance.instanceChannels(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceChannels");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for Tx channels
+        try {
+            InstanceChannelsResponse result = apiInstance.instanceChannels(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceChannels");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
Boolean *tx = true; // Set to true for Tx channels (optional)
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceChannelsWith:tx
+              completionHandler: ^(InstanceChannelsResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var opts = { 
+  'tx': true // {Boolean} Set to true for Tx channels
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceChannels(opts, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceChannelsExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var tx = true;  // Boolean | Set to true for Tx channels (optional) 
+
+            try
+            {
+                InstanceChannelsResponse result = apiInstance.instanceChannels(tx);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceChannels: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$tx = true; // Boolean | Set to true for Tx channels
+
+try {
+    $result = $api_instance->instanceChannels($tx);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceChannels: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $tx = true; # Boolean | Set to true for Tx channels
+
+eval { 
+    my $result = $api_instance->instanceChannels(tx => $tx);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceChannels: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+tx = true # Boolean | Set to true for Tx channels (optional)
+
+try: 
+    api_response = api_instance.instance_channels(tx=tx)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceChannels: %s\n" % e)
+
+
+ +

Parameters

+ + + + + +
Query parameters
+ + + + + + + + + +
NameDescription
tx + + +
+
+
+ + Boolean + + +
+ Set to true for Tx channels +
+
+
+
+
+ +

Responses

+

Status: 200 - Success

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceDVSerialPatch

+

+
+
+
+

+

Set or reset DV serial processing for AMBE frames decoding in digital voice modes

+

+
+
/sdrangel/dvserial
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X PATCH "http://localhost:10010/sdrangel/dvserial?dvserial="
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean dvserial = true; // Boolean | Set to true to set DV serial processing
+        try {
+            DVSeralDevices result = apiInstance.instanceDVSerialPatch(dvserial);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDVSerialPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean dvserial = true; // Boolean | Set to true to set DV serial processing
+        try {
+            DVSeralDevices result = apiInstance.instanceDVSerialPatch(dvserial);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDVSerialPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
Boolean *dvserial = true; // Set to true to set DV serial processing (optional)
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceDVSerialPatchWith:dvserial
+              completionHandler: ^(DVSeralDevices output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var opts = { 
+  'dvserial': true // {Boolean} Set to true to set DV serial processing
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceDVSerialPatch(opts, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceDVSerialPatchExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var dvserial = true;  // Boolean | Set to true to set DV serial processing (optional) 
+
+            try
+            {
+                DVSeralDevices result = apiInstance.instanceDVSerialPatch(dvserial);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceDVSerialPatch: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$dvserial = true; // Boolean | Set to true to set DV serial processing
+
+try {
+    $result = $api_instance->instanceDVSerialPatch($dvserial);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceDVSerialPatch: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $dvserial = true; # Boolean | Set to true to set DV serial processing
+
+eval { 
+    my $result = $api_instance->instanceDVSerialPatch(dvserial => $dvserial);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceDVSerialPatch: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+dvserial = true # Boolean | Set to true to set DV serial processing (optional)
+
+try: 
+    api_response = api_instance.instance_dv_serial_patch(dvserial=dvserial)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceDVSerialPatch: %s\n" % e)
+
+
+ +

Parameters

+ + + + + +
Query parameters
+ + + + + + + + + +
NameDescription
dvserial + + +
+
+
+ + Boolean + + +
+ Set to true to set DV serial processing +
+
+
+
+
+ +

Responses

+

Status: 200 - On success return list of devices or empty list if unset

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceDeviceSetsDelete

+

+
+
+
+

+

Remove last device set

+

+
+
/sdrangel/devicesets
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X DELETE "http://localhost:10010/sdrangel/devicesets"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            DeviceSetList result = apiInstance.instanceDeviceSetsDelete();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsDelete");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            DeviceSetList result = apiInstance.instanceDeviceSetsDelete();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsDelete");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceDeviceSetsDeleteWithCompletionHandler: 
+              ^(DeviceSetList output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceDeviceSetsDelete(callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceDeviceSetsDeleteExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                DeviceSetList result = apiInstance.instanceDeviceSetsDelete();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceDeviceSetsDelete: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+
+try {
+    $result = $api_instance->instanceDeviceSetsDelete();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceDeviceSetsDelete: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+
+eval { 
+    my $result = $api_instance->instanceDeviceSetsDelete();
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceDeviceSetsDelete: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+
+try: 
+    api_response = api_instance.instance_device_sets_delete()
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceDeviceSetsDelete: %s\n" % e)
+
+
+ +

Parameters

+ + + + + + +

Responses

+

Status: 200 - On success return new list of device sets

+ + + +
+
+
+ +
+ +
+
+ +

Status: 404 - No more device sets opened in this instance

+ + + +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceDeviceSetsGet

+

+
+
+
+

+

Get summary information about device sets opened in the instance

+

+
+
/sdrangel/devicesets
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET "http://localhost:10010/sdrangel/devicesets"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            DeviceSetList result = apiInstance.instanceDeviceSetsGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            DeviceSetList result = apiInstance.instanceDeviceSetsGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceDeviceSetsGetWithCompletionHandler: 
+              ^(DeviceSetList output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceDeviceSetsGet(callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceDeviceSetsGetExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                DeviceSetList result = apiInstance.instanceDeviceSetsGet();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceDeviceSetsGet: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+
+try {
+    $result = $api_instance->instanceDeviceSetsGet();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceDeviceSetsGet: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+
+eval { 
+    my $result = $api_instance->instanceDeviceSetsGet();
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceDeviceSetsGet: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+
+try: 
+    api_response = api_instance.instance_device_sets_get()
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceDeviceSetsGet: %s\n" % e)
+
+
+ +

Parameters

+ + + + + + +

Responses

+

Status: 200 - On success return device set list

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceDeviceSetsPost

+

+
+
+
+

+

Add (append) a new device set

+

+
+
/sdrangel/devicesets
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X POST "http://localhost:10010/sdrangel/devicesets?tx="
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for a Tx device set
+        try {
+            DeviceSet result = apiInstance.instanceDeviceSetsPost(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsPost");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for a Tx device set
+        try {
+            DeviceSet result = apiInstance.instanceDeviceSetsPost(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsPost");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
Boolean *tx = true; // Set to true for a Tx device set (optional)
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceDeviceSetsPostWith:tx
+              completionHandler: ^(DeviceSet output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var opts = { 
+  'tx': true // {Boolean} Set to true for a Tx device set
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceDeviceSetsPost(opts, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceDeviceSetsPostExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var tx = true;  // Boolean | Set to true for a Tx device set (optional) 
+
+            try
+            {
+                DeviceSet result = apiInstance.instanceDeviceSetsPost(tx);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceDeviceSetsPost: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$tx = true; // Boolean | Set to true for a Tx device set
+
+try {
+    $result = $api_instance->instanceDeviceSetsPost($tx);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceDeviceSetsPost: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $tx = true; # Boolean | Set to true for a Tx device set
+
+eval { 
+    my $result = $api_instance->instanceDeviceSetsPost(tx => $tx);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceDeviceSetsPost: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+tx = true # Boolean | Set to true for a Tx device set (optional)
+
+try: 
+    api_response = api_instance.instance_device_sets_post(tx=tx)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceDeviceSetsPost: %s\n" % e)
+
+
+ +

Parameters

+ + + + + +
Query parameters
+ + + + + + + + + +
NameDescription
tx + + +
+
+
+ + Boolean + + +
+ Set to true for a Tx device set +
+
+
+
+
+ +

Responses

+

Status: 200 - On success return new device set

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceDevices

+

+
+
+
+

+

Get a list of sampling devices that can be used to take part in a device set

+

+
+
/sdrangel/devices
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET "http://localhost:10010/sdrangel/devices?tx="
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for Tx direction
+        try {
+            InstanceDevicesResponse result = apiInstance.instanceDevices(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDevices");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for Tx direction
+        try {
+            InstanceDevicesResponse result = apiInstance.instanceDevices(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDevices");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
Boolean *tx = true; // Set to true for Tx direction (optional)
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceDevicesWith:tx
+              completionHandler: ^(InstanceDevicesResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var opts = { 
+  'tx': true // {Boolean} Set to true for Tx direction
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceDevices(opts, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceDevicesExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var tx = true;  // Boolean | Set to true for Tx direction (optional) 
+
+            try
+            {
+                InstanceDevicesResponse result = apiInstance.instanceDevices(tx);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceDevices: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$tx = true; // Boolean | Set to true for Tx direction
+
+try {
+    $result = $api_instance->instanceDevices($tx);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceDevices: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $tx = true; # Boolean | Set to true for Tx direction
+
+eval { 
+    my $result = $api_instance->instanceDevices(tx => $tx);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceDevices: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+tx = true # Boolean | Set to true for Tx direction (optional)
+
+try: 
+    api_response = api_instance.instance_devices(tx=tx)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceDevices: %s\n" % e)
+
+
+ +

Parameters

+ + + + + +
Query parameters
+ + + + + + + + + +
NameDescription
tx + + +
+
+
+ + Boolean + + +
+ Set to true for Tx direction +
+
+
+
+
+ +

Responses

+

Status: 200 - Success

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceLocationGet

+

+
+
+
+

+

Get instance geolocation information

+

+
+
/sdrangel/location
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET "http://localhost:10010/sdrangel/location"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            LocationInformation result = apiInstance.instanceLocationGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLocationGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            LocationInformation result = apiInstance.instanceLocationGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLocationGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceLocationGetWithCompletionHandler: 
+              ^(LocationInformation output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceLocationGet(callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceLocationGetExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                LocationInformation result = apiInstance.instanceLocationGet();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceLocationGet: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+
+try {
+    $result = $api_instance->instanceLocationGet();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceLocationGet: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+
+eval { 
+    my $result = $api_instance->instanceLocationGet();
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceLocationGet: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+
+try: 
+    api_response = api_instance.instance_location_get()
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceLocationGet: %s\n" % e)
+
+
+ +

Parameters

+ + + + + + +

Responses

+

Status: 200 - On success return location

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceLocationPut

+

+
+
+
+

+

Set instance geolocation information

+

+
+
/sdrangel/location
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X PUT "http://localhost:10010/sdrangel/location"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        LocationInformation body = ; // LocationInformation | Location of instance in latitude and longitude
+        try {
+            LocationInformation result = apiInstance.instanceLocationPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLocationPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        LocationInformation body = ; // LocationInformation | Location of instance in latitude and longitude
+        try {
+            LocationInformation result = apiInstance.instanceLocationPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLocationPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
LocationInformation *body = ; // Location of instance in latitude and longitude
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceLocationPutWith:body
+              completionHandler: ^(LocationInformation output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var body = ; // {LocationInformation} Location of instance in latitude and longitude
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceLocationPut(body, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceLocationPutExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new LocationInformation(); // LocationInformation | Location of instance in latitude and longitude
+
+            try
+            {
+                LocationInformation result = apiInstance.instanceLocationPut(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceLocationPut: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$body = ; // LocationInformation | Location of instance in latitude and longitude
+
+try {
+    $result = $api_instance->instanceLocationPut($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceLocationPut: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $body = WWW::SwaggerClient::Object::LocationInformation->new(); # LocationInformation | Location of instance in latitude and longitude
+
+eval { 
+    my $result = $api_instance->instanceLocationPut(body => $body);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceLocationPut: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+body =  # LocationInformation | Location of instance in latitude and longitude
+
+try: 
+    api_response = api_instance.instance_location_put(body)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceLocationPut: %s\n" % e)
+
+
+ +

Parameters

+ + + +
Body parameters
+ + + + + + + + + +
NameDescription
body * + + + +
+
+ + + +

Responses

+

Status: 200 - On success return location

+ + + +
+
+
+ +
+ +
+
+ +

Status: 400 - Location invalid

+ + + +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceLoggingGet

+

+
+
+
+

+

Get logging information for this instance

+

+
+
/sdrangel/logging
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET "http://localhost:10010/sdrangel/logging"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            LoggingInfo result = apiInstance.instanceLoggingGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLoggingGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            LoggingInfo result = apiInstance.instanceLoggingGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLoggingGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceLoggingGetWithCompletionHandler: 
+              ^(LoggingInfo output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceLoggingGet(callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceLoggingGetExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                LoggingInfo result = apiInstance.instanceLoggingGet();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceLoggingGet: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+
+try {
+    $result = $api_instance->instanceLoggingGet();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceLoggingGet: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+
+eval { 
+    my $result = $api_instance->instanceLoggingGet();
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceLoggingGet: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+
+try: 
+    api_response = api_instance.instance_logging_get()
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceLoggingGet: %s\n" % e)
+
+
+ +

Parameters

+ + + + + + +

Responses

+

Status: 200 - Success

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceLoggingPut

+

+
+
+
+

+

Change logging parmeters for this instance

+

+
+
/sdrangel/logging
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X PUT "http://localhost:10010/sdrangel/logging"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        LoggingInfo body = ; // LoggingInfo | Logging information
+        try {
+            LoggingInfo result = apiInstance.instanceLoggingPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLoggingPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        LoggingInfo body = ; // LoggingInfo | Logging information
+        try {
+            LoggingInfo result = apiInstance.instanceLoggingPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLoggingPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
LoggingInfo *body = ; // Logging information
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceLoggingPutWith:body
+              completionHandler: ^(LoggingInfo output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var body = ; // {LoggingInfo} Logging information
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceLoggingPut(body, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceLoggingPutExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new LoggingInfo(); // LoggingInfo | Logging information
+
+            try
+            {
+                LoggingInfo result = apiInstance.instanceLoggingPut(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceLoggingPut: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$body = ; // LoggingInfo | Logging information
+
+try {
+    $result = $api_instance->instanceLoggingPut($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceLoggingPut: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $body = WWW::SwaggerClient::Object::LoggingInfo->new(); # LoggingInfo | Logging information
+
+eval { 
+    my $result = $api_instance->instanceLoggingPut(body => $body);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceLoggingPut: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+body =  # LoggingInfo | Logging information
+
+try: 
+    api_response = api_instance.instance_logging_put(body)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceLoggingPut: %s\n" % e)
+
+
+ +

Parameters

+ + + +
Body parameters
+ + + + + + + + + +
NameDescription
body * + + + +
+
+ + + +

Responses

+

Status: 200 - Return new data on success

+ + + +
+
+
+ +
+ +
+
+ +

Status: 400 - Invallid data

+ + + +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instancePresetDelete

+

+
+
+
+

+

Deletes a preset

+

+
+
/sdrangel/preset
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X DELETE "http://localhost:10010/sdrangel/preset"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        PresetIdentifier body = ; // PresetIdentifier | delete this preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetDelete(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetDelete");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        PresetIdentifier body = ; // PresetIdentifier | delete this preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetDelete(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetDelete");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
PresetIdentifier *body = ; // delete this preset
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instancePresetDeleteWith:body
+              completionHandler: ^(PresetIdentifier output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var body = ; // {PresetIdentifier} delete this preset
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instancePresetDelete(body, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instancePresetDeleteExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new PresetIdentifier(); // PresetIdentifier | delete this preset
+
+            try
+            {
+                PresetIdentifier result = apiInstance.instancePresetDelete(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instancePresetDelete: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$body = ; // PresetIdentifier | delete this preset
+
+try {
+    $result = $api_instance->instancePresetDelete($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instancePresetDelete: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $body = WWW::SwaggerClient::Object::PresetIdentifier->new(); # PresetIdentifier | delete this preset
+
+eval { 
+    my $result = $api_instance->instancePresetDelete(body => $body);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instancePresetDelete: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+body =  # PresetIdentifier | delete this preset
+
+try: 
+    api_response = api_instance.instance_preset_delete(body)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instancePresetDelete: %s\n" % e)
+
+
+ +

Parameters

+ + + +
Body parameters
+ + + + + + + + + +
NameDescription
body * + + + +
+
+ + + +

Responses

+

Status: 200 - On success return deleted preset identification

+ + + +
+
+
+ +
+ +
+
+ +

Status: 400 - Invalid frequency

+ + + +
+
+ +

Status: 404 - Preset not found

+ + + +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instancePresetGet

+

+
+
+
+

+

List all presets in the instance

+

+
+
/sdrangel/preset
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET "http://localhost:10010/sdrangel/preset"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            Presets result = apiInstance.instancePresetGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            Presets result = apiInstance.instancePresetGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instancePresetGetWithCompletionHandler: 
+              ^(Presets output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instancePresetGet(callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instancePresetGetExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                Presets result = apiInstance.instancePresetGet();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instancePresetGet: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+
+try {
+    $result = $api_instance->instancePresetGet();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instancePresetGet: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+
+eval { 
+    my $result = $api_instance->instancePresetGet();
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instancePresetGet: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+
+try: 
+    api_response = api_instance.instance_preset_get()
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instancePresetGet: %s\n" % e)
+
+
+ +

Parameters

+ + + + + + +

Responses

+

Status: 200 - On success return preset list

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instancePresetPatch

+

+
+
+
+

+

Load a preset in a device set

+

+
+
/sdrangel/preset
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X PATCH "http://localhost:10010/sdrangel/preset"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | Load preset settings to the device set
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPatch(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | Load preset settings to the device set
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPatch(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
PresetTransfer *body = ; // Load preset settings to the device set
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instancePresetPatchWith:body
+              completionHandler: ^(PresetIdentifier output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var body = ; // {PresetTransfer} Load preset settings to the device set
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instancePresetPatch(body, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instancePresetPatchExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new PresetTransfer(); // PresetTransfer | Load preset settings to the device set
+
+            try
+            {
+                PresetIdentifier result = apiInstance.instancePresetPatch(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instancePresetPatch: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$body = ; // PresetTransfer | Load preset settings to the device set
+
+try {
+    $result = $api_instance->instancePresetPatch($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instancePresetPatch: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $body = WWW::SwaggerClient::Object::PresetTransfer->new(); # PresetTransfer | Load preset settings to the device set
+
+eval { 
+    my $result = $api_instance->instancePresetPatch(body => $body);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instancePresetPatch: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+body =  # PresetTransfer | Load preset settings to the device set
+
+try: 
+    api_response = api_instance.instance_preset_patch(body)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instancePresetPatch: %s\n" % e)
+
+
+ +

Parameters

+ + + +
Body parameters
+ + + + + + + + + +
NameDescription
body * + + + +
+
+ + + +

Responses

+

Status: 200 - On success return preset identification

+ + + +
+
+
+ +
+ +
+
+ +

Status: 400 - Invalid frequency

+ + + +
+
+ +

Status: 404 - No preset or device set found

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instancePresetPost

+

+
+
+
+

+

Create a new preset from a device set settings

+

+
+
/sdrangel/preset
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X POST "http://localhost:10010/sdrangel/preset"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | save device set settings on a new preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPost(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPost");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | save device set settings on a new preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPost(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPost");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
PresetTransfer *body = ; // save device set settings on a new preset
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instancePresetPostWith:body
+              completionHandler: ^(PresetIdentifier output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var body = ; // {PresetTransfer} save device set settings on a new preset
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instancePresetPost(body, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instancePresetPostExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new PresetTransfer(); // PresetTransfer | save device set settings on a new preset
+
+            try
+            {
+                PresetIdentifier result = apiInstance.instancePresetPost(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instancePresetPost: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$body = ; // PresetTransfer | save device set settings on a new preset
+
+try {
+    $result = $api_instance->instancePresetPost($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instancePresetPost: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $body = WWW::SwaggerClient::Object::PresetTransfer->new(); # PresetTransfer | save device set settings on a new preset
+
+eval { 
+    my $result = $api_instance->instancePresetPost(body => $body);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instancePresetPost: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+body =  # PresetTransfer | save device set settings on a new preset
+
+try: 
+    api_response = api_instance.instance_preset_post(body)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instancePresetPost: %s\n" % e)
+
+
+ +

Parameters

+ + + +
Body parameters
+ + + + + + + + + +
NameDescription
body * + + + +
+
+ + + +

Responses

+

Status: 200 - On success return preset identification

+ + + +
+
+
+ +
+ +
+
+ +

Status: 400 - Invalid frequency

+ + + +
+
+ +

Status: 404 - Device set not found

+ + + +
+
+ +

Status: 409 - Preset already exists

+ + + +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instancePresetPut

+

+
+
+
+

+

Save device set settings on a preset

+

+
+
/sdrangel/preset
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X PUT "http://localhost:10010/sdrangel/preset"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | save device set settings to the preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | save device set settings to the preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
PresetTransfer *body = ; // save device set settings to the preset
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instancePresetPutWith:body
+              completionHandler: ^(PresetIdentifier output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var body = ; // {PresetTransfer} save device set settings to the preset
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instancePresetPut(body, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instancePresetPutExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new PresetTransfer(); // PresetTransfer | save device set settings to the preset
+
+            try
+            {
+                PresetIdentifier result = apiInstance.instancePresetPut(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instancePresetPut: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+$body = ; // PresetTransfer | save device set settings to the preset
+
+try {
+    $result = $api_instance->instancePresetPut($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instancePresetPut: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+my $body = WWW::SwaggerClient::Object::PresetTransfer->new(); # PresetTransfer | save device set settings to the preset
+
+eval { 
+    my $result = $api_instance->instancePresetPut(body => $body);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instancePresetPut: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+body =  # PresetTransfer | save device set settings to the preset
+
+try: 
+    api_response = api_instance.instance_preset_put(body)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instancePresetPut: %s\n" % e)
+
+
+ +

Parameters

+ + + +
Body parameters
+ + + + + + + + + +
NameDescription
body * + + + +
+
+ + + +

Responses

+

Status: 200 - On success return preset identification

+ + + +
+
+
+ +
+ +
+
+ +

Status: 400 - Invalid frequency

+ + + +
+
+ +

Status: 404 - No preset or device set found

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+
+

instanceSummary

+

+
+
+
+

+

SDRangel instance summary

+

+
+
/sdrangel
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET "http://localhost:10010/sdrangel"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            InstanceSummaryResponse result = apiInstance.instanceSummary();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceSummary");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            InstanceSummaryResponse result = apiInstance.instanceSummary();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceSummary");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceSummaryWithCompletionHandler: 
+              ^(InstanceSummaryResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var SdRangel = require('sd_rangel');
+
+var api = new SdRangel.DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceSummary(callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class instanceSummaryExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                InstanceSummaryResponse result = apiInstance.instanceSummary();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceSummary: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\Api\DefaultApi();
+
+try {
+    $result = $api_instance->instanceSummary();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceSummary: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::DefaultApi;
+
+my $api_instance = WWW::SwaggerClient::DefaultApi->new();
+
+eval { 
+    my $result = $api_instance->instanceSummary();
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->instanceSummary: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.DefaultApi()
+
+try: 
+    api_response = api_instance.instance_summary()
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->instanceSummary: %s\n" % e)
+
+
+ +

Parameters

+ + + + + + +

Responses

+

Status: 200 - Success

+ + + +
+
+
+ +
+ +
+
+ +

Status: 500 - Error

+ + + +
+
+
+ +
+ +
+
+ +

Status: 501 - Function not implemented

+ + + +
+
+ +
+
+
+
+
+ +
+
+ Generated 2017-11-19T10:38:58.684+01:00 +
+
+
+
+
+ + + + + + + + + + + + + diff --git a/sdrbase/resources/res.qrc b/sdrbase/resources/res.qrc new file mode 100644 index 000000000..e1d46c714 --- /dev/null +++ b/sdrbase/resources/res.qrc @@ -0,0 +1,5 @@ + + + index.html + + \ No newline at end of file diff --git a/sdrbase/sdrbase.pro b/sdrbase/sdrbase.pro index 5fff9607a..5497ea6ab 100644 --- a/sdrbase/sdrbase.pro +++ b/sdrbase/sdrbase.pro @@ -200,5 +200,7 @@ HEADERS += audio/audiodeviceinfo.h\ LIBS += -L../httpserver/$${build_subdir} -lhttpserver LIBS += -L../swagger/$${build_subdir} -lswagger +RESOURCES = resources/res.qrc + CONFIG(ANDROID):CONFIG += mobility CONFIG(ANDROID):MOBILITY = diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index 4e573951b..a71d7b665 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -16,6 +16,7 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// +#include "httpdocrootsettings.h" #include "webapirequestmapper.h" #include "SWGInstanceSummaryResponse.h" #include "SWGErrorResponse.h" @@ -23,7 +24,16 @@ WebAPIRequestMapper::WebAPIRequestMapper(QObject* parent) : HttpRequestHandler(parent), m_adapter(0) -{ } +{ + qtwebapp::HttpDocrootSettings docrootSettings; + docrootSettings.path = ":/"; + m_staticFileController = new qtwebapp::StaticFileController(docrootSettings, parent); +} + +WebAPIRequestMapper::~WebAPIRequestMapper() +{ + delete m_staticFileController; +} void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) { @@ -61,7 +71,9 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http } else { - response.setStatus(404,"Not found"); + QByteArray path = "/"; + m_staticFileController->service(path, response); + //response.setStatus(404,"Not found"); } } } diff --git a/sdrbase/webapi/webapirequestmapper.h b/sdrbase/webapi/webapirequestmapper.h index e3404c868..395314853 100644 --- a/sdrbase/webapi/webapirequestmapper.h +++ b/sdrbase/webapi/webapirequestmapper.h @@ -22,17 +22,20 @@ #include "httprequesthandler.h" #include "httprequest.h" #include "httpresponse.h" +#include "staticfilecontroller.h" #include "webapiadapterinterface.h" class WebAPIRequestMapper : public qtwebapp::HttpRequestHandler { Q_OBJECT public: WebAPIRequestMapper(QObject* parent=0); + ~WebAPIRequestMapper(); void service(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void setAdapter(WebAPIAdapterInterface *adapter) { m_adapter = adapter; } private: WebAPIAdapterInterface *m_adapter; + qtwebapp::StaticFileController *m_staticFileController; }; #endif /* SDRBASE_WEBAPI_WEBAPIREQUESTMAPPER_H_ */