From 6fbbd14fd1d1e5050406b79b605316f1efb5d67e Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 19 Mar 2018 00:08:38 +0100 Subject: [PATCH] Web API: entry point to get all channel reports at once --- sdrbase/resources/webapi/doc/html2/index.html | 486 +++++++++++++++++- .../resources/webapi/doc/swagger/swagger.yaml | 49 ++ sdrbase/webapi/webapiadapterinterface.cpp | 1 + sdrbase/webapi/webapiadapterinterface.h | 16 + sdrbase/webapi/webapirequestmapper.cpp | 40 ++ sdrbase/webapi/webapirequestmapper.h | 1 + sdrgui/webapi/webapiadaptergui.cpp | 81 +++ sdrgui/webapi/webapiadaptergui.h | 6 + swagger/sdrangel/api/swagger/swagger.yaml | 54 +- swagger/sdrangel/code/html2/index.html | 486 +++++++++++++++++- .../sdrangel/code/qt5/client/SWGChannel.cpp | 23 + swagger/sdrangel/code/qt5/client/SWGChannel.h | 7 + .../code/qt5/client/SWGChannelsDetail.cpp | 133 +++++ .../code/qt5/client/SWGChannelsDetail.h | 65 +++ .../code/qt5/client/SWGDeviceSetApi.cpp | 54 ++ .../code/qt5/client/SWGDeviceSetApi.h | 6 + .../code/qt5/client/SWGModelFactory.h | 4 + 17 files changed, 1506 insertions(+), 6 deletions(-) create mode 100644 swagger/sdrangel/code/qt5/client/SWGChannelsDetail.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGChannelsDetail.h diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 8f924b78d..2a15ee373 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -807,6 +807,9 @@ margin-bottom: 20px; "deltaFrequency" : { "type" : "integer", "description" : "Channel shift frequency in Hz from the center of baseband" + }, + "report" : { + "$ref" : "#/definitions/ChannelReport" } }, "description" : "Channel summarized information" @@ -882,6 +885,23 @@ margin-bottom: 20px; } }, "description" : "Base channel settings. The specific channel settings present depends on channelType." +}; + defs.ChannelsDetail = { + "required" : [ "channelcount" ], + "properties" : { + "channelcount" : { + "type" : "integer", + "description" : "Number of channels in the set" + }, + "channels" : { + "type" : "array", + "description" : "Channels list", + "items" : { + "$ref" : "#/definitions/Channel" + } + } + }, + "description" : "All channels detailed information" }; defs.DVSeralDevices = { "required" : [ "nbDevices" ], @@ -1756,6 +1776,9 @@ margin-bottom: 20px;
  • devicesetChannelSettingsPut
  • +
  • + devicesetChannelsReportGet +
  • devicesetDevicePut
  • @@ -4971,6 +4994,467 @@ $(document).ready(function() {
    +
    +
    +
    +

    devicesetChannelsReportGet

    +

    +
    +
    +
    +

    +

    get channels report

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/channels/report
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/channels/report"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        try {
    +            ChannelsDetail result = apiInstance.devicesetChannelsReportGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelsReportGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        try {
    +            ChannelsDetail result = apiInstance.devicesetChannelsReportGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelsReportGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetChannelsReportGetWith:deviceSetIndex
    +              completionHandler: ^(ChannelsDetail output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetChannelsReportGet(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetChannelsReportGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                ChannelsDetail result = apiInstance.devicesetChannelsReportGet(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetChannelsReportGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +
    +try {
    +    $result = $api_instance->devicesetChannelsReportGet($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetChannelsReportGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +
    +eval { 
    +    my $result = $api_instance->devicesetChannelsReportGet(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetChannelsReportGet: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +
    +try: 
    +    api_response = api_instance.deviceset_channels_report_get(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetChannelsReportGet: %s\n" % e)
    +
    +
    + +

    Parameters

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

    Responses

    +

    Status: 200 - On success return channels report information

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

    Status: 400 - Invalid device set index

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

    Status: 404 - Device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -17472,7 +17956,7 @@ except ApiException as e:
    - Generated 2018-03-18T11:03:22.829+01:00 + Generated 2018-03-18T22:42:33.187+01:00
    diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index 64af08125..cf43b57cd 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -810,6 +810,38 @@ paths: $ref: "#/responses/Response_500" "501": $ref: "#/responses/Response_501" + + /sdrangel/deviceset/{deviceSetIndex}/channels/report: + x-swagger-router-controller: deviceset + get: + description: get channels report + operationId: devicesetChannelsReportGet + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + responses: + "200": + description: On success return channels report information + schema: + $ref: "#/definitions/ChannelsDetail" + "400": + description: Invalid device set index + schema: + $ref: "#/definitions/ErrorResponse" + "404": + description: Device not found + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/channel: x-swagger-router-controller: deviceset @@ -1302,6 +1334,23 @@ definitions: deltaFrequency: description: "Channel shift frequency in Hz from the center of baseband" type: integer + report: + $ref: "#/definitions/ChannelReport" + + ChannelsDetail: + description: "All channels detailed information" + required: + - channelcount + properties: + channelcount: + description: "Number of channels in the set" + type: integer + channels: + description: "Channels list" + type: array + items: + $ref: "#/definitions/Channel" + AudioDevices: description: "List of audio devices available in the system" diff --git a/sdrbase/webapi/webapiadapterinterface.cpp b/sdrbase/webapi/webapiadapterinterface.cpp index 9e2b2af3c..169cc44c5 100644 --- a/sdrbase/webapi/webapiadapterinterface.cpp +++ b/sdrbase/webapi/webapiadapterinterface.cpp @@ -36,6 +36,7 @@ std::regex WebAPIAdapterInterface::devicesetFocusURLRe("^/sdrangel/deviceset/([0 std::regex WebAPIAdapterInterface::devicesetDeviceURLRe("^/sdrangel/deviceset/([0-9]{1,2})/device$"); std::regex WebAPIAdapterInterface::devicesetDeviceSettingsURLRe("^/sdrangel/deviceset/([0-9]{1,2})/device/settings$"); std::regex WebAPIAdapterInterface::devicesetDeviceRunURLRe("^/sdrangel/deviceset/([0-9]{1,2})/device/run"); +std::regex WebAPIAdapterInterface::devicesetChannelsReportURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channels/report$"); std::regex WebAPIAdapterInterface::devicesetChannelURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel$"); std::regex WebAPIAdapterInterface::devicesetChannelIndexURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel/([0-9]{1,2})$"); std::regex WebAPIAdapterInterface::devicesetChannelSettingsURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel/([0-9]{1,2})/settings$"); diff --git a/sdrbase/webapi/webapiadapterinterface.h b/sdrbase/webapi/webapiadapterinterface.h index ca16f738e..a7dd4a5dc 100644 --- a/sdrbase/webapi/webapiadapterinterface.h +++ b/sdrbase/webapi/webapiadapterinterface.h @@ -46,6 +46,7 @@ namespace SWGSDRangel class SWGDeviceListItem; class SWGDeviceSettings; class SWGDeviceState; + class SWGChannelsDetail; class SWGChannelSettings; class SWGChannelReport; class SWGSuccessResponse; @@ -454,6 +455,20 @@ public: return 501; } + /** + * Handler of /sdrangel/deviceset/{devicesetIndex}/channels/report (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels + * returns the Http status code (default 501: not implemented) + */ + virtual int devicesetChannelsReportGet( + int deviceSetIndex __attribute__((unused)), + SWGSDRangel::SWGChannelsDetail& response __attribute__((unused)), + SWGSDRangel::SWGErrorResponse& error) + { + error.init(); + *error.getMessage() = QString("Function not implemented"); + return 501; + } + /** * Handler of /sdrangel/deviceset/{deviceSetIndex}/channel (POST) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels * returns the Http status code (default 501: not implemented) @@ -553,6 +568,7 @@ public: static std::regex devicesetChannelIndexURLRe; static std::regex devicesetChannelSettingsURLRe; static std::regex devicesetChannelReportURLRe; + static std::regex devicesetChannelsReportURLRe; }; diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index ad43613b8..dfe7c8a3e 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -38,6 +38,7 @@ #include "SWGPresetExport.h" #include "SWGDeviceSettings.h" #include "SWGDeviceState.h" +#include "SWGChannelsDetail.h" #include "SWGChannelSettings.h" #include "SWGChannelReport.h" #include "SWGSuccessResponse.h" @@ -113,6 +114,8 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http devicesetDeviceSettingsService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetDeviceRunURLRe)) { devicesetDeviceRunService(std::string(desc_match[1]), request, response); + } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetChannelsReportURLRe)) { + devicesetChannelsReportService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetChannelURLRe)) { devicesetChannelService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetChannelIndexURLRe)) { @@ -1065,6 +1068,43 @@ void WebAPIRequestMapper::devicesetDeviceRunService(const std::string& indexStr, } } +void WebAPIRequestMapper::devicesetChannelsReportService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) +{ + SWGSDRangel::SWGErrorResponse errorResponse; + response.setHeader("Content-Type", "application/json"); + + if (request.getMethod() == "GET") + { + try + { + SWGSDRangel::SWGChannelsDetail normalResponse; + int deviceSetIndex = boost::lexical_cast(indexStr); + int status = m_adapter->devicesetChannelsReportGet(deviceSetIndex, normalResponse, errorResponse); + response.setStatus(status); + + if (status/100 == 2) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + } + catch (const boost::bad_lexical_cast &e) + { + errorResponse.init(); + *errorResponse.getMessage() = "Wrong integer conversion on device set index"; + response.setStatus(400,"Invalid data"); + 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::devicesetChannelService( const std::string& deviceSetIndexStr, qtwebapp::HttpRequest& request, diff --git a/sdrbase/webapi/webapirequestmapper.h b/sdrbase/webapi/webapirequestmapper.h index 3c5aa8d07..f4730362c 100644 --- a/sdrbase/webapi/webapirequestmapper.h +++ b/sdrbase/webapi/webapirequestmapper.h @@ -65,6 +65,7 @@ private: void devicesetDeviceService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetDeviceSettingsService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetDeviceRunService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); + void devicesetChannelsReportService(const std::string& deviceSetIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetChannelService(const std::string& deviceSetIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetChannelIndexService(const std::string& deviceSetIndexStr, const std::string& channelIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetChannelSettingsService(const std::string& deviceSetIndexStr, const std::string& channelIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); diff --git a/sdrgui/webapi/webapiadaptergui.cpp b/sdrgui/webapi/webapiadaptergui.cpp index fa9144c95..94db43e24 100644 --- a/sdrgui/webapi/webapiadaptergui.cpp +++ b/sdrgui/webapi/webapiadaptergui.cpp @@ -53,6 +53,7 @@ #include "SWGPresetIdentifier.h" #include "SWGDeviceSettings.h" #include "SWGDeviceState.h" +#include "SWGChannelsDetail.h" #include "SWGChannelSettings.h" #include "SWGChannelReport.h" #include "SWGSuccessResponse.h" @@ -983,6 +984,27 @@ int WebAPIAdapterGUI::devicesetDeviceRunDelete( } } +int WebAPIAdapterGUI::devicesetChannelsReportGet( + int deviceSetIndex, + SWGSDRangel::SWGChannelsDetail& response, + SWGSDRangel::SWGErrorResponse& error) +{ + if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainWindow.m_deviceUIs.size())) + { + const DeviceUISet *deviceSet = m_mainWindow.m_deviceUIs[deviceSetIndex]; + getChannelsDetail(&response, deviceSet); + + return 200; + } + else + { + error.init(); + *error.getMessage() = QString("There is no device set with index %1").arg(deviceSetIndex); + + return 404; + } +} + int WebAPIAdapterGUI::devicesetChannelPost( int deviceSetIndex, SWGSDRangel::SWGChannelSettings& query, @@ -1435,6 +1457,65 @@ void WebAPIAdapterGUI::getDeviceSet(SWGSDRangel::SWGDeviceSet *deviceSet, const } } +void WebAPIAdapterGUI::getChannelsDetail(SWGSDRangel::SWGChannelsDetail *channelsDetail, const DeviceUISet* deviceUISet) +{ + channelsDetail->init(); + SWGSDRangel::SWGChannelReport *channelReport; + QString channelReportError; + + if (deviceUISet->m_deviceSinkEngine) // Tx data + { + channelsDetail->setChannelcount(deviceUISet->m_deviceSinkAPI->getNbChannels()); + QList *channels = channelsDetail->getChannels(); + + for (int i = 0; i < channelsDetail->getChannelcount(); i++) + { + channels->append(new SWGSDRangel::SWGChannel); + channels->back()->init(); + ChannelSourceAPI *channel = deviceUISet->m_deviceSinkAPI->getChanelAPIAt(i); + channels->back()->setDeltaFrequency(channel->getCenterFrequency()); + channels->back()->setIndex(channel->getIndexInDeviceSet()); + channels->back()->setUid(channel->getUID()); + channel->getIdentifier(*channels->back()->getId()); + channel->getTitle(*channels->back()->getTitle()); + + channelReport = new SWGSDRangel::SWGChannelReport(); + + if (channel->webapiReportGet(*channelReport, channelReportError) != 501) { + channels->back()->setReport(channelReport); + } else { + delete channelReport; + } + } + } + + if (deviceUISet->m_deviceSourceEngine) // Rx data + { + channelsDetail->setChannelcount(deviceUISet->m_deviceSourceAPI->getNbChannels()); + QList *channels = channelsDetail->getChannels(); + + for (int i = 0; i < channelsDetail->getChannelcount(); i++) + { + channels->append(new SWGSDRangel::SWGChannel); + channels->back()->init(); + ChannelSinkAPI *channel = deviceUISet->m_deviceSourceAPI->getChanelAPIAt(i); + channels->back()->setDeltaFrequency(channel->getCenterFrequency()); + channels->back()->setIndex(channel->getIndexInDeviceSet()); + channels->back()->setUid(channel->getUID()); + channel->getIdentifier(*channels->back()->getId()); + channel->getTitle(*channels->back()->getTitle()); + + channelReport = new SWGSDRangel::SWGChannelReport(); + + if (channel->webapiReportGet(*channelReport, channelReportError) != 501) { + channels->back()->setReport(channelReport); + } else { + delete channelReport; + } + } + } +} + QtMsgType WebAPIAdapterGUI::getMsgTypeFromString(const QString& msgTypeString) { if (msgTypeString == "debug") { diff --git a/sdrgui/webapi/webapiadaptergui.h b/sdrgui/webapi/webapiadaptergui.h index 37be03994..7edc56a98 100644 --- a/sdrgui/webapi/webapiadaptergui.h +++ b/sdrgui/webapi/webapiadaptergui.h @@ -159,6 +159,11 @@ public: SWGSDRangel::SWGDeviceState& response, SWGSDRangel::SWGErrorResponse& error); + virtual int devicesetChannelsReportGet( + int deviceSetIndex, + SWGSDRangel::SWGChannelsDetail& response, + SWGSDRangel::SWGErrorResponse& error); + virtual int devicesetChannelPost( int deviceSetIndex, SWGSDRangel::SWGChannelSettings& query, @@ -196,6 +201,7 @@ private: void getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList); void getDeviceSet(SWGSDRangel::SWGDeviceSet *deviceSet, const DeviceUISet* deviceUISet, int deviceUISetIndex); + void getChannelsDetail(SWGSDRangel::SWGChannelsDetail *channelsDetail, const DeviceUISet* deviceUISet); static QtMsgType getMsgTypeFromString(const QString& msgTypeString); static void getMsgTypeString(const QtMsgType& msgType, QString& level); }; diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index e1ae42dc5..a08f7e555 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -810,6 +810,38 @@ paths: $ref: "#/responses/Response_500" "501": $ref: "#/responses/Response_501" + + /sdrangel/deviceset/{deviceSetIndex}/channels/report: + x-swagger-router-controller: deviceset + get: + description: get channels report + operationId: devicesetChannelsReportGet + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + responses: + "200": + description: On success return channels report information + schema: + $ref: "#/definitions/ChannelsDetail" + "400": + description: Invalid device set index + schema: + $ref: "#/definitions/ErrorResponse" + "404": + description: Device not found + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/channel: x-swagger-router-controller: deviceset @@ -1302,6 +1334,23 @@ definitions: deltaFrequency: description: "Channel shift frequency in Hz from the center of baseband" type: integer + report: + $ref: "#/definitions/ChannelReport" + + ChannelsDetail: + description: "All channels detailed information" + required: + - channelcount + properties: + channelcount: + description: "Number of channels in the set" + type: integer + channels: + description: "Channels list" + type: array + items: + $ref: "#/definitions/Channel" + AudioDevices: description: "List of audio devices available in the system" @@ -1551,11 +1600,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModSettings" ChannelReport: - description: Base channel report. The specific channel report present depends on channelType. + description: Base channel report. The specific channel report present depends on channelType or paremt context. discriminator: channelType - required: - - channelType - - tx properties: channelType: description: Channel type code diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 8f924b78d..2a15ee373 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -807,6 +807,9 @@ margin-bottom: 20px; "deltaFrequency" : { "type" : "integer", "description" : "Channel shift frequency in Hz from the center of baseband" + }, + "report" : { + "$ref" : "#/definitions/ChannelReport" } }, "description" : "Channel summarized information" @@ -882,6 +885,23 @@ margin-bottom: 20px; } }, "description" : "Base channel settings. The specific channel settings present depends on channelType." +}; + defs.ChannelsDetail = { + "required" : [ "channelcount" ], + "properties" : { + "channelcount" : { + "type" : "integer", + "description" : "Number of channels in the set" + }, + "channels" : { + "type" : "array", + "description" : "Channels list", + "items" : { + "$ref" : "#/definitions/Channel" + } + } + }, + "description" : "All channels detailed information" }; defs.DVSeralDevices = { "required" : [ "nbDevices" ], @@ -1756,6 +1776,9 @@ margin-bottom: 20px;
  • devicesetChannelSettingsPut
  • +
  • + devicesetChannelsReportGet +
  • devicesetDevicePut
  • @@ -4971,6 +4994,467 @@ $(document).ready(function() {
    +
    +
    +
    +

    devicesetChannelsReportGet

    +

    +
    +
    +
    +

    +

    get channels report

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/channels/report
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/channels/report"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        try {
    +            ChannelsDetail result = apiInstance.devicesetChannelsReportGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelsReportGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        try {
    +            ChannelsDetail result = apiInstance.devicesetChannelsReportGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelsReportGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetChannelsReportGetWith:deviceSetIndex
    +              completionHandler: ^(ChannelsDetail output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetChannelsReportGet(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetChannelsReportGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                ChannelsDetail result = apiInstance.devicesetChannelsReportGet(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetChannelsReportGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +
    +try {
    +    $result = $api_instance->devicesetChannelsReportGet($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetChannelsReportGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +
    +eval { 
    +    my $result = $api_instance->devicesetChannelsReportGet(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetChannelsReportGet: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +
    +try: 
    +    api_response = api_instance.deviceset_channels_report_get(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetChannelsReportGet: %s\n" % e)
    +
    +
    + +

    Parameters

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

    Responses

    +

    Status: 200 - On success return channels report information

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

    Status: 400 - Invalid device set index

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

    Status: 404 - Device not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -17472,7 +17956,7 @@ except ApiException as e:
    - Generated 2018-03-18T11:03:22.829+01:00 + Generated 2018-03-18T22:42:33.187+01:00
    diff --git a/swagger/sdrangel/code/qt5/client/SWGChannel.cpp b/swagger/sdrangel/code/qt5/client/SWGChannel.cpp index 85280b5c9..f8b666dcc 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannel.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannel.cpp @@ -38,6 +38,8 @@ SWGChannel::SWGChannel() { m_title_isSet = false; delta_frequency = 0; m_delta_frequency_isSet = false; + report = nullptr; + m_report_isSet = false; } SWGChannel::~SWGChannel() { @@ -56,6 +58,8 @@ SWGChannel::init() { m_title_isSet = false; delta_frequency = 0; m_delta_frequency_isSet = false; + report = new SWGChannelReport(); + m_report_isSet = false; } void @@ -69,6 +73,9 @@ SWGChannel::cleanup() { delete title; } + if(report != nullptr) { + delete report; + } } SWGChannel* @@ -92,6 +99,8 @@ SWGChannel::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&delta_frequency, pJson["deltaFrequency"], "qint32", ""); + ::SWGSDRangel::setValue(&report, pJson["report"], "SWGChannelReport", "SWGChannelReport"); + } QString @@ -123,6 +132,9 @@ SWGChannel::asJsonObject() { if(m_delta_frequency_isSet){ obj->insert("deltaFrequency", QJsonValue(delta_frequency)); } + if((report != nullptr) && (report->isSet())){ + toJsonValue(QString("report"), report, obj, QString("SWGChannelReport")); + } return obj; } @@ -177,6 +189,16 @@ SWGChannel::setDeltaFrequency(qint32 delta_frequency) { this->m_delta_frequency_isSet = true; } +SWGChannelReport* +SWGChannel::getReport() { + return report; +} +void +SWGChannel::setReport(SWGChannelReport* report) { + this->report = report; + this->m_report_isSet = true; +} + bool SWGChannel::isSet(){ @@ -187,6 +209,7 @@ SWGChannel::isSet(){ if(m_uid_isSet){ isObjectUpdated = true; break;} if(title != nullptr && *title != QString("")){ isObjectUpdated = true; break;} if(m_delta_frequency_isSet){ isObjectUpdated = true; break;} + if(report != nullptr && report->isSet()){ isObjectUpdated = true; break;} }while(false); return isObjectUpdated; } diff --git a/swagger/sdrangel/code/qt5/client/SWGChannel.h b/swagger/sdrangel/code/qt5/client/SWGChannel.h index 315b4b958..4dee7c18b 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannel.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannel.h @@ -22,6 +22,7 @@ #include +#include "SWGChannelReport.h" #include #include "SWGObject.h" @@ -56,6 +57,9 @@ public: qint32 getDeltaFrequency(); void setDeltaFrequency(qint32 delta_frequency); + SWGChannelReport* getReport(); + void setReport(SWGChannelReport* report); + virtual bool isSet() override; @@ -75,6 +79,9 @@ private: qint32 delta_frequency; bool m_delta_frequency_isSet; + SWGChannelReport* report; + bool m_report_isSet; + }; } diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelsDetail.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelsDetail.cpp new file mode 100644 index 000000000..efdf56a16 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGChannelsDetail.cpp @@ -0,0 +1,133 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * 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 demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 --- + * + * OpenAPI spec version: 4.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 "SWGChannelsDetail.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGChannelsDetail::SWGChannelsDetail(QString* json) { + init(); + this->fromJson(*json); +} + +SWGChannelsDetail::SWGChannelsDetail() { + channelcount = 0; + m_channelcount_isSet = false; + channels = nullptr; + m_channels_isSet = false; +} + +SWGChannelsDetail::~SWGChannelsDetail() { + this->cleanup(); +} + +void +SWGChannelsDetail::init() { + channelcount = 0; + m_channelcount_isSet = false; + channels = new QList(); + m_channels_isSet = false; +} + +void +SWGChannelsDetail::cleanup() { + + if(channels != nullptr) { + auto arr = channels; + for(auto o: *arr) { + delete o; + } + delete channels; + } +} + +SWGChannelsDetail* +SWGChannelsDetail::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGChannelsDetail::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&channelcount, pJson["channelcount"], "qint32", ""); + + + ::SWGSDRangel::setValue(&channels, pJson["channels"], "QList", "SWGChannel"); +} + +QString +SWGChannelsDetail::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGChannelsDetail::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_channelcount_isSet){ + obj->insert("channelcount", QJsonValue(channelcount)); + } + if(channels->size() > 0){ + toJsonArray((QList*)channels, obj, "channels", "SWGChannel"); + } + + return obj; +} + +qint32 +SWGChannelsDetail::getChannelcount() { + return channelcount; +} +void +SWGChannelsDetail::setChannelcount(qint32 channelcount) { + this->channelcount = channelcount; + this->m_channelcount_isSet = true; +} + +QList* +SWGChannelsDetail::getChannels() { + return channels; +} +void +SWGChannelsDetail::setChannels(QList* channels) { + this->channels = channels; + this->m_channels_isSet = true; +} + + +bool +SWGChannelsDetail::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_channelcount_isSet){ isObjectUpdated = true; break;} + if(channels->size() > 0){ isObjectUpdated = true; break;} + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelsDetail.h b/swagger/sdrangel/code/qt5/client/SWGChannelsDetail.h new file mode 100644 index 000000000..6e7c03103 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGChannelsDetail.h @@ -0,0 +1,65 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * 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 demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 --- + * + * OpenAPI spec version: 4.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. + */ + +/* + * SWGChannelsDetail.h + * + * All channels detailed information + */ + +#ifndef SWGChannelsDetail_H_ +#define SWGChannelsDetail_H_ + +#include + + +#include "SWGChannel.h" +#include + +#include "SWGObject.h" + +namespace SWGSDRangel { + +class SWGChannelsDetail: public SWGObject { +public: + SWGChannelsDetail(); + SWGChannelsDetail(QString* json); + virtual ~SWGChannelsDetail(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGChannelsDetail* fromJson(QString &jsonString) override; + + qint32 getChannelcount(); + void setChannelcount(qint32 channelcount); + + QList* getChannels(); + void setChannels(QList* channels); + + + virtual bool isSet() override; + +private: + qint32 channelcount; + bool m_channelcount_isSet; + + QList* channels; + bool m_channels_isSet; + +}; + +} + +#endif /* SWGChannelsDetail_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp index 99afc3eb0..bb41cf948 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp @@ -371,6 +371,60 @@ SWGDeviceSetApi::devicesetChannelSettingsPutCallback(SWGHttpRequestWorker * work } } +void +SWGDeviceSetApi::devicesetChannelsReportGet(qint32 device_set_index) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/channels/report"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "GET"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetChannelsReportGetCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetChannelsReportGetCallback(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); + SWGChannelsDetail* output = static_cast(create(json, QString("SWGChannelsDetail"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetChannelsReportGetSignal(output); + } else { + emit devicesetChannelsReportGetSignalE(output, error_type, error_str); + emit devicesetChannelsReportGetSignalEFull(worker, error_type, error_str); + } +} + void SWGDeviceSetApi::devicesetDevicePut(qint32 device_set_index, SWGDeviceListItem& body) { QString fullPath; diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h index 9a552e786..678114871 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h @@ -17,6 +17,7 @@ #include "SWGChannelReport.h" #include "SWGChannelSettings.h" +#include "SWGChannelsDetail.h" #include "SWGDeviceListItem.h" #include "SWGDeviceSet.h" #include "SWGDeviceSettings.h" @@ -46,6 +47,7 @@ public: void devicesetChannelSettingsGet(qint32 device_set_index, qint32 channel_index); void devicesetChannelSettingsPatch(qint32 device_set_index, qint32 channel_index, SWGChannelSettings& body); void devicesetChannelSettingsPut(qint32 device_set_index, qint32 channel_index, SWGChannelSettings& body); + void devicesetChannelsReportGet(qint32 device_set_index); void devicesetDevicePut(qint32 device_set_index, SWGDeviceListItem& body); void devicesetDeviceRunDelete(qint32 device_set_index); void devicesetDeviceRunGet(qint32 device_set_index); @@ -65,6 +67,7 @@ private: void devicesetChannelSettingsGetCallback (SWGHttpRequestWorker * worker); void devicesetChannelSettingsPatchCallback (SWGHttpRequestWorker * worker); void devicesetChannelSettingsPutCallback (SWGHttpRequestWorker * worker); + void devicesetChannelsReportGetCallback (SWGHttpRequestWorker * worker); void devicesetDevicePutCallback (SWGHttpRequestWorker * worker); void devicesetDeviceRunDeleteCallback (SWGHttpRequestWorker * worker); void devicesetDeviceRunGetCallback (SWGHttpRequestWorker * worker); @@ -84,6 +87,7 @@ signals: void devicesetChannelSettingsGetSignal(SWGChannelSettings* summary); void devicesetChannelSettingsPatchSignal(SWGChannelSettings* summary); void devicesetChannelSettingsPutSignal(SWGChannelSettings* summary); + void devicesetChannelsReportGetSignal(SWGChannelsDetail* summary); void devicesetDevicePutSignal(SWGDeviceListItem* summary); void devicesetDeviceRunDeleteSignal(SWGDeviceState* summary); void devicesetDeviceRunGetSignal(SWGDeviceState* summary); @@ -102,6 +106,7 @@ signals: void devicesetChannelSettingsGetSignalE(SWGChannelSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetChannelSettingsPatchSignalE(SWGChannelSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetChannelSettingsPutSignalE(SWGChannelSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetChannelsReportGetSignalE(SWGChannelsDetail* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDevicePutSignalE(SWGDeviceListItem* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDeviceRunDeleteSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDeviceRunGetSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str); @@ -120,6 +125,7 @@ signals: void devicesetChannelSettingsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetChannelSettingsPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetChannelSettingsPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetChannelsReportGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDevicePutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDeviceRunDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDeviceRunGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 4e59ed8b6..b14fd122f 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -22,6 +22,7 @@ #include "SWGChannelListItem.h" #include "SWGChannelReport.h" #include "SWGChannelSettings.h" +#include "SWGChannelsDetail.h" #include "SWGDVSeralDevices.h" #include "SWGDVSerialDevice.h" #include "SWGDeviceListItem.h" @@ -82,6 +83,9 @@ namespace SWGSDRangel { if(QString("SWGChannelSettings").compare(type) == 0) { return new SWGChannelSettings(); } + if(QString("SWGChannelsDetail").compare(type) == 0) { + return new SWGChannelsDetail(); + } if(QString("SWGDVSeralDevices").compare(type) == 0) { return new SWGDVSeralDevices(); }