From aa994e180a6408f5bae46f2de2d6f09a308123c6 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 12 Jan 2020 01:43:19 +0100 Subject: [PATCH] LimeRFE USB support: REST API: generated code --- sdrbase/resources/webapi/doc/html2/index.html | 1758 ++++++++++++++++- .../resources/webapi/doc/swagger/swagger.yaml | 126 ++ swagger/sdrangel/code/html2/index.html | 1758 ++++++++++++++++- .../code/qt5/client/SWGInstanceApi.cpp | 222 +++ .../sdrangel/code/qt5/client/SWGInstanceApi.h | 23 + .../code/qt5/client/SWGLimeRFEDevice.cpp | 110 ++ .../code/qt5/client/SWGLimeRFEDevice.h | 59 + .../code/qt5/client/SWGLimeRFEDevices.cpp | 137 ++ .../code/qt5/client/SWGLimeRFEDevices.h | 66 + .../code/qt5/client/SWGLimeRFESettings.cpp | 432 ++++ .../code/qt5/client/SWGLimeRFESettings.h | 143 ++ .../code/qt5/client/SWGModelFactory.h | 12 + 12 files changed, 4844 insertions(+), 2 deletions(-) create mode 100644 swagger/sdrangel/code/qt5/client/SWGLimeRFEDevice.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGLimeRFEDevice.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGLimeRFEDevices.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGLimeRFEDevices.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGLimeRFESettings.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGLimeRFESettings.h diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index b98cb70ed..e6cb2bd00 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -3999,6 +3999,94 @@ margin-bottom: 20px; } }, "description" : "KiwiSDR" +}; + defs.LimeRFEDevice = { + "properties" : { + "deviceRef" : { + "type" : "string", + "description" : "Serial device name or server address" + } + }, + "description" : "LimeRFE device active in the system" +}; + defs.LimeRFEDevices = { + "required" : [ "nbDevices" ], + "properties" : { + "nbDevices" : { + "type" : "integer", + "description" : "Number of LimeRFE serial interfaces" + }, + "limeRFEDevices" : { + "type" : "array", + "description" : "List of LimeRFE devices", + "items" : { + "$ref" : "#/definitions/LimeRFEDevice" + } + } + }, + "description" : "List of LimeRFE devices (serial or server address)" +}; + defs.LimeRFESettings = { + "properties" : { + "devicePath" : { + "type" : "string", + "description" : "Path to the device serial interface (ex /dev/ttyUSB2)" + }, + "rxChannels" : { + "type" : "integer", + "description" : "Rx channels group (see LimeRFEController.ChannelGroups enumeration)" + }, + "rxWidebandChannel" : { + "type" : "integer" + }, + "rxHAMChannel" : { + "type" : "integer", + "description" : "Rx HAM channel selection (see LimeRFEController.HAMChannel enumeration)" + }, + "rxCellularChannel" : { + "type" : "integer", + "description" : "Rx cellular channel selection (see LimeRFEController.HAMChannel enumeration)" + }, + "rxPort" : { + "type" : "integer", + "description" : "Rx port selected (see LimeRFEController.RxPort enumeration)" + }, + "attenuationFactor" : { + "type" : "integer", + "description" : "Rx attenuation factor. Attenuation is 2 times this factor in dB (0..7 => 0..14dB)" + }, + "amfmNotch" : { + "type" : "integer" + }, + "txChannels" : { + "type" : "integer", + "description" : "Tx channels group (see LimeRFEController.ChannelGroups enumeration)" + }, + "txWidebandChannel" : { + "type" : "integer" + }, + "txHAMChannel" : { + "type" : "integer", + "description" : "Tx HAM channel selection (see LimeRFEController.HAMChannel enumeration)" + }, + "txCellularChannel" : { + "type" : "integer", + "description" : "Tx cellular channel selection (see LimeRFEController.HAMChannel enumeration)" + }, + "txPort" : { + "type" : "integer", + "description" : "Tx port selected (see LimeRFEController.TxPort enumeration)" + }, + "rxOn" : { + "type" : "integer", + "description" : "Boolean 1 if Rx is active else 0" + }, + "txOn" : { + "type" : "integer", + "description" : "Boolean 1 if Tx is active else 0" + } + }, + "description" : "LimeRFE" }; defs.LimeSdrInputReport = { "properties" : { @@ -7349,6 +7437,18 @@ margin-bottom: 20px;
  • instanceDevices
  • +
  • + instanceLimeRFEConfigGet +
  • +
  • + instanceLimeRFEConfigPut +
  • +
  • + instanceLimeRFERunPut +
  • +
  • + instanceLimeRFESerialGet +
  • instanceLocationGet
  • @@ -25080,6 +25180,1662 @@ except ApiException as e:
    +
    +
    +
    +

    instanceLimeRFEConfigGet

    +

    +
    +
    +
    +

    +

    get LimeRFE configuration

    +

    +
    +
    /sdrangel/limerfe/config
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/limerfe/config?serial="
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.InstanceApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        InstanceApi apiInstance = new InstanceApi();
    +        String serial = serial_example; // String | device serial path
    +        try {
    +            LimeRFESettings result = apiInstance.instanceLimeRFEConfigGet(serial);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFEConfigGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.InstanceApi;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        InstanceApi apiInstance = new InstanceApi();
    +        String serial = serial_example; // String | device serial path
    +        try {
    +            LimeRFESettings result = apiInstance.instanceLimeRFEConfigGet(serial);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFEConfigGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    String *serial = serial_example; // device serial path
    +
    +InstanceApi *apiInstance = [[InstanceApi alloc] init];
    +
    +[apiInstance instanceLimeRFEConfigGetWith:serial
    +              completionHandler: ^(LimeRFESettings output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.InstanceApi()
    +
    +var serial = serial_example; // {String} device serial path
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.instanceLimeRFEConfigGet(serial, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class instanceLimeRFEConfigGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new InstanceApi();
    +            var serial = serial_example;  // String | device serial path
    +
    +            try
    +            {
    +                LimeRFESettings result = apiInstance.instanceLimeRFEConfigGet(serial);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling InstanceApi.instanceLimeRFEConfigGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\InstanceApi();
    +$serial = serial_example; // String | device serial path
    +
    +try {
    +    $result = $api_instance->instanceLimeRFEConfigGet($serial);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling InstanceApi->instanceLimeRFEConfigGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::InstanceApi;
    +
    +my $api_instance = SWGSDRangel::InstanceApi->new();
    +my $serial = serial_example; # String | device serial path
    +
    +eval { 
    +    my $result = $api_instance->instanceLimeRFEConfigGet(serial => $serial);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling InstanceApi->instanceLimeRFEConfigGet: $@\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.InstanceApi()
    +serial = serial_example # String | device serial path
    +
    +try: 
    +    api_response = api_instance.instance_lime_rfe_config_get(serial)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling InstanceApi->instanceLimeRFEConfigGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + + + + + +
    Query parameters
    + + + + + + + + + +
    NameDescription
    serial* + + +
    +
    +
    + + String + + +
    + device serial path +
    +
    +
    + Required +
    +
    +
    +
    + +

    Responses

    +

    Status: 200 - On success return configuration information for the given device in input

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    instanceLimeRFEConfigPut

    +

    +
    +
    +
    +

    +

    replace LimeRFE configuration

    +

    +
    +
    /sdrangel/limerfe/config
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/limerfe/config"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.InstanceApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        InstanceApi apiInstance = new InstanceApi();
    +        LimeRFESettings body = ; // LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +        try {
    +            SuccessResponse result = apiInstance.instanceLimeRFEConfigPut(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFEConfigPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.InstanceApi;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        InstanceApi apiInstance = new InstanceApi();
    +        LimeRFESettings body = ; // LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +        try {
    +            SuccessResponse result = apiInstance.instanceLimeRFEConfigPut(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFEConfigPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    LimeRFESettings *body = ; // Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +InstanceApi *apiInstance = [[InstanceApi alloc] init];
    +
    +[apiInstance instanceLimeRFEConfigPutWith:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.InstanceApi()
    +
    +var body = ; // {LimeRFESettings} Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.instanceLimeRFEConfigPut(body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class instanceLimeRFEConfigPutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new InstanceApi();
    +            var body = new LimeRFESettings(); // LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.instanceLimeRFEConfigPut(body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling InstanceApi.instanceLimeRFEConfigPut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\InstanceApi();
    +$body = ; // LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +try {
    +    $result = $api_instance->instanceLimeRFEConfigPut($body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling InstanceApi->instanceLimeRFEConfigPut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::InstanceApi;
    +
    +my $api_instance = SWGSDRangel::InstanceApi->new();
    +my $body = SWGSDRangel::Object::LimeRFESettings->new(); # LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +eval { 
    +    my $result = $api_instance->instanceLimeRFEConfigPut(body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling InstanceApi->instanceLimeRFEConfigPut: $@\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.InstanceApi()
    +body =  # LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +try: 
    +    api_response = api_instance.instance_lime_rfe_config_put(body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling InstanceApi->instanceLimeRFEConfigPut: %s\n" % e)
    +
    +
    + +

    Parameters

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

    Responses

    +

    Status: 200 - Success

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

    Status: 400 - Error

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

    Status: 404 - LimeRFE device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    instanceLimeRFERunPut

    +

    +
    +
    +
    +

    +

    set Rx and Tx on or off

    +

    +
    +
    /sdrangel/limerfe/run
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/limerfe/run"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.InstanceApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        InstanceApi apiInstance = new InstanceApi();
    +        LimeRFESettings body = ; // LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +        try {
    +            SuccessResponse result = apiInstance.instanceLimeRFERunPut(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFERunPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.InstanceApi;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        InstanceApi apiInstance = new InstanceApi();
    +        LimeRFESettings body = ; // LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +        try {
    +            SuccessResponse result = apiInstance.instanceLimeRFERunPut(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFERunPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    LimeRFESettings *body = ; // Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +InstanceApi *apiInstance = [[InstanceApi alloc] init];
    +
    +[apiInstance instanceLimeRFERunPutWith:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.InstanceApi()
    +
    +var body = ; // {LimeRFESettings} Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.instanceLimeRFERunPut(body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class instanceLimeRFERunPutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new InstanceApi();
    +            var body = new LimeRFESettings(); // LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.instanceLimeRFERunPut(body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling InstanceApi.instanceLimeRFERunPut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\InstanceApi();
    +$body = ; // LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +try {
    +    $result = $api_instance->instanceLimeRFERunPut($body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling InstanceApi->instanceLimeRFERunPut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::InstanceApi;
    +
    +my $api_instance = SWGSDRangel::InstanceApi->new();
    +my $body = SWGSDRangel::Object::LimeRFESettings->new(); # LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +eval { 
    +    my $result = $api_instance->instanceLimeRFERunPut(body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling InstanceApi->instanceLimeRFERunPut: $@\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.InstanceApi()
    +body =  # LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +try: 
    +    api_response = api_instance.instance_lime_rfe_run_put(body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling InstanceApi->instanceLimeRFERunPut: %s\n" % e)
    +
    +
    + +

    Parameters

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

    Responses

    +

    Status: 200 - Success

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

    Status: 400 - Error

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

    Status: 404 - LimeRFE device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    instanceLimeRFESerialGet

    +

    +
    +
    +
    +

    +

    get a list of available serial interfaces to LimeRFE device

    +

    +
    +
    /sdrangel/limerfe/serial
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/limerfe/serial"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.InstanceApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        InstanceApi apiInstance = new InstanceApi();
    +        try {
    +            LimeRFEDevices result = apiInstance.instanceLimeRFESerialGet();
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFESerialGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.InstanceApi;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        InstanceApi apiInstance = new InstanceApi();
    +        try {
    +            LimeRFEDevices result = apiInstance.instanceLimeRFESerialGet();
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFESerialGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    
    +InstanceApi *apiInstance = [[InstanceApi alloc] init];
    +
    +[apiInstance instanceLimeRFESerialGetWithCompletionHandler: 
    +              ^(LimeRFEDevices output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.InstanceApi()
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.instanceLimeRFESerialGet(callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class instanceLimeRFESerialGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new InstanceApi();
    +
    +            try
    +            {
    +                LimeRFEDevices result = apiInstance.instanceLimeRFESerialGet();
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling InstanceApi.instanceLimeRFESerialGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\InstanceApi();
    +
    +try {
    +    $result = $api_instance->instanceLimeRFESerialGet();
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling InstanceApi->instanceLimeRFESerialGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::InstanceApi;
    +
    +my $api_instance = SWGSDRangel::InstanceApi->new();
    +
    +eval { 
    +    my $result = $api_instance->instanceLimeRFESerialGet();
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling InstanceApi->instanceLimeRFESerialGet: $@\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.InstanceApi()
    +
    +try: 
    +    api_response = api_instance.instance_lime_rfe_serial_get()
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling InstanceApi->instanceLimeRFESerialGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + + + + + + +

    Responses

    +

    Status: 200 - On success return list of device paths possibly empty

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -30140,7 +31896,7 @@ except ApiException as e:
    - Generated 2019-12-29T19:22:04.482+01:00 + Generated 2020-01-12T01:24:41.592+01:00
    diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index d90b830a1..bff3c9a1f 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -531,6 +531,111 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/limerfe/serial: + x-swagger-router-controller: instance + get: + description: get a list of available serial interfaces to LimeRFE device + operationId: instanceLimeRFESerialGet + tags: + - Instance + responses: + "200": + description: On success return list of device paths possibly empty + schema: + $ref: "#/definitions/LimeRFEDevices" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + + /sdrangel/limerfe/config: + x-swagger-router-controller: instance + get: + description: get LimeRFE configuration + operationId: instanceLimeRFEConfigGet + tags: + - Instance + consumes: + - application/json + parameters: + - name: serial + in: query + description: device serial path + required: true + type: string + responses: + "200": + description: On success return configuration information for the given device in input + schema: + $ref: "/doc/swagger/include/LimeRFE.yaml#/LimeRFESettings" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + put: + description: replace LimeRFE configuration + operationId: instanceLimeRFEConfigPut + tags: + - Instance + consumes: + - application/json + parameters: + - name: body + in: body + description: Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API. + required: true + schema: + $ref: "/doc/swagger/include/LimeRFE.yaml#/LimeRFESettings" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/SuccessResponse" + "400": + description: Error + schema: + $ref: "#/definitions/ErrorResponse" + "404": + description: LimeRFE device not found + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + + /sdrangel/limerfe/run: + x-swagger-router-controller: instance + put: + description: set Rx and Tx on or off + operationId: instanceLimeRFERunPut + tags: + - Instance + parameters: + - name: body + in: body + description: Give device serial path in devicePath field and run status in rxOn and txOn + required: true + schema: + $ref: "/doc/swagger/include/LimeRFE.yaml#/LimeRFESettings" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/SuccessResponse" + "400": + description: Error + schema: + $ref: "#/definitions/ErrorResponse" + "404": + description: LimeRFE device not found + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/presets: x-swagger-router-controller: instance get: @@ -1939,6 +2044,27 @@ definitions: description: "1 if device is to be removed from active list" type: integer + LimeRFEDevices: + description: "List of LimeRFE devices (serial or server address)" + required: + - nbDevices + properties: + nbDevices: + description: "Number of LimeRFE serial interfaces" + type: integer + limeRFEDevices: + description: "List of LimeRFE devices" + type: array + items: + $ref: "#/definitions/LimeRFEDevice" + + LimeRFEDevice: + description: "LimeRFE device active in the system" + properties: + deviceRef: + description: "Serial device name or server address" + type: string + Presets: description: "Settings presets" required: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index b98cb70ed..e6cb2bd00 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -3999,6 +3999,94 @@ margin-bottom: 20px; } }, "description" : "KiwiSDR" +}; + defs.LimeRFEDevice = { + "properties" : { + "deviceRef" : { + "type" : "string", + "description" : "Serial device name or server address" + } + }, + "description" : "LimeRFE device active in the system" +}; + defs.LimeRFEDevices = { + "required" : [ "nbDevices" ], + "properties" : { + "nbDevices" : { + "type" : "integer", + "description" : "Number of LimeRFE serial interfaces" + }, + "limeRFEDevices" : { + "type" : "array", + "description" : "List of LimeRFE devices", + "items" : { + "$ref" : "#/definitions/LimeRFEDevice" + } + } + }, + "description" : "List of LimeRFE devices (serial or server address)" +}; + defs.LimeRFESettings = { + "properties" : { + "devicePath" : { + "type" : "string", + "description" : "Path to the device serial interface (ex /dev/ttyUSB2)" + }, + "rxChannels" : { + "type" : "integer", + "description" : "Rx channels group (see LimeRFEController.ChannelGroups enumeration)" + }, + "rxWidebandChannel" : { + "type" : "integer" + }, + "rxHAMChannel" : { + "type" : "integer", + "description" : "Rx HAM channel selection (see LimeRFEController.HAMChannel enumeration)" + }, + "rxCellularChannel" : { + "type" : "integer", + "description" : "Rx cellular channel selection (see LimeRFEController.HAMChannel enumeration)" + }, + "rxPort" : { + "type" : "integer", + "description" : "Rx port selected (see LimeRFEController.RxPort enumeration)" + }, + "attenuationFactor" : { + "type" : "integer", + "description" : "Rx attenuation factor. Attenuation is 2 times this factor in dB (0..7 => 0..14dB)" + }, + "amfmNotch" : { + "type" : "integer" + }, + "txChannels" : { + "type" : "integer", + "description" : "Tx channels group (see LimeRFEController.ChannelGroups enumeration)" + }, + "txWidebandChannel" : { + "type" : "integer" + }, + "txHAMChannel" : { + "type" : "integer", + "description" : "Tx HAM channel selection (see LimeRFEController.HAMChannel enumeration)" + }, + "txCellularChannel" : { + "type" : "integer", + "description" : "Tx cellular channel selection (see LimeRFEController.HAMChannel enumeration)" + }, + "txPort" : { + "type" : "integer", + "description" : "Tx port selected (see LimeRFEController.TxPort enumeration)" + }, + "rxOn" : { + "type" : "integer", + "description" : "Boolean 1 if Rx is active else 0" + }, + "txOn" : { + "type" : "integer", + "description" : "Boolean 1 if Tx is active else 0" + } + }, + "description" : "LimeRFE" }; defs.LimeSdrInputReport = { "properties" : { @@ -7349,6 +7437,18 @@ margin-bottom: 20px;
  • instanceDevices
  • +
  • + instanceLimeRFEConfigGet +
  • +
  • + instanceLimeRFEConfigPut +
  • +
  • + instanceLimeRFERunPut +
  • +
  • + instanceLimeRFESerialGet +
  • instanceLocationGet
  • @@ -25080,6 +25180,1662 @@ except ApiException as e:
    +
    +
    +
    +

    instanceLimeRFEConfigGet

    +

    +
    +
    +
    +

    +

    get LimeRFE configuration

    +

    +
    +
    /sdrangel/limerfe/config
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/limerfe/config?serial="
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.InstanceApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        InstanceApi apiInstance = new InstanceApi();
    +        String serial = serial_example; // String | device serial path
    +        try {
    +            LimeRFESettings result = apiInstance.instanceLimeRFEConfigGet(serial);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFEConfigGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.InstanceApi;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        InstanceApi apiInstance = new InstanceApi();
    +        String serial = serial_example; // String | device serial path
    +        try {
    +            LimeRFESettings result = apiInstance.instanceLimeRFEConfigGet(serial);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFEConfigGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    String *serial = serial_example; // device serial path
    +
    +InstanceApi *apiInstance = [[InstanceApi alloc] init];
    +
    +[apiInstance instanceLimeRFEConfigGetWith:serial
    +              completionHandler: ^(LimeRFESettings output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.InstanceApi()
    +
    +var serial = serial_example; // {String} device serial path
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.instanceLimeRFEConfigGet(serial, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class instanceLimeRFEConfigGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new InstanceApi();
    +            var serial = serial_example;  // String | device serial path
    +
    +            try
    +            {
    +                LimeRFESettings result = apiInstance.instanceLimeRFEConfigGet(serial);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling InstanceApi.instanceLimeRFEConfigGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\InstanceApi();
    +$serial = serial_example; // String | device serial path
    +
    +try {
    +    $result = $api_instance->instanceLimeRFEConfigGet($serial);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling InstanceApi->instanceLimeRFEConfigGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::InstanceApi;
    +
    +my $api_instance = SWGSDRangel::InstanceApi->new();
    +my $serial = serial_example; # String | device serial path
    +
    +eval { 
    +    my $result = $api_instance->instanceLimeRFEConfigGet(serial => $serial);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling InstanceApi->instanceLimeRFEConfigGet: $@\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.InstanceApi()
    +serial = serial_example # String | device serial path
    +
    +try: 
    +    api_response = api_instance.instance_lime_rfe_config_get(serial)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling InstanceApi->instanceLimeRFEConfigGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + + + + + +
    Query parameters
    + + + + + + + + + +
    NameDescription
    serial* + + +
    +
    +
    + + String + + +
    + device serial path +
    +
    +
    + Required +
    +
    +
    +
    + +

    Responses

    +

    Status: 200 - On success return configuration information for the given device in input

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    instanceLimeRFEConfigPut

    +

    +
    +
    +
    +

    +

    replace LimeRFE configuration

    +

    +
    +
    /sdrangel/limerfe/config
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/limerfe/config"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.InstanceApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        InstanceApi apiInstance = new InstanceApi();
    +        LimeRFESettings body = ; // LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +        try {
    +            SuccessResponse result = apiInstance.instanceLimeRFEConfigPut(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFEConfigPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.InstanceApi;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        InstanceApi apiInstance = new InstanceApi();
    +        LimeRFESettings body = ; // LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +        try {
    +            SuccessResponse result = apiInstance.instanceLimeRFEConfigPut(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFEConfigPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    LimeRFESettings *body = ; // Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +InstanceApi *apiInstance = [[InstanceApi alloc] init];
    +
    +[apiInstance instanceLimeRFEConfigPutWith:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.InstanceApi()
    +
    +var body = ; // {LimeRFESettings} Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.instanceLimeRFEConfigPut(body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class instanceLimeRFEConfigPutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new InstanceApi();
    +            var body = new LimeRFESettings(); // LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.instanceLimeRFEConfigPut(body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling InstanceApi.instanceLimeRFEConfigPut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\InstanceApi();
    +$body = ; // LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +try {
    +    $result = $api_instance->instanceLimeRFEConfigPut($body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling InstanceApi->instanceLimeRFEConfigPut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::InstanceApi;
    +
    +my $api_instance = SWGSDRangel::InstanceApi->new();
    +my $body = SWGSDRangel::Object::LimeRFESettings->new(); # LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +eval { 
    +    my $result = $api_instance->instanceLimeRFEConfigPut(body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling InstanceApi->instanceLimeRFEConfigPut: $@\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.InstanceApi()
    +body =  # LimeRFESettings | Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
    +
    +try: 
    +    api_response = api_instance.instance_lime_rfe_config_put(body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling InstanceApi->instanceLimeRFEConfigPut: %s\n" % e)
    +
    +
    + +

    Parameters

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

    Responses

    +

    Status: 200 - Success

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

    Status: 400 - Error

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

    Status: 404 - LimeRFE device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    instanceLimeRFERunPut

    +

    +
    +
    +
    +

    +

    set Rx and Tx on or off

    +

    +
    +
    /sdrangel/limerfe/run
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/limerfe/run"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.InstanceApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        InstanceApi apiInstance = new InstanceApi();
    +        LimeRFESettings body = ; // LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +        try {
    +            SuccessResponse result = apiInstance.instanceLimeRFERunPut(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFERunPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.InstanceApi;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        InstanceApi apiInstance = new InstanceApi();
    +        LimeRFESettings body = ; // LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +        try {
    +            SuccessResponse result = apiInstance.instanceLimeRFERunPut(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFERunPut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    LimeRFESettings *body = ; // Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +InstanceApi *apiInstance = [[InstanceApi alloc] init];
    +
    +[apiInstance instanceLimeRFERunPutWith:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.InstanceApi()
    +
    +var body = ; // {LimeRFESettings} Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.instanceLimeRFERunPut(body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class instanceLimeRFERunPutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new InstanceApi();
    +            var body = new LimeRFESettings(); // LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.instanceLimeRFERunPut(body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling InstanceApi.instanceLimeRFERunPut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\InstanceApi();
    +$body = ; // LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +try {
    +    $result = $api_instance->instanceLimeRFERunPut($body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling InstanceApi->instanceLimeRFERunPut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::InstanceApi;
    +
    +my $api_instance = SWGSDRangel::InstanceApi->new();
    +my $body = SWGSDRangel::Object::LimeRFESettings->new(); # LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +eval { 
    +    my $result = $api_instance->instanceLimeRFERunPut(body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling InstanceApi->instanceLimeRFERunPut: $@\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.InstanceApi()
    +body =  # LimeRFESettings | Give device serial path in devicePath field and run status in rxOn and txOn
    +
    +try: 
    +    api_response = api_instance.instance_lime_rfe_run_put(body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling InstanceApi->instanceLimeRFERunPut: %s\n" % e)
    +
    +
    + +

    Parameters

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

    Responses

    +

    Status: 200 - Success

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

    Status: 400 - Error

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

    Status: 404 - LimeRFE device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

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

    instanceLimeRFESerialGet

    +

    +
    +
    +
    +

    +

    get a list of available serial interfaces to LimeRFE device

    +

    +
    +
    /sdrangel/limerfe/serial
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/limerfe/serial"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.InstanceApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        InstanceApi apiInstance = new InstanceApi();
    +        try {
    +            LimeRFEDevices result = apiInstance.instanceLimeRFESerialGet();
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFESerialGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.InstanceApi;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        InstanceApi apiInstance = new InstanceApi();
    +        try {
    +            LimeRFEDevices result = apiInstance.instanceLimeRFESerialGet();
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceLimeRFESerialGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    
    +InstanceApi *apiInstance = [[InstanceApi alloc] init];
    +
    +[apiInstance instanceLimeRFESerialGetWithCompletionHandler: 
    +              ^(LimeRFEDevices output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.InstanceApi()
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.instanceLimeRFESerialGet(callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class instanceLimeRFESerialGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new InstanceApi();
    +
    +            try
    +            {
    +                LimeRFEDevices result = apiInstance.instanceLimeRFESerialGet();
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling InstanceApi.instanceLimeRFESerialGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\InstanceApi();
    +
    +try {
    +    $result = $api_instance->instanceLimeRFESerialGet();
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling InstanceApi->instanceLimeRFESerialGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::InstanceApi;
    +
    +my $api_instance = SWGSDRangel::InstanceApi->new();
    +
    +eval { 
    +    my $result = $api_instance->instanceLimeRFESerialGet();
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling InstanceApi->instanceLimeRFESerialGet: $@\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.InstanceApi()
    +
    +try: 
    +    api_response = api_instance.instance_lime_rfe_serial_get()
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling InstanceApi->instanceLimeRFESerialGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + + + + + + +

    Responses

    +

    Status: 200 - On success return list of device paths possibly empty

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -30140,7 +31896,7 @@ except ApiException as e:
    - Generated 2019-12-29T19:22:04.482+01:00 + Generated 2020-01-12T01:24:41.592+01:00
    diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp index 91f74c12a..7adf415d5 100644 --- a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp @@ -1056,6 +1056,228 @@ SWGInstanceApi::instanceDevicesCallback(SWGHttpRequestWorker * worker) { } } +void +SWGInstanceApi::instanceLimeRFEConfigGet(QString* serial) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/limerfe/config"); + + + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?"); + fullPath.append(QUrl::toPercentEncoding("serial")) + .append("=") + .append(QUrl::toPercentEncoding(stringValue(serial))); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "GET"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGInstanceApi::instanceLimeRFEConfigGetCallback); + + worker->execute(&input); +} + +void +SWGInstanceApi::instanceLimeRFEConfigGetCallback(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); + SWGLimeRFESettings* output = static_cast(create(json, QString("SWGLimeRFESettings"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit instanceLimeRFEConfigGetSignal(output); + } else { + emit instanceLimeRFEConfigGetSignalE(output, error_type, error_str); + emit instanceLimeRFEConfigGetSignalEFull(worker, error_type, error_str); + } +} + +void +SWGInstanceApi::instanceLimeRFEConfigPut(SWGLimeRFESettings& body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/limerfe/config"); + + + + 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, + &SWGInstanceApi::instanceLimeRFEConfigPutCallback); + + worker->execute(&input); +} + +void +SWGInstanceApi::instanceLimeRFEConfigPutCallback(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 instanceLimeRFEConfigPutSignal(output); + } else { + emit instanceLimeRFEConfigPutSignalE(output, error_type, error_str); + emit instanceLimeRFEConfigPutSignalEFull(worker, error_type, error_str); + } +} + +void +SWGInstanceApi::instanceLimeRFERunPut(SWGLimeRFESettings& body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/limerfe/run"); + + + + 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, + &SWGInstanceApi::instanceLimeRFERunPutCallback); + + worker->execute(&input); +} + +void +SWGInstanceApi::instanceLimeRFERunPutCallback(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 instanceLimeRFERunPutSignal(output); + } else { + emit instanceLimeRFERunPutSignalE(output, error_type, error_str); + emit instanceLimeRFERunPutSignalEFull(worker, error_type, error_str); + } +} + +void +SWGInstanceApi::instanceLimeRFESerialGet() { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/limerfe/serial"); + + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "GET"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGInstanceApi::instanceLimeRFESerialGetCallback); + + worker->execute(&input); +} + +void +SWGInstanceApi::instanceLimeRFESerialGetCallback(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); + SWGLimeRFEDevices* output = static_cast(create(json, QString("SWGLimeRFEDevices"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit instanceLimeRFESerialGetSignal(output); + } else { + emit instanceLimeRFESerialGetSignalE(output, error_type, error_str); + emit instanceLimeRFESerialGetSignalEFull(worker, error_type, error_str); + } +} + void SWGInstanceApi::instanceLocationGet() { QString fullPath; diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.h b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.h index 0f5ced238..ed932c787 100644 --- a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.h +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.h @@ -15,6 +15,7 @@ #include "SWGHttpRequest.h" +#include #include "SWGAMBEDevices.h" #include "SWGAudioDevices.h" #include "SWGAudioInputDevice.h" @@ -26,6 +27,8 @@ #include "SWGInstanceConfigResponse.h" #include "SWGInstanceDevicesResponse.h" #include "SWGInstanceSummaryResponse.h" +#include "SWGLimeRFEDevices.h" +#include "SWGLimeRFESettings.h" #include "SWGLocationInformation.h" #include "SWGLoggingInfo.h" #include "SWGPresetExport.h" @@ -70,6 +73,10 @@ public: void instanceDelete(); void instanceDeviceSetsGet(); void instanceDevices(qint32 direction); + void instanceLimeRFEConfigGet(QString* serial); + void instanceLimeRFEConfigPut(SWGLimeRFESettings& body); + void instanceLimeRFERunPut(SWGLimeRFESettings& body); + void instanceLimeRFESerialGet(); void instanceLocationGet(); void instanceLocationPut(SWGLocationInformation& body); void instanceLoggingGet(); @@ -103,6 +110,10 @@ private: void instanceDeleteCallback (SWGHttpRequestWorker * worker); void instanceDeviceSetsGetCallback (SWGHttpRequestWorker * worker); void instanceDevicesCallback (SWGHttpRequestWorker * worker); + void instanceLimeRFEConfigGetCallback (SWGHttpRequestWorker * worker); + void instanceLimeRFEConfigPutCallback (SWGHttpRequestWorker * worker); + void instanceLimeRFERunPutCallback (SWGHttpRequestWorker * worker); + void instanceLimeRFESerialGetCallback (SWGHttpRequestWorker * worker); void instanceLocationGetCallback (SWGHttpRequestWorker * worker); void instanceLocationPutCallback (SWGHttpRequestWorker * worker); void instanceLoggingGetCallback (SWGHttpRequestWorker * worker); @@ -136,6 +147,10 @@ signals: void instanceDeleteSignal(SWGInstanceSummaryResponse* summary); void instanceDeviceSetsGetSignal(SWGDeviceSetList* summary); void instanceDevicesSignal(SWGInstanceDevicesResponse* summary); + void instanceLimeRFEConfigGetSignal(SWGLimeRFESettings* summary); + void instanceLimeRFEConfigPutSignal(SWGSuccessResponse* summary); + void instanceLimeRFERunPutSignal(SWGSuccessResponse* summary); + void instanceLimeRFESerialGetSignal(SWGLimeRFEDevices* summary); void instanceLocationGetSignal(SWGLocationInformation* summary); void instanceLocationPutSignal(SWGLocationInformation* summary); void instanceLoggingGetSignal(SWGLoggingInfo* summary); @@ -168,6 +183,10 @@ signals: void instanceDeleteSignalE(SWGInstanceSummaryResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDeviceSetsGetSignalE(SWGDeviceSetList* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDevicesSignalE(SWGInstanceDevicesResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void instanceLimeRFEConfigGetSignalE(SWGLimeRFESettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void instanceLimeRFEConfigPutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void instanceLimeRFERunPutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void instanceLimeRFESerialGetSignalE(SWGLimeRFEDevices* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceLocationGetSignalE(SWGLocationInformation* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceLocationPutSignalE(SWGLocationInformation* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceLoggingGetSignalE(SWGLoggingInfo* summary, QNetworkReply::NetworkError error_type, QString& error_str); @@ -200,6 +219,10 @@ signals: void instanceDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDeviceSetsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDevicesSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void instanceLimeRFEConfigGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void instanceLimeRFEConfigPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void instanceLimeRFERunPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void instanceLimeRFESerialGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceLocationGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceLocationPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceLoggingGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); diff --git a/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevice.cpp b/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevice.cpp new file mode 100644 index 000000000..9b1ae8bb4 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevice.cpp @@ -0,0 +1,110 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 5.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGLimeRFEDevice.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGLimeRFEDevice::SWGLimeRFEDevice(QString* json) { + init(); + this->fromJson(*json); +} + +SWGLimeRFEDevice::SWGLimeRFEDevice() { + device_ref = nullptr; + m_device_ref_isSet = false; +} + +SWGLimeRFEDevice::~SWGLimeRFEDevice() { + this->cleanup(); +} + +void +SWGLimeRFEDevice::init() { + device_ref = new QString(""); + m_device_ref_isSet = false; +} + +void +SWGLimeRFEDevice::cleanup() { + if(device_ref != nullptr) { + delete device_ref; + } +} + +SWGLimeRFEDevice* +SWGLimeRFEDevice::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGLimeRFEDevice::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&device_ref, pJson["deviceRef"], "QString", "QString"); + +} + +QString +SWGLimeRFEDevice::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGLimeRFEDevice::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(device_ref != nullptr && *device_ref != QString("")){ + toJsonValue(QString("deviceRef"), device_ref, obj, QString("QString")); + } + + return obj; +} + +QString* +SWGLimeRFEDevice::getDeviceRef() { + return device_ref; +} +void +SWGLimeRFEDevice::setDeviceRef(QString* device_ref) { + this->device_ref = device_ref; + this->m_device_ref_isSet = true; +} + + +bool +SWGLimeRFEDevice::isSet(){ + bool isObjectUpdated = false; + do{ + if(device_ref && *device_ref != QString("")){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevice.h b/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevice.h new file mode 100644 index 000000000..75260c468 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevice.h @@ -0,0 +1,59 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 5.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGLimeRFEDevice.h + * + * LimeRFE device active in the system + */ + +#ifndef SWGLimeRFEDevice_H_ +#define SWGLimeRFEDevice_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGLimeRFEDevice: public SWGObject { +public: + SWGLimeRFEDevice(); + SWGLimeRFEDevice(QString* json); + virtual ~SWGLimeRFEDevice(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGLimeRFEDevice* fromJson(QString &jsonString) override; + + QString* getDeviceRef(); + void setDeviceRef(QString* device_ref); + + + virtual bool isSet() override; + +private: + QString* device_ref; + bool m_device_ref_isSet; + +}; + +} + +#endif /* SWGLimeRFEDevice_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevices.cpp b/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevices.cpp new file mode 100644 index 000000000..e4f1b87a5 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevices.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.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGLimeRFEDevices.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGLimeRFEDevices::SWGLimeRFEDevices(QString* json) { + init(); + this->fromJson(*json); +} + +SWGLimeRFEDevices::SWGLimeRFEDevices() { + nb_devices = 0; + m_nb_devices_isSet = false; + lime_rfe_devices = nullptr; + m_lime_rfe_devices_isSet = false; +} + +SWGLimeRFEDevices::~SWGLimeRFEDevices() { + this->cleanup(); +} + +void +SWGLimeRFEDevices::init() { + nb_devices = 0; + m_nb_devices_isSet = false; + lime_rfe_devices = new QList(); + m_lime_rfe_devices_isSet = false; +} + +void +SWGLimeRFEDevices::cleanup() { + + if(lime_rfe_devices != nullptr) { + auto arr = lime_rfe_devices; + for(auto o: *arr) { + delete o; + } + delete lime_rfe_devices; + } +} + +SWGLimeRFEDevices* +SWGLimeRFEDevices::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGLimeRFEDevices::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&nb_devices, pJson["nbDevices"], "qint32", ""); + + + ::SWGSDRangel::setValue(&lime_rfe_devices, pJson["limeRFEDevices"], "QList", "SWGLimeRFEDevice"); +} + +QString +SWGLimeRFEDevices::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGLimeRFEDevices::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_nb_devices_isSet){ + obj->insert("nbDevices", QJsonValue(nb_devices)); + } + if(lime_rfe_devices && lime_rfe_devices->size() > 0){ + toJsonArray((QList*)lime_rfe_devices, obj, "limeRFEDevices", "SWGLimeRFEDevice"); + } + + return obj; +} + +qint32 +SWGLimeRFEDevices::getNbDevices() { + return nb_devices; +} +void +SWGLimeRFEDevices::setNbDevices(qint32 nb_devices) { + this->nb_devices = nb_devices; + this->m_nb_devices_isSet = true; +} + +QList* +SWGLimeRFEDevices::getLimeRfeDevices() { + return lime_rfe_devices; +} +void +SWGLimeRFEDevices::setLimeRfeDevices(QList* lime_rfe_devices) { + this->lime_rfe_devices = lime_rfe_devices; + this->m_lime_rfe_devices_isSet = true; +} + + +bool +SWGLimeRFEDevices::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_nb_devices_isSet){ + isObjectUpdated = true; break; + } + if(lime_rfe_devices && (lime_rfe_devices->size() > 0)){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevices.h b/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevices.h new file mode 100644 index 000000000..b7bac25ef --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGLimeRFEDevices.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.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGLimeRFEDevices.h + * + * List of LimeRFE devices (serial or server address) + */ + +#ifndef SWGLimeRFEDevices_H_ +#define SWGLimeRFEDevices_H_ + +#include + + +#include "SWGLimeRFEDevice.h" +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGLimeRFEDevices: public SWGObject { +public: + SWGLimeRFEDevices(); + SWGLimeRFEDevices(QString* json); + virtual ~SWGLimeRFEDevices(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGLimeRFEDevices* fromJson(QString &jsonString) override; + + qint32 getNbDevices(); + void setNbDevices(qint32 nb_devices); + + QList* getLimeRfeDevices(); + void setLimeRfeDevices(QList* lime_rfe_devices); + + + virtual bool isSet() override; + +private: + qint32 nb_devices; + bool m_nb_devices_isSet; + + QList* lime_rfe_devices; + bool m_lime_rfe_devices_isSet; + +}; + +} + +#endif /* SWGLimeRFEDevices_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGLimeRFESettings.cpp b/swagger/sdrangel/code/qt5/client/SWGLimeRFESettings.cpp new file mode 100644 index 000000000..b2cff2f68 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGLimeRFESettings.cpp @@ -0,0 +1,432 @@ +/** + * 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.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGLimeRFESettings.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGLimeRFESettings::SWGLimeRFESettings(QString* json) { + init(); + this->fromJson(*json); +} + +SWGLimeRFESettings::SWGLimeRFESettings() { + device_path = nullptr; + m_device_path_isSet = false; + rx_channels = 0; + m_rx_channels_isSet = false; + rx_wideband_channel = 0; + m_rx_wideband_channel_isSet = false; + rx_ham_channel = 0; + m_rx_ham_channel_isSet = false; + rx_cellular_channel = 0; + m_rx_cellular_channel_isSet = false; + rx_port = 0; + m_rx_port_isSet = false; + attenuation_factor = 0; + m_attenuation_factor_isSet = false; + amfm_notch = 0; + m_amfm_notch_isSet = false; + tx_channels = 0; + m_tx_channels_isSet = false; + tx_wideband_channel = 0; + m_tx_wideband_channel_isSet = false; + tx_ham_channel = 0; + m_tx_ham_channel_isSet = false; + tx_cellular_channel = 0; + m_tx_cellular_channel_isSet = false; + tx_port = 0; + m_tx_port_isSet = false; + rx_on = 0; + m_rx_on_isSet = false; + tx_on = 0; + m_tx_on_isSet = false; +} + +SWGLimeRFESettings::~SWGLimeRFESettings() { + this->cleanup(); +} + +void +SWGLimeRFESettings::init() { + device_path = new QString(""); + m_device_path_isSet = false; + rx_channels = 0; + m_rx_channels_isSet = false; + rx_wideband_channel = 0; + m_rx_wideband_channel_isSet = false; + rx_ham_channel = 0; + m_rx_ham_channel_isSet = false; + rx_cellular_channel = 0; + m_rx_cellular_channel_isSet = false; + rx_port = 0; + m_rx_port_isSet = false; + attenuation_factor = 0; + m_attenuation_factor_isSet = false; + amfm_notch = 0; + m_amfm_notch_isSet = false; + tx_channels = 0; + m_tx_channels_isSet = false; + tx_wideband_channel = 0; + m_tx_wideband_channel_isSet = false; + tx_ham_channel = 0; + m_tx_ham_channel_isSet = false; + tx_cellular_channel = 0; + m_tx_cellular_channel_isSet = false; + tx_port = 0; + m_tx_port_isSet = false; + rx_on = 0; + m_rx_on_isSet = false; + tx_on = 0; + m_tx_on_isSet = false; +} + +void +SWGLimeRFESettings::cleanup() { + if(device_path != nullptr) { + delete device_path; + } + + + + + + + + + + + + + + +} + +SWGLimeRFESettings* +SWGLimeRFESettings::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGLimeRFESettings::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&device_path, pJson["devicePath"], "QString", "QString"); + + ::SWGSDRangel::setValue(&rx_channels, pJson["rxChannels"], "qint32", ""); + + ::SWGSDRangel::setValue(&rx_wideband_channel, pJson["rxWidebandChannel"], "qint32", ""); + + ::SWGSDRangel::setValue(&rx_ham_channel, pJson["rxHAMChannel"], "qint32", ""); + + ::SWGSDRangel::setValue(&rx_cellular_channel, pJson["rxCellularChannel"], "qint32", ""); + + ::SWGSDRangel::setValue(&rx_port, pJson["rxPort"], "qint32", ""); + + ::SWGSDRangel::setValue(&attenuation_factor, pJson["attenuationFactor"], "qint32", ""); + + ::SWGSDRangel::setValue(&amfm_notch, pJson["amfmNotch"], "qint32", ""); + + ::SWGSDRangel::setValue(&tx_channels, pJson["txChannels"], "qint32", ""); + + ::SWGSDRangel::setValue(&tx_wideband_channel, pJson["txWidebandChannel"], "qint32", ""); + + ::SWGSDRangel::setValue(&tx_ham_channel, pJson["txHAMChannel"], "qint32", ""); + + ::SWGSDRangel::setValue(&tx_cellular_channel, pJson["txCellularChannel"], "qint32", ""); + + ::SWGSDRangel::setValue(&tx_port, pJson["txPort"], "qint32", ""); + + ::SWGSDRangel::setValue(&rx_on, pJson["rxOn"], "qint32", ""); + + ::SWGSDRangel::setValue(&tx_on, pJson["txOn"], "qint32", ""); + +} + +QString +SWGLimeRFESettings::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGLimeRFESettings::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(device_path != nullptr && *device_path != QString("")){ + toJsonValue(QString("devicePath"), device_path, obj, QString("QString")); + } + if(m_rx_channels_isSet){ + obj->insert("rxChannels", QJsonValue(rx_channels)); + } + if(m_rx_wideband_channel_isSet){ + obj->insert("rxWidebandChannel", QJsonValue(rx_wideband_channel)); + } + if(m_rx_ham_channel_isSet){ + obj->insert("rxHAMChannel", QJsonValue(rx_ham_channel)); + } + if(m_rx_cellular_channel_isSet){ + obj->insert("rxCellularChannel", QJsonValue(rx_cellular_channel)); + } + if(m_rx_port_isSet){ + obj->insert("rxPort", QJsonValue(rx_port)); + } + if(m_attenuation_factor_isSet){ + obj->insert("attenuationFactor", QJsonValue(attenuation_factor)); + } + if(m_amfm_notch_isSet){ + obj->insert("amfmNotch", QJsonValue(amfm_notch)); + } + if(m_tx_channels_isSet){ + obj->insert("txChannels", QJsonValue(tx_channels)); + } + if(m_tx_wideband_channel_isSet){ + obj->insert("txWidebandChannel", QJsonValue(tx_wideband_channel)); + } + if(m_tx_ham_channel_isSet){ + obj->insert("txHAMChannel", QJsonValue(tx_ham_channel)); + } + if(m_tx_cellular_channel_isSet){ + obj->insert("txCellularChannel", QJsonValue(tx_cellular_channel)); + } + if(m_tx_port_isSet){ + obj->insert("txPort", QJsonValue(tx_port)); + } + if(m_rx_on_isSet){ + obj->insert("rxOn", QJsonValue(rx_on)); + } + if(m_tx_on_isSet){ + obj->insert("txOn", QJsonValue(tx_on)); + } + + return obj; +} + +QString* +SWGLimeRFESettings::getDevicePath() { + return device_path; +} +void +SWGLimeRFESettings::setDevicePath(QString* device_path) { + this->device_path = device_path; + this->m_device_path_isSet = true; +} + +qint32 +SWGLimeRFESettings::getRxChannels() { + return rx_channels; +} +void +SWGLimeRFESettings::setRxChannels(qint32 rx_channels) { + this->rx_channels = rx_channels; + this->m_rx_channels_isSet = true; +} + +qint32 +SWGLimeRFESettings::getRxWidebandChannel() { + return rx_wideband_channel; +} +void +SWGLimeRFESettings::setRxWidebandChannel(qint32 rx_wideband_channel) { + this->rx_wideband_channel = rx_wideband_channel; + this->m_rx_wideband_channel_isSet = true; +} + +qint32 +SWGLimeRFESettings::getRxHamChannel() { + return rx_ham_channel; +} +void +SWGLimeRFESettings::setRxHamChannel(qint32 rx_ham_channel) { + this->rx_ham_channel = rx_ham_channel; + this->m_rx_ham_channel_isSet = true; +} + +qint32 +SWGLimeRFESettings::getRxCellularChannel() { + return rx_cellular_channel; +} +void +SWGLimeRFESettings::setRxCellularChannel(qint32 rx_cellular_channel) { + this->rx_cellular_channel = rx_cellular_channel; + this->m_rx_cellular_channel_isSet = true; +} + +qint32 +SWGLimeRFESettings::getRxPort() { + return rx_port; +} +void +SWGLimeRFESettings::setRxPort(qint32 rx_port) { + this->rx_port = rx_port; + this->m_rx_port_isSet = true; +} + +qint32 +SWGLimeRFESettings::getAttenuationFactor() { + return attenuation_factor; +} +void +SWGLimeRFESettings::setAttenuationFactor(qint32 attenuation_factor) { + this->attenuation_factor = attenuation_factor; + this->m_attenuation_factor_isSet = true; +} + +qint32 +SWGLimeRFESettings::getAmfmNotch() { + return amfm_notch; +} +void +SWGLimeRFESettings::setAmfmNotch(qint32 amfm_notch) { + this->amfm_notch = amfm_notch; + this->m_amfm_notch_isSet = true; +} + +qint32 +SWGLimeRFESettings::getTxChannels() { + return tx_channels; +} +void +SWGLimeRFESettings::setTxChannels(qint32 tx_channels) { + this->tx_channels = tx_channels; + this->m_tx_channels_isSet = true; +} + +qint32 +SWGLimeRFESettings::getTxWidebandChannel() { + return tx_wideband_channel; +} +void +SWGLimeRFESettings::setTxWidebandChannel(qint32 tx_wideband_channel) { + this->tx_wideband_channel = tx_wideband_channel; + this->m_tx_wideband_channel_isSet = true; +} + +qint32 +SWGLimeRFESettings::getTxHamChannel() { + return tx_ham_channel; +} +void +SWGLimeRFESettings::setTxHamChannel(qint32 tx_ham_channel) { + this->tx_ham_channel = tx_ham_channel; + this->m_tx_ham_channel_isSet = true; +} + +qint32 +SWGLimeRFESettings::getTxCellularChannel() { + return tx_cellular_channel; +} +void +SWGLimeRFESettings::setTxCellularChannel(qint32 tx_cellular_channel) { + this->tx_cellular_channel = tx_cellular_channel; + this->m_tx_cellular_channel_isSet = true; +} + +qint32 +SWGLimeRFESettings::getTxPort() { + return tx_port; +} +void +SWGLimeRFESettings::setTxPort(qint32 tx_port) { + this->tx_port = tx_port; + this->m_tx_port_isSet = true; +} + +qint32 +SWGLimeRFESettings::getRxOn() { + return rx_on; +} +void +SWGLimeRFESettings::setRxOn(qint32 rx_on) { + this->rx_on = rx_on; + this->m_rx_on_isSet = true; +} + +qint32 +SWGLimeRFESettings::getTxOn() { + return tx_on; +} +void +SWGLimeRFESettings::setTxOn(qint32 tx_on) { + this->tx_on = tx_on; + this->m_tx_on_isSet = true; +} + + +bool +SWGLimeRFESettings::isSet(){ + bool isObjectUpdated = false; + do{ + if(device_path && *device_path != QString("")){ + isObjectUpdated = true; break; + } + if(m_rx_channels_isSet){ + isObjectUpdated = true; break; + } + if(m_rx_wideband_channel_isSet){ + isObjectUpdated = true; break; + } + if(m_rx_ham_channel_isSet){ + isObjectUpdated = true; break; + } + if(m_rx_cellular_channel_isSet){ + isObjectUpdated = true; break; + } + if(m_rx_port_isSet){ + isObjectUpdated = true; break; + } + if(m_attenuation_factor_isSet){ + isObjectUpdated = true; break; + } + if(m_amfm_notch_isSet){ + isObjectUpdated = true; break; + } + if(m_tx_channels_isSet){ + isObjectUpdated = true; break; + } + if(m_tx_wideband_channel_isSet){ + isObjectUpdated = true; break; + } + if(m_tx_ham_channel_isSet){ + isObjectUpdated = true; break; + } + if(m_tx_cellular_channel_isSet){ + isObjectUpdated = true; break; + } + if(m_tx_port_isSet){ + isObjectUpdated = true; break; + } + if(m_rx_on_isSet){ + isObjectUpdated = true; break; + } + if(m_tx_on_isSet){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGLimeRFESettings.h b/swagger/sdrangel/code/qt5/client/SWGLimeRFESettings.h new file mode 100644 index 000000000..3bd07de22 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGLimeRFESettings.h @@ -0,0 +1,143 @@ +/** + * 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.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGLimeRFESettings.h + * + * LimeRFE + */ + +#ifndef SWGLimeRFESettings_H_ +#define SWGLimeRFESettings_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGLimeRFESettings: public SWGObject { +public: + SWGLimeRFESettings(); + SWGLimeRFESettings(QString* json); + virtual ~SWGLimeRFESettings(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGLimeRFESettings* fromJson(QString &jsonString) override; + + QString* getDevicePath(); + void setDevicePath(QString* device_path); + + qint32 getRxChannels(); + void setRxChannels(qint32 rx_channels); + + qint32 getRxWidebandChannel(); + void setRxWidebandChannel(qint32 rx_wideband_channel); + + qint32 getRxHamChannel(); + void setRxHamChannel(qint32 rx_ham_channel); + + qint32 getRxCellularChannel(); + void setRxCellularChannel(qint32 rx_cellular_channel); + + qint32 getRxPort(); + void setRxPort(qint32 rx_port); + + qint32 getAttenuationFactor(); + void setAttenuationFactor(qint32 attenuation_factor); + + qint32 getAmfmNotch(); + void setAmfmNotch(qint32 amfm_notch); + + qint32 getTxChannels(); + void setTxChannels(qint32 tx_channels); + + qint32 getTxWidebandChannel(); + void setTxWidebandChannel(qint32 tx_wideband_channel); + + qint32 getTxHamChannel(); + void setTxHamChannel(qint32 tx_ham_channel); + + qint32 getTxCellularChannel(); + void setTxCellularChannel(qint32 tx_cellular_channel); + + qint32 getTxPort(); + void setTxPort(qint32 tx_port); + + qint32 getRxOn(); + void setRxOn(qint32 rx_on); + + qint32 getTxOn(); + void setTxOn(qint32 tx_on); + + + virtual bool isSet() override; + +private: + QString* device_path; + bool m_device_path_isSet; + + qint32 rx_channels; + bool m_rx_channels_isSet; + + qint32 rx_wideband_channel; + bool m_rx_wideband_channel_isSet; + + qint32 rx_ham_channel; + bool m_rx_ham_channel_isSet; + + qint32 rx_cellular_channel; + bool m_rx_cellular_channel_isSet; + + qint32 rx_port; + bool m_rx_port_isSet; + + qint32 attenuation_factor; + bool m_attenuation_factor_isSet; + + qint32 amfm_notch; + bool m_amfm_notch_isSet; + + qint32 tx_channels; + bool m_tx_channels_isSet; + + qint32 tx_wideband_channel; + bool m_tx_wideband_channel_isSet; + + qint32 tx_ham_channel; + bool m_tx_ham_channel_isSet; + + qint32 tx_cellular_channel; + bool m_tx_cellular_channel_isSet; + + qint32 tx_port; + bool m_tx_port_isSet; + + qint32 rx_on; + bool m_rx_on_isSet; + + qint32 tx_on; + bool m_tx_on_isSet; + +}; + +} + +#endif /* SWGLimeRFESettings_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 6d013c89a..4c1ebf3e5 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -93,6 +93,9 @@ #include "SWGInterferometerSettings.h" #include "SWGKiwiSDRReport.h" #include "SWGKiwiSDRSettings.h" +#include "SWGLimeRFEDevice.h" +#include "SWGLimeRFEDevices.h" +#include "SWGLimeRFESettings.h" #include "SWGLimeSdrInputReport.h" #include "SWGLimeSdrInputSettings.h" #include "SWGLimeSdrOutputReport.h" @@ -411,6 +414,15 @@ namespace SWGSDRangel { if(QString("SWGKiwiSDRSettings").compare(type) == 0) { return new SWGKiwiSDRSettings(); } + if(QString("SWGLimeRFEDevice").compare(type) == 0) { + return new SWGLimeRFEDevice(); + } + if(QString("SWGLimeRFEDevices").compare(type) == 0) { + return new SWGLimeRFEDevices(); + } + if(QString("SWGLimeRFESettings").compare(type) == 0) { + return new SWGLimeRFESettings(); + } if(QString("SWGLimeSdrInputReport").compare(type) == 0) { return new SWGLimeSdrInputReport(); }