From 1f7720e8f913c6388792f93e4ebb67d57aeef709 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 30 Aug 2018 01:56:53 +0200 Subject: [PATCH] SDRdaemon: channel source report --- .../sdrdaemonsink/sdrdaemonsinkgui.cpp | 10 +- .../sdrdaemonsink/sdrdaemonsinkgui.h | 3 +- .../sdrdaemonsink/sdrdaemonsinkgui.ui | 199 ++++++-- sdrbase/resources/res.qrc | 1 + sdrbase/resources/webapi/doc/html2/index.html | 478 +++++++++++++++++- .../include/SDRDaemonChannelSource.yaml | 34 ++ .../resources/webapi/doc/swagger/swagger.yaml | 36 +- sdrbase/webapi/webapirequestmapper.cpp | 2 + sdrdaemon/channel/sdrdaemonchannelsource.cpp | 100 +++- sdrdaemon/channel/sdrdaemonchannelsource.h | 19 + sdrdaemon/channel/sdrdaemondatareadqueue.cpp | 24 +- sdrdaemon/channel/sdrdaemondatareadqueue.h | 7 +- sdrdaemon/webapi/webapiadapterdaemon.cpp | 60 ++- sdrdaemon/webapi/webapiadapterdaemon.h | 8 +- sdrdaemon/webapi/webapirequestmapper.cpp | 49 +- sdrdaemon/webapi/webapirequestmapper.h | 3 + .../include/SDRDaemonChannelSource.yaml | 34 ++ swagger/sdrangel/api/swagger/swagger.yaml | 36 +- swagger/sdrangel/code/html2/index.html | 478 +++++++++++++++++- .../code/qt5/client/SWGChannelReport.cpp | 23 + .../code/qt5/client/SWGChannelReport.h | 7 + .../code/qt5/client/SWGChannelSettings.cpp | 23 + .../code/qt5/client/SWGChannelSettings.h | 7 + .../sdrangel/code/qt5/client/SWGDaemonApi.cpp | 52 ++ .../sdrangel/code/qt5/client/SWGDaemonApi.h | 6 + .../code/qt5/client/SWGModelFactory.h | 8 + .../SWGSDRDaemonChannelSourceReport.cpp | 232 +++++++++ .../client/SWGSDRDaemonChannelSourceReport.h | 94 ++++ .../SWGSDRDaemonChannelSourceSettings.cpp | 129 +++++ .../SWGSDRDaemonChannelSourceSettings.h | 65 +++ 30 files changed, 2141 insertions(+), 86 deletions(-) create mode 100644 sdrbase/resources/webapi/doc/swagger/include/SDRDaemonChannelSource.yaml create mode 100644 swagger/sdrangel/api/swagger/include/SDRDaemonChannelSource.yaml create mode 100644 swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceReport.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceReport.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceSettings.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceSettings.h diff --git a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.cpp b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.cpp index 60c9170b8..687045947 100644 --- a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.cpp +++ b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.cpp @@ -365,10 +365,9 @@ void SDRdaemonSinkGui::on_dataPort_returnPressed() sendSettings(); } -void SDRdaemonSinkGui::on_applyButton_clicked(bool checked __attribute__((unused))) +void SDRdaemonSinkGui::on_apiApplyButton_clicked(bool checked __attribute__((unused))) { m_settings.m_apiAddress = ui->apiAddress->text(); - m_settings.m_dataAddress = ui->dataAddress->text(); bool apiOk; int apiPort = ui->apiPort->text().toInt(&apiOk); @@ -378,6 +377,13 @@ void SDRdaemonSinkGui::on_applyButton_clicked(bool checked __attribute__((unused m_settings.m_apiPort = apiPort; } + sendSettings(); +} + +void SDRdaemonSinkGui::on_dataApplyButton_clicked(bool checked __attribute__((unused))) +{ + m_settings.m_dataAddress = ui->dataAddress->text(); + bool dataOk; int udpDataPort = ui->dataPort->text().toInt(&dataOk); diff --git a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.h b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.h index 6e7e02395..db9b8d03e 100644 --- a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.h +++ b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.h @@ -105,7 +105,8 @@ private slots: void on_apiPort_returnPressed(); void on_dataAddress_returnPressed(); void on_dataPort_returnPressed(); - void on_applyButton_clicked(bool checked); + void on_apiApplyButton_clicked(bool checked); + void on_dataApplyButton_clicked(bool checked); void on_startStop_toggled(bool checked); void on_eventCountsReset_clicked(bool checked); void updateHardware(); diff --git a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.ui b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.ui index 27175b4cb..23b83ab7f 100644 --- a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.ui +++ b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.ui @@ -6,8 +6,8 @@ 0 0 - 400 - 217 + 360 + 237 @@ -18,7 +18,7 @@ - 400 + 360 190 @@ -345,32 +345,6 @@ - - - - QL: - - - - - - - - 18 - 0 - - - - Current transmitter queue length in number of vectors - - - 00 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - @@ -395,22 +369,6 @@ - - - - - 52 - 0 - - - - Tx status since last poll: minimum of blocks received / maximum number of blocks used for recovery - - - 100/100 - - - @@ -485,9 +443,61 @@ - + + + + + QL + + + + + + + + 16777215 + 14 + + + + Queue length gauge + + + 50 + + + + + + + + 50 + 0 + + + + Queue length / Queue size + + + 000/000 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + 30 + 0 + + API @@ -497,12 +507,12 @@ - 100 + 120 0 - Remote data connection IP address + API IP address 000.000.000.000 @@ -512,10 +522,23 @@ + + + + : + + + + + + 50 + 16777215 + + - Remote data connection port + API IP port 00000 @@ -525,8 +548,47 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 30 + 16777215 + + + + Set API address and port + + + Set + + + + + + + + + + 30 + 0 + + Data @@ -536,10 +598,13 @@ - 100 + 120 0 + + Remote data address + 000.000.000.000 @@ -548,8 +613,24 @@ + + + + : + + + + + + 50 + 16777215 + + + + Remote data port + 00000 @@ -559,13 +640,29 @@ - + + + Qt::Horizontal + + + + 40 + 20 + + + + + + 30 16777215 + + Set data address and port + Set diff --git a/sdrbase/resources/res.qrc b/sdrbase/resources/res.qrc index 52e87e0dc..179cd9eaa 100644 --- a/sdrbase/resources/res.qrc +++ b/sdrbase/resources/res.qrc @@ -22,6 +22,7 @@ webapi/doc/swagger/include/PlutoSdr.yaml webapi/doc/swagger/include/RtlSdr.yaml webapi/doc/swagger/include/SDRDaemonChannelSink.yaml + webapi/doc/swagger/include/SDRDaemonChannelSource.yaml webapi/doc/swagger/include/SDRDaemonSource.yaml webapi/doc/swagger/include/SDRDaemonSink.yaml webapi/doc/swagger/include/SDRPlay.yaml diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 95c5bcb5f..62a05233f 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1416,6 +1416,9 @@ margin-bottom: 20px; "SSBDemodReport" : { "$ref" : "#/definitions/SSBDemodReport" }, + "SDRDaemonChannelSourceReport" : { + "$ref" : "#/definitions/SDRDaemonChannelSourceReport" + }, "SSBModReport" : { "$ref" : "#/definitions/SSBModReport" }, @@ -1470,6 +1473,9 @@ margin-bottom: 20px; "SDRDaemonChannelSinkSettings" : { "$ref" : "#/definitions/SDRDaemonChannelSinkSettings" }, + "SDRDaemonChannelSourceSettings" : { + "$ref" : "#/definitions/SDRDaemonChannelSourceSettings" + }, "SSBModSettings" : { "$ref" : "#/definitions/SSBModSettings" }, @@ -3166,6 +3172,52 @@ margin-bottom: 20px; } }, "description" : "Data handling details for SDRDaemon" +}; + defs.SDRDaemonChannelSourceReport = { + "properties" : { + "queueLength" : { + "type" : "integer", + "description" : "Data read/write queue length in number of data frames" + }, + "queueSize" : { + "type" : "integer", + "description" : "Data read/write queue size in number of data frames" + }, + "samplesCount" : { + "type" : "integer", + "description" : "Absolute consumed samples count" + }, + "correctableErrorsCount" : { + "type" : "integer", + "description" : "Absolute number of correctable errors" + }, + "uncorrectableErrorsCount" : { + "type" : "integer", + "description" : "Absolute number of uncorrectable errors" + }, + "tvSec" : { + "type" : "integer", + "description" : "Counts timestamp seconds" + }, + "tvUSec" : { + "type" : "integer", + "description" : "Counts timestamp microseconds" + } + }, + "description" : "SDRDaemon channel source report" +}; + defs.SDRDaemonChannelSourceSettings = { + "properties" : { + "dataAddress" : { + "type" : "string", + "description" : "Remote USB data address" + }, + "dataPort" : { + "type" : "integer", + "description" : "Remote USB data port" + } + }, + "description" : "Data handling details for SDRDaemon" }; defs.SDRPlayReport = { "properties" : { @@ -4024,6 +4076,9 @@ margin-bottom: 20px; +
  • + daemonChannelReportGet +
  • daemonChannelSettingsGet
  • @@ -4230,6 +4285,427 @@ margin-bottom: 20px;

    Daemon

    +
    +
    +
    +

    daemonChannelReportGet

    +

    +
    +
    +
    +

    +

    get the channel report

    +

    +
    +
    /sdrdaemon/channel/report
    +

    +

    Usage and SDK Samples

    +

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

    Parameters

    + + + + + + +

    Responses

    +

    Status: 200 - On success return channel report

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

    Status: 400 - Invalid device set or channel index

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

    Status: 404 - Device or channel not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -28212,7 +28688,7 @@ except ApiException as e:
    - Generated 2018-08-29T15:59:39.880+02:00 + Generated 2018-08-30T01:40:47.594+02:00
    diff --git a/sdrbase/resources/webapi/doc/swagger/include/SDRDaemonChannelSource.yaml b/sdrbase/resources/webapi/doc/swagger/include/SDRDaemonChannelSource.yaml new file mode 100644 index 000000000..bed33bf1a --- /dev/null +++ b/sdrbase/resources/webapi/doc/swagger/include/SDRDaemonChannelSource.yaml @@ -0,0 +1,34 @@ +SDRDaemonChannelSourceSettings: + description: "Data handling details for SDRDaemon" + properties: + dataAddress: + description: "Remote USB data address" + type: string + dataPort: + description: "Remote USB data port" + type: integer + +SDRDaemonChannelSourceReport: + description: "SDRDaemon channel source report" + properties: + queueLength: + description: "Data read/write queue length in number of data frames" + type: integer + queueSize: + description: "Data read/write queue size in number of data frames" + type: integer + samplesCount: + description: "Absolute consumed samples count" + type: integer + correctableErrorsCount: + description: "Absolute number of correctable errors" + type: integer + uncorrectableErrorsCount: + description: "Absolute number of uncorrectable errors" + type: integer + tvSec: + description: "Counts timestamp seconds" + type: integer + tvUSec: + description: "Counts timestamp microseconds" + type: integer \ No newline at end of file diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index 4ef531051..bbf8870b9 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -1299,7 +1299,7 @@ paths: $ref: "#/responses/Response_501" /sdrdaemon/channel/settings: - x-swagger-router-controller: deviceset + x-swagger-router-controller: daemon get: description: Get channel handling details operationId: daemonChannelSettingsGet @@ -1360,7 +1360,7 @@ paths: /sdrdaemon/device/settings: - x-swagger-router-controller: deviceset + x-swagger-router-controller: daemon get: description: Get device settings operationId: daemonDeviceSettingsGet @@ -1431,7 +1431,7 @@ paths: $ref: "#/responses/Response_501" /sdrdaemon/run: - x-swagger-router-controller: deviceset + x-swagger-router-controller: daemon get: description: get device run status operationId: daemonRunGet @@ -1500,7 +1500,7 @@ paths: $ref: "#/responses/Response_501" /sdrdaemon/device/report: - x-swagger-router-controller: deviceset + x-swagger-router-controller: daemon get: description: get the device report operationId: daemonDeviceReportGet @@ -1524,6 +1524,30 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrdaemon/channel/report: + x-swagger-router-controller: daemon + get: + description: get the channel report + operationId: daemonChannelReportGet + tags: + - Daemon + responses: + "200": + description: On success return channel report + schema: + $ref: "#/definitions/ChannelReport" + "400": + description: Invalid device set or channel index + schema: + $ref: "#/definitions/ErrorResponse" + "404": + description: Device or channel not found + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" /swagger: x-swagger-pipe: swagger_raw @@ -2196,6 +2220,8 @@ definitions: $ref: "/doc/swagger/include/NFMMod.yaml#/NFMModSettings" SDRDaemonChannelSinkSettings: $ref: "/doc/swagger/include/SDRDaemonChannelSink.yaml#/SDRDaemonChannelSinkSettings" + SDRDaemonChannelSourceSettings: + $ref: "/doc/swagger/include/SDRDaemonChannelSource.yaml#/SDRDaemonChannelSourceSettings" SSBModSettings: $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModSettings" SSBDemodSettings: @@ -2235,6 +2261,8 @@ definitions: $ref: "/doc/swagger/include/NFMMod.yaml#/NFMModReport" SSBDemodReport: $ref: "/doc/swagger/include/SSBDemod.yaml#/SSBDemodReport" + SDRDaemonChannelSourceReport: + $ref: "/doc/swagger/include/SDRDaemonChannelSource.yaml#/SDRDaemonChannelSourceReport" SSBModReport: $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport" UDPSinkReport: diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index 5f08de819..d58fcd22d 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -2399,6 +2399,7 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings.setNfmDemodSettings(0); channelSettings.setNfmModSettings(0); channelSettings.setSdrDaemonChannelSinkSettings(0); + channelSettings.setSdrDaemonChannelSourceSettings(0); channelSettings.setSsbDemodSettings(0); channelSettings.setSsbModSettings(0); channelSettings.setUdpSinkSettings(0); @@ -2418,6 +2419,7 @@ void WebAPIRequestMapper::resetChannelReport(SWGSDRangel::SWGChannelReport& chan channelReport.setDsdDemodReport(0); channelReport.setNfmDemodReport(0); channelReport.setNfmModReport(0); + channelReport.setSdrDaemonChannelSourceReport(0); channelReport.setSsbDemodReport(0); channelReport.setSsbModReport(0); channelReport.setUdpSinkReport(0); diff --git a/sdrdaemon/channel/sdrdaemonchannelsource.cpp b/sdrdaemon/channel/sdrdaemonchannelsource.cpp index 08538d0d9..f89e54738 100644 --- a/sdrdaemon/channel/sdrdaemonchannelsource.cpp +++ b/sdrdaemon/channel/sdrdaemonchannelsource.cpp @@ -20,11 +20,17 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// +#include +#include #include #include #include +#include "SWGChannelSettings.h" +#include "SWGChannelReport.h" +#include "SWGSDRDaemonChannelSourceReport.h" + #include "util/simpleserializer.h" #include "dsp/threadedbasebandsamplesource.h" #include "dsp/upchannelizer.h" @@ -44,7 +50,9 @@ SDRDaemonChannelSource::SDRDaemonChannelSource(DeviceSinkAPI *deviceAPI) : m_deviceAPI(deviceAPI), m_sourceThread(0), m_running(false), - m_samplesCount(0) + m_samplesCount(0), + m_nbCorrectableErrors(0), + m_nbUncorrectableErrors(0) { setObjectName(m_channelId); @@ -226,6 +234,13 @@ void SDRDaemonChannelSource::handleDataBlock(SDRDaemonDataBlock* dataBlock) paramsCM256.RecoveryCount = m_currentMeta.m_nbFECBlocks; } + // update counters + if (dataBlock->m_rxControlBlock.m_recoveryCount > paramsCM256.RecoveryCount) { + m_nbUncorrectableErrors += SDRDaemonNbOrginalBlocks - dataBlock->m_rxControlBlock.m_originalCount; + } else { + m_nbCorrectableErrors += dataBlock->m_rxControlBlock.m_recoveryCount; + } + if (m_cm256.cm256_decode(paramsCM256, m_cm256DescriptorBlocks)) // CM256 decode { qWarning() << "SDRDaemonChannelSource::handleDataBlock: decode CM256 error:" @@ -315,3 +330,86 @@ uint32_t SDRDaemonChannelSource::calculateDataReadQueueSize(int sampleRate) qDebug("SDRDaemonChannelSource::calculateDataReadQueueSize: set max queue size to %u blocks", maxSize); return maxSize; } + +int SDRDaemonChannelSource::webapiSettingsGet( + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage __attribute__((unused))) +{ + response.setSdrDaemonChannelSourceSettings(new SWGSDRangel::SWGSDRDaemonChannelSourceSettings()); + response.getSdrDaemonChannelSourceSettings()->init(); + webapiFormatChannelSettings(response, m_settings); + return 200; +} + +int SDRDaemonChannelSource::webapiSettingsPutPatch( + bool force, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage __attribute__((unused))) +{ + SDRDaemonChannelSourceSettings settings = m_settings; + + if (channelSettingsKeys.contains("dataAddress")) { + settings.m_dataAddress = *response.getSdrDaemonChannelSourceSettings()->getDataAddress(); + } + + if (channelSettingsKeys.contains("dataPort")) + { + int dataPort = response.getSdrDaemonChannelSourceSettings()->getDataPort(); + + if ((dataPort < 1024) || (dataPort > 65535)) { + settings.m_dataPort = 9090; + } else { + settings.m_dataPort = dataPort; + } + } + + MsgConfigureSDRDaemonChannelSource *msg = MsgConfigureSDRDaemonChannelSource::create(settings, force); + m_inputMessageQueue.push(msg); + + qDebug("SDRDaemonChannelSource::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue); + if (m_guiMessageQueue) // forward to GUI if any + { + MsgConfigureSDRDaemonChannelSource *msgToGUI = MsgConfigureSDRDaemonChannelSource::create(settings, force); + m_guiMessageQueue->push(msgToGUI); + } + + webapiFormatChannelSettings(response, settings); + + return 200; +} + +int SDRDaemonChannelSource::webapiReportGet( + SWGSDRangel::SWGChannelReport& response, + QString& errorMessage __attribute__((unused))) +{ + response.setSdrDaemonChannelSourceReport(new SWGSDRangel::SWGSDRDaemonChannelSourceReport()); + response.getSdrDaemonChannelSourceReport()->init(); + webapiFormatChannelReport(response); + return 200; +} + +void SDRDaemonChannelSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const SDRDaemonChannelSourceSettings& settings) +{ + if (response.getSdrDaemonChannelSourceSettings()->getDataAddress()) { + *response.getSdrDaemonChannelSourceSettings()->getDataAddress() = settings.m_dataAddress; + } else { + response.getSdrDaemonChannelSourceSettings()->setDataAddress(new QString(settings.m_dataAddress)); + } + + response.getSdrDaemonChannelSourceSettings()->setDataPort(settings.m_dataPort); +} + +void SDRDaemonChannelSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) +{ + struct timeval tv; + gettimeofday(&tv, 0); + + response.getSdrDaemonChannelSourceReport()->setTvSec(tv.tv_sec); + response.getSdrDaemonChannelSourceReport()->setTvUSec(tv.tv_usec); + response.getSdrDaemonChannelSourceReport()->setQueueSize(m_dataReadQueue.size()); + response.getSdrDaemonChannelSourceReport()->setQueueLength(m_dataReadQueue.length()); + response.getSdrDaemonChannelSourceReport()->setSamplesCount(m_dataReadQueue.readSampleCount()); + response.getSdrDaemonChannelSourceReport()->setCorrectableErrorsCount(m_nbCorrectableErrors); + response.getSdrDaemonChannelSourceReport()->setUncorrectableErrorsCount(m_nbUncorrectableErrors); +} diff --git a/sdrdaemon/channel/sdrdaemonchannelsource.h b/sdrdaemon/channel/sdrdaemonchannelsource.h index e743b3418..79621da5c 100644 --- a/sdrdaemon/channel/sdrdaemonchannelsource.h +++ b/sdrdaemon/channel/sdrdaemonchannelsource.h @@ -80,6 +80,20 @@ public: virtual QByteArray serialize() const; virtual bool deserialize(const QByteArray& data); + virtual int webapiSettingsGet( + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage); + + virtual int webapiSettingsPutPatch( + bool force, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage); + + virtual int webapiReportGet( + SWGSDRangel::SWGChannelReport& response, + QString& errorMessage); + void setDataLink(const QString& dataAddress, uint16_t dataPort); static const QString m_channelIdURI; @@ -103,10 +117,15 @@ private: SDRDaemonDataReadQueue m_dataReadQueue; + uint32_t m_nbCorrectableErrors; //!< count of correctable errors in number of blocks + uint32_t m_nbUncorrectableErrors; //!< count of uncorrectable errors in number of blocks + void applySettings(const SDRDaemonChannelSourceSettings& settings, bool force = false); void handleDataBlock(SDRDaemonDataBlock *dataBlock); void printMeta(const QString& header, SDRDaemonMetaDataFEC *metaData); uint32_t calculateDataReadQueueSize(int sampleRate); + void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const SDRDaemonChannelSourceSettings& settings); + void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); private slots: void handleData(); diff --git a/sdrdaemon/channel/sdrdaemondatareadqueue.cpp b/sdrdaemon/channel/sdrdaemondatareadqueue.cpp index 7dc92be51..3c947c725 100644 --- a/sdrdaemon/channel/sdrdaemondatareadqueue.cpp +++ b/sdrdaemon/channel/sdrdaemondatareadqueue.cpp @@ -30,6 +30,7 @@ SDRDaemonDataReadQueue::SDRDaemonDataReadQueue() : m_maxSize(MinimumMaxSize), m_blockIndex(1), m_sampleIndex(0), + m_sampleCount(0), m_full(false) {} @@ -46,7 +47,7 @@ SDRDaemonDataReadQueue::~SDRDaemonDataReadQueue() void SDRDaemonDataReadQueue::push(SDRDaemonDataBlock* dataBlock) { - if (size() >= m_maxSize) + if (length() >= m_maxSize) { qWarning("SDRDaemonDataReadQueue::push: queue is full"); m_full = true; // stop filling the queue @@ -55,7 +56,7 @@ void SDRDaemonDataReadQueue::push(SDRDaemonDataBlock* dataBlock) } if (m_full) { - m_full = (size() > m_maxSize/2); // do not fill queue again before queue is half size + m_full = (length() > m_maxSize/2); // do not fill queue again before queue is half size } if (!m_full) { @@ -78,11 +79,6 @@ SDRDaemonDataBlock* SDRDaemonDataReadQueue::pop() } } -uint32_t SDRDaemonDataReadQueue::size() const -{ - return m_dataReadQueue.size(); -} - void SDRDaemonDataReadQueue::setSize(uint32_t size) { if (size != m_maxSize) { @@ -95,13 +91,14 @@ void SDRDaemonDataReadQueue::readSample(Sample& s) // depletion/repletion state if (m_dataBlock == 0) { - if (size() >= m_maxSize/2) + if (length() >= m_maxSize/2) { - qDebug("SDRDaemonDataReadQueue::readSample: initial pop new block: queue size: %u", size()); + qDebug("SDRDaemonDataReadQueue::readSample: initial pop new block: queue size: %u", length()); m_blockIndex = 1; m_dataBlock = m_dataReadQueue.takeFirst(); s = m_dataBlock->m_superBlocks[m_blockIndex].m_protectedBlock.m_samples[m_sampleIndex]; m_sampleIndex++; + m_sampleCount++; } else { @@ -115,6 +112,7 @@ void SDRDaemonDataReadQueue::readSample(Sample& s) { s = m_dataBlock->m_superBlocks[m_blockIndex].m_protectedBlock.m_samples[m_sampleIndex]; m_sampleIndex++; + m_sampleCount++; } else { @@ -125,6 +123,7 @@ void SDRDaemonDataReadQueue::readSample(Sample& s) { s = m_dataBlock->m_superBlocks[m_blockIndex].m_protectedBlock.m_samples[m_sampleIndex]; m_sampleIndex++; + m_sampleCount++; } else { @@ -133,18 +132,19 @@ void SDRDaemonDataReadQueue::readSample(Sample& s) delete m_dataBlock; m_dataBlock = 0; - if (size() == 0) { + if (length() == 0) { qWarning("SDRDaemonDataReadQueue::readSample: try to pop new block but queue is empty"); } } - if (size() > 0) + if (length() > 0) { - qDebug("SDRDaemonDataReadQueue::readSample: pop new block: queue size: %u", size()); + //qDebug("SDRDaemonDataReadQueue::readSample: pop new block: queue size: %u", length()); m_blockIndex = 1; m_dataBlock = m_dataReadQueue.takeFirst(); s = m_dataBlock->m_superBlocks[m_blockIndex].m_protectedBlock.m_samples[m_sampleIndex]; m_sampleIndex++; + m_sampleCount++; } else { diff --git a/sdrdaemon/channel/sdrdaemondatareadqueue.h b/sdrdaemon/channel/sdrdaemondatareadqueue.h index fe9a88edc..d96f98366 100644 --- a/sdrdaemon/channel/sdrdaemondatareadqueue.h +++ b/sdrdaemon/channel/sdrdaemondatareadqueue.h @@ -37,8 +37,10 @@ public: void push(SDRDaemonDataBlock* dataBlock); //!< push block on the queue SDRDaemonDataBlock* pop(); //!< Pop block from the queue void readSample(Sample& s); //!< Read sample from queue - uint32_t size() const; //!< Returns queue size - void setSize(uint32_t size); //!< Sets the queue size + uint32_t length() const { return m_dataReadQueue.size(); } //!< Returns queue length + uint32_t size() const { return m_maxSize; } //!< Returns queue size (max length) + void setSize(uint32_t size); //!< Sets the queue size (max length) + uint32_t readSampleCount() const { return m_sampleCount; } //!< Returns the absolute number of samples read static const uint32_t MinimumMaxSize; @@ -48,6 +50,7 @@ private: uint32_t m_maxSize; uint32_t m_blockIndex; uint32_t m_sampleIndex; + uint32_t m_sampleCount; bool m_full; //!< full condition was hit }; diff --git a/sdrdaemon/webapi/webapiadapterdaemon.cpp b/sdrdaemon/webapi/webapiadapterdaemon.cpp index c89704648..dbcddb71b 100644 --- a/sdrdaemon/webapi/webapiadapterdaemon.cpp +++ b/sdrdaemon/webapi/webapiadapterdaemon.cpp @@ -23,6 +23,7 @@ #include "SWGDeviceSettings.h" #include "SWGDeviceState.h" #include "SWGDeviceReport.h" +#include "SWGChannelReport.h" #include "SWGChannelSettings.h" #include "SWGErrorResponse.h" @@ -44,6 +45,7 @@ QString WebAPIAdapterDaemon::daemonInstanceLoggingURL = "/sdrdaemon/logging"; QString WebAPIAdapterDaemon::daemonChannelSettingsURL = "/sdrdaemon/channel/settings"; QString WebAPIAdapterDaemon::daemonDeviceSettingsURL = "/sdrdaemon/device/settings"; QString WebAPIAdapterDaemon::daemonDeviceReportURL = "/sdrdaemon/device/report"; +QString WebAPIAdapterDaemon::daemonChannelReportURL = "/sdrdaemon/channel/report"; QString WebAPIAdapterDaemon::daemonRunURL = "/sdrdaemon/run"; WebAPIAdapterDaemon::WebAPIAdapterDaemon(SDRDaemonMain& sdrDaemonMain) : @@ -179,7 +181,7 @@ int WebAPIAdapterDaemon::daemonInstanceLoggingPut( } int WebAPIAdapterDaemon::daemonChannelSettingsGet( - SWGSDRangel::SWGChannelSettings& response __attribute__((unused)), + SWGSDRangel::SWGChannelSettings& response, SWGSDRangel::SWGErrorResponse& error) { error.init(); @@ -226,9 +228,9 @@ int WebAPIAdapterDaemon::daemonChannelSettingsGet( } int WebAPIAdapterDaemon::daemonChannelSettingsPutPatch( - bool force __attribute__((unused)), - const QStringList& channelSettingsKeys __attribute__((unused)), - SWGSDRangel::SWGChannelSettings& response __attribute__((unused)), + bool force, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response, SWGSDRangel::SWGErrorResponse& error) { error.init(); @@ -443,7 +445,7 @@ int WebAPIAdapterDaemon::daemonRunDelete( } } -int WebAPIAdapterDaemon::daemonReportGet( +int WebAPIAdapterDaemon::daemonDeviceReportGet( SWGSDRangel::SWGDeviceReport& response, SWGSDRangel::SWGErrorResponse& error) { @@ -470,6 +472,54 @@ int WebAPIAdapterDaemon::daemonReportGet( } } +int WebAPIAdapterDaemon::daemonChannelReportGet( + SWGSDRangel::SWGChannelReport& response, + SWGSDRangel::SWGErrorResponse& error) +{ + error.init(); + + if (m_sdrDaemonMain.m_deviceSourceEngine) // Rx + { + ChannelSinkAPI *channelAPI = m_sdrDaemonMain.m_deviceSourceAPI->getChanelAPIAt(0); + + if (channelAPI == 0) + { + *error.getMessage() = QString("There is no channel"); + return 500; // a SDRDaemon sink channel should have been created so this is a server error + } + else + { + response.setChannelType(new QString()); + channelAPI->getIdentifier(*response.getChannelType()); + response.setTx(0); + return channelAPI->webapiReportGet(response, *error.getMessage()); + } + } + else if (m_sdrDaemonMain.m_deviceSinkEngine) // Tx + { + ChannelSourceAPI *channelAPI = m_sdrDaemonMain.m_deviceSinkAPI->getChanelAPIAt(0); + + if (channelAPI == 0) + { + *error.getMessage() = QString("There is no channel"); + return 500; // a SDRDaemon source channel should have been created so this is a server error + } + else + { + response.setChannelType(new QString()); + channelAPI->getIdentifier(*response.getChannelType()); + response.setTx(1); + return channelAPI->webapiReportGet(response, *error.getMessage()); + } + } + else + { + *error.getMessage() = QString("Device not created error"); + return 500; + } +} + + // TODO: put in library in common with SDRangel. Can be static. QtMsgType WebAPIAdapterDaemon::getMsgTypeFromString(const QString& msgTypeString) { diff --git a/sdrdaemon/webapi/webapiadapterdaemon.h b/sdrdaemon/webapi/webapiadapterdaemon.h index df4c7c592..cbc3e6c51 100644 --- a/sdrdaemon/webapi/webapiadapterdaemon.h +++ b/sdrdaemon/webapi/webapiadapterdaemon.h @@ -30,6 +30,7 @@ namespace SWGSDRangel class SWGDeviceSettings; class SWGDeviceState; class SWGDeviceReport; + class SWGChannelReport; class SWGSuccessResponse; class SWGErrorResponse; class SWGLoggingInfo; @@ -89,15 +90,20 @@ public: SWGSDRangel::SWGDeviceState& response, SWGSDRangel::SWGErrorResponse& error); - int daemonReportGet( + int daemonDeviceReportGet( SWGSDRangel::SWGDeviceReport& response, SWGSDRangel::SWGErrorResponse& error); + int daemonChannelReportGet( + SWGSDRangel::SWGChannelReport& response, + SWGSDRangel::SWGErrorResponse& error); + static QString daemonInstanceSummaryURL; static QString daemonInstanceLoggingURL; static QString daemonChannelSettingsURL; static QString daemonDeviceSettingsURL; static QString daemonDeviceReportURL; + static QString daemonChannelReportURL; static QString daemonRunURL; private: diff --git a/sdrdaemon/webapi/webapirequestmapper.cpp b/sdrdaemon/webapi/webapirequestmapper.cpp index 4d3def6ae..8b72965d1 100644 --- a/sdrdaemon/webapi/webapirequestmapper.cpp +++ b/sdrdaemon/webapi/webapirequestmapper.cpp @@ -27,6 +27,7 @@ #include "SWGDaemonSummaryResponse.h" #include "SWGInstanceDevicesResponse.h" #include "SWGChannelSettings.h" +#include "SWGChannelReport.h" #include "SWGDeviceSettings.h" #include "SWGDeviceState.h" #include "SWGDeviceReport.h" @@ -98,6 +99,8 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http daemonInstanceLoggingService(request, response); } else if (path == WebAPIAdapterDaemon::daemonChannelSettingsURL) { daemonChannelSettingsService(request, response); + } else if (path == WebAPIAdapterDaemon::daemonChannelReportURL) { + daemonChannelReportService(request, response); } else if (path == WebAPIAdapterDaemon::daemonDeviceSettingsURL) { daemonDeviceSettingsService(request, response); } else if (path == WebAPIAdapterDaemon::daemonDeviceReportURL) { @@ -261,6 +264,29 @@ void WebAPIRequestMapper::daemonChannelSettingsService(qtwebapp::HttpRequest& re } } +void WebAPIRequestMapper::daemonChannelReportService( + qtwebapp::HttpRequest& request, + qtwebapp::HttpResponse& response) +{ + SWGSDRangel::SWGErrorResponse errorResponse; + response.setHeader("Content-Type", "application/json"); + response.setHeader("Access-Control-Allow-Origin", "*"); + + if (request.getMethod() == "GET") + { + SWGSDRangel::SWGChannelReport normalResponse; + resetChannelReport(normalResponse); + int status = m_adapter->daemonChannelReportGet(normalResponse, errorResponse); + response.setStatus(status); + + if (status/100 == 2) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + } +} + void WebAPIRequestMapper::daemonDeviceSettingsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) { SWGSDRangel::SWGErrorResponse errorResponse; @@ -341,7 +367,7 @@ void WebAPIRequestMapper::daemonDeviceReportService(qtwebapp::HttpRequest& reque { SWGSDRangel::SWGDeviceReport normalResponse; resetDeviceReport(normalResponse); - int status = m_adapter->daemonReportGet(normalResponse, errorResponse); + int status = m_adapter->daemonDeviceReportGet(normalResponse, errorResponse); response.setStatus(status); if (status/100 == 2) { @@ -992,6 +1018,7 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings.setNfmDemodSettings(0); channelSettings.setNfmModSettings(0); channelSettings.setSdrDaemonChannelSinkSettings(0); + channelSettings.setSdrDaemonChannelSourceSettings(0); channelSettings.setSsbDemodSettings(0); channelSettings.setSsbModSettings(0); channelSettings.setUdpSinkSettings(0); @@ -1000,6 +1027,26 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings.setWfmModSettings(0); } +void WebAPIRequestMapper::resetChannelReport(SWGSDRangel::SWGChannelReport& channelReport) +{ + channelReport.cleanup(); + channelReport.setChannelType(0); + channelReport.setAmDemodReport(0); + channelReport.setAmModReport(0); + channelReport.setAtvModReport(0); + channelReport.setBfmDemodReport(0); + channelReport.setDsdDemodReport(0); + channelReport.setNfmDemodReport(0); + channelReport.setNfmModReport(0); + channelReport.setSdrDaemonChannelSourceReport(0); + channelReport.setSsbDemodReport(0); + channelReport.setSsbModReport(0); + channelReport.setUdpSinkReport(0); + channelReport.setUdpSrcReport(0); + channelReport.setWfmDemodReport(0); + channelReport.setWfmModReport(0); +} + // TODO: put in library in common with SDRangel. Can be static. void WebAPIRequestMapper::resetDeviceSettings(SWGSDRangel::SWGDeviceSettings& deviceSettings) { diff --git a/sdrdaemon/webapi/webapirequestmapper.h b/sdrdaemon/webapi/webapirequestmapper.h index 49363493a..67030891b 100644 --- a/sdrdaemon/webapi/webapirequestmapper.h +++ b/sdrdaemon/webapi/webapirequestmapper.h @@ -31,6 +31,7 @@ namespace SWGSDRangel { class SWGChannelSettings; + class SWGChannelReport; class SWGDeviceSettings; class SWGDeviceReport; } @@ -58,6 +59,7 @@ private: void daemonDeviceSettingsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void daemonRunService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void daemonDeviceReportService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); + void daemonChannelReportService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); bool validateChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings, QJsonObject& jsonObject, QStringList& channelSettingsKeys); bool validateDeviceSettings(SWGSDRangel::SWGDeviceSettings& deviceSettings, QJsonObject& jsonObject, QStringList& deviceSettingsKeys); @@ -71,6 +73,7 @@ private: bool parseJsonBody(QString& jsonStr, QJsonObject& jsonObject, qtwebapp::HttpResponse& response); void resetChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings); + void resetChannelReport(SWGSDRangel::SWGChannelReport& deviceSettings); void resetDeviceSettings(SWGSDRangel::SWGDeviceSettings& deviceSettings); void resetDeviceReport(SWGSDRangel::SWGDeviceReport& deviceReport); }; diff --git a/swagger/sdrangel/api/swagger/include/SDRDaemonChannelSource.yaml b/swagger/sdrangel/api/swagger/include/SDRDaemonChannelSource.yaml new file mode 100644 index 000000000..bed33bf1a --- /dev/null +++ b/swagger/sdrangel/api/swagger/include/SDRDaemonChannelSource.yaml @@ -0,0 +1,34 @@ +SDRDaemonChannelSourceSettings: + description: "Data handling details for SDRDaemon" + properties: + dataAddress: + description: "Remote USB data address" + type: string + dataPort: + description: "Remote USB data port" + type: integer + +SDRDaemonChannelSourceReport: + description: "SDRDaemon channel source report" + properties: + queueLength: + description: "Data read/write queue length in number of data frames" + type: integer + queueSize: + description: "Data read/write queue size in number of data frames" + type: integer + samplesCount: + description: "Absolute consumed samples count" + type: integer + correctableErrorsCount: + description: "Absolute number of correctable errors" + type: integer + uncorrectableErrorsCount: + description: "Absolute number of uncorrectable errors" + type: integer + tvSec: + description: "Counts timestamp seconds" + type: integer + tvUSec: + description: "Counts timestamp microseconds" + type: integer \ No newline at end of file diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index 76bd46b24..fa7612f74 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -1299,7 +1299,7 @@ paths: $ref: "#/responses/Response_501" /sdrdaemon/channel/settings: - x-swagger-router-controller: deviceset + x-swagger-router-controller: daemon get: description: Get channel handling details operationId: daemonChannelSettingsGet @@ -1360,7 +1360,7 @@ paths: /sdrdaemon/device/settings: - x-swagger-router-controller: deviceset + x-swagger-router-controller: daemon get: description: Get device settings operationId: daemonDeviceSettingsGet @@ -1431,7 +1431,7 @@ paths: $ref: "#/responses/Response_501" /sdrdaemon/run: - x-swagger-router-controller: deviceset + x-swagger-router-controller: daemon get: description: get device run status operationId: daemonRunGet @@ -1500,7 +1500,7 @@ paths: $ref: "#/responses/Response_501" /sdrdaemon/device/report: - x-swagger-router-controller: deviceset + x-swagger-router-controller: daemon get: description: get the device report operationId: daemonDeviceReportGet @@ -1524,6 +1524,30 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrdaemon/channel/report: + x-swagger-router-controller: daemon + get: + description: get the channel report + operationId: daemonChannelReportGet + tags: + - Daemon + responses: + "200": + description: On success return channel report + schema: + $ref: "#/definitions/ChannelReport" + "400": + description: Invalid device set or channel index + schema: + $ref: "#/definitions/ErrorResponse" + "404": + description: Device or channel not found + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" /swagger: x-swagger-pipe: swagger_raw @@ -2196,6 +2220,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModSettings" SDRDaemonChannelSinkSettings: $ref: "http://localhost:8081/api/swagger/include/SDRDaemonChannelSink.yaml#/SDRDaemonChannelSinkSettings" + SDRDaemonChannelSourceSettings: + $ref: "http://localhost:8081/api/swagger/include/SDRDaemonChannelSource.yaml#/SDRDaemonChannelSourceSettings" SSBModSettings: $ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModSettings" SSBDemodSettings: @@ -2235,6 +2261,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModReport" SSBDemodReport: $ref: "http://localhost:8081/api/swagger/include/SSBDemod.yaml#/SSBDemodReport" + SDRDaemonChannelSourceReport: + $ref: "http://localhost:8081/api/swagger/include/SDRDaemonChannelSource.yaml#/SDRDaemonChannelSourceReport" SSBModReport: $ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModReport" UDPSinkReport: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 95c5bcb5f..62a05233f 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -1416,6 +1416,9 @@ margin-bottom: 20px; "SSBDemodReport" : { "$ref" : "#/definitions/SSBDemodReport" }, + "SDRDaemonChannelSourceReport" : { + "$ref" : "#/definitions/SDRDaemonChannelSourceReport" + }, "SSBModReport" : { "$ref" : "#/definitions/SSBModReport" }, @@ -1470,6 +1473,9 @@ margin-bottom: 20px; "SDRDaemonChannelSinkSettings" : { "$ref" : "#/definitions/SDRDaemonChannelSinkSettings" }, + "SDRDaemonChannelSourceSettings" : { + "$ref" : "#/definitions/SDRDaemonChannelSourceSettings" + }, "SSBModSettings" : { "$ref" : "#/definitions/SSBModSettings" }, @@ -3166,6 +3172,52 @@ margin-bottom: 20px; } }, "description" : "Data handling details for SDRDaemon" +}; + defs.SDRDaemonChannelSourceReport = { + "properties" : { + "queueLength" : { + "type" : "integer", + "description" : "Data read/write queue length in number of data frames" + }, + "queueSize" : { + "type" : "integer", + "description" : "Data read/write queue size in number of data frames" + }, + "samplesCount" : { + "type" : "integer", + "description" : "Absolute consumed samples count" + }, + "correctableErrorsCount" : { + "type" : "integer", + "description" : "Absolute number of correctable errors" + }, + "uncorrectableErrorsCount" : { + "type" : "integer", + "description" : "Absolute number of uncorrectable errors" + }, + "tvSec" : { + "type" : "integer", + "description" : "Counts timestamp seconds" + }, + "tvUSec" : { + "type" : "integer", + "description" : "Counts timestamp microseconds" + } + }, + "description" : "SDRDaemon channel source report" +}; + defs.SDRDaemonChannelSourceSettings = { + "properties" : { + "dataAddress" : { + "type" : "string", + "description" : "Remote USB data address" + }, + "dataPort" : { + "type" : "integer", + "description" : "Remote USB data port" + } + }, + "description" : "Data handling details for SDRDaemon" }; defs.SDRPlayReport = { "properties" : { @@ -4024,6 +4076,9 @@ margin-bottom: 20px; +
  • + daemonChannelReportGet +
  • daemonChannelSettingsGet
  • @@ -4230,6 +4285,427 @@ margin-bottom: 20px;

    Daemon

    +
    +
    +
    +

    daemonChannelReportGet

    +

    +
    +
    +
    +

    +

    get the channel report

    +

    +
    +
    /sdrdaemon/channel/report
    +

    +

    Usage and SDK Samples

    +

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

    Parameters

    + + + + + + +

    Responses

    +

    Status: 200 - On success return channel report

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

    Status: 400 - Invalid device set or channel index

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

    Status: 404 - Device or channel not found

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

    Status: 500 - Error

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

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -28212,7 +28688,7 @@ except ApiException as e:
    - Generated 2018-08-29T15:59:39.880+02:00 + Generated 2018-08-30T01:40:47.594+02:00
    diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp index d90cda597..520dc6d29 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp @@ -48,6 +48,8 @@ SWGChannelReport::SWGChannelReport() { m_nfm_mod_report_isSet = false; ssb_demod_report = nullptr; m_ssb_demod_report_isSet = false; + sdr_daemon_channel_source_report = nullptr; + m_sdr_daemon_channel_source_report_isSet = false; ssb_mod_report = nullptr; m_ssb_mod_report_isSet = false; udp_sink_report = nullptr; @@ -86,6 +88,8 @@ SWGChannelReport::init() { m_nfm_mod_report_isSet = false; ssb_demod_report = new SWGSSBDemodReport(); m_ssb_demod_report_isSet = false; + sdr_daemon_channel_source_report = new SWGSDRDaemonChannelSourceReport(); + m_sdr_daemon_channel_source_report_isSet = false; ssb_mod_report = new SWGSSBModReport(); m_ssb_mod_report_isSet = false; udp_sink_report = new SWGUDPSinkReport(); @@ -128,6 +132,9 @@ SWGChannelReport::cleanup() { if(ssb_demod_report != nullptr) { delete ssb_demod_report; } + if(sdr_daemon_channel_source_report != nullptr) { + delete sdr_daemon_channel_source_report; + } if(ssb_mod_report != nullptr) { delete ssb_mod_report; } @@ -176,6 +183,8 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&ssb_demod_report, pJson["SSBDemodReport"], "SWGSSBDemodReport", "SWGSSBDemodReport"); + ::SWGSDRangel::setValue(&sdr_daemon_channel_source_report, pJson["SDRDaemonChannelSourceReport"], "SWGSDRDaemonChannelSourceReport", "SWGSDRDaemonChannelSourceReport"); + ::SWGSDRangel::setValue(&ssb_mod_report, pJson["SSBModReport"], "SWGSSBModReport", "SWGSSBModReport"); ::SWGSDRangel::setValue(&udp_sink_report, pJson["UDPSinkReport"], "SWGUDPSinkReport", "SWGUDPSinkReport"); @@ -232,6 +241,9 @@ SWGChannelReport::asJsonObject() { if((ssb_demod_report != nullptr) && (ssb_demod_report->isSet())){ toJsonValue(QString("SSBDemodReport"), ssb_demod_report, obj, QString("SWGSSBDemodReport")); } + if((sdr_daemon_channel_source_report != nullptr) && (sdr_daemon_channel_source_report->isSet())){ + toJsonValue(QString("SDRDaemonChannelSourceReport"), sdr_daemon_channel_source_report, obj, QString("SWGSDRDaemonChannelSourceReport")); + } if((ssb_mod_report != nullptr) && (ssb_mod_report->isSet())){ toJsonValue(QString("SSBModReport"), ssb_mod_report, obj, QString("SWGSSBModReport")); } @@ -351,6 +363,16 @@ SWGChannelReport::setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report) { this->m_ssb_demod_report_isSet = true; } +SWGSDRDaemonChannelSourceReport* +SWGChannelReport::getSdrDaemonChannelSourceReport() { + return sdr_daemon_channel_source_report; +} +void +SWGChannelReport::setSdrDaemonChannelSourceReport(SWGSDRDaemonChannelSourceReport* sdr_daemon_channel_source_report) { + this->sdr_daemon_channel_source_report = sdr_daemon_channel_source_report; + this->m_sdr_daemon_channel_source_report_isSet = true; +} + SWGSSBModReport* SWGChannelReport::getSsbModReport() { return ssb_mod_report; @@ -416,6 +438,7 @@ SWGChannelReport::isSet(){ if(nfm_demod_report != nullptr && nfm_demod_report->isSet()){ isObjectUpdated = true; break;} if(nfm_mod_report != nullptr && nfm_mod_report->isSet()){ isObjectUpdated = true; break;} if(ssb_demod_report != nullptr && ssb_demod_report->isSet()){ isObjectUpdated = true; break;} + if(sdr_daemon_channel_source_report != nullptr && sdr_daemon_channel_source_report->isSet()){ isObjectUpdated = true; break;} if(ssb_mod_report != nullptr && ssb_mod_report->isSet()){ isObjectUpdated = true; break;} if(udp_sink_report != nullptr && udp_sink_report->isSet()){ isObjectUpdated = true; break;} if(udp_src_report != nullptr && udp_src_report->isSet()){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h index 0f7ad8b02..f6cd8f662 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h @@ -29,6 +29,7 @@ #include "SWGDSDDemodReport.h" #include "SWGNFMDemodReport.h" #include "SWGNFMModReport.h" +#include "SWGSDRDaemonChannelSourceReport.h" #include "SWGSSBDemodReport.h" #include "SWGSSBModReport.h" #include "SWGUDPSinkReport.h" @@ -85,6 +86,9 @@ public: SWGSSBDemodReport* getSsbDemodReport(); void setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report); + SWGSDRDaemonChannelSourceReport* getSdrDaemonChannelSourceReport(); + void setSdrDaemonChannelSourceReport(SWGSDRDaemonChannelSourceReport* sdr_daemon_channel_source_report); + SWGSSBModReport* getSsbModReport(); void setSsbModReport(SWGSSBModReport* ssb_mod_report); @@ -134,6 +138,9 @@ private: SWGSSBDemodReport* ssb_demod_report; bool m_ssb_demod_report_isSet; + SWGSDRDaemonChannelSourceReport* sdr_daemon_channel_source_report; + bool m_sdr_daemon_channel_source_report_isSet; + SWGSSBModReport* ssb_mod_report; bool m_ssb_mod_report_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp index 751c40280..37ef26b00 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp @@ -48,6 +48,8 @@ SWGChannelSettings::SWGChannelSettings() { m_nfm_mod_settings_isSet = false; sdr_daemon_channel_sink_settings = nullptr; m_sdr_daemon_channel_sink_settings_isSet = false; + sdr_daemon_channel_source_settings = nullptr; + m_sdr_daemon_channel_source_settings_isSet = false; ssb_mod_settings = nullptr; m_ssb_mod_settings_isSet = false; ssb_demod_settings = nullptr; @@ -88,6 +90,8 @@ SWGChannelSettings::init() { m_nfm_mod_settings_isSet = false; sdr_daemon_channel_sink_settings = new SWGSDRDaemonChannelSinkSettings(); m_sdr_daemon_channel_sink_settings_isSet = false; + sdr_daemon_channel_source_settings = new SWGSDRDaemonChannelSourceSettings(); + m_sdr_daemon_channel_source_settings_isSet = false; ssb_mod_settings = new SWGSSBModSettings(); m_ssb_mod_settings_isSet = false; ssb_demod_settings = new SWGSSBDemodSettings(); @@ -132,6 +136,9 @@ SWGChannelSettings::cleanup() { if(sdr_daemon_channel_sink_settings != nullptr) { delete sdr_daemon_channel_sink_settings; } + if(sdr_daemon_channel_source_settings != nullptr) { + delete sdr_daemon_channel_source_settings; + } if(ssb_mod_settings != nullptr) { delete ssb_mod_settings; } @@ -183,6 +190,8 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&sdr_daemon_channel_sink_settings, pJson["SDRDaemonChannelSinkSettings"], "SWGSDRDaemonChannelSinkSettings", "SWGSDRDaemonChannelSinkSettings"); + ::SWGSDRangel::setValue(&sdr_daemon_channel_source_settings, pJson["SDRDaemonChannelSourceSettings"], "SWGSDRDaemonChannelSourceSettings", "SWGSDRDaemonChannelSourceSettings"); + ::SWGSDRangel::setValue(&ssb_mod_settings, pJson["SSBModSettings"], "SWGSSBModSettings", "SWGSSBModSettings"); ::SWGSDRangel::setValue(&ssb_demod_settings, pJson["SSBDemodSettings"], "SWGSSBDemodSettings", "SWGSSBDemodSettings"); @@ -241,6 +250,9 @@ SWGChannelSettings::asJsonObject() { if((sdr_daemon_channel_sink_settings != nullptr) && (sdr_daemon_channel_sink_settings->isSet())){ toJsonValue(QString("SDRDaemonChannelSinkSettings"), sdr_daemon_channel_sink_settings, obj, QString("SWGSDRDaemonChannelSinkSettings")); } + if((sdr_daemon_channel_source_settings != nullptr) && (sdr_daemon_channel_source_settings->isSet())){ + toJsonValue(QString("SDRDaemonChannelSourceSettings"), sdr_daemon_channel_source_settings, obj, QString("SWGSDRDaemonChannelSourceSettings")); + } if((ssb_mod_settings != nullptr) && (ssb_mod_settings->isSet())){ toJsonValue(QString("SSBModSettings"), ssb_mod_settings, obj, QString("SWGSSBModSettings")); } @@ -363,6 +375,16 @@ SWGChannelSettings::setSdrDaemonChannelSinkSettings(SWGSDRDaemonChannelSinkSetti this->m_sdr_daemon_channel_sink_settings_isSet = true; } +SWGSDRDaemonChannelSourceSettings* +SWGChannelSettings::getSdrDaemonChannelSourceSettings() { + return sdr_daemon_channel_source_settings; +} +void +SWGChannelSettings::setSdrDaemonChannelSourceSettings(SWGSDRDaemonChannelSourceSettings* sdr_daemon_channel_source_settings) { + this->sdr_daemon_channel_source_settings = sdr_daemon_channel_source_settings; + this->m_sdr_daemon_channel_source_settings_isSet = true; +} + SWGSSBModSettings* SWGChannelSettings::getSsbModSettings() { return ssb_mod_settings; @@ -438,6 +460,7 @@ SWGChannelSettings::isSet(){ if(nfm_demod_settings != nullptr && nfm_demod_settings->isSet()){ isObjectUpdated = true; break;} if(nfm_mod_settings != nullptr && nfm_mod_settings->isSet()){ isObjectUpdated = true; break;} if(sdr_daemon_channel_sink_settings != nullptr && sdr_daemon_channel_sink_settings->isSet()){ isObjectUpdated = true; break;} + if(sdr_daemon_channel_source_settings != nullptr && sdr_daemon_channel_source_settings->isSet()){ isObjectUpdated = true; break;} if(ssb_mod_settings != nullptr && ssb_mod_settings->isSet()){ isObjectUpdated = true; break;} if(ssb_demod_settings != nullptr && ssb_demod_settings->isSet()){ isObjectUpdated = true; break;} if(udp_sink_settings != nullptr && udp_sink_settings->isSet()){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h index 9742e650f..90bdf4c0e 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h @@ -30,6 +30,7 @@ #include "SWGNFMDemodSettings.h" #include "SWGNFMModSettings.h" #include "SWGSDRDaemonChannelSinkSettings.h" +#include "SWGSDRDaemonChannelSourceSettings.h" #include "SWGSSBDemodSettings.h" #include "SWGSSBModSettings.h" #include "SWGUDPSinkSettings.h" @@ -86,6 +87,9 @@ public: SWGSDRDaemonChannelSinkSettings* getSdrDaemonChannelSinkSettings(); void setSdrDaemonChannelSinkSettings(SWGSDRDaemonChannelSinkSettings* sdr_daemon_channel_sink_settings); + SWGSDRDaemonChannelSourceSettings* getSdrDaemonChannelSourceSettings(); + void setSdrDaemonChannelSourceSettings(SWGSDRDaemonChannelSourceSettings* sdr_daemon_channel_source_settings); + SWGSSBModSettings* getSsbModSettings(); void setSsbModSettings(SWGSSBModSettings* ssb_mod_settings); @@ -138,6 +142,9 @@ private: SWGSDRDaemonChannelSinkSettings* sdr_daemon_channel_sink_settings; bool m_sdr_daemon_channel_sink_settings_isSet; + SWGSDRDaemonChannelSourceSettings* sdr_daemon_channel_source_settings; + bool m_sdr_daemon_channel_source_settings_isSet; + SWGSSBModSettings* ssb_mod_settings; bool m_ssb_mod_settings_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGDaemonApi.cpp b/swagger/sdrangel/code/qt5/client/SWGDaemonApi.cpp index 23886faef..f1498b845 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDaemonApi.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGDaemonApi.cpp @@ -28,6 +28,58 @@ SWGDaemonApi::SWGDaemonApi(QString host, QString basePath) { this->basePath = basePath; } +void +SWGDaemonApi::daemonChannelReportGet() { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrdaemon/channel/report"); + + + + 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, + &SWGDaemonApi::daemonChannelReportGetCallback); + + worker->execute(&input); +} + +void +SWGDaemonApi::daemonChannelReportGetCallback(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); + SWGChannelReport* output = static_cast(create(json, QString("SWGChannelReport"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit daemonChannelReportGetSignal(output); + } else { + emit daemonChannelReportGetSignalE(output, error_type, error_str); + emit daemonChannelReportGetSignalEFull(worker, error_type, error_str); + } +} + void SWGDaemonApi::daemonChannelSettingsGet() { QString fullPath; diff --git a/swagger/sdrangel/code/qt5/client/SWGDaemonApi.h b/swagger/sdrangel/code/qt5/client/SWGDaemonApi.h index 74b7083f6..10f9ccad2 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDaemonApi.h +++ b/swagger/sdrangel/code/qt5/client/SWGDaemonApi.h @@ -15,6 +15,7 @@ #include "SWGHttpRequest.h" +#include "SWGChannelReport.h" #include "SWGChannelSettings.h" #include "SWGDaemonSummaryResponse.h" #include "SWGDeviceReport.h" @@ -39,6 +40,7 @@ public: QString basePath; QMap defaultHeaders; + void daemonChannelReportGet(); void daemonChannelSettingsGet(); void daemonChannelSettingsPatch(SWGChannelSettings& body); void daemonChannelSettingsPut(SWGChannelSettings& body); @@ -54,6 +56,7 @@ public: void daemonRunPost(); private: + void daemonChannelReportGetCallback (SWGHttpRequestWorker * worker); void daemonChannelSettingsGetCallback (SWGHttpRequestWorker * worker); void daemonChannelSettingsPatchCallback (SWGHttpRequestWorker * worker); void daemonChannelSettingsPutCallback (SWGHttpRequestWorker * worker); @@ -69,6 +72,7 @@ private: void daemonRunPostCallback (SWGHttpRequestWorker * worker); signals: + void daemonChannelReportGetSignal(SWGChannelReport* summary); void daemonChannelSettingsGetSignal(SWGChannelSettings* summary); void daemonChannelSettingsPatchSignal(SWGChannelSettings* summary); void daemonChannelSettingsPutSignal(SWGChannelSettings* summary); @@ -83,6 +87,7 @@ signals: void daemonRunGetSignal(SWGDeviceState* summary); void daemonRunPostSignal(SWGDeviceState* summary); + void daemonChannelReportGetSignalE(SWGChannelReport* summary, QNetworkReply::NetworkError error_type, QString& error_str); void daemonChannelSettingsGetSignalE(SWGChannelSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); void daemonChannelSettingsPatchSignalE(SWGChannelSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); void daemonChannelSettingsPutSignalE(SWGChannelSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); @@ -97,6 +102,7 @@ signals: void daemonRunGetSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str); void daemonRunPostSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void daemonChannelReportGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void daemonChannelSettingsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void daemonChannelSettingsPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void daemonChannelSettingsPutSignalEFull(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 05f3854fb..48555ccd4 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -90,6 +90,8 @@ #include "SWGRtlSdrReport.h" #include "SWGRtlSdrSettings.h" #include "SWGSDRDaemonChannelSinkSettings.h" +#include "SWGSDRDaemonChannelSourceReport.h" +#include "SWGSDRDaemonChannelSourceSettings.h" #include "SWGSDRPlayReport.h" #include "SWGSDRPlaySettings.h" #include "SWGSDRdaemonSinkReport.h" @@ -344,6 +346,12 @@ namespace SWGSDRangel { if(QString("SWGSDRDaemonChannelSinkSettings").compare(type) == 0) { return new SWGSDRDaemonChannelSinkSettings(); } + if(QString("SWGSDRDaemonChannelSourceReport").compare(type) == 0) { + return new SWGSDRDaemonChannelSourceReport(); + } + if(QString("SWGSDRDaemonChannelSourceSettings").compare(type) == 0) { + return new SWGSDRDaemonChannelSourceSettings(); + } if(QString("SWGSDRPlayReport").compare(type) == 0) { return new SWGSDRPlayReport(); } diff --git a/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceReport.cpp b/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceReport.cpp new file mode 100644 index 000000000..1d0659eba --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceReport.cpp @@ -0,0 +1,232 @@ +/** + * 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: 4.1.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 "SWGSDRDaemonChannelSourceReport.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGSDRDaemonChannelSourceReport::SWGSDRDaemonChannelSourceReport(QString* json) { + init(); + this->fromJson(*json); +} + +SWGSDRDaemonChannelSourceReport::SWGSDRDaemonChannelSourceReport() { + queue_length = 0; + m_queue_length_isSet = false; + queue_size = 0; + m_queue_size_isSet = false; + samples_count = 0; + m_samples_count_isSet = false; + correctable_errors_count = 0; + m_correctable_errors_count_isSet = false; + uncorrectable_errors_count = 0; + m_uncorrectable_errors_count_isSet = false; + tv_sec = 0; + m_tv_sec_isSet = false; + tv_u_sec = 0; + m_tv_u_sec_isSet = false; +} + +SWGSDRDaemonChannelSourceReport::~SWGSDRDaemonChannelSourceReport() { + this->cleanup(); +} + +void +SWGSDRDaemonChannelSourceReport::init() { + queue_length = 0; + m_queue_length_isSet = false; + queue_size = 0; + m_queue_size_isSet = false; + samples_count = 0; + m_samples_count_isSet = false; + correctable_errors_count = 0; + m_correctable_errors_count_isSet = false; + uncorrectable_errors_count = 0; + m_uncorrectable_errors_count_isSet = false; + tv_sec = 0; + m_tv_sec_isSet = false; + tv_u_sec = 0; + m_tv_u_sec_isSet = false; +} + +void +SWGSDRDaemonChannelSourceReport::cleanup() { + + + + + + + +} + +SWGSDRDaemonChannelSourceReport* +SWGSDRDaemonChannelSourceReport::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGSDRDaemonChannelSourceReport::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&queue_length, pJson["queueLength"], "qint32", ""); + + ::SWGSDRangel::setValue(&queue_size, pJson["queueSize"], "qint32", ""); + + ::SWGSDRangel::setValue(&samples_count, pJson["samplesCount"], "qint32", ""); + + ::SWGSDRangel::setValue(&correctable_errors_count, pJson["correctableErrorsCount"], "qint32", ""); + + ::SWGSDRangel::setValue(&uncorrectable_errors_count, pJson["uncorrectableErrorsCount"], "qint32", ""); + + ::SWGSDRangel::setValue(&tv_sec, pJson["tvSec"], "qint32", ""); + + ::SWGSDRangel::setValue(&tv_u_sec, pJson["tvUSec"], "qint32", ""); + +} + +QString +SWGSDRDaemonChannelSourceReport::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGSDRDaemonChannelSourceReport::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_queue_length_isSet){ + obj->insert("queueLength", QJsonValue(queue_length)); + } + if(m_queue_size_isSet){ + obj->insert("queueSize", QJsonValue(queue_size)); + } + if(m_samples_count_isSet){ + obj->insert("samplesCount", QJsonValue(samples_count)); + } + if(m_correctable_errors_count_isSet){ + obj->insert("correctableErrorsCount", QJsonValue(correctable_errors_count)); + } + if(m_uncorrectable_errors_count_isSet){ + obj->insert("uncorrectableErrorsCount", QJsonValue(uncorrectable_errors_count)); + } + if(m_tv_sec_isSet){ + obj->insert("tvSec", QJsonValue(tv_sec)); + } + if(m_tv_u_sec_isSet){ + obj->insert("tvUSec", QJsonValue(tv_u_sec)); + } + + return obj; +} + +qint32 +SWGSDRDaemonChannelSourceReport::getQueueLength() { + return queue_length; +} +void +SWGSDRDaemonChannelSourceReport::setQueueLength(qint32 queue_length) { + this->queue_length = queue_length; + this->m_queue_length_isSet = true; +} + +qint32 +SWGSDRDaemonChannelSourceReport::getQueueSize() { + return queue_size; +} +void +SWGSDRDaemonChannelSourceReport::setQueueSize(qint32 queue_size) { + this->queue_size = queue_size; + this->m_queue_size_isSet = true; +} + +qint32 +SWGSDRDaemonChannelSourceReport::getSamplesCount() { + return samples_count; +} +void +SWGSDRDaemonChannelSourceReport::setSamplesCount(qint32 samples_count) { + this->samples_count = samples_count; + this->m_samples_count_isSet = true; +} + +qint32 +SWGSDRDaemonChannelSourceReport::getCorrectableErrorsCount() { + return correctable_errors_count; +} +void +SWGSDRDaemonChannelSourceReport::setCorrectableErrorsCount(qint32 correctable_errors_count) { + this->correctable_errors_count = correctable_errors_count; + this->m_correctable_errors_count_isSet = true; +} + +qint32 +SWGSDRDaemonChannelSourceReport::getUncorrectableErrorsCount() { + return uncorrectable_errors_count; +} +void +SWGSDRDaemonChannelSourceReport::setUncorrectableErrorsCount(qint32 uncorrectable_errors_count) { + this->uncorrectable_errors_count = uncorrectable_errors_count; + this->m_uncorrectable_errors_count_isSet = true; +} + +qint32 +SWGSDRDaemonChannelSourceReport::getTvSec() { + return tv_sec; +} +void +SWGSDRDaemonChannelSourceReport::setTvSec(qint32 tv_sec) { + this->tv_sec = tv_sec; + this->m_tv_sec_isSet = true; +} + +qint32 +SWGSDRDaemonChannelSourceReport::getTvUSec() { + return tv_u_sec; +} +void +SWGSDRDaemonChannelSourceReport::setTvUSec(qint32 tv_u_sec) { + this->tv_u_sec = tv_u_sec; + this->m_tv_u_sec_isSet = true; +} + + +bool +SWGSDRDaemonChannelSourceReport::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_queue_length_isSet){ isObjectUpdated = true; break;} + if(m_queue_size_isSet){ isObjectUpdated = true; break;} + if(m_samples_count_isSet){ isObjectUpdated = true; break;} + if(m_correctable_errors_count_isSet){ isObjectUpdated = true; break;} + if(m_uncorrectable_errors_count_isSet){ isObjectUpdated = true; break;} + if(m_tv_sec_isSet){ isObjectUpdated = true; break;} + if(m_tv_u_sec_isSet){ isObjectUpdated = true; break;} + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceReport.h b/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceReport.h new file mode 100644 index 000000000..737a3e948 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceReport.h @@ -0,0 +1,94 @@ +/** + * 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: 4.1.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. + */ + +/* + * SWGSDRDaemonChannelSourceReport.h + * + * SDRDaemon channel source report + */ + +#ifndef SWGSDRDaemonChannelSourceReport_H_ +#define SWGSDRDaemonChannelSourceReport_H_ + +#include + + + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGSDRDaemonChannelSourceReport: public SWGObject { +public: + SWGSDRDaemonChannelSourceReport(); + SWGSDRDaemonChannelSourceReport(QString* json); + virtual ~SWGSDRDaemonChannelSourceReport(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGSDRDaemonChannelSourceReport* fromJson(QString &jsonString) override; + + qint32 getQueueLength(); + void setQueueLength(qint32 queue_length); + + qint32 getQueueSize(); + void setQueueSize(qint32 queue_size); + + qint32 getSamplesCount(); + void setSamplesCount(qint32 samples_count); + + qint32 getCorrectableErrorsCount(); + void setCorrectableErrorsCount(qint32 correctable_errors_count); + + qint32 getUncorrectableErrorsCount(); + void setUncorrectableErrorsCount(qint32 uncorrectable_errors_count); + + qint32 getTvSec(); + void setTvSec(qint32 tv_sec); + + qint32 getTvUSec(); + void setTvUSec(qint32 tv_u_sec); + + + virtual bool isSet() override; + +private: + qint32 queue_length; + bool m_queue_length_isSet; + + qint32 queue_size; + bool m_queue_size_isSet; + + qint32 samples_count; + bool m_samples_count_isSet; + + qint32 correctable_errors_count; + bool m_correctable_errors_count_isSet; + + qint32 uncorrectable_errors_count; + bool m_uncorrectable_errors_count_isSet; + + qint32 tv_sec; + bool m_tv_sec_isSet; + + qint32 tv_u_sec; + bool m_tv_u_sec_isSet; + +}; + +} + +#endif /* SWGSDRDaemonChannelSourceReport_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceSettings.cpp new file mode 100644 index 000000000..5a39bd498 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceSettings.cpp @@ -0,0 +1,129 @@ +/** + * 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: 4.1.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 "SWGSDRDaemonChannelSourceSettings.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGSDRDaemonChannelSourceSettings::SWGSDRDaemonChannelSourceSettings(QString* json) { + init(); + this->fromJson(*json); +} + +SWGSDRDaemonChannelSourceSettings::SWGSDRDaemonChannelSourceSettings() { + data_address = nullptr; + m_data_address_isSet = false; + data_port = 0; + m_data_port_isSet = false; +} + +SWGSDRDaemonChannelSourceSettings::~SWGSDRDaemonChannelSourceSettings() { + this->cleanup(); +} + +void +SWGSDRDaemonChannelSourceSettings::init() { + data_address = new QString(""); + m_data_address_isSet = false; + data_port = 0; + m_data_port_isSet = false; +} + +void +SWGSDRDaemonChannelSourceSettings::cleanup() { + if(data_address != nullptr) { + delete data_address; + } + +} + +SWGSDRDaemonChannelSourceSettings* +SWGSDRDaemonChannelSourceSettings::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGSDRDaemonChannelSourceSettings::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&data_address, pJson["dataAddress"], "QString", "QString"); + + ::SWGSDRangel::setValue(&data_port, pJson["dataPort"], "qint32", ""); + +} + +QString +SWGSDRDaemonChannelSourceSettings::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGSDRDaemonChannelSourceSettings::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(data_address != nullptr && *data_address != QString("")){ + toJsonValue(QString("dataAddress"), data_address, obj, QString("QString")); + } + if(m_data_port_isSet){ + obj->insert("dataPort", QJsonValue(data_port)); + } + + return obj; +} + +QString* +SWGSDRDaemonChannelSourceSettings::getDataAddress() { + return data_address; +} +void +SWGSDRDaemonChannelSourceSettings::setDataAddress(QString* data_address) { + this->data_address = data_address; + this->m_data_address_isSet = true; +} + +qint32 +SWGSDRDaemonChannelSourceSettings::getDataPort() { + return data_port; +} +void +SWGSDRDaemonChannelSourceSettings::setDataPort(qint32 data_port) { + this->data_port = data_port; + this->m_data_port_isSet = true; +} + + +bool +SWGSDRDaemonChannelSourceSettings::isSet(){ + bool isObjectUpdated = false; + do{ + if(data_address != nullptr && *data_address != QString("")){ isObjectUpdated = true; break;} + if(m_data_port_isSet){ isObjectUpdated = true; break;} + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceSettings.h b/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceSettings.h new file mode 100644 index 000000000..123e1956e --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSDRDaemonChannelSourceSettings.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. * 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: 4.1.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. + */ + +/* + * SWGSDRDaemonChannelSourceSettings.h + * + * Data handling details for SDRDaemon + */ + +#ifndef SWGSDRDaemonChannelSourceSettings_H_ +#define SWGSDRDaemonChannelSourceSettings_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGSDRDaemonChannelSourceSettings: public SWGObject { +public: + SWGSDRDaemonChannelSourceSettings(); + SWGSDRDaemonChannelSourceSettings(QString* json); + virtual ~SWGSDRDaemonChannelSourceSettings(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGSDRDaemonChannelSourceSettings* fromJson(QString &jsonString) override; + + QString* getDataAddress(); + void setDataAddress(QString* data_address); + + qint32 getDataPort(); + void setDataPort(qint32 data_port); + + + virtual bool isSet() override; + +private: + QString* data_address; + bool m_data_address_isSet; + + qint32 data_port; + bool m_data_port_isSet; + +}; + +} + +#endif /* SWGSDRDaemonChannelSourceSettings_H_ */