diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 428dadd3d..4b3f7183c 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -4808,6 +4808,32 @@ margin-bottom: 20px; } }, "description" : "Represents a FeatureSetPreset::FeatureConfig object" +}; + defs.FeatureListItem = { + "required" : [ "id" ], + "properties" : { + "name" : { + "type" : "string", + "description" : "Displayable name of the feature plugin" + }, + "idURI" : { + "type" : "string", + "description" : "Key to identify the feature plugin type in URI form" + }, + "id" : { + "type" : "string", + "description" : "Key to identify the feature plugin type as short object name" + }, + "version" : { + "type" : "string", + "description" : "Feature plugin version number" + }, + "index" : { + "type" : "integer", + "description" : "Index of the feature in the list of registered channels" + } + }, + "description" : "Summarized information about feature plugin" }; defs.FeatureReport = { "required" : [ "featureType" ], @@ -6061,6 +6087,22 @@ margin-bottom: 20px; } }, "description" : "Summarized information about logical devices from hardware devices attached to this SDRangel instance" +}; + defs.InstanceFeaturesResponse = { + "required" : [ "featurecount" ], + "properties" : { + "featurecount" : { + "type" : "integer", + "description" : "Number of plugins available" + }, + "features" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/FeatureListItem" + } + } + }, + "description" : "Summarized information about feature plugins available in this SDRangel instance" }; defs.InstanceSummaryResponse = { "required" : [ "appname", "architecture", "devicesetlist", "dspRxBits", "dspTxBits", "os", "pid", "qtVersion", "version" ], @@ -12593,6 +12635,9 @@ margin-bottom: 20px;
  • instanceFeatureSetsGet
  • +
  • + instanceFeatures +
  • instanceLimeRFEConfigGet
  • @@ -40680,6 +40725,341 @@ except ApiException as e:
    +
    +
    +
    +

    instanceFeatures

    +

    +
    +
    +
    +

    +

    Get a list of feature plugins available in this instance

    +

    +
    +
    /sdrangel/features
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/features"
    +
    +
    +
    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 {
    +            InstanceFeaturesResponse result = apiInstance.instanceFeatures();
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceFeatures");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.InstanceApi;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        InstanceApi apiInstance = new InstanceApi();
    +        try {
    +            InstanceFeaturesResponse result = apiInstance.instanceFeatures();
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceFeatures");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    
    +InstanceApi *apiInstance = [[InstanceApi alloc] init];
    +
    +[apiInstance instanceFeaturesWithCompletionHandler: 
    +              ^(InstanceFeaturesResponse 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.instanceFeatures(callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class instanceFeaturesExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new InstanceApi();
    +
    +            try
    +            {
    +                InstanceFeaturesResponse result = apiInstance.instanceFeatures();
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling InstanceApi.instanceFeatures: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\InstanceApi();
    +
    +try {
    +    $result = $api_instance->instanceFeatures();
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling InstanceApi->instanceFeatures: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::InstanceApi;
    +
    +my $api_instance = SWGSDRangel::InstanceApi->new();
    +
    +eval { 
    +    my $result = $api_instance->instanceFeatures();
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling InstanceApi->instanceFeatures: $@\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_features()
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling InstanceApi->instanceFeatures: %s\n" % e)
    +
    +
    + +

    Parameters

    + + + + + + +

    Responses

    +

    Status: 200 - Success

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -47728,7 +48108,7 @@ except ApiException as e:
    - Generated 2021-08-25T15:15:18.832+02:00 + Generated 2021-08-28T23:40:46.879+02:00
    diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index cd6abe0fe..61ce0eafc 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -185,6 +185,23 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/features: + x-swagger-router-controller: instance + get: + description: Get a list of feature plugins available in this instance + operationId: instanceFeatures + tags: + - Instance + responses: + "200": + description: Success + schema: + $ref: "#/definitions/InstanceFeaturesResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/logging: x-swagger-router-controller: instance get: @@ -2398,6 +2415,19 @@ definitions: items: $ref: "#/definitions/ChannelListItem" + InstanceFeaturesResponse: + description: "Summarized information about feature plugins available in this SDRangel instance" + required: + - featurecount + properties: + featurecount: + description: "Number of plugins available" + type: integer + features: + type: array + items: + $ref: "#/definitions/FeatureListItem" + ErrorResponse: required: - message @@ -2484,6 +2514,27 @@ definitions: description: "Index of the channel in the list of registered channels" type: integer + FeatureListItem: + description: "Summarized information about feature plugin" + required: + - id + properties: + name: + description: "Displayable name of the feature plugin" + type: string + idURI: + description: "Key to identify the feature plugin type in URI form" + type: string + id: + description: "Key to identify the feature plugin type as short object name" + type: string + version: + description: "Feature plugin version number" + type: string + index: + description: "Index of the feature in the list of registered channels" + type: integer + DeviceSet: description: "Sampling device and its associated channels" required: diff --git a/sdrbase/webapi/webapiadapter.cpp b/sdrbase/webapi/webapiadapter.cpp index 7119764b9..decb7055f 100644 --- a/sdrbase/webapi/webapiadapter.cpp +++ b/sdrbase/webapi/webapiadapter.cpp @@ -45,6 +45,7 @@ #include "SWGInstanceConfigResponse.h" #include "SWGInstanceDevicesResponse.h" #include "SWGInstanceChannelsResponse.h" +#include "SWGInstanceFeaturesResponse.h" #include "SWGDeviceListItem.h" #include "SWGAudioDevices.h" #include "SWGLocationInformation.h" @@ -346,6 +347,37 @@ int WebAPIAdapter::instanceChannels( return 200; } +int WebAPIAdapter::instanceFeatures( + SWGSDRangel::SWGInstanceFeaturesResponse& response, + SWGSDRangel::SWGErrorResponse& error) +{ + (void) error; + response.init(); + PluginAPI::FeatureRegistrations *featureRegistrations; + int nbFeatureDevices; + + featureRegistrations = m_mainCore->m_pluginManager->getFeatureRegistrations(); + nbFeatureDevices = featureRegistrations->size(); + + response.setFeaturecount(nbFeatureDevices); + QList *features = response.getFeatures(); + + for (int i = 0; i < nbFeatureDevices; i++) + { + features->append(new SWGSDRangel::SWGFeatureListItem); + features->back()->init(); + PluginInterface *featureInterface = featureRegistrations->at(i).m_plugin; + const PluginDescriptor& pluginDescriptor = featureInterface->getPluginDescriptor(); + *features->back()->getVersion() = pluginDescriptor.version; + *features->back()->getName() = pluginDescriptor.displayedName; + *features->back()->getIdUri() = featureRegistrations->at(i).m_featureIdURI; + *features->back()->getId() = featureRegistrations->at(i).m_featureId; + features->back()->setIndex(i); + } + + return 200; +} + int WebAPIAdapter::instanceLoggingGet( SWGSDRangel::SWGLoggingInfo& response, SWGSDRangel::SWGErrorResponse& error) diff --git a/sdrbase/webapi/webapiadapter.h b/sdrbase/webapi/webapiadapter.h index 71654c3a6..765b3a8b8 100644 --- a/sdrbase/webapi/webapiadapter.h +++ b/sdrbase/webapi/webapiadapter.h @@ -64,6 +64,10 @@ public: SWGSDRangel::SWGInstanceChannelsResponse& response, SWGSDRangel::SWGErrorResponse& error); + virtual int instanceFeatures( + SWGSDRangel::SWGInstanceFeaturesResponse& response, + SWGSDRangel::SWGErrorResponse& error); + virtual int instanceLoggingGet( SWGSDRangel::SWGLoggingInfo& response, SWGSDRangel::SWGErrorResponse& error); diff --git a/sdrbase/webapi/webapiadapterinterface.cpp b/sdrbase/webapi/webapiadapterinterface.cpp index 3730b0604..41cc11603 100644 --- a/sdrbase/webapi/webapiadapterinterface.cpp +++ b/sdrbase/webapi/webapiadapterinterface.cpp @@ -23,6 +23,7 @@ QString WebAPIAdapterInterface::instanceSummaryURL = "/sdrangel"; QString WebAPIAdapterInterface::instanceConfigURL = "/sdrangel/config"; QString WebAPIAdapterInterface::instanceDevicesURL = "/sdrangel/devices"; QString WebAPIAdapterInterface::instanceChannelsURL = "/sdrangel/channels"; +QString WebAPIAdapterInterface::instanceFeaturesURL = "/sdrangel/features"; QString WebAPIAdapterInterface::instanceLoggingURL = "/sdrangel/logging"; QString WebAPIAdapterInterface::instanceAudioURL = "/sdrangel/audio"; QString WebAPIAdapterInterface::instanceAudioInputParametersURL = "/sdrangel/audio/input/parameters"; diff --git a/sdrbase/webapi/webapiadapterinterface.h b/sdrbase/webapi/webapiadapterinterface.h index 8bbea9a03..bc52e75ba 100644 --- a/sdrbase/webapi/webapiadapterinterface.h +++ b/sdrbase/webapi/webapiadapterinterface.h @@ -34,6 +34,7 @@ namespace SWGSDRangel class SWGInstanceConfigResponse; class SWGInstanceDevicesResponse; class SWGInstanceChannelsResponse; + class SWGInstanceFeaturesResponse; class SWGPreferences; class SWGLoggingInfo; class SWGAudioDevices; @@ -214,6 +215,20 @@ public: return 501; } + /** + * Handler of /sdrangel/features (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels + * returns the Http status code (default 501: not implemented) + */ + virtual int instanceFeatures( + SWGSDRangel::SWGInstanceFeaturesResponse& response, + SWGSDRangel::SWGErrorResponse& error) + { + (void) response; + error.init(); + *error.getMessage() = QString("Function not implemented"); + return 501; + } + /** * Handler of /sdrangel/logging (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels * returns the Http status code (default 501: not implemented) @@ -1357,6 +1372,7 @@ public: static QString instanceConfigURL; static QString instanceDevicesURL; static QString instanceChannelsURL; + static QString instanceFeaturesURL; static QString instanceLoggingURL; static QString instanceAudioURL; static QString instanceAudioInputParametersURL; diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index f7c50fe72..847682cd8 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -30,6 +30,7 @@ #include "SWGInstanceConfigResponse.h" #include "SWGInstanceDevicesResponse.h" #include "SWGInstanceChannelsResponse.h" +#include "SWGInstanceFeaturesResponse.h" #include "SWGAudioDevices.h" #include "SWGLocationInformation.h" #include "SWGDVSerialDevices.h" @@ -115,6 +116,8 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http instanceDevicesService(request, response); } else if (path == WebAPIAdapterInterface::instanceChannelsURL) { instanceChannelsService(request, response); + } else if (path == WebAPIAdapterInterface::instanceFeaturesURL) { + instanceFeaturesService(request, response); } else if (path == WebAPIAdapterInterface::instanceLoggingURL) { instanceLoggingService(request, response); } else if (path == WebAPIAdapterInterface::instanceAudioURL) { @@ -422,6 +425,33 @@ void WebAPIRequestMapper::instanceChannelsService(qtwebapp::HttpRequest& request } } +void WebAPIRequestMapper::instanceFeaturesService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) +{ + SWGSDRangel::SWGInstanceFeaturesResponse normalResponse; + SWGSDRangel::SWGErrorResponse errorResponse; + response.setHeader("Content-Type", "application/json"); + response.setHeader("Access-Control-Allow-Origin", "*"); + + if (request.getMethod() == "GET") + { + int status = m_adapter->instanceFeatures(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::instanceLoggingService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) { SWGSDRangel::SWGLoggingInfo query; diff --git a/sdrbase/webapi/webapirequestmapper.h b/sdrbase/webapi/webapirequestmapper.h index c9de42355..65fb3ea1a 100644 --- a/sdrbase/webapi/webapirequestmapper.h +++ b/sdrbase/webapi/webapirequestmapper.h @@ -58,6 +58,7 @@ private: void instanceConfigService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void instanceDevicesService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void instanceChannelsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); + void instanceFeaturesService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void instanceLoggingService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void instanceAudioService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void instanceAudioInputParametersService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index 402283d39..76fe48fff 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -185,6 +185,23 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/features: + x-swagger-router-controller: instance + get: + description: Get a list of feature plugins available in this instance + operationId: instanceFeatures + tags: + - Instance + responses: + "200": + description: Success + schema: + $ref: "#/definitions/InstanceFeaturesResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/logging: x-swagger-router-controller: instance get: @@ -2398,6 +2415,19 @@ definitions: items: $ref: "#/definitions/ChannelListItem" + InstanceFeaturesResponse: + description: "Summarized information about feature plugins available in this SDRangel instance" + required: + - featurecount + properties: + featurecount: + description: "Number of plugins available" + type: integer + features: + type: array + items: + $ref: "#/definitions/FeatureListItem" + ErrorResponse: required: - message @@ -2484,6 +2514,27 @@ definitions: description: "Index of the channel in the list of registered channels" type: integer + FeatureListItem: + description: "Summarized information about feature plugin" + required: + - id + properties: + name: + description: "Displayable name of the feature plugin" + type: string + idURI: + description: "Key to identify the feature plugin type in URI form" + type: string + id: + description: "Key to identify the feature plugin type as short object name" + type: string + version: + description: "Feature plugin version number" + type: string + index: + description: "Index of the feature in the list of registered channels" + type: integer + DeviceSet: description: "Sampling device and its associated channels" required: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 428dadd3d..4b3f7183c 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -4808,6 +4808,32 @@ margin-bottom: 20px; } }, "description" : "Represents a FeatureSetPreset::FeatureConfig object" +}; + defs.FeatureListItem = { + "required" : [ "id" ], + "properties" : { + "name" : { + "type" : "string", + "description" : "Displayable name of the feature plugin" + }, + "idURI" : { + "type" : "string", + "description" : "Key to identify the feature plugin type in URI form" + }, + "id" : { + "type" : "string", + "description" : "Key to identify the feature plugin type as short object name" + }, + "version" : { + "type" : "string", + "description" : "Feature plugin version number" + }, + "index" : { + "type" : "integer", + "description" : "Index of the feature in the list of registered channels" + } + }, + "description" : "Summarized information about feature plugin" }; defs.FeatureReport = { "required" : [ "featureType" ], @@ -6061,6 +6087,22 @@ margin-bottom: 20px; } }, "description" : "Summarized information about logical devices from hardware devices attached to this SDRangel instance" +}; + defs.InstanceFeaturesResponse = { + "required" : [ "featurecount" ], + "properties" : { + "featurecount" : { + "type" : "integer", + "description" : "Number of plugins available" + }, + "features" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/FeatureListItem" + } + } + }, + "description" : "Summarized information about feature plugins available in this SDRangel instance" }; defs.InstanceSummaryResponse = { "required" : [ "appname", "architecture", "devicesetlist", "dspRxBits", "dspTxBits", "os", "pid", "qtVersion", "version" ], @@ -12593,6 +12635,9 @@ margin-bottom: 20px;
  • instanceFeatureSetsGet
  • +
  • + instanceFeatures +
  • instanceLimeRFEConfigGet
  • @@ -40680,6 +40725,341 @@ except ApiException as e:
    +
    +
    +
    +

    instanceFeatures

    +

    +
    +
    +
    +

    +

    Get a list of feature plugins available in this instance

    +

    +
    +
    /sdrangel/features
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/features"
    +
    +
    +
    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 {
    +            InstanceFeaturesResponse result = apiInstance.instanceFeatures();
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceFeatures");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.InstanceApi;
    +
    +public class InstanceApiExample {
    +
    +    public static void main(String[] args) {
    +        InstanceApi apiInstance = new InstanceApi();
    +        try {
    +            InstanceFeaturesResponse result = apiInstance.instanceFeatures();
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling InstanceApi#instanceFeatures");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    
    +InstanceApi *apiInstance = [[InstanceApi alloc] init];
    +
    +[apiInstance instanceFeaturesWithCompletionHandler: 
    +              ^(InstanceFeaturesResponse 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.instanceFeatures(callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class instanceFeaturesExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new InstanceApi();
    +
    +            try
    +            {
    +                InstanceFeaturesResponse result = apiInstance.instanceFeatures();
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling InstanceApi.instanceFeatures: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\InstanceApi();
    +
    +try {
    +    $result = $api_instance->instanceFeatures();
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling InstanceApi->instanceFeatures: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::InstanceApi;
    +
    +my $api_instance = SWGSDRangel::InstanceApi->new();
    +
    +eval { 
    +    my $result = $api_instance->instanceFeatures();
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling InstanceApi->instanceFeatures: $@\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_features()
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling InstanceApi->instanceFeatures: %s\n" % e)
    +
    +
    + +

    Parameters

    + + + + + + +

    Responses

    +

    Status: 200 - Success

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -47728,7 +48108,7 @@ except ApiException as e:
    - Generated 2021-08-25T15:15:18.832+02:00 + Generated 2021-08-28T23:40:46.879+02:00
    diff --git a/swagger/sdrangel/code/qt5/client/SWGFeatureListItem.cpp b/swagger/sdrangel/code/qt5/client/SWGFeatureListItem.cpp new file mode 100644 index 000000000..36dff127b --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGFeatureListItem.cpp @@ -0,0 +1,208 @@ +/** + * 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: 6.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 "SWGFeatureListItem.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGFeatureListItem::SWGFeatureListItem(QString* json) { + init(); + this->fromJson(*json); +} + +SWGFeatureListItem::SWGFeatureListItem() { + name = nullptr; + m_name_isSet = false; + id_uri = nullptr; + m_id_uri_isSet = false; + id = nullptr; + m_id_isSet = false; + version = nullptr; + m_version_isSet = false; + index = 0; + m_index_isSet = false; +} + +SWGFeatureListItem::~SWGFeatureListItem() { + this->cleanup(); +} + +void +SWGFeatureListItem::init() { + name = new QString(""); + m_name_isSet = false; + id_uri = new QString(""); + m_id_uri_isSet = false; + id = new QString(""); + m_id_isSet = false; + version = new QString(""); + m_version_isSet = false; + index = 0; + m_index_isSet = false; +} + +void +SWGFeatureListItem::cleanup() { + if(name != nullptr) { + delete name; + } + if(id_uri != nullptr) { + delete id_uri; + } + if(id != nullptr) { + delete id; + } + if(version != nullptr) { + delete version; + } + +} + +SWGFeatureListItem* +SWGFeatureListItem::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGFeatureListItem::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString"); + + ::SWGSDRangel::setValue(&id_uri, pJson["idURI"], "QString", "QString"); + + ::SWGSDRangel::setValue(&id, pJson["id"], "QString", "QString"); + + ::SWGSDRangel::setValue(&version, pJson["version"], "QString", "QString"); + + ::SWGSDRangel::setValue(&index, pJson["index"], "qint32", ""); + +} + +QString +SWGFeatureListItem::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGFeatureListItem::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(name != nullptr && *name != QString("")){ + toJsonValue(QString("name"), name, obj, QString("QString")); + } + if(id_uri != nullptr && *id_uri != QString("")){ + toJsonValue(QString("idURI"), id_uri, obj, QString("QString")); + } + if(id != nullptr && *id != QString("")){ + toJsonValue(QString("id"), id, obj, QString("QString")); + } + if(version != nullptr && *version != QString("")){ + toJsonValue(QString("version"), version, obj, QString("QString")); + } + if(m_index_isSet){ + obj->insert("index", QJsonValue(index)); + } + + return obj; +} + +QString* +SWGFeatureListItem::getName() { + return name; +} +void +SWGFeatureListItem::setName(QString* name) { + this->name = name; + this->m_name_isSet = true; +} + +QString* +SWGFeatureListItem::getIdUri() { + return id_uri; +} +void +SWGFeatureListItem::setIdUri(QString* id_uri) { + this->id_uri = id_uri; + this->m_id_uri_isSet = true; +} + +QString* +SWGFeatureListItem::getId() { + return id; +} +void +SWGFeatureListItem::setId(QString* id) { + this->id = id; + this->m_id_isSet = true; +} + +QString* +SWGFeatureListItem::getVersion() { + return version; +} +void +SWGFeatureListItem::setVersion(QString* version) { + this->version = version; + this->m_version_isSet = true; +} + +qint32 +SWGFeatureListItem::getIndex() { + return index; +} +void +SWGFeatureListItem::setIndex(qint32 index) { + this->index = index; + this->m_index_isSet = true; +} + + +bool +SWGFeatureListItem::isSet(){ + bool isObjectUpdated = false; + do{ + if(name && *name != QString("")){ + isObjectUpdated = true; break; + } + if(id_uri && *id_uri != QString("")){ + isObjectUpdated = true; break; + } + if(id && *id != QString("")){ + isObjectUpdated = true; break; + } + if(version && *version != QString("")){ + isObjectUpdated = true; break; + } + if(m_index_isSet){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGFeatureListItem.h b/swagger/sdrangel/code/qt5/client/SWGFeatureListItem.h new file mode 100644 index 000000000..bcc3f87a8 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGFeatureListItem.h @@ -0,0 +1,83 @@ +/** + * 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: 6.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. + */ + +/* + * SWGFeatureListItem.h + * + * Summarized information about feature plugin + */ + +#ifndef SWGFeatureListItem_H_ +#define SWGFeatureListItem_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGFeatureListItem: public SWGObject { +public: + SWGFeatureListItem(); + SWGFeatureListItem(QString* json); + virtual ~SWGFeatureListItem(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGFeatureListItem* fromJson(QString &jsonString) override; + + QString* getName(); + void setName(QString* name); + + QString* getIdUri(); + void setIdUri(QString* id_uri); + + QString* getId(); + void setId(QString* id); + + QString* getVersion(); + void setVersion(QString* version); + + qint32 getIndex(); + void setIndex(qint32 index); + + + virtual bool isSet() override; + +private: + QString* name; + bool m_name_isSet; + + QString* id_uri; + bool m_id_uri_isSet; + + QString* id; + bool m_id_isSet; + + QString* version; + bool m_version_isSet; + + qint32 index; + bool m_index_isSet; + +}; + +} + +#endif /* SWGFeatureListItem_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp index be6bf9631..0ece46e18 100644 --- a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp @@ -1108,6 +1108,58 @@ SWGInstanceApi::instanceFeatureSetsGetCallback(SWGHttpRequestWorker * worker) { } } +void +SWGInstanceApi::instanceFeatures() { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/features"); + + + + 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::instanceFeaturesCallback); + + worker->execute(&input); +} + +void +SWGInstanceApi::instanceFeaturesCallback(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); + SWGInstanceFeaturesResponse* output = static_cast(create(json, QString("SWGInstanceFeaturesResponse"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit instanceFeaturesSignal(output); + } else { + emit instanceFeaturesSignalE(output, error_type, error_str); + emit instanceFeaturesSignalEFull(worker, error_type, error_str); + } +} + void SWGInstanceApi::instanceLimeRFEConfigGet(QString* serial) { QString fullPath; diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.h b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.h index b32536f18..b2700bfb4 100644 --- a/swagger/sdrangel/code/qt5/client/SWGInstanceApi.h +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceApi.h @@ -27,6 +27,7 @@ #include "SWGInstanceChannelsResponse.h" #include "SWGInstanceConfigResponse.h" #include "SWGInstanceDevicesResponse.h" +#include "SWGInstanceFeaturesResponse.h" #include "SWGInstanceSummaryResponse.h" #include "SWGLimeRFEDevices.h" #include "SWGLimeRFEPower.h" @@ -76,6 +77,7 @@ public: void instanceDeviceSetsGet(); void instanceDevices(qint32 direction); void instanceFeatureSetsGet(); + void instanceFeatures(); void instanceLimeRFEConfigGet(QString* serial); void instanceLimeRFEConfigPut(SWGLimeRFESettings& body); void instanceLimeRFEPowerGet(QString* serial); @@ -115,6 +117,7 @@ private: void instanceDeviceSetsGetCallback (SWGHttpRequestWorker * worker); void instanceDevicesCallback (SWGHttpRequestWorker * worker); void instanceFeatureSetsGetCallback (SWGHttpRequestWorker * worker); + void instanceFeaturesCallback (SWGHttpRequestWorker * worker); void instanceLimeRFEConfigGetCallback (SWGHttpRequestWorker * worker); void instanceLimeRFEConfigPutCallback (SWGHttpRequestWorker * worker); void instanceLimeRFEPowerGetCallback (SWGHttpRequestWorker * worker); @@ -154,6 +157,7 @@ signals: void instanceDeviceSetsGetSignal(SWGDeviceSetList* summary); void instanceDevicesSignal(SWGInstanceDevicesResponse* summary); void instanceFeatureSetsGetSignal(SWGFeatureSetList* summary); + void instanceFeaturesSignal(SWGInstanceFeaturesResponse* summary); void instanceLimeRFEConfigGetSignal(SWGLimeRFESettings* summary); void instanceLimeRFEConfigPutSignal(SWGSuccessResponse* summary); void instanceLimeRFEPowerGetSignal(SWGLimeRFEPower* summary); @@ -192,6 +196,7 @@ signals: void instanceDeviceSetsGetSignalE(SWGDeviceSetList* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDevicesSignalE(SWGInstanceDevicesResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceFeatureSetsGetSignalE(SWGFeatureSetList* 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); @@ -230,6 +235,7 @@ signals: void instanceDeviceSetsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDevicesSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceFeatureSetsGetSignalEFull(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); diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceFeaturesResponse.cpp b/swagger/sdrangel/code/qt5/client/SWGInstanceFeaturesResponse.cpp new file mode 100644 index 000000000..c003a3cc9 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceFeaturesResponse.cpp @@ -0,0 +1,137 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 6.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 "SWGInstanceFeaturesResponse.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGInstanceFeaturesResponse::SWGInstanceFeaturesResponse(QString* json) { + init(); + this->fromJson(*json); +} + +SWGInstanceFeaturesResponse::SWGInstanceFeaturesResponse() { + featurecount = 0; + m_featurecount_isSet = false; + features = nullptr; + m_features_isSet = false; +} + +SWGInstanceFeaturesResponse::~SWGInstanceFeaturesResponse() { + this->cleanup(); +} + +void +SWGInstanceFeaturesResponse::init() { + featurecount = 0; + m_featurecount_isSet = false; + features = new QList(); + m_features_isSet = false; +} + +void +SWGInstanceFeaturesResponse::cleanup() { + + if(features != nullptr) { + auto arr = features; + for(auto o: *arr) { + delete o; + } + delete features; + } +} + +SWGInstanceFeaturesResponse* +SWGInstanceFeaturesResponse::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGInstanceFeaturesResponse::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&featurecount, pJson["featurecount"], "qint32", ""); + + + ::SWGSDRangel::setValue(&features, pJson["features"], "QList", "SWGFeatureListItem"); +} + +QString +SWGInstanceFeaturesResponse::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGInstanceFeaturesResponse::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_featurecount_isSet){ + obj->insert("featurecount", QJsonValue(featurecount)); + } + if(features && features->size() > 0){ + toJsonArray((QList*)features, obj, "features", "SWGFeatureListItem"); + } + + return obj; +} + +qint32 +SWGInstanceFeaturesResponse::getFeaturecount() { + return featurecount; +} +void +SWGInstanceFeaturesResponse::setFeaturecount(qint32 featurecount) { + this->featurecount = featurecount; + this->m_featurecount_isSet = true; +} + +QList* +SWGInstanceFeaturesResponse::getFeatures() { + return features; +} +void +SWGInstanceFeaturesResponse::setFeatures(QList* features) { + this->features = features; + this->m_features_isSet = true; +} + + +bool +SWGInstanceFeaturesResponse::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_featurecount_isSet){ + isObjectUpdated = true; break; + } + if(features && (features->size() > 0)){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceFeaturesResponse.h b/swagger/sdrangel/code/qt5/client/SWGInstanceFeaturesResponse.h new file mode 100644 index 000000000..4ff40fe02 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceFeaturesResponse.h @@ -0,0 +1,66 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 6.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. + */ + +/* + * SWGInstanceFeaturesResponse.h + * + * Summarized information about feature plugins available in this SDRangel instance + */ + +#ifndef SWGInstanceFeaturesResponse_H_ +#define SWGInstanceFeaturesResponse_H_ + +#include + + +#include "SWGFeatureListItem.h" +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGInstanceFeaturesResponse: public SWGObject { +public: + SWGInstanceFeaturesResponse(); + SWGInstanceFeaturesResponse(QString* json); + virtual ~SWGInstanceFeaturesResponse(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGInstanceFeaturesResponse* fromJson(QString &jsonString) override; + + qint32 getFeaturecount(); + void setFeaturecount(qint32 featurecount); + + QList* getFeatures(); + void setFeatures(QList* features); + + + virtual bool isSet() override; + +private: + qint32 featurecount; + bool m_featurecount_isSet; + + QList* features; + bool m_features_isSet; + +}; + +} + +#endif /* SWGInstanceFeaturesResponse_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 6d4480837..8d21beeec 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -103,6 +103,7 @@ #include "SWGFeature.h" #include "SWGFeatureActions.h" #include "SWGFeatureConfig.h" +#include "SWGFeatureListItem.h" #include "SWGFeatureReport.h" #include "SWGFeatureSet.h" #include "SWGFeatureSetList.h" @@ -139,6 +140,7 @@ #include "SWGInstanceChannelsResponse.h" #include "SWGInstanceConfigResponse.h" #include "SWGInstanceDevicesResponse.h" +#include "SWGInstanceFeaturesResponse.h" #include "SWGInstanceSummaryResponse.h" #include "SWGInterferometerSettings.h" #include "SWGKiwiSDRReport.h" @@ -727,6 +729,11 @@ namespace SWGSDRangel { obj->init(); return obj; } + if(QString("SWGFeatureListItem").compare(type) == 0) { + SWGFeatureListItem *obj = new SWGFeatureListItem(); + obj->init(); + return obj; + } if(QString("SWGFeatureReport").compare(type) == 0) { SWGFeatureReport *obj = new SWGFeatureReport(); obj->init(); @@ -907,6 +914,11 @@ namespace SWGSDRangel { obj->init(); return obj; } + if(QString("SWGInstanceFeaturesResponse").compare(type) == 0) { + SWGInstanceFeaturesResponse *obj = new SWGInstanceFeaturesResponse(); + obj->init(); + return obj; + } if(QString("SWGInstanceSummaryResponse").compare(type) == 0) { SWGInstanceSummaryResponse *obj = new SWGInstanceSummaryResponse(); obj->init();