From 2db3ece8a851bc91639d7e0c154f55374af753dc Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 5 May 2020 11:37:11 +0200 Subject: [PATCH] REST API: generated code --- sdrbase/resources/webapi/doc/html2/index.html | 2748 ++++++++++++++++- swagger/sdrangel/code/html2/index.html | 2748 ++++++++++++++++- .../code/qt5/client/SWGDeviceSetApi.cpp | 330 ++ .../code/qt5/client/SWGDeviceSetApi.h | 32 + .../code/qt5/client/SWGGLSpectrum.cpp | 23 - .../sdrangel/code/qt5/client/SWGGLSpectrum.h | 6 - .../code/qt5/client/SWGModelFactory.h | 8 + .../code/qt5/client/SWGSpectrumServer.cpp | 137 + .../code/qt5/client/SWGSpectrumServer.h | 66 + .../qt5/client/SWGSpectrumServer_clients.cpp | 133 + .../qt5/client/SWGSpectrumServer_clients.h | 65 + .../code/qt5/client/SWGSpectrumState.cpp | 108 + .../code/qt5/client/SWGSpectrumState.h | 58 + 13 files changed, 6423 insertions(+), 39 deletions(-) create mode 100644 swagger/sdrangel/code/qt5/client/SWGSpectrumServer.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGSpectrumServer.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGSpectrumState.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGSpectrumState.h diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index eac3bc360..b090a0d0c 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -4192,10 +4192,6 @@ margin-bottom: 20px; "type" : "integer", "description" : "boolean" }, - "invert" : { - "type" : "integer", - "description" : "boolean" - }, "displayGridIntensity" : { "type" : "integer" }, @@ -7304,6 +7300,32 @@ margin-bottom: 20px; } }, "description" : "SoapySDR" +}; + defs.SpectrumServer = { + "properties" : { + "run" : { + "type" : "integer", + "description" : "Boolean: 1: websocket spectrum server running 0: not running" + }, + "clients" : { + "type" : "array", + "description" : "List of clients", + "items" : { + "$ref" : "#/definitions/SpectrumServer_clients" + } + } + }, + "description" : "Spectrum server state" +}; + defs.SpectrumServer_clients = { + "properties" : { + "address" : { + "type" : "string" + }, + "port" : { + "type" : "integer" + } + } }; defs.SuccessResponse = { "required" : [ "message" ], @@ -8568,6 +8590,24 @@ margin-bottom: 20px;
  • devicesetGet
  • +
  • + devicesetSpectrumServerDelete +
  • +
  • + devicesetSpectrumServerGet +
  • +
  • + devicesetSpectrumServerPost +
  • +
  • + devicesetSpectrumSettingsGet +
  • +
  • + devicesetSpectrumSettingsPatch +
  • +
  • + devicesetSpectrumSettingsPut +
  • instanceDeviceSetDelete
  • @@ -19611,6 +19651,2704 @@ except ApiException as e:
    +
    +
    +
    +

    devicesetSpectrumServerDelete

    +

    +
    +
    +
    +

    +

    Stop main spectrum websocket server

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/server
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X DELETE "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/server"
    +
    +
    +
    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 {
    +            SuccessResponse result = apiInstance.devicesetSpectrumServerDelete(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerDelete");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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 {
    +            SuccessResponse result = apiInstance.devicesetSpectrumServerDelete(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerDelete");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumServerDeleteWith:deviceSetIndex
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    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.devicesetSpectrumServerDelete(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumServerDeleteExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.devicesetSpectrumServerDelete(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumServerDelete: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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->devicesetSpectrumServerDelete($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumServerDelete: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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->devicesetSpectrumServerDelete(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumServerDelete: $@\n";
    +}
    +
    + +
    +
    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_spectrum_server_delete(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumServerDelete: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - Server successfully stopped

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

    Status: 400 - Invalid device set index

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

    Status: 404 - Device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    devicesetSpectrumServerGet

    +

    +
    +
    +
    +

    +

    Get main spectrum websocket server status

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/server
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/server"
    +
    +
    +
    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 {
    +            SpectrumServer result = apiInstance.devicesetSpectrumServerGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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 {
    +            SpectrumServer result = apiInstance.devicesetSpectrumServerGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumServerGetWith:deviceSetIndex
    +              completionHandler: ^(SpectrumServer output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    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.devicesetSpectrumServerGet(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumServerGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                SpectrumServer result = apiInstance.devicesetSpectrumServerGet(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumServerGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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->devicesetSpectrumServerGet($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumServerGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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->devicesetSpectrumServerGet(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumServerGet: $@\n";
    +}
    +
    + +
    +
    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_spectrum_server_get(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumServerGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - On success return main spectrum server status

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

    Status: 404 - Invalid index

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    devicesetSpectrumServerPost

    +

    +
    +
    +
    +

    +

    Start main spectrum websocket server

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/server
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/server"
    +
    +
    +
    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 {
    +            SuccessResponse result = apiInstance.devicesetSpectrumServerPost(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerPost");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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 {
    +            SuccessResponse result = apiInstance.devicesetSpectrumServerPost(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerPost");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumServerPostWith:deviceSetIndex
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    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.devicesetSpectrumServerPost(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumServerPostExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.devicesetSpectrumServerPost(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumServerPost: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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->devicesetSpectrumServerPost($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumServerPost: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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->devicesetSpectrumServerPost(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumServerPost: $@\n";
    +}
    +
    + +
    +
    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_spectrum_server_post(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumServerPost: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - Server successfully started

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

    Status: 400 - Invalid device set index

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

    Status: 404 - Device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    devicesetSpectrumSettingsGet

    +

    +
    +
    +
    +

    +

    Get main spectrum settings

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/settings
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings"
    +
    +
    +
    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 {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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 {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumSettingsGetWith:deviceSetIndex
    +              completionHandler: ^(GLSpectrum output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    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.devicesetSpectrumSettingsGet(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumSettingsGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                GLSpectrum result = apiInstance.devicesetSpectrumSettingsGet(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumSettingsGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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->devicesetSpectrumSettingsGet($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumSettingsGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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->devicesetSpectrumSettingsGet(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumSettingsGet: $@\n";
    +}
    +
    + +
    +
    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_spectrum_settings_get(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumSettingsGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - On success return details on the main spectrum

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

    Status: 404 - Invalid index

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    devicesetSpectrumSettingsPatch

    +

    +
    +
    +
    +

    +

    Apply main spectrun settings differentially (no force)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/settings
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PATCH "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings"
    +
    +
    +
    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
    +        GLSpectrum body = ; // GLSpectrum | Spectrum settings to apply
    +        try {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsPatch(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsPatch");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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
    +        GLSpectrum body = ; // GLSpectrum | Spectrum settings to apply
    +        try {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsPatch(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsPatch");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +GLSpectrum *body = ; // Spectrum settings to apply
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumSettingsPatchWith:deviceSetIndex
    +    body:body
    +              completionHandler: ^(GLSpectrum output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var body = ; // {GLSpectrum} Spectrum settings to apply
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetSpectrumSettingsPatch(deviceSetIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumSettingsPatchExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var body = new GLSpectrum(); // GLSpectrum | Spectrum settings to apply
    +
    +            try
    +            {
    +                GLSpectrum result = apiInstance.devicesetSpectrumSettingsPatch(deviceSetIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumSettingsPatch: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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
    +$body = ; // GLSpectrum | Spectrum settings to apply
    +
    +try {
    +    $result = $api_instance->devicesetSpectrumSettingsPatch($deviceSetIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumSettingsPatch: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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
    +my $body = SWGSDRangel::Object::GLSpectrum->new(); # GLSpectrum | Spectrum settings to apply
    +
    +eval { 
    +    my $result = $api_instance->devicesetSpectrumSettingsPatch(deviceSetIndex => $deviceSetIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumSettingsPatch: $@\n";
    +}
    +
    + +
    +
    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
    +body =  # GLSpectrum | Spectrum settings to apply
    +
    +try: 
    +    api_response = api_instance.deviceset_spectrum_settings_patch(deviceSetIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumSettingsPatch: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 200 - On success returns new settings values

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

    Status: 404 - Invalid device set index or device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    devicesetSpectrumSettingsPut

    +

    +
    +
    +
    +

    +

    Apply main spectrun settings unconditionnaly (force)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/settings
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings"
    +
    +
    +
    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
    +        GLSpectrum body = ; // GLSpectrum | Spectrum settings to apply
    +        try {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsPut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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
    +        GLSpectrum body = ; // GLSpectrum | Spectrum settings to apply
    +        try {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsPut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +GLSpectrum *body = ; // Spectrum settings to apply
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumSettingsPutWith:deviceSetIndex
    +    body:body
    +              completionHandler: ^(GLSpectrum output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var body = ; // {GLSpectrum} Spectrum settings to apply
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetSpectrumSettingsPut(deviceSetIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumSettingsPutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var body = new GLSpectrum(); // GLSpectrum | Spectrum settings to apply
    +
    +            try
    +            {
    +                GLSpectrum result = apiInstance.devicesetSpectrumSettingsPut(deviceSetIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumSettingsPut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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
    +$body = ; // GLSpectrum | Spectrum settings to apply
    +
    +try {
    +    $result = $api_instance->devicesetSpectrumSettingsPut($deviceSetIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumSettingsPut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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
    +my $body = SWGSDRangel::Object::GLSpectrum->new(); # GLSpectrum | Spectrum settings to apply
    +
    +eval { 
    +    my $result = $api_instance->devicesetSpectrumSettingsPut(deviceSetIndex => $deviceSetIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumSettingsPut: $@\n";
    +}
    +
    + +
    +
    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
    +body =  # GLSpectrum | Spectrum settings to apply
    +
    +try: 
    +    api_response = api_instance.deviceset_spectrum_settings_put(deviceSetIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumSettingsPut: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 200 - On success returns new settings values

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

    Status: 404 - Invalid device set index or device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -34485,7 +37223,7 @@ except ApiException as e:
    - Generated 2020-04-27T16:54:02.798+02:00 + Generated 2020-05-05T11:23:31.800+02:00
    diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index eac3bc360..b090a0d0c 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -4192,10 +4192,6 @@ margin-bottom: 20px; "type" : "integer", "description" : "boolean" }, - "invert" : { - "type" : "integer", - "description" : "boolean" - }, "displayGridIntensity" : { "type" : "integer" }, @@ -7304,6 +7300,32 @@ margin-bottom: 20px; } }, "description" : "SoapySDR" +}; + defs.SpectrumServer = { + "properties" : { + "run" : { + "type" : "integer", + "description" : "Boolean: 1: websocket spectrum server running 0: not running" + }, + "clients" : { + "type" : "array", + "description" : "List of clients", + "items" : { + "$ref" : "#/definitions/SpectrumServer_clients" + } + } + }, + "description" : "Spectrum server state" +}; + defs.SpectrumServer_clients = { + "properties" : { + "address" : { + "type" : "string" + }, + "port" : { + "type" : "integer" + } + } }; defs.SuccessResponse = { "required" : [ "message" ], @@ -8568,6 +8590,24 @@ margin-bottom: 20px;
  • devicesetGet
  • +
  • + devicesetSpectrumServerDelete +
  • +
  • + devicesetSpectrumServerGet +
  • +
  • + devicesetSpectrumServerPost +
  • +
  • + devicesetSpectrumSettingsGet +
  • +
  • + devicesetSpectrumSettingsPatch +
  • +
  • + devicesetSpectrumSettingsPut +
  • instanceDeviceSetDelete
  • @@ -19611,6 +19651,2704 @@ except ApiException as e:
    +
    +
    +
    +

    devicesetSpectrumServerDelete

    +

    +
    +
    +
    +

    +

    Stop main spectrum websocket server

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/server
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X DELETE "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/server"
    +
    +
    +
    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 {
    +            SuccessResponse result = apiInstance.devicesetSpectrumServerDelete(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerDelete");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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 {
    +            SuccessResponse result = apiInstance.devicesetSpectrumServerDelete(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerDelete");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumServerDeleteWith:deviceSetIndex
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    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.devicesetSpectrumServerDelete(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumServerDeleteExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.devicesetSpectrumServerDelete(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumServerDelete: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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->devicesetSpectrumServerDelete($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumServerDelete: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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->devicesetSpectrumServerDelete(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumServerDelete: $@\n";
    +}
    +
    + +
    +
    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_spectrum_server_delete(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumServerDelete: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - Server successfully stopped

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

    Status: 400 - Invalid device set index

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

    Status: 404 - Device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    devicesetSpectrumServerGet

    +

    +
    +
    +
    +

    +

    Get main spectrum websocket server status

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/server
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/server"
    +
    +
    +
    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 {
    +            SpectrumServer result = apiInstance.devicesetSpectrumServerGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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 {
    +            SpectrumServer result = apiInstance.devicesetSpectrumServerGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumServerGetWith:deviceSetIndex
    +              completionHandler: ^(SpectrumServer output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    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.devicesetSpectrumServerGet(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumServerGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                SpectrumServer result = apiInstance.devicesetSpectrumServerGet(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumServerGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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->devicesetSpectrumServerGet($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumServerGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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->devicesetSpectrumServerGet(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumServerGet: $@\n";
    +}
    +
    + +
    +
    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_spectrum_server_get(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumServerGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - On success return main spectrum server status

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

    Status: 404 - Invalid index

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    devicesetSpectrumServerPost

    +

    +
    +
    +
    +

    +

    Start main spectrum websocket server

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/server
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/server"
    +
    +
    +
    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 {
    +            SuccessResponse result = apiInstance.devicesetSpectrumServerPost(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerPost");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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 {
    +            SuccessResponse result = apiInstance.devicesetSpectrumServerPost(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumServerPost");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumServerPostWith:deviceSetIndex
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    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.devicesetSpectrumServerPost(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumServerPostExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.devicesetSpectrumServerPost(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumServerPost: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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->devicesetSpectrumServerPost($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumServerPost: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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->devicesetSpectrumServerPost(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumServerPost: $@\n";
    +}
    +
    + +
    +
    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_spectrum_server_post(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumServerPost: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - Server successfully started

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

    Status: 400 - Invalid device set index

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

    Status: 404 - Device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    devicesetSpectrumSettingsGet

    +

    +
    +
    +
    +

    +

    Get main spectrum settings

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/settings
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings"
    +
    +
    +
    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 {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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 {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumSettingsGetWith:deviceSetIndex
    +              completionHandler: ^(GLSpectrum output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    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.devicesetSpectrumSettingsGet(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumSettingsGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                GLSpectrum result = apiInstance.devicesetSpectrumSettingsGet(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumSettingsGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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->devicesetSpectrumSettingsGet($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumSettingsGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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->devicesetSpectrumSettingsGet(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumSettingsGet: $@\n";
    +}
    +
    + +
    +
    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_spectrum_settings_get(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumSettingsGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - On success return details on the main spectrum

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

    Status: 404 - Invalid index

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    devicesetSpectrumSettingsPatch

    +

    +
    +
    +
    +

    +

    Apply main spectrun settings differentially (no force)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/settings
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PATCH "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings"
    +
    +
    +
    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
    +        GLSpectrum body = ; // GLSpectrum | Spectrum settings to apply
    +        try {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsPatch(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsPatch");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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
    +        GLSpectrum body = ; // GLSpectrum | Spectrum settings to apply
    +        try {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsPatch(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsPatch");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +GLSpectrum *body = ; // Spectrum settings to apply
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumSettingsPatchWith:deviceSetIndex
    +    body:body
    +              completionHandler: ^(GLSpectrum output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var body = ; // {GLSpectrum} Spectrum settings to apply
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetSpectrumSettingsPatch(deviceSetIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumSettingsPatchExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var body = new GLSpectrum(); // GLSpectrum | Spectrum settings to apply
    +
    +            try
    +            {
    +                GLSpectrum result = apiInstance.devicesetSpectrumSettingsPatch(deviceSetIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumSettingsPatch: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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
    +$body = ; // GLSpectrum | Spectrum settings to apply
    +
    +try {
    +    $result = $api_instance->devicesetSpectrumSettingsPatch($deviceSetIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumSettingsPatch: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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
    +my $body = SWGSDRangel::Object::GLSpectrum->new(); # GLSpectrum | Spectrum settings to apply
    +
    +eval { 
    +    my $result = $api_instance->devicesetSpectrumSettingsPatch(deviceSetIndex => $deviceSetIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumSettingsPatch: $@\n";
    +}
    +
    + +
    +
    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
    +body =  # GLSpectrum | Spectrum settings to apply
    +
    +try: 
    +    api_response = api_instance.deviceset_spectrum_settings_patch(deviceSetIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumSettingsPatch: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 200 - On success returns new settings values

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

    Status: 404 - Invalid device set index or device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    devicesetSpectrumSettingsPut

    +

    +
    +
    +
    +

    +

    Apply main spectrun settings unconditionnaly (force)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/settings
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings"
    +
    +
    +
    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
    +        GLSpectrum body = ; // GLSpectrum | Spectrum settings to apply
    +        try {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsPut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    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
    +        GLSpectrum body = ; // GLSpectrum | Spectrum settings to apply
    +        try {
    +            GLSpectrum result = apiInstance.devicesetSpectrumSettingsPut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumSettingsPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +GLSpectrum *body = ; // Spectrum settings to apply
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumSettingsPutWith:deviceSetIndex
    +    body:body
    +              completionHandler: ^(GLSpectrum output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var body = ; // {GLSpectrum} Spectrum settings to apply
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetSpectrumSettingsPut(deviceSetIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumSettingsPutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var body = new GLSpectrum(); // GLSpectrum | Spectrum settings to apply
    +
    +            try
    +            {
    +                GLSpectrum result = apiInstance.devicesetSpectrumSettingsPut(deviceSetIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumSettingsPut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?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
    +$body = ; // GLSpectrum | Spectrum settings to apply
    +
    +try {
    +    $result = $api_instance->devicesetSpectrumSettingsPut($deviceSetIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumSettingsPut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    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
    +my $body = SWGSDRangel::Object::GLSpectrum->new(); # GLSpectrum | Spectrum settings to apply
    +
    +eval { 
    +    my $result = $api_instance->devicesetSpectrumSettingsPut(deviceSetIndex => $deviceSetIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumSettingsPut: $@\n";
    +}
    +
    + +
    +
    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
    +body =  # GLSpectrum | Spectrum settings to apply
    +
    +try: 
    +    api_response = api_instance.deviceset_spectrum_settings_put(deviceSetIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumSettingsPut: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 200 - On success returns new settings values

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

    Status: 404 - Invalid device set index or device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -34485,7 +37223,7 @@ except ApiException as e:
    - Generated 2020-04-27T16:54:02.798+02:00 + Generated 2020-05-05T11:23:31.800+02:00
    diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp index ddf289d5d..ad0a905a3 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp @@ -1270,6 +1270,336 @@ SWGDeviceSetApi::devicesetGetCallback(SWGHttpRequestWorker * worker) { } } +void +SWGDeviceSetApi::devicesetSpectrumServerDelete(qint32 device_set_index) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/server"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "DELETE"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetSpectrumServerDeleteCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetSpectrumServerDeleteCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGSuccessResponse* output = static_cast(create(json, QString("SWGSuccessResponse"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetSpectrumServerDeleteSignal(output); + } else { + emit devicesetSpectrumServerDeleteSignalE(output, error_type, error_str); + emit devicesetSpectrumServerDeleteSignalEFull(worker, error_type, error_str); + } +} + +void +SWGDeviceSetApi::devicesetSpectrumServerGet(qint32 device_set_index) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/server"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "GET"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetSpectrumServerGetCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetSpectrumServerGetCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGSpectrumServer* output = static_cast(create(json, QString("SWGSpectrumServer"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetSpectrumServerGetSignal(output); + } else { + emit devicesetSpectrumServerGetSignalE(output, error_type, error_str); + emit devicesetSpectrumServerGetSignalEFull(worker, error_type, error_str); + } +} + +void +SWGDeviceSetApi::devicesetSpectrumServerPost(qint32 device_set_index) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/server"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "POST"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetSpectrumServerPostCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetSpectrumServerPostCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGSuccessResponse* output = static_cast(create(json, QString("SWGSuccessResponse"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetSpectrumServerPostSignal(output); + } else { + emit devicesetSpectrumServerPostSignalE(output, error_type, error_str); + emit devicesetSpectrumServerPostSignalEFull(worker, error_type, error_str); + } +} + +void +SWGDeviceSetApi::devicesetSpectrumSettingsGet(qint32 device_set_index) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "GET"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetSpectrumSettingsGetCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetSpectrumSettingsGetCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGGLSpectrum* output = static_cast(create(json, QString("SWGGLSpectrum"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetSpectrumSettingsGetSignal(output); + } else { + emit devicesetSpectrumSettingsGetSignalE(output, error_type, error_str); + emit devicesetSpectrumSettingsGetSignalEFull(worker, error_type, error_str); + } +} + +void +SWGDeviceSetApi::devicesetSpectrumSettingsPatch(qint32 device_set_index, SWGGLSpectrum& body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "PATCH"); + + + + QString output = body.asJson(); + input.request_body.append(output); + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetSpectrumSettingsPatchCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetSpectrumSettingsPatchCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGGLSpectrum* output = static_cast(create(json, QString("SWGGLSpectrum"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetSpectrumSettingsPatchSignal(output); + } else { + emit devicesetSpectrumSettingsPatchSignalE(output, error_type, error_str); + emit devicesetSpectrumSettingsPatchSignalEFull(worker, error_type, error_str); + } +} + +void +SWGDeviceSetApi::devicesetSpectrumSettingsPut(qint32 device_set_index, SWGGLSpectrum& body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "PUT"); + + + + QString output = body.asJson(); + input.request_body.append(output); + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetSpectrumSettingsPutCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetSpectrumSettingsPutCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGGLSpectrum* output = static_cast(create(json, QString("SWGGLSpectrum"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetSpectrumSettingsPutSignal(output); + } else { + emit devicesetSpectrumSettingsPutSignalE(output, error_type, error_str); + emit devicesetSpectrumSettingsPutSignalEFull(worker, error_type, error_str); + } +} + void SWGDeviceSetApi::instanceDeviceSetDelete() { QString fullPath; diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h index c9d96c9e7..2797c533d 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h @@ -26,6 +26,8 @@ #include "SWGDeviceSettings.h" #include "SWGDeviceState.h" #include "SWGErrorResponse.h" +#include "SWGGLSpectrum.h" +#include "SWGSpectrumServer.h" #include "SWGSuccessResponse.h" #include @@ -66,6 +68,12 @@ public: void devicesetDeviceSubsystemRunPost(qint32 device_set_index, qint32 subsystem_index, SWGDeviceSettings& body); void devicesetFocusPatch(qint32 device_set_index); void devicesetGet(qint32 device_set_index); + void devicesetSpectrumServerDelete(qint32 device_set_index); + void devicesetSpectrumServerGet(qint32 device_set_index); + void devicesetSpectrumServerPost(qint32 device_set_index); + void devicesetSpectrumSettingsGet(qint32 device_set_index); + void devicesetSpectrumSettingsPatch(qint32 device_set_index, SWGGLSpectrum& body); + void devicesetSpectrumSettingsPut(qint32 device_set_index, SWGGLSpectrum& body); void instanceDeviceSetDelete(); void instanceDeviceSetPost(qint32 direction); @@ -92,6 +100,12 @@ private: void devicesetDeviceSubsystemRunPostCallback (SWGHttpRequestWorker * worker); void devicesetFocusPatchCallback (SWGHttpRequestWorker * worker); void devicesetGetCallback (SWGHttpRequestWorker * worker); + void devicesetSpectrumServerDeleteCallback (SWGHttpRequestWorker * worker); + void devicesetSpectrumServerGetCallback (SWGHttpRequestWorker * worker); + void devicesetSpectrumServerPostCallback (SWGHttpRequestWorker * worker); + void devicesetSpectrumSettingsGetCallback (SWGHttpRequestWorker * worker); + void devicesetSpectrumSettingsPatchCallback (SWGHttpRequestWorker * worker); + void devicesetSpectrumSettingsPutCallback (SWGHttpRequestWorker * worker); void instanceDeviceSetDeleteCallback (SWGHttpRequestWorker * worker); void instanceDeviceSetPostCallback (SWGHttpRequestWorker * worker); @@ -118,6 +132,12 @@ signals: void devicesetDeviceSubsystemRunPostSignal(SWGDeviceState* summary); void devicesetFocusPatchSignal(SWGSuccessResponse* summary); void devicesetGetSignal(SWGDeviceSet* summary); + void devicesetSpectrumServerDeleteSignal(SWGSuccessResponse* summary); + void devicesetSpectrumServerGetSignal(SWGSpectrumServer* summary); + void devicesetSpectrumServerPostSignal(SWGSuccessResponse* summary); + void devicesetSpectrumSettingsGetSignal(SWGGLSpectrum* summary); + void devicesetSpectrumSettingsPatchSignal(SWGGLSpectrum* summary); + void devicesetSpectrumSettingsPutSignal(SWGGLSpectrum* summary); void instanceDeviceSetDeleteSignal(SWGSuccessResponse* summary); void instanceDeviceSetPostSignal(SWGSuccessResponse* summary); @@ -143,6 +163,12 @@ signals: void devicesetDeviceSubsystemRunPostSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetFocusPatchSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetGetSignalE(SWGDeviceSet* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumServerDeleteSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumServerGetSignalE(SWGSpectrumServer* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumServerPostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumSettingsGetSignalE(SWGGLSpectrum* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumSettingsPatchSignalE(SWGGLSpectrum* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumSettingsPutSignalE(SWGGLSpectrum* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDeviceSetDeleteSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDeviceSetPostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); @@ -168,6 +194,12 @@ signals: void devicesetDeviceSubsystemRunPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetFocusPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumServerDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumServerGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumServerPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumSettingsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumSettingsPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumSettingsPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDeviceSetDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDeviceSetPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); diff --git a/swagger/sdrangel/code/qt5/client/SWGGLSpectrum.cpp b/swagger/sdrangel/code/qt5/client/SWGGLSpectrum.cpp index 285cbed86..0a3714f9f 100644 --- a/swagger/sdrangel/code/qt5/client/SWGGLSpectrum.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGGLSpectrum.cpp @@ -50,8 +50,6 @@ SWGGLSpectrum::SWGGLSpectrum() { m_decay_isSet = false; display_grid = 0; m_display_grid_isSet = false; - invert = 0; - m_invert_isSet = false; display_grid_intensity = 0; m_display_grid_intensity_isSet = false; decay_divisor = 0; @@ -100,8 +98,6 @@ SWGGLSpectrum::init() { m_decay_isSet = false; display_grid = 0; m_display_grid_isSet = false; - invert = 0; - m_invert_isSet = false; display_grid_intensity = 0; m_display_grid_intensity_isSet = false; decay_divisor = 0; @@ -143,7 +139,6 @@ SWGGLSpectrum::cleanup() { - } @@ -180,8 +175,6 @@ SWGGLSpectrum::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&display_grid, pJson["displayGrid"], "qint32", ""); - ::SWGSDRangel::setValue(&invert, pJson["invert"], "qint32", ""); - ::SWGSDRangel::setValue(&display_grid_intensity, pJson["displayGridIntensity"], "qint32", ""); ::SWGSDRangel::setValue(&decay_divisor, pJson["decayDivisor"], "qint32", ""); @@ -249,9 +242,6 @@ SWGGLSpectrum::asJsonObject() { if(m_display_grid_isSet){ obj->insert("displayGrid", QJsonValue(display_grid)); } - if(m_invert_isSet){ - obj->insert("invert", QJsonValue(invert)); - } if(m_display_grid_intensity_isSet){ obj->insert("displayGridIntensity", QJsonValue(display_grid_intensity)); } @@ -393,16 +383,6 @@ SWGGLSpectrum::setDisplayGrid(qint32 display_grid) { this->m_display_grid_isSet = true; } -qint32 -SWGGLSpectrum::getInvert() { - return invert; -} -void -SWGGLSpectrum::setInvert(qint32 invert) { - this->invert = invert; - this->m_invert_isSet = true; -} - qint32 SWGGLSpectrum::getDisplayGridIntensity() { return display_grid_intensity; @@ -531,9 +511,6 @@ SWGGLSpectrum::isSet(){ if(m_display_grid_isSet){ isObjectUpdated = true; break; } - if(m_invert_isSet){ - isObjectUpdated = true; break; - } if(m_display_grid_intensity_isSet){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGGLSpectrum.h b/swagger/sdrangel/code/qt5/client/SWGGLSpectrum.h index cbbf7fb13..f8f4bdd12 100644 --- a/swagger/sdrangel/code/qt5/client/SWGGLSpectrum.h +++ b/swagger/sdrangel/code/qt5/client/SWGGLSpectrum.h @@ -74,9 +74,6 @@ public: qint32 getDisplayGrid(); void setDisplayGrid(qint32 display_grid); - qint32 getInvert(); - void setInvert(qint32 invert); - qint32 getDisplayGridIntensity(); void setDisplayGridIntensity(qint32 display_grid_intensity); @@ -141,9 +138,6 @@ private: qint32 display_grid; bool m_display_grid_isSet; - qint32 invert; - bool m_invert_isSet; - qint32 display_grid_intensity; bool m_display_grid_intensity_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index ae9f99628..ff92383d4 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -180,6 +180,8 @@ #include "SWGSoapySDRInputSettings.h" #include "SWGSoapySDROutputSettings.h" #include "SWGSoapySDRReport.h" +#include "SWGSpectrumServer.h" +#include "SWGSpectrumServer_clients.h" #include "SWGSuccessResponse.h" #include "SWGTestMISettings.h" #include "SWGTestMOSyncSettings.h" @@ -705,6 +707,12 @@ namespace SWGSDRangel { if(QString("SWGSoapySDRReport").compare(type) == 0) { return new SWGSoapySDRReport(); } + if(QString("SWGSpectrumServer").compare(type) == 0) { + return new SWGSpectrumServer(); + } + if(QString("SWGSpectrumServer_clients").compare(type) == 0) { + return new SWGSpectrumServer_clients(); + } if(QString("SWGSuccessResponse").compare(type) == 0) { return new SWGSuccessResponse(); } diff --git a/swagger/sdrangel/code/qt5/client/SWGSpectrumServer.cpp b/swagger/sdrangel/code/qt5/client/SWGSpectrumServer.cpp new file mode 100644 index 000000000..7d394f9c7 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSpectrumServer.cpp @@ -0,0 +1,137 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 5.3.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGSpectrumServer.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGSpectrumServer::SWGSpectrumServer(QString* json) { + init(); + this->fromJson(*json); +} + +SWGSpectrumServer::SWGSpectrumServer() { + run = 0; + m_run_isSet = false; + clients = nullptr; + m_clients_isSet = false; +} + +SWGSpectrumServer::~SWGSpectrumServer() { + this->cleanup(); +} + +void +SWGSpectrumServer::init() { + run = 0; + m_run_isSet = false; + clients = new QList(); + m_clients_isSet = false; +} + +void +SWGSpectrumServer::cleanup() { + + if(clients != nullptr) { + auto arr = clients; + for(auto o: *arr) { + delete o; + } + delete clients; + } +} + +SWGSpectrumServer* +SWGSpectrumServer::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGSpectrumServer::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&run, pJson["run"], "qint32", ""); + + + ::SWGSDRangel::setValue(&clients, pJson["clients"], "QList", "SWGSpectrumServer_clients"); +} + +QString +SWGSpectrumServer::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGSpectrumServer::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_run_isSet){ + obj->insert("run", QJsonValue(run)); + } + if(clients && clients->size() > 0){ + toJsonArray((QList*)clients, obj, "clients", "SWGSpectrumServer_clients"); + } + + return obj; +} + +qint32 +SWGSpectrumServer::getRun() { + return run; +} +void +SWGSpectrumServer::setRun(qint32 run) { + this->run = run; + this->m_run_isSet = true; +} + +QList* +SWGSpectrumServer::getClients() { + return clients; +} +void +SWGSpectrumServer::setClients(QList* clients) { + this->clients = clients; + this->m_clients_isSet = true; +} + + +bool +SWGSpectrumServer::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_run_isSet){ + isObjectUpdated = true; break; + } + if(clients && (clients->size() > 0)){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGSpectrumServer.h b/swagger/sdrangel/code/qt5/client/SWGSpectrumServer.h new file mode 100644 index 000000000..44abe1058 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSpectrumServer.h @@ -0,0 +1,66 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 5.3.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGSpectrumServer.h + * + * Spectrum server state + */ + +#ifndef SWGSpectrumServer_H_ +#define SWGSpectrumServer_H_ + +#include + + +#include "SWGSpectrumServer_clients.h" +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGSpectrumServer: public SWGObject { +public: + SWGSpectrumServer(); + SWGSpectrumServer(QString* json); + virtual ~SWGSpectrumServer(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGSpectrumServer* fromJson(QString &jsonString) override; + + qint32 getRun(); + void setRun(qint32 run); + + QList* getClients(); + void setClients(QList* clients); + + + virtual bool isSet() override; + +private: + qint32 run; + bool m_run_isSet; + + QList* clients; + bool m_clients_isSet; + +}; + +} + +#endif /* SWGSpectrumServer_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.cpp b/swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.cpp new file mode 100644 index 000000000..5bb621623 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.cpp @@ -0,0 +1,133 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 5.3.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGSpectrumServer_clients.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGSpectrumServer_clients::SWGSpectrumServer_clients(QString* json) { + init(); + this->fromJson(*json); +} + +SWGSpectrumServer_clients::SWGSpectrumServer_clients() { + address = nullptr; + m_address_isSet = false; + port = 0; + m_port_isSet = false; +} + +SWGSpectrumServer_clients::~SWGSpectrumServer_clients() { + this->cleanup(); +} + +void +SWGSpectrumServer_clients::init() { + address = new QString(""); + m_address_isSet = false; + port = 0; + m_port_isSet = false; +} + +void +SWGSpectrumServer_clients::cleanup() { + if(address != nullptr) { + delete address; + } + +} + +SWGSpectrumServer_clients* +SWGSpectrumServer_clients::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGSpectrumServer_clients::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&address, pJson["address"], "QString", "QString"); + + ::SWGSDRangel::setValue(&port, pJson["port"], "qint32", ""); + +} + +QString +SWGSpectrumServer_clients::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGSpectrumServer_clients::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(address != nullptr && *address != QString("")){ + toJsonValue(QString("address"), address, obj, QString("QString")); + } + if(m_port_isSet){ + obj->insert("port", QJsonValue(port)); + } + + return obj; +} + +QString* +SWGSpectrumServer_clients::getAddress() { + return address; +} +void +SWGSpectrumServer_clients::setAddress(QString* address) { + this->address = address; + this->m_address_isSet = true; +} + +qint32 +SWGSpectrumServer_clients::getPort() { + return port; +} +void +SWGSpectrumServer_clients::setPort(qint32 port) { + this->port = port; + this->m_port_isSet = true; +} + + +bool +SWGSpectrumServer_clients::isSet(){ + bool isObjectUpdated = false; + do{ + if(address && *address != QString("")){ + isObjectUpdated = true; break; + } + if(m_port_isSet){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.h b/swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.h new file mode 100644 index 000000000..4d19fd409 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.h @@ -0,0 +1,65 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 5.3.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGSpectrumServer_clients.h + * + * + */ + +#ifndef SWGSpectrumServer_clients_H_ +#define SWGSpectrumServer_clients_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGSpectrumServer_clients: public SWGObject { +public: + SWGSpectrumServer_clients(); + SWGSpectrumServer_clients(QString* json); + virtual ~SWGSpectrumServer_clients(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGSpectrumServer_clients* fromJson(QString &jsonString) override; + + QString* getAddress(); + void setAddress(QString* address); + + qint32 getPort(); + void setPort(qint32 port); + + + virtual bool isSet() override; + +private: + QString* address; + bool m_address_isSet; + + qint32 port; + bool m_port_isSet; + +}; + +} + +#endif /* SWGSpectrumServer_clients_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGSpectrumState.cpp b/swagger/sdrangel/code/qt5/client/SWGSpectrumState.cpp new file mode 100644 index 000000000..ecc6b677f --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSpectrumState.cpp @@ -0,0 +1,108 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 5.3.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGSpectrumState.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGSpectrumState::SWGSpectrumState(QString* json) { + init(); + this->fromJson(*json); +} + +SWGSpectrumState::SWGSpectrumState() { + ws_spectrum = 0; + m_ws_spectrum_isSet = false; +} + +SWGSpectrumState::~SWGSpectrumState() { + this->cleanup(); +} + +void +SWGSpectrumState::init() { + ws_spectrum = 0; + m_ws_spectrum_isSet = false; +} + +void +SWGSpectrumState::cleanup() { + +} + +SWGSpectrumState* +SWGSpectrumState::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGSpectrumState::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&ws_spectrum, pJson["wsSpectrum"], "qint32", ""); + +} + +QString +SWGSpectrumState::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGSpectrumState::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_ws_spectrum_isSet){ + obj->insert("wsSpectrum", QJsonValue(ws_spectrum)); + } + + return obj; +} + +qint32 +SWGSpectrumState::getWsSpectrum() { + return ws_spectrum; +} +void +SWGSpectrumState::setWsSpectrum(qint32 ws_spectrum) { + this->ws_spectrum = ws_spectrum; + this->m_ws_spectrum_isSet = true; +} + + +bool +SWGSpectrumState::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_ws_spectrum_isSet){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGSpectrumState.h b/swagger/sdrangel/code/qt5/client/SWGSpectrumState.h new file mode 100644 index 000000000..0b74357cc --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSpectrumState.h @@ -0,0 +1,58 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 5.3.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGSpectrumState.h + * + * Spectrum running state + */ + +#ifndef SWGSpectrumState_H_ +#define SWGSpectrumState_H_ + +#include + + + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGSpectrumState: public SWGObject { +public: + SWGSpectrumState(); + SWGSpectrumState(QString* json); + virtual ~SWGSpectrumState(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGSpectrumState* fromJson(QString &jsonString) override; + + qint32 getWsSpectrum(); + void setWsSpectrum(qint32 ws_spectrum); + + + virtual bool isSet() override; + +private: + qint32 ws_spectrum; + bool m_ws_spectrum_isSet; + +}; + +} + +#endif /* SWGSpectrumState_H_ */