From c057c86ef93afd8af853994647d3992e4616dbca Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 22 May 2022 20:59:34 +0200 Subject: [PATCH] Removed instance LimeRFE API --- sdrbase/resources/webapi/doc/html2/index.html | 2018 +---------------- .../webapi/doc/swagger/include/LimeRFE.yaml | 10 - .../resources/webapi/doc/swagger/swagger.yaml | 122 - sdrbase/webapi/webapiadapter.cpp | 207 -- sdrbase/webapi/webapiadapter.h | 26 - sdrbase/webapi/webapiadapterinterface.cpp | 4 - sdrbase/webapi/webapiadapterinterface.h | 20 - sdrbase/webapi/webapirequestmapper.cpp | 287 --- sdrbase/webapi/webapirequestmapper.h | 5 - .../sdrangel/api/swagger/include/LimeRFE.yaml | 10 - swagger/sdrangel/api/swagger/swagger.yaml | 122 - swagger/sdrangel/code/html2/index.html | 2018 +---------------- .../code/qt5/client/SWGInstanceApi.cpp | 282 --- .../sdrangel/code/qt5/client/SWGInstanceApi.h | 29 - .../code/qt5/client/SWGLimeRFEPower.cpp | 131 -- .../code/qt5/client/SWGLimeRFEPower.h | 64 - .../code/qt5/client/SWGModelFactory.h | 6 - 17 files changed, 2 insertions(+), 5359 deletions(-) delete mode 100644 swagger/sdrangel/code/qt5/client/SWGLimeRFEPower.cpp delete mode 100644 swagger/sdrangel/code/qt5/client/SWGLimeRFEPower.h diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 423a2de1f..474dfdf12 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -7132,19 +7132,6 @@ margin-bottom: 20px; } }, "description" : "List of LimeRFE devices (serial or server address)" -}; - defs.LimeRFEPower = { - "properties" : { - "forward" : { - "type" : "integer", - "description" : "relative forward power in centi-Bels" - }, - "reflected" : { - "type" : "integer", - "description" : "relative reflected power in centi-Bels" - } - }, - "description" : "report of forward and reflected power measurements TO BE DECOMMISSIONED" }; defs.LimeRFEReport = { "properties" : { @@ -14814,21 +14801,6 @@ margin-bottom: 20px;
  • instanceFeatures
  • -
  • - instanceLimeRFEConfigGet -
  • -
  • - instanceLimeRFEConfigPut -
  • -
  • - instanceLimeRFEPowerGet -
  • -
  • - instanceLimeRFERunPut -
  • -
  • - instanceLimeRFESerialGet -
  • instanceLocationGet
  • @@ -51155,1994 +51127,6 @@ 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: 500 - Error

    - - - -
    -
    -
    - -
    - -
    -
    - -

    Status: 501 - Function not implemented

    - - - -
    -
    -
    - -
    - -
    -
    - -
    -
    -
    -
    -
    -
    -

    instanceLimeRFEPowerGet

    -

    -
    -
    -
    -

    -

    get forward and reflected relative powers in centi-Bels

    -

    -
    -
    /sdrangel/limerfe/power
    -

    -

    Usage and SDK Samples

    -

    - - -
    -
    -
    curl -X GET "http://localhost/sdrangel/limerfe/power?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 {
    -            LimeRFEPower result = apiInstance.instanceLimeRFEPowerGet(serial);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling InstanceApi#instanceLimeRFEPowerGet");
    -            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 {
    -            LimeRFEPower result = apiInstance.instanceLimeRFEPowerGet(serial);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling InstanceApi#instanceLimeRFEPowerGet");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    - -
    -
    String *serial = serial_example; // device serial path
    -
    -InstanceApi *apiInstance = [[InstanceApi alloc] init];
    -
    -[apiInstance instanceLimeRFEPowerGetWith:serial
    -              completionHandler: ^(LimeRFEPower 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.instanceLimeRFEPowerGet(serial, callback);
    -
    -
    - - -
    -
    using System;
    -using System.Diagnostics;
    -using SWGSDRangel.Api;
    -using SWGSDRangel.Client;
    -using SWGSDRangel.Model;
    -
    -namespace Example
    -{
    -    public class instanceLimeRFEPowerGetExample
    -    {
    -        public void main()
    -        {
    -            
    -            var apiInstance = new InstanceApi();
    -            var serial = serial_example;  // String | device serial path
    -
    -            try
    -            {
    -                LimeRFEPower result = apiInstance.instanceLimeRFEPowerGet(serial);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling InstanceApi.instanceLimeRFEPowerGet: " + 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->instanceLimeRFEPowerGet($serial);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling InstanceApi->instanceLimeRFEPowerGet: ', $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->instanceLimeRFEPowerGet(serial => $serial);
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling InstanceApi->instanceLimeRFEPowerGet: $@\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_power_get(serial)
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling InstanceApi->instanceLimeRFEPowerGet: %s\n" % e)
    -
    -
    - -

    Parameters

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

    Responses

    -

    Status: 200 - On success return forward and reflected powers in centi-Bels

    - - - -
    -
    -
    - -
    - -
    -
    - -

    Status: 400 - Error

    - - - -
    -
    -
    - -
    - -
    -
    - -

    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: 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

    - - - -
    -
    -
    - -
    - -
    -
    - -
    -
    -
    @@ -59777,7 +57761,7 @@ except ApiException as e:
    - Generated 2022-05-22T12:29:41.738+02:00 + Generated 2022-05-22T20:12:13.506+02:00
    diff --git a/sdrbase/resources/webapi/doc/swagger/include/LimeRFE.yaml b/sdrbase/resources/webapi/doc/swagger/include/LimeRFE.yaml index bee219f91..8757eb8ee 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/LimeRFE.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/LimeRFE.yaml @@ -172,13 +172,3 @@ LimeRFEActions: Open or close device * 0 - Close device * 1 - Open device - -LimeRFEPower: - description: report of forward and reflected power measurements TO BE DECOMMISSIONED - properties: - forward: - description: relative forward power in centi-Bels - type: integer - reflected: - description: relative reflected power in centi-Bels - type: integer diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index a81ae6e1a..5c3799cfe 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -548,128 +548,6 @@ 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 - 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" - "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" - "500": - $ref: "#/responses/Response_500" - "501": - $ref: "#/responses/Response_501" - - /sdrangel/limerfe/power: - x-swagger-router-controller: instance - get: - description: get forward and reflected relative powers in centi-Bels - operationId: instanceLimeRFEPowerGet - tags: - - Instance - parameters: - - name: serial - in: query - description: device serial path - required: true - type: string - responses: - "200": - description: On success return forward and reflected powers in centi-Bels - schema: - $ref: "/doc/swagger/include/LimeRFE.yaml#/LimeRFEPower" - "400": - description: Error - schema: - $ref: "#/definitions/ErrorResponse" - "500": - $ref: "#/responses/Response_500" - "501": - $ref: "#/responses/Response_501" - /sdrangel/presets: x-swagger-router-controller: instance get: diff --git a/sdrbase/webapi/webapiadapter.cpp b/sdrbase/webapi/webapiadapter.cpp index ff92d1761..b7c30ad7f 100644 --- a/sdrbase/webapi/webapiadapter.cpp +++ b/sdrbase/webapi/webapiadapter.cpp @@ -79,7 +79,6 @@ #include "SWGDeviceState.h" #include "SWGLimeRFEDevices.h" #include "SWGLimeRFESettings.h" -#include "SWGLimeRFEPower.h" #include "SWGFeaturePresets.h" #include "SWGFeaturePresetGroup.h" #include "SWGFeaturePresetItem.h" @@ -88,10 +87,6 @@ #include "SWGFeatureReport.h" #include "SWGFeatureActions.h" -#ifdef HAS_LIMERFEUSB -#include "limerfe/limerfecontroller.h" -#endif - #include "webapiadapter.h" WebAPIAdapter::WebAPIAdapter() @@ -934,208 +929,6 @@ int WebAPIAdapter::instanceAMBEDevicesPatch( return 200; } -#ifdef HAS_LIMERFEUSB -int WebAPIAdapter::instanceLimeRFESerialGet( - SWGSDRangel::SWGLimeRFEDevices& response, - SWGSDRangel::SWGErrorResponse& error) -{ - (void) error; - response.init(); - std::vector comPorts; - SerialUtil::getComPorts(comPorts, "ttyUSB[0-9]+"); // regex is for Linux only - response.setNbDevices((int) comPorts.size()); - QList *deviceNamesList = response.getLimeRfeDevices(); - std::vector::iterator it = comPorts.begin(); - - while (it != comPorts.end()) - { - deviceNamesList->append(new SWGSDRangel::SWGLimeRFEDevice); - deviceNamesList->back()->init(); - *deviceNamesList->back()->getDeviceRef() = QString::fromStdString(*it); - ++it; - } - - return 200; -} - -int WebAPIAdapter::instanceLimeRFEConfigGet( - const QString& serial, - SWGSDRangel::SWGLimeRFESettings& response, - SWGSDRangel::SWGErrorResponse& error) -{ - LimeRFEController controller; - int rc = controller.openDevice(serial.toStdString()); - - if (rc != 0) - { - error.init(); - *error.getMessage() = QString("Error opening LimeRFE device %1: %2") - .arg(serial).arg(controller.getError(rc).c_str()); - return 400; - } - - rc = controller.getState(); - - if (rc != 0) - { - error.init(); - *error.getMessage() = QString("Error getting config from LimeRFE device %1: %2") - .arg(serial).arg(controller.getError(rc).c_str()); - return 500; - } - - controller.closeDevice(); - - LimeRFEController::LimeRFESettings settings; - controller.stateToSettings(settings); - response.init(); - response.setDevicePath(new QString(serial)); - response.setRxChannels((int) settings.m_rxChannels); - response.setRxWidebandChannel((int) settings.m_rxWidebandChannel); - response.setRxHamChannel((int) settings.m_rxHAMChannel); - response.setRxCellularChannel((int) settings.m_rxCellularChannel); - response.setRxPort((int) settings.m_rxPort); - response.setAmfmNotch(settings.m_amfmNotch ? 1 : 0); - response.setAttenuationFactor(settings.m_attenuationFactor); - response.setTxChannels((int) settings.m_txChannels); - response.setTxWidebandChannel((int) settings.m_txWidebandChannel); - response.setTxHamChannel((int) settings.m_txHAMChannel); - response.setTxCellularChannel((int) settings.m_txCellularChannel); - response.setTxPort((int) settings.m_txPort); - response.setSwrEnable(settings.m_swrEnable ? 1 : 0); - response.setSwrSource((int) settings.m_swrSource); - - return 200; -} - -int WebAPIAdapter::instanceLimeRFEConfigPut( - SWGSDRangel::SWGLimeRFESettings& query, - SWGSDRangel::SWGSuccessResponse& response, - SWGSDRangel::SWGErrorResponse& error) -{ - LimeRFEController controller; - int rc = controller.openDevice(query.getDevicePath()->toStdString()); - - if (rc != 0) - { - error.init(); - *error.getMessage() = QString("Error opening LimeRFE device %1: %2") - .arg(*query.getDevicePath()).arg(controller.getError(rc).c_str()); - return 400; - } - - LimeRFEController::LimeRFESettings settings; - settings.m_rxChannels = (LimeRFEController::ChannelGroups) query.getRxChannels(); - settings.m_rxWidebandChannel = (LimeRFEController::WidebandChannel) query.getRxWidebandChannel(); - settings.m_rxHAMChannel = (LimeRFEController::HAMChannel) query.getRxHamChannel(); - settings.m_rxCellularChannel = (LimeRFEController::CellularChannel) query.getRxCellularChannel(); - settings.m_rxPort = (LimeRFEController::RxPort) query.getRxPort(); - settings.m_amfmNotch = query.getAmfmNotch() != 0; - settings.m_attenuationFactor = query.getAttenuationFactor(); - settings.m_txChannels = (LimeRFEController::ChannelGroups) query.getTxChannels(); - settings.m_txWidebandChannel = (LimeRFEController::WidebandChannel) query.getTxWidebandChannel(); - settings.m_txHAMChannel = (LimeRFEController::HAMChannel) query.getTxHamChannel(); - settings.m_txCellularChannel = (LimeRFEController::CellularChannel) query.getTxCellularChannel(); - settings.m_txPort = (LimeRFEController::TxPort) query.getTxPort(); - settings.m_swrEnable = query.getSwrEnable() != 0; - settings.m_swrSource = (LimeRFEController::SWRSource) query.getSwrSource(); - - controller.settingsToState(settings); - - rc = controller.configure(); - - if (rc != 0) - { - error.init(); - *error.getMessage() = QString("Error configuring LimeRFE device %1: %2") - .arg(*query.getDevicePath()).arg(controller.getError(rc).c_str()); - return 500; - } - - response.init(); - *response.getMessage() = QString("LimeRFE device at %1 configuration updated successfully").arg(*query.getDevicePath()); - return 200; -} - -int WebAPIAdapter::instanceLimeRFERunPut( - SWGSDRangel::SWGLimeRFESettings& query, - SWGSDRangel::SWGSuccessResponse& response, - SWGSDRangel::SWGErrorResponse& error) -{ - LimeRFEController controller; - int rc = controller.openDevice(query.getDevicePath()->toStdString()); - - if (rc != 0) - { - error.init(); - *error.getMessage() = QString("Error opening LimeRFE device %1: %2") - .arg(*query.getDevicePath()).arg(controller.getError(rc).c_str()); - return 400; - } - - LimeRFEController::LimeRFESettings settings; - rc = controller.setRx(settings, settings.m_rxOn); - - if (rc != 0) - { - error.init(); - *error.getMessage() = QString("Error setting Rx/Tx LimeRFE device %1: %2") - .arg(*query.getDevicePath()).arg(controller.getError(rc).c_str()); - return 400; - } - - response.init(); - *response.getMessage() = QString("LimeRFE device at %1 mode updated successfully").arg(*query.getDevicePath()); - return 200; -} - -int WebAPIAdapter::instanceLimeRFEPowerGet( - const QString& serial, - SWGSDRangel::SWGLimeRFEPower& response, - SWGSDRangel::SWGErrorResponse& error) -{ - LimeRFEController controller; - int rc = controller.openDevice(serial.toStdString()); - - if (rc != 0) - { - error.init(); - *error.getMessage() = QString("Error opening LimeRFE device %1: %2") - .arg(serial).arg(controller.getError(rc).c_str()); - return 400; - } - - int fwdPower; - rc = controller.getFwdPower(fwdPower); - - if (rc != 0) - { - error.init(); - *error.getMessage() = QString("Error getting forward power from LimeRFE device %1: %2") - .arg(serial).arg(controller.getError(rc).c_str()); - return 500; - } - - int refPower; - rc = controller.getRefPower(refPower); - - if (rc != 0) - { - error.init(); - *error.getMessage() = QString("Error getting reflected power from LimeRFE device %1: %2") - .arg(serial).arg(controller.getError(rc).c_str()); - return 500; - } - - controller.closeDevice(); - - response.init(); - response.setForward(fwdPower); - response.setReflected(refPower); - return 200; -} -#endif - int WebAPIAdapter::instancePresetsGet( SWGSDRangel::SWGPresets& response, SWGSDRangel::SWGErrorResponse& error) diff --git a/sdrbase/webapi/webapiadapter.h b/sdrbase/webapi/webapiadapter.h index 0608f0060..22e6aaddb 100644 --- a/sdrbase/webapi/webapiadapter.h +++ b/sdrbase/webapi/webapiadapter.h @@ -146,32 +146,6 @@ public: SWGSDRangel::SWGSuccessResponse& response, SWGSDRangel::SWGErrorResponse& error); -#ifdef HAS_LIMERFEUSB - virtual int instanceLimeRFESerialGet( - SWGSDRangel::SWGLimeRFEDevices& response, - SWGSDRangel::SWGErrorResponse& error); - - virtual int instanceLimeRFEConfigGet( - const QString& serial, - SWGSDRangel::SWGLimeRFESettings& response, - SWGSDRangel::SWGErrorResponse& error); - - virtual int instanceLimeRFEConfigPut( - SWGSDRangel::SWGLimeRFESettings& query, - SWGSDRangel::SWGSuccessResponse& response, - SWGSDRangel::SWGErrorResponse& error); - - virtual int instanceLimeRFERunPut( - SWGSDRangel::SWGLimeRFESettings& query, - SWGSDRangel::SWGSuccessResponse& response, - SWGSDRangel::SWGErrorResponse& error); - - virtual int instanceLimeRFEPowerGet( - const QString& serial, - SWGSDRangel::SWGLimeRFEPower& response, - SWGSDRangel::SWGErrorResponse& error); -#endif - virtual int instancePresetsGet( SWGSDRangel::SWGPresets& response, SWGSDRangel::SWGErrorResponse& error); diff --git a/sdrbase/webapi/webapiadapterinterface.cpp b/sdrbase/webapi/webapiadapterinterface.cpp index 3c10c31a0..9c3e15048 100644 --- a/sdrbase/webapi/webapiadapterinterface.cpp +++ b/sdrbase/webapi/webapiadapterinterface.cpp @@ -33,10 +33,6 @@ QString WebAPIAdapterInterface::instanceAudioOutputCleanupURL = "/sdrangel/audio QString WebAPIAdapterInterface::instanceLocationURL = "/sdrangel/location"; QString WebAPIAdapterInterface::instanceAMBESerialURL = "/sdrangel/ambe/serial"; QString WebAPIAdapterInterface::instanceAMBEDevicesURL = "/sdrangel/ambe/devices"; -QString WebAPIAdapterInterface::instanceLimeRFESerialURL = "/sdrangel/limerfe/serial"; -QString WebAPIAdapterInterface::instanceLimeRFEConfigURL = "/sdrangel/limerfe/config"; -QString WebAPIAdapterInterface::instanceLimeRFERunURL = "/sdrangel/limerfe/run"; -QString WebAPIAdapterInterface::instanceLimeRFEPowerURL = "/sdrangel/limerfe/power"; QString WebAPIAdapterInterface::instancePresetsURL = "/sdrangel/presets"; QString WebAPIAdapterInterface::instancePresetURL = "/sdrangel/preset"; QString WebAPIAdapterInterface::instancePresetFileURL = "/sdrangel/preset/file"; diff --git a/sdrbase/webapi/webapiadapterinterface.h b/sdrbase/webapi/webapiadapterinterface.h index 41a9e2c3b..302dfb3c0 100644 --- a/sdrbase/webapi/webapiadapterinterface.h +++ b/sdrbase/webapi/webapiadapterinterface.h @@ -537,22 +537,6 @@ public: return 501; } - /** - * Handler of /sdrangel/limerfe/power (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels - * returns the Http status code (default 501: not implemented) - */ - virtual int instanceLimeRFEPowerGet( - const QString& serial, - SWGSDRangel::SWGLimeRFEPower& response, - SWGSDRangel::SWGErrorResponse& error) - { - (void) serial; - (void) response; - error.init(); - *error.getMessage() = QString("Function not implemented"); - return 501; - } - /** * Handler of /sdrangel/presets (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels * returns the Http status code (default 501: not implemented) @@ -1788,10 +1772,6 @@ public: static QString instanceLocationURL; static QString instanceAMBESerialURL; static QString instanceAMBEDevicesURL; - static QString instanceLimeRFESerialURL; - static QString instanceLimeRFEConfigURL; - static QString instanceLimeRFERunURL; - static QString instanceLimeRFEPowerURL; static QString instancePresetsURL; static QString instancePresetURL; static QString instancePresetFileURL; diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index edfb00858..a17083c6f 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -37,7 +37,6 @@ #include "SWGAMBEDevices.h" #include "SWGLimeRFEDevices.h" #include "SWGLimeRFESettings.h" -#include "SWGLimeRFEPower.h" #include "SWGPresets.h" #include "SWGPresetTransfer.h" #include "SWGPresetIdentifier.h" @@ -143,14 +142,6 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http instanceAMBESerialService(request, response); } else if (path == WebAPIAdapterInterface::instanceAMBEDevicesURL) { instanceAMBEDevicesService(request, response); - } else if (path == WebAPIAdapterInterface::instanceLimeRFESerialURL) { - instanceLimeRFESerialService(request, response); - } else if (path == WebAPIAdapterInterface::instanceLimeRFEConfigURL) { - instanceLimeRFEConfigService(request, response); - } else if (path == WebAPIAdapterInterface::instanceLimeRFERunURL) { - instanceLimeRFERunService(request, response); - } else if (path == WebAPIAdapterInterface::instanceLimeRFEPowerURL) { - instanceLimeRFEPowerService(request, response); } else if (path == WebAPIAdapterInterface::instancePresetsURL) { instancePresetsService(request, response); } else if (path == WebAPIAdapterInterface::instancePresetURL) { @@ -920,203 +911,6 @@ void WebAPIRequestMapper::instanceAMBEDevicesService(qtwebapp::HttpRequest& requ } } -void WebAPIRequestMapper::instanceLimeRFESerialService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) -{ - SWGSDRangel::SWGErrorResponse errorResponse; - response.setHeader("Content-Type", "application/json"); - response.setHeader("Access-Control-Allow-Origin", "*"); - - if (request.getMethod() == "GET") - { - SWGSDRangel::SWGLimeRFEDevices normalResponse; - - int status = m_adapter->instanceLimeRFESerialGet(normalResponse, errorResponse); - response.setStatus(status); - - if (status/100 == 2) { - response.write(normalResponse.asJson().toUtf8()); - } else { - response.write(errorResponse.asJson().toUtf8()); - } - } - else - { - response.setStatus(405,"Invalid HTTP method"); - errorResponse.init(); - *errorResponse.getMessage() = "Invalid HTTP method"; - response.write(errorResponse.asJson().toUtf8()); - } -} - -void WebAPIRequestMapper::instanceLimeRFEConfigService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) -{ - SWGSDRangel::SWGErrorResponse errorResponse; - response.setHeader("Content-Type", "application/json"); - response.setHeader("Access-Control-Allow-Origin", "*"); - - if (request.getMethod() == "GET") - { - QByteArray serialStr = request.getParameter("serial"); - SWGSDRangel::SWGLimeRFESettings normalResponse; - - int status = m_adapter->instanceLimeRFEConfigGet(serialStr, normalResponse, errorResponse); - response.setStatus(status); - - if (status/100 == 2) { - response.write(normalResponse.asJson().toUtf8()); - } else { - response.write(errorResponse.asJson().toUtf8()); - } - } - else if (request.getMethod() == "PUT") - { - SWGSDRangel::SWGLimeRFESettings query; - SWGSDRangel::SWGSuccessResponse normalResponse; - QString jsonStr = request.getBody(); - QJsonObject jsonObject; - - if (parseJsonBody(jsonStr, jsonObject, response)) - { - QStringList limeRFESettingsKeys; - - if (validateLimeRFEConfig(query, jsonObject, limeRFESettingsKeys)) - { - if (limeRFESettingsKeys.contains("devicePath")) - { - int status = m_adapter->instanceLimeRFEConfigPut(query, normalResponse, errorResponse); - response.setStatus(status); - - if (status/100 == 2) { - response.write(normalResponse.asJson().toUtf8()); - } else { - response.write(errorResponse.asJson().toUtf8()); - } - } - else - { - response.setStatus(400,"LimeRFE device path expected in JSON body"); - errorResponse.init(); - *errorResponse.getMessage() = "Invalid request"; - response.write(errorResponse.asJson().toUtf8()); - } - } - else - { - response.setStatus(400,"Invalid JSON format"); - errorResponse.init(); - *errorResponse.getMessage() = "Invalid JSON format"; - response.write(errorResponse.asJson().toUtf8()); - } - } - else - { - response.setStatus(400,"Invalid JSON format"); - errorResponse.init(); - *errorResponse.getMessage() = "Invalid JSON format"; - response.write(errorResponse.asJson().toUtf8()); - } - } - else - { - response.setStatus(405,"Invalid HTTP method"); - errorResponse.init(); - *errorResponse.getMessage() = "Invalid HTTP method"; - response.write(errorResponse.asJson().toUtf8()); - } -} - -void WebAPIRequestMapper::instanceLimeRFERunService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) -{ - SWGSDRangel::SWGErrorResponse errorResponse; - response.setHeader("Content-Type", "application/json"); - response.setHeader("Access-Control-Allow-Origin", "*"); - - if (request.getMethod() == "PUT") - { - SWGSDRangel::SWGLimeRFESettings query; - QString jsonStr = request.getBody(); - QJsonObject jsonObject; - - if (parseJsonBody(jsonStr, jsonObject, response)) - { - QStringList limeRFESettingsKeys; - - if (validateLimeRFEConfig(query, jsonObject, limeRFESettingsKeys)) - { - if (limeRFESettingsKeys.contains("devicePath")) - { - SWGSDRangel::SWGSuccessResponse normalResponse; - int status = m_adapter->instanceLimeRFERunPut(query, normalResponse, errorResponse); - response.setStatus(status); - - if (status/100 == 2) { - response.write(normalResponse.asJson().toUtf8()); - } else { - response.write(errorResponse.asJson().toUtf8()); - } - } - else - { - response.setStatus(400,"LimeRFE device path expected in JSON body"); - errorResponse.init(); - *errorResponse.getMessage() = "Invalid JSON format"; - response.write(errorResponse.asJson().toUtf8()); - } - } - else - { - response.setStatus(400,"Invalid JSON format"); - errorResponse.init(); - *errorResponse.getMessage() = "Invalid JSON format"; - response.write(errorResponse.asJson().toUtf8()); - } - } - else - { - response.setStatus(400,"Invalid JSON format"); - errorResponse.init(); - *errorResponse.getMessage() = "Invalid JSON format"; - response.write(errorResponse.asJson().toUtf8()); - } - } - else - { - response.setStatus(405,"Invalid HTTP method"); - errorResponse.init(); - *errorResponse.getMessage() = "Invalid HTTP method"; - response.write(errorResponse.asJson().toUtf8()); - } -} - -void WebAPIRequestMapper::instanceLimeRFEPowerService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) -{ - SWGSDRangel::SWGErrorResponse errorResponse; - response.setHeader("Content-Type", "application/json"); - response.setHeader("Access-Control-Allow-Origin", "*"); - - if (request.getMethod() == "GET") - { - QByteArray serialStr = request.getParameter("serial"); - SWGSDRangel::SWGLimeRFEPower normalResponse; - - int status = m_adapter->instanceLimeRFEPowerGet(serialStr, normalResponse, errorResponse); - response.setStatus(status); - - if (status/100 == 2) { - response.write(normalResponse.asJson().toUtf8()); - } else { - response.write(errorResponse.asJson().toUtf8()); - } - } - else - { - response.setStatus(405,"Invalid HTTP method"); - errorResponse.init(); - *errorResponse.getMessage() = "Invalid HTTP method"; - response.write(errorResponse.asJson().toUtf8()); - } -} - void WebAPIRequestMapper::instancePresetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) { SWGSDRangel::SWGErrorResponse errorResponse; @@ -4304,87 +4098,6 @@ bool WebAPIRequestMapper::validateAMBEDevices(SWGSDRangel::SWGAMBEDevices& ambeD return false; } -bool WebAPIRequestMapper::validateLimeRFEConfig(SWGSDRangel::SWGLimeRFESettings& limeRFESettings, QJsonObject& jsonObject, QStringList& limeRFESettingsKeys) -{ - if (jsonObject.contains("devicePath")) - { - limeRFESettings.setDevicePath(new QString(jsonObject["devicePath"].toString())); - limeRFESettingsKeys.append("devicePath"); - } - if (jsonObject.contains("rxChannels")) - { - limeRFESettings.setRxChannels(jsonObject["rxChannels"].toInt()); - limeRFESettingsKeys.append("rxChannels"); - } - if (jsonObject.contains("rxWidebandChannel")) - { - limeRFESettings.setRxWidebandChannel(jsonObject["rxWidebandChannel"].toInt()); - limeRFESettingsKeys.append("rxWidebandChannel"); - } - if (jsonObject.contains("rxHAMChannel")) - { - limeRFESettings.setRxHamChannel(jsonObject["rxHAMChannel"].toInt()); - limeRFESettingsKeys.append("rxHAMChannel"); - } - if (jsonObject.contains("rxCellularChannel")) - { - limeRFESettings.setRxCellularChannel(jsonObject["rxCellularChannel"].toInt()); - limeRFESettingsKeys.append("rxCellularChannel"); - } - if (jsonObject.contains("rxPort")) - { - limeRFESettings.setRxPort(jsonObject["rxPort"].toInt()); - limeRFESettingsKeys.append("rxPort"); - } - if (jsonObject.contains("attenuationFactor")) - { - limeRFESettings.setAttenuationFactor(jsonObject["attenuationFactor"].toInt()); - limeRFESettingsKeys.append("attenuationFactor"); - } - if (jsonObject.contains("amfmNotch")) - { - limeRFESettings.setAmfmNotch(jsonObject["amfmNotch"].toInt()); - limeRFESettingsKeys.append("amfmNotch"); - } - if (jsonObject.contains("txChannels")) - { - limeRFESettings.setTxChannels(jsonObject["txChannels"].toInt()); - limeRFESettingsKeys.append("txChannels"); - } - if (jsonObject.contains("txWidebandChannel")) - { - limeRFESettings.setTxWidebandChannel(jsonObject["txWidebandChannel"].toInt()); - limeRFESettingsKeys.append("txWidebandChannel"); - } - if (jsonObject.contains("txHAMChannel")) - { - limeRFESettings.setTxHamChannel(jsonObject["txHAMChannel"].toInt()); - limeRFESettingsKeys.append("txHAMChannel"); - } - if (jsonObject.contains("txCellularChannel")) - { - limeRFESettings.setTxCellularChannel(jsonObject["txCellularChannel"].toInt()); - limeRFESettingsKeys.append("txCellularChannel"); - } - if (jsonObject.contains("txPort")) - { - limeRFESettings.setTxPort(jsonObject["txPort"].toInt()); - limeRFESettingsKeys.append("txPort"); - } - if (jsonObject.contains("swrEnable")) - { - limeRFESettings.setSwrEnable(jsonObject["swrEnable"].toInt()); - limeRFESettingsKeys.append("swrEnable"); - } - if (jsonObject.contains("swrSource")) - { - limeRFESettings.setSwrSource(jsonObject["swrSource"].toInt()); - limeRFESettingsKeys.append("swrSource"); - } - - return true; -} - bool WebAPIRequestMapper::validateSpectrumSettings(SWGSDRangel::SWGGLSpectrum& spectrumSettings, QJsonObject& jsonObject, QStringList& spectrumSettingsKeys) { extractKeys(jsonObject, spectrumSettingsKeys); diff --git a/sdrbase/webapi/webapirequestmapper.h b/sdrbase/webapi/webapirequestmapper.h index 048d4a02b..2bf22e846 100644 --- a/sdrbase/webapi/webapirequestmapper.h +++ b/sdrbase/webapi/webapirequestmapper.h @@ -69,10 +69,6 @@ private: void instanceDVSerialService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void instanceAMBESerialService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void instanceAMBEDevicesService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); - void instanceLimeRFESerialService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); - void instanceLimeRFEConfigService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); - void instanceLimeRFERunService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); - void instanceLimeRFEPowerService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void instancePresetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void instancePresetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void instancePresetFileService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); @@ -131,7 +127,6 @@ private: bool validateAudioInputDevice(SWGSDRangel::SWGAudioInputDevice& audioInputDevice, QJsonObject& jsonObject, QStringList& audioInputDeviceKeys); bool validateAudioOutputDevice(SWGSDRangel::SWGAudioOutputDevice& audioOutputDevice, QJsonObject& jsonObject, QStringList& audioOutputDeviceKeys); bool validateAMBEDevices(SWGSDRangel::SWGAMBEDevices& ambeDevices, QJsonObject& jsonObject); - bool validateLimeRFEConfig(SWGSDRangel::SWGLimeRFESettings& limeRFESettings, QJsonObject& jsonObject, QStringList& limeRFESettingsKeys); bool validateConfig(SWGSDRangel::SWGInstanceConfigResponse& config, QJsonObject& jsonObject, WebAPIAdapterInterface::ConfigKeys& configKeys); bool validateWorkspaceInfo(SWGSDRangel::SWGWorkspaceInfo& workspaceInfo, QJsonObject& jsonObject); bool validateConfigurationIdentifier(SWGSDRangel::SWGConfigurationIdentifier& configurationIdentifier); diff --git a/swagger/sdrangel/api/swagger/include/LimeRFE.yaml b/swagger/sdrangel/api/swagger/include/LimeRFE.yaml index f8c0bebf0..b1704019a 100644 --- a/swagger/sdrangel/api/swagger/include/LimeRFE.yaml +++ b/swagger/sdrangel/api/swagger/include/LimeRFE.yaml @@ -172,13 +172,3 @@ LimeRFEActions: Open or close device * 0 - Close device * 1 - Open device - -LimeRFEPower: - description: report of forward and reflected power measurements TO BE DECOMMISSIONED - properties: - forward: - description: relative forward power in centi-Bels - type: integer - reflected: - description: relative reflected power in centi-Bels - type: integer diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index bc41da17a..70b12dfad 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -548,128 +548,6 @@ 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 - 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: "http://swgserver:8081/api/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: "http://swgserver:8081/api/swagger/include/LimeRFE.yaml#/LimeRFESettings" - responses: - "200": - description: Success - schema: - $ref: "#/definitions/SuccessResponse" - "400": - description: Error - 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: "http://swgserver:8081/api/swagger/include/LimeRFE.yaml#/LimeRFESettings" - responses: - "200": - description: Success - schema: - $ref: "#/definitions/SuccessResponse" - "400": - description: Error - schema: - $ref: "#/definitions/ErrorResponse" - "500": - $ref: "#/responses/Response_500" - "501": - $ref: "#/responses/Response_501" - - /sdrangel/limerfe/power: - x-swagger-router-controller: instance - get: - description: get forward and reflected relative powers in centi-Bels - operationId: instanceLimeRFEPowerGet - tags: - - Instance - parameters: - - name: serial - in: query - description: device serial path - required: true - type: string - responses: - "200": - description: On success return forward and reflected powers in centi-Bels - schema: - $ref: "http://swgserver:8081/api/swagger/include/LimeRFE.yaml#/LimeRFEPower" - "400": - description: Error - schema: - $ref: "#/definitions/ErrorResponse" - "500": - $ref: "#/responses/Response_500" - "501": - $ref: "#/responses/Response_501" - /sdrangel/presets: x-swagger-router-controller: instance get: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 423a2de1f..474dfdf12 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -7132,19 +7132,6 @@ margin-bottom: 20px; } }, "description" : "List of LimeRFE devices (serial or server address)" -}; - defs.LimeRFEPower = { - "properties" : { - "forward" : { - "type" : "integer", - "description" : "relative forward power in centi-Bels" - }, - "reflected" : { - "type" : "integer", - "description" : "relative reflected power in centi-Bels" - } - }, - "description" : "report of forward and reflected power measurements TO BE DECOMMISSIONED" }; defs.LimeRFEReport = { "properties" : { @@ -14814,21 +14801,6 @@ margin-bottom: 20px;
  • instanceFeatures
  • -
  • - instanceLimeRFEConfigGet -
  • -
  • - instanceLimeRFEConfigPut -
  • -
  • - instanceLimeRFEPowerGet -
  • -
  • - instanceLimeRFERunPut -
  • -
  • - instanceLimeRFESerialGet -
  • instanceLocationGet
  • @@ -51155,1994 +51127,6 @@ 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: 500 - Error

    - - - -
    -
    -
    - -
    - -
    -
    - -

    Status: 501 - Function not implemented

    - - - -
    -
    -
    - -
    - -
    -
    - -
    -
    -
    -
    -
    -
    -

    instanceLimeRFEPowerGet

    -

    -
    -
    -
    -

    -

    get forward and reflected relative powers in centi-Bels

    -

    -
    -
    /sdrangel/limerfe/power
    -

    -

    Usage and SDK Samples

    -

    - - -
    -
    -
    curl -X GET "http://localhost/sdrangel/limerfe/power?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 {
    -            LimeRFEPower result = apiInstance.instanceLimeRFEPowerGet(serial);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling InstanceApi#instanceLimeRFEPowerGet");
    -            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 {
    -            LimeRFEPower result = apiInstance.instanceLimeRFEPowerGet(serial);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling InstanceApi#instanceLimeRFEPowerGet");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    - -
    -
    String *serial = serial_example; // device serial path
    -
    -InstanceApi *apiInstance = [[InstanceApi alloc] init];
    -
    -[apiInstance instanceLimeRFEPowerGetWith:serial
    -              completionHandler: ^(LimeRFEPower 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.instanceLimeRFEPowerGet(serial, callback);
    -
    -
    - - -
    -
    using System;
    -using System.Diagnostics;
    -using SWGSDRangel.Api;
    -using SWGSDRangel.Client;
    -using SWGSDRangel.Model;
    -
    -namespace Example
    -{
    -    public class instanceLimeRFEPowerGetExample
    -    {
    -        public void main()
    -        {
    -            
    -            var apiInstance = new InstanceApi();
    -            var serial = serial_example;  // String | device serial path
    -
    -            try
    -            {
    -                LimeRFEPower result = apiInstance.instanceLimeRFEPowerGet(serial);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling InstanceApi.instanceLimeRFEPowerGet: " + 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->instanceLimeRFEPowerGet($serial);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling InstanceApi->instanceLimeRFEPowerGet: ', $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->instanceLimeRFEPowerGet(serial => $serial);
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling InstanceApi->instanceLimeRFEPowerGet: $@\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_power_get(serial)
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling InstanceApi->instanceLimeRFEPowerGet: %s\n" % e)
    -
    -
    - -

    Parameters

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

    Responses

    -

    Status: 200 - On success return forward and reflected powers in centi-Bels

    - - - -
    -
    -
    - -
    - -
    -
    - -

    Status: 400 - Error

    - - - -
    -
    -
    - -
    - -
    -
    - -

    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: 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

    - - - -
    -
    -
    - -
    - -
    -
    - -
    -
    -
    @@ -59777,7 +57761,7 @@ except ApiException as e:
    - Generated 2022-05-22T12:29:41.738+02:00 + Generated 2022-05-22T20:12:13.506+02:00
    diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp index 288dd007b..ab13b9f45 100644 --- a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp @@ -1707,288 +1707,6 @@ SWGInstanceApi::instanceFeaturesCallback(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.toUtf8()); - - - - 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::instanceLimeRFEPowerGet(QString* serial) { - QString fullPath; - fullPath.append(this->host).append(this->basePath).append("/sdrangel/limerfe/power"); - - - 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::instanceLimeRFEPowerGetCallback); - - worker->execute(&input); -} - -void -SWGInstanceApi::instanceLimeRFEPowerGetCallback(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); - SWGLimeRFEPower* output = static_cast(create(json, QString("SWGLimeRFEPower"))); - worker->deleteLater(); - - if (worker->error_type == QNetworkReply::NoError) { - emit instanceLimeRFEPowerGetSignal(output); - } else { - emit instanceLimeRFEPowerGetSignalE(output, error_type, error_str); - emit instanceLimeRFEPowerGetSignalEFull(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.toUtf8()); - - - - 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 e5b916a85..61a178a99 100644 --- a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.h +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.h @@ -15,7 +15,6 @@ #include "SWGHttpRequest.h" -#include #include "SWGAMBEDevices.h" #include "SWGAudioDevices.h" #include "SWGAudioInputDevice.h" @@ -35,9 +34,6 @@ #include "SWGInstanceDevicesResponse.h" #include "SWGInstanceFeaturesResponse.h" #include "SWGInstanceSummaryResponse.h" -#include "SWGLimeRFEDevices.h" -#include "SWGLimeRFEPower.h" -#include "SWGLimeRFESettings.h" #include "SWGLocationInformation.h" #include "SWGLoggingInfo.h" #include "SWGPresetExport.h" @@ -93,11 +89,6 @@ public: void instanceFeaturePresetDelete(SWGFeaturePresetIdentifier& body); void instanceFeaturePresetGet(); void instanceFeatures(); - void instanceLimeRFEConfigGet(QString* serial); - void instanceLimeRFEConfigPut(SWGLimeRFESettings& body); - void instanceLimeRFEPowerGet(QString* serial); - void instanceLimeRFERunPut(SWGLimeRFESettings& body); - void instanceLimeRFESerialGet(); void instanceLocationGet(); void instanceLocationPut(SWGLocationInformation& body); void instanceLoggingGet(); @@ -145,11 +136,6 @@ private: void instanceFeaturePresetDeleteCallback (SWGHttpRequestWorker * worker); void instanceFeaturePresetGetCallback (SWGHttpRequestWorker * worker); void instanceFeaturesCallback (SWGHttpRequestWorker * worker); - void instanceLimeRFEConfigGetCallback (SWGHttpRequestWorker * worker); - void instanceLimeRFEConfigPutCallback (SWGHttpRequestWorker * worker); - void instanceLimeRFEPowerGetCallback (SWGHttpRequestWorker * worker); - void instanceLimeRFERunPutCallback (SWGHttpRequestWorker * worker); - void instanceLimeRFESerialGetCallback (SWGHttpRequestWorker * worker); void instanceLocationGetCallback (SWGHttpRequestWorker * worker); void instanceLocationPutCallback (SWGHttpRequestWorker * worker); void instanceLoggingGetCallback (SWGHttpRequestWorker * worker); @@ -197,11 +183,6 @@ signals: void instanceFeaturePresetDeleteSignal(SWGFeaturePresetIdentifier* summary); void instanceFeaturePresetGetSignal(SWGFeaturePresets* summary); void instanceFeaturesSignal(SWGInstanceFeaturesResponse* summary); - void instanceLimeRFEConfigGetSignal(SWGLimeRFESettings* summary); - void instanceLimeRFEConfigPutSignal(SWGSuccessResponse* summary); - void instanceLimeRFEPowerGetSignal(SWGLimeRFEPower* summary); - void instanceLimeRFERunPutSignal(SWGSuccessResponse* summary); - void instanceLimeRFESerialGetSignal(SWGLimeRFEDevices* summary); void instanceLocationGetSignal(SWGLocationInformation* summary); void instanceLocationPutSignal(SWGLocationInformation* summary); void instanceLoggingGetSignal(SWGLoggingInfo* summary); @@ -248,11 +229,6 @@ signals: void instanceFeaturePresetDeleteSignalE(SWGFeaturePresetIdentifier* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceFeaturePresetGetSignalE(SWGFeaturePresets* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceFeaturesSignalE(SWGInstanceFeaturesResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); - void instanceLimeRFEConfigGetSignalE(SWGLimeRFESettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); - void instanceLimeRFEConfigPutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); - void instanceLimeRFEPowerGetSignalE(SWGLimeRFEPower* 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); @@ -299,11 +275,6 @@ signals: void instanceFeaturePresetDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceFeaturePresetGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceFeaturesSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void instanceLimeRFEConfigGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void instanceLimeRFEConfigPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void instanceLimeRFEPowerGetSignalEFull(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/SWGLimeRFEPower.cpp b/swagger/sdrangel/code/qt5/client/SWGLimeRFEPower.cpp deleted file mode 100644 index 9f936e750..000000000 --- a/swagger/sdrangel/code/qt5/client/SWGLimeRFEPower.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/** - * 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: 7.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 "SWGLimeRFEPower.h" - -#include "SWGHelpers.h" - -#include -#include -#include -#include - -namespace SWGSDRangel { - -SWGLimeRFEPower::SWGLimeRFEPower(QString* json) { - init(); - this->fromJson(*json); -} - -SWGLimeRFEPower::SWGLimeRFEPower() { - forward = 0; - m_forward_isSet = false; - reflected = 0; - m_reflected_isSet = false; -} - -SWGLimeRFEPower::~SWGLimeRFEPower() { - this->cleanup(); -} - -void -SWGLimeRFEPower::init() { - forward = 0; - m_forward_isSet = false; - reflected = 0; - m_reflected_isSet = false; -} - -void -SWGLimeRFEPower::cleanup() { - - -} - -SWGLimeRFEPower* -SWGLimeRFEPower::fromJson(QString &json) { - QByteArray array (json.toStdString().c_str()); - QJsonDocument doc = QJsonDocument::fromJson(array); - QJsonObject jsonObject = doc.object(); - this->fromJsonObject(jsonObject); - return this; -} - -void -SWGLimeRFEPower::fromJsonObject(QJsonObject &pJson) { - ::SWGSDRangel::setValue(&forward, pJson["forward"], "qint32", ""); - - ::SWGSDRangel::setValue(&reflected, pJson["reflected"], "qint32", ""); - -} - -QString -SWGLimeRFEPower::asJson () -{ - QJsonObject* obj = this->asJsonObject(); - - QJsonDocument doc(*obj); - QByteArray bytes = doc.toJson(); - delete obj; - return QString(bytes); -} - -QJsonObject* -SWGLimeRFEPower::asJsonObject() { - QJsonObject* obj = new QJsonObject(); - if(m_forward_isSet){ - obj->insert("forward", QJsonValue(forward)); - } - if(m_reflected_isSet){ - obj->insert("reflected", QJsonValue(reflected)); - } - - return obj; -} - -qint32 -SWGLimeRFEPower::getForward() { - return forward; -} -void -SWGLimeRFEPower::setForward(qint32 forward) { - this->forward = forward; - this->m_forward_isSet = true; -} - -qint32 -SWGLimeRFEPower::getReflected() { - return reflected; -} -void -SWGLimeRFEPower::setReflected(qint32 reflected) { - this->reflected = reflected; - this->m_reflected_isSet = true; -} - - -bool -SWGLimeRFEPower::isSet(){ - bool isObjectUpdated = false; - do{ - if(m_forward_isSet){ - isObjectUpdated = true; break; - } - if(m_reflected_isSet){ - isObjectUpdated = true; break; - } - }while(false); - return isObjectUpdated; -} -} - diff --git a/swagger/sdrangel/code/qt5/client/SWGLimeRFEPower.h b/swagger/sdrangel/code/qt5/client/SWGLimeRFEPower.h deleted file mode 100644 index 917a6d3af..000000000 --- a/swagger/sdrangel/code/qt5/client/SWGLimeRFEPower.h +++ /dev/null @@ -1,64 +0,0 @@ -/** - * 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: 7.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. - */ - -/* - * SWGLimeRFEPower.h - * - * report of forward and reflected power measurements TO BE DECOMMISSIONED - */ - -#ifndef SWGLimeRFEPower_H_ -#define SWGLimeRFEPower_H_ - -#include - - - -#include "SWGObject.h" -#include "export.h" - -namespace SWGSDRangel { - -class SWG_API SWGLimeRFEPower: public SWGObject { -public: - SWGLimeRFEPower(); - SWGLimeRFEPower(QString* json); - virtual ~SWGLimeRFEPower(); - void init(); - void cleanup(); - - virtual QString asJson () override; - virtual QJsonObject* asJsonObject() override; - virtual void fromJsonObject(QJsonObject &json) override; - virtual SWGLimeRFEPower* fromJson(QString &jsonString) override; - - qint32 getForward(); - void setForward(qint32 forward); - - qint32 getReflected(); - void setReflected(qint32 reflected); - - - virtual bool isSet() override; - -private: - qint32 forward; - bool m_forward_isSet; - - qint32 reflected; - bool m_reflected_isSet; - -}; - -} - -#endif /* SWGLimeRFEPower_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 120ac5f7f..2cb26fd51 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -161,7 +161,6 @@ #include "SWGLimeRFEActions.h" #include "SWGLimeRFEDevice.h" #include "SWGLimeRFEDevices.h" -#include "SWGLimeRFEPower.h" #include "SWGLimeRFEReport.h" #include "SWGLimeRFESettings.h" #include "SWGLimeSdrInputReport.h" @@ -1065,11 +1064,6 @@ namespace SWGSDRangel { obj->init(); return obj; } - if(QString("SWGLimeRFEPower").compare(type) == 0) { - SWGLimeRFEPower *obj = new SWGLimeRFEPower(); - obj->init(); - return obj; - } if(QString("SWGLimeRFEReport").compare(type) == 0) { SWGLimeRFEReport *obj = new SWGLimeRFEReport(); obj->init();