From 96abae1fc0d9355003e6d866b4ee9d70545e1be3 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 15 Jan 2020 00:28:55 +0100 Subject: [PATCH] REST API: HTML documentation updates --- sdrbase/resources/webapi/doc/html2/index.html | 444 +++++++++++++++++- swagger/sdrangel/code/html2/index.html | 444 +++++++++++++++++- 2 files changed, 886 insertions(+), 2 deletions(-) diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 0d5039171..6249f10a9 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -3934,6 +3934,19 @@ 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" }; defs.LimeRFESettings = { "properties" : { @@ -3986,6 +3999,14 @@ margin-bottom: 20px; "type" : "integer", "description" : "Tx port selected (see LimeRFEController.TxPort enumeration)" }, + "swrEnable" : { + "type" : "integer", + "description" : "Boolean if SWR measurements are enabled else 0" + }, + "swrSource" : { + "type" : "integer", + "description" : "SWR measurement source (see LimeRFEController.SWRSource)" + }, "rxOn" : { "type" : "integer", "description" : "Boolean 1 if Rx is active else 0" @@ -7242,6 +7263,9 @@ margin-bottom: 20px;
  • instanceLimeRFEConfigPut
  • +
  • + instanceLimeRFEPowerGet +
  • instanceLimeRFERunPut
  • @@ -25784,6 +25808,424 @@ $(document).ready(function() {
    +
    +
    +
    +

    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

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -31609,7 +32051,7 @@ except ApiException as e:
    - Generated 2020-01-14T01:04:56.442+01:00 + Generated 2020-01-15T00:01:43.073+01:00
    diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 0d5039171..6249f10a9 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -3934,6 +3934,19 @@ 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" }; defs.LimeRFESettings = { "properties" : { @@ -3986,6 +3999,14 @@ margin-bottom: 20px; "type" : "integer", "description" : "Tx port selected (see LimeRFEController.TxPort enumeration)" }, + "swrEnable" : { + "type" : "integer", + "description" : "Boolean if SWR measurements are enabled else 0" + }, + "swrSource" : { + "type" : "integer", + "description" : "SWR measurement source (see LimeRFEController.SWRSource)" + }, "rxOn" : { "type" : "integer", "description" : "Boolean 1 if Rx is active else 0" @@ -7242,6 +7263,9 @@ margin-bottom: 20px;
  • instanceLimeRFEConfigPut
  • +
  • + instanceLimeRFEPowerGet +
  • instanceLimeRFERunPut
  • @@ -25784,6 +25808,424 @@ $(document).ready(function() {
    +
    +
    +
    +

    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

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -31609,7 +32051,7 @@ except ApiException as e:
    - Generated 2020-01-14T01:04:56.442+01:00 + Generated 2020-01-15T00:01:43.073+01:00