From b2dc7a6cdc6696be8e96f2dadd5f08db5a27f04d Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 4 Sep 2018 20:35:54 +0200 Subject: [PATCH] Changed SDRDaemonChannelXxx to DaemonXxx --- plugins/channeltx/daemonsrc/daemonsrc.cpp | 70 ++-- .../channeltx/daemonsrc/daemonsrcthread.cpp | 6 +- .../sdrdaemonsink/sdrdaemonsinkgui.cpp | 4 +- .../sdrdaemonsink/sdrdaemonsinkoutput.cpp | 4 +- sdrbase/resources/res.qrc | 4 +- sdrbase/resources/webapi/doc/html2/index.html | 192 +++++------ ...DaemonChannelSink.yaml => DaemonSink.yaml} | 4 +- ...onChannelSource.yaml => DaemonSource.yaml} | 8 +- .../resources/webapi/doc/swagger/swagger.yaml | 12 +- sdrbase/webapi/webapirequestmapper.cpp | 12 +- sdrdaemon/channel/sdrdaemonchannelsink.cpp | 26 +- sdrdaemon/channel/sdrdaemonchannelsource.cpp | 34 +- sdrdaemon/webapi/webapirequestmapper.cpp | 10 +- ...DaemonChannelSink.yaml => DaemonSink.yaml} | 4 +- ...onChannelSource.yaml => DaemonSource.yaml} | 8 +- swagger/sdrangel/api/swagger/swagger.yaml | 12 +- swagger/sdrangel/code/html2/index.html | 192 +++++------ .../code/qt5/client/SWGChannelReport.cpp | 32 +- .../code/qt5/client/SWGChannelReport.h | 10 +- .../code/qt5/client/SWGChannelSettings.cpp | 64 ++-- .../code/qt5/client/SWGChannelSettings.h | 20 +- .../code/qt5/client/SWGDaemonSinkSettings.cpp | 171 ++++++++++ .../code/qt5/client/SWGDaemonSinkSettings.h | 77 +++++ .../code/qt5/client/SWGDaemonSourceReport.cpp | 316 ++++++++++++++++++ .../code/qt5/client/SWGDaemonSourceReport.h | 118 +++++++ .../qt5/client/SWGDaemonSourceSettings.cpp | 173 ++++++++++ .../code/qt5/client/SWGDaemonSourceSettings.h | 77 +++++ .../code/qt5/client/SWGModelFactory.h | 24 +- 28 files changed, 1308 insertions(+), 376 deletions(-) rename sdrbase/resources/webapi/doc/swagger/include/{SDRDaemonChannelSink.yaml => DaemonSink.yaml} (82%) rename sdrbase/resources/webapi/doc/swagger/include/{SDRDaemonChannelSource.yaml => DaemonSource.yaml} (88%) rename swagger/sdrangel/api/swagger/include/{SDRDaemonChannelSink.yaml => DaemonSink.yaml} (82%) rename swagger/sdrangel/api/swagger/include/{SDRDaemonChannelSource.yaml => DaemonSource.yaml} (88%) create mode 100644 swagger/sdrangel/code/qt5/client/SWGDaemonSinkSettings.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGDaemonSinkSettings.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGDaemonSourceReport.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGDaemonSourceReport.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGDaemonSourceSettings.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGDaemonSourceSettings.h diff --git a/plugins/channeltx/daemonsrc/daemonsrc.cpp b/plugins/channeltx/daemonsrc/daemonsrc.cpp index c703b7be8..7904e3ace 100644 --- a/plugins/channeltx/daemonsrc/daemonsrc.cpp +++ b/plugins/channeltx/daemonsrc/daemonsrc.cpp @@ -23,7 +23,7 @@ #include "SWGChannelSettings.h" #include "SWGChannelReport.h" -#include "SWGSDRDaemonChannelSourceReport.h" +#include "SWGDaemonSourceReport.h" #include "dsp/devicesamplesink.h" #include "device/devicesinkapi.h" @@ -219,7 +219,7 @@ void DaemonSrc::handleDataBlock(SDRDaemonDataBlock* dataBlock __attribute__((unu { if (dataBlock->m_rxControlBlock.m_blockCount < SDRDaemonNbOrginalBlocks) { - qWarning("SDRDaemonChannelSource::handleDataBlock: incomplete data block: not processing"); + qWarning("DaemonSrc::handleDataBlock: incomplete data block: not processing"); } else { @@ -241,12 +241,12 @@ void DaemonSrc::handleDataBlock(SDRDaemonDataBlock* dataBlock __attribute__((unu } } - //qDebug("SDRDaemonChannelSource::handleDataBlock: frame: %u blocks: %d", dataBlock.m_rxControlBlock.m_frameIndex, blockCount); + //qDebug("DaemonSrc::handleDataBlock: frame: %u blocks: %d", dataBlock.m_rxControlBlock.m_frameIndex, blockCount); // Need to use the CM256 recovery if (m_cm256p &&(dataBlock->m_rxControlBlock.m_originalCount < SDRDaemonNbOrginalBlocks)) { - qDebug("SDRDaemonChannelSource::handleDataBlock: %d recovery blocks", dataBlock->m_rxControlBlock.m_recoveryCount); + qDebug("DaemonSrc::handleDataBlock: %d recovery blocks", dataBlock->m_rxControlBlock.m_recoveryCount); CM256::cm256_encoder_params paramsCM256; paramsCM256.BlockBytes = sizeof(SDRDaemonProtectedBlock); // never changes paramsCM256.OriginalCount = SDRDaemonNbOrginalBlocks; // never changes @@ -266,7 +266,7 @@ void DaemonSrc::handleDataBlock(SDRDaemonDataBlock* dataBlock __attribute__((unu if (m_cm256.cm256_decode(paramsCM256, m_cm256DescriptorBlocks)) // CM256 decode { - qWarning() << "SDRDaemonChannelSource::handleDataBlock: decode CM256 error:" + qWarning() << "DaemonSrc::handleDataBlock: decode CM256 error:" << " m_originalCount: " << dataBlock->m_rxControlBlock.m_originalCount << " m_recoveryCount: " << dataBlock->m_rxControlBlock.m_recoveryCount; } @@ -297,7 +297,7 @@ void DaemonSrc::handleDataBlock(SDRDaemonDataBlock* dataBlock __attribute__((unu { if (!(m_currentMeta == *metaData)) { - printMeta("SDRDaemonChannelSource::handleDataBlock", metaData); + printMeta("DaemonSrc::handleDataBlock", metaData); if (m_currentMeta.m_centerFrequency != metaData->m_centerFrequency) { m_deviceAPI->getSampleSink()->setCenterFrequency(metaData->m_centerFrequency*1000); // frequency is in kHz @@ -314,7 +314,7 @@ void DaemonSrc::handleDataBlock(SDRDaemonDataBlock* dataBlock __attribute__((unu } else { - qWarning() << "SDRDaemonChannelSource::handleDataBlock: recovered meta: invalid CRC32"; + qWarning() << "DaemonSrc::handleDataBlock: recovered meta: invalid CRC32"; } } @@ -350,7 +350,7 @@ uint32_t DaemonSrc::calculateDataReadQueueSize(int sampleRate) // scale for 20 blocks at 48 kS/s. Take next even number. uint32_t maxSize = sampleRate / 2400; maxSize = (maxSize % 2 == 0) ? maxSize : maxSize + 1; - qDebug("SDRDaemonChannelSource::calculateDataReadQueueSize: set max queue size to %u blocks", maxSize); + qDebug("DaemonSrc::calculateDataReadQueueSize: set max queue size to %u blocks", maxSize); return maxSize; } @@ -358,8 +358,8 @@ int DaemonSrc::webapiSettingsGet( SWGSDRangel::SWGChannelSettings& response, QString& errorMessage __attribute__((unused))) { - response.setSdrDaemonChannelSourceSettings(new SWGSDRangel::SWGSDRDaemonChannelSourceSettings()); - response.getSdrDaemonChannelSourceSettings()->init(); + response.setDaemonSourceSettings(new SWGSDRangel::SWGDaemonSourceSettings()); + response.getDaemonSourceSettings()->init(); webapiFormatChannelSettings(response, m_settings); return 200; } @@ -373,11 +373,11 @@ int DaemonSrc::webapiSettingsPutPatch( DaemonSrcSettings settings = m_settings; if (channelSettingsKeys.contains("dataAddress")) { - settings.m_dataAddress = *response.getSdrDaemonChannelSourceSettings()->getDataAddress(); + settings.m_dataAddress = *response.getDaemonSourceSettings()->getDataAddress(); } if (channelSettingsKeys.contains("dataPort")) { - int dataPort = response.getSdrDaemonChannelSourceSettings()->getDataPort(); + int dataPort = response.getDaemonSourceSettings()->getDataPort(); if ((dataPort < 1024) || (dataPort > 65535)) { settings.m_dataPort = 9090; @@ -386,10 +386,10 @@ int DaemonSrc::webapiSettingsPutPatch( } } if (channelSettingsKeys.contains("rgbColor")) { - settings.m_rgbColor = response.getSdrDaemonChannelSourceSettings()->getRgbColor(); + settings.m_rgbColor = response.getDaemonSourceSettings()->getRgbColor(); } if (channelSettingsKeys.contains("title")) { - settings.m_title = *response.getSdrDaemonChannelSourceSettings()->getTitle(); + settings.m_title = *response.getDaemonSourceSettings()->getTitle(); } MsgConfigureDaemonSrc *msg = MsgConfigureDaemonSrc::create(settings, force); @@ -411,27 +411,27 @@ int DaemonSrc::webapiReportGet( SWGSDRangel::SWGChannelReport& response, QString& errorMessage __attribute__((unused))) { - response.setSdrDaemonChannelSourceReport(new SWGSDRangel::SWGSDRDaemonChannelSourceReport()); - response.getSdrDaemonChannelSourceReport()->init(); + response.setDaemonSourceReport(new SWGSDRangel::SWGDaemonSourceReport()); + response.getDaemonSourceReport()->init(); webapiFormatChannelReport(response); return 200; } void DaemonSrc::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DaemonSrcSettings& settings) { - if (response.getSdrDaemonChannelSourceSettings()->getDataAddress()) { - *response.getSdrDaemonChannelSourceSettings()->getDataAddress() = settings.m_dataAddress; + if (response.getDaemonSourceSettings()->getDataAddress()) { + *response.getDaemonSourceSettings()->getDataAddress() = settings.m_dataAddress; } else { - response.getSdrDaemonChannelSourceSettings()->setDataAddress(new QString(settings.m_dataAddress)); + response.getDaemonSourceSettings()->setDataAddress(new QString(settings.m_dataAddress)); } - response.getSdrDaemonChannelSourceSettings()->setDataPort(settings.m_dataPort); - response.getSdrDaemonChannelSourceSettings()->setRgbColor(settings.m_rgbColor); + response.getDaemonSourceSettings()->setDataPort(settings.m_dataPort); + response.getDaemonSourceSettings()->setRgbColor(settings.m_rgbColor); - if (response.getSdrDaemonChannelSourceSettings()->getTitle()) { - *response.getSdrDaemonChannelSourceSettings()->getTitle() = settings.m_title; + if (response.getDaemonSourceSettings()->getTitle()) { + *response.getDaemonSourceSettings()->getTitle() = settings.m_title; } else { - response.getSdrDaemonChannelSourceSettings()->setTitle(new QString(settings.m_title)); + response.getDaemonSourceSettings()->setTitle(new QString(settings.m_title)); } } @@ -440,16 +440,16 @@ void DaemonSrc::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& respons 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); - response.getSdrDaemonChannelSourceReport()->setNbOriginalBlocks(m_currentMeta.m_nbOriginalBlocks); - response.getSdrDaemonChannelSourceReport()->setNbFecBlocks(m_currentMeta.m_nbFECBlocks); - response.getSdrDaemonChannelSourceReport()->setCenterFreq(m_currentMeta.m_centerFrequency); - response.getSdrDaemonChannelSourceReport()->setSampleRate(m_currentMeta.m_sampleRate); + response.getDaemonSourceReport()->setTvSec(tv.tv_sec); + response.getDaemonSourceReport()->setTvUSec(tv.tv_usec); + response.getDaemonSourceReport()->setQueueSize(m_dataReadQueue.size()); + response.getDaemonSourceReport()->setQueueLength(m_dataReadQueue.length()); + response.getDaemonSourceReport()->setSamplesCount(m_dataReadQueue.readSampleCount()); + response.getDaemonSourceReport()->setCorrectableErrorsCount(m_nbCorrectableErrors); + response.getDaemonSourceReport()->setUncorrectableErrorsCount(m_nbUncorrectableErrors); + response.getDaemonSourceReport()->setNbOriginalBlocks(m_currentMeta.m_nbOriginalBlocks); + response.getDaemonSourceReport()->setNbFecBlocks(m_currentMeta.m_nbFECBlocks); + response.getDaemonSourceReport()->setCenterFreq(m_currentMeta.m_centerFrequency); + response.getDaemonSourceReport()->setSampleRate(m_currentMeta.m_sampleRate); } diff --git a/plugins/channeltx/daemonsrc/daemonsrcthread.cpp b/plugins/channeltx/daemonsrc/daemonsrcthread.cpp index e810b944a..b203eb4f5 100644 --- a/plugins/channeltx/daemonsrc/daemonsrcthread.cpp +++ b/plugins/channeltx/daemonsrc/daemonsrcthread.cpp @@ -41,7 +41,7 @@ DaemonSrcThread::DaemonSrcThread(SDRDaemonDataQueue *dataQueue, QObject* parent) DaemonSrcThread::~DaemonSrcThread() { - qDebug("DaemonSrcThread::~SDRDaemonChannelSourceThread"); + qDebug("DaemonSrcThread::~DaemonSrcThread"); } void DaemonSrcThread::startStop(bool start) @@ -159,7 +159,7 @@ void DaemonSrcThread::readPendingDatagrams() if (superBlock.m_header.m_frameIndex != frameIndex) { - //qDebug("SDRDaemonChannelSourceThread::readPendingDatagrams: push frame %u", frameIndex); + //qDebug("DaemonSrcThread::readPendingDatagrams: push frame %u", frameIndex); m_dataQueue->push(m_dataBlocks[dataBlockIndex]); m_dataBlocks[dataBlockIndex] = new SDRDaemonDataBlock(); m_dataBlocks[dataBlockIndex]->m_rxControlBlock.m_frameIndex = superBlock.m_header.m_frameIndex; @@ -182,7 +182,7 @@ void DaemonSrcThread::readPendingDatagrams() } else { - qWarning("SDRDaemonChannelSourceThread::readPendingDatagrams: wrong super block size not processing"); + qWarning("DaemonSrcThread::readPendingDatagrams: wrong super block size not processing"); } } } diff --git a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.cpp b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.cpp index 0de35c635..a11fcb007 100644 --- a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.cpp +++ b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkgui.cpp @@ -555,9 +555,9 @@ void SDRdaemonSinkGui::analyzeApiReply(const QJsonObject& jsonObject) { QString infoLine; - if (jsonObject.contains("SDRDaemonChannelSourceReport")) + if (jsonObject.contains("DaemonSourceReport")) { - QJsonObject report = jsonObject["SDRDaemonChannelSourceReport"].toObject(); + QJsonObject report = jsonObject["DaemonSourceReport"].toObject(); int queueSize = report["queueSize"].toInt(); queueSize = queueSize == 0 ? 10 : queueSize; int queueLength = report["queueLength"].toInt(); diff --git a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkoutput.cpp b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkoutput.cpp index 0a4525a4b..d6f84c3d5 100644 --- a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkoutput.cpp +++ b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkoutput.cpp @@ -508,9 +508,9 @@ void SDRdaemonSinkOutput::analyzeApiReply(const QJsonObject& jsonObject) return; } - if (jsonObject.contains("SDRDaemonChannelSourceReport")) + if (jsonObject.contains("DaemonSourceReport")) { - QJsonObject report = jsonObject["SDRDaemonChannelSourceReport"].toObject(); + QJsonObject report = jsonObject["DaemonSourceReport"].toObject(); int queueSize = report["queueSize"].toInt(); queueSize = queueSize == 0 ? 10 : queueSize; int queueLength = report["queueLength"].toInt(); diff --git a/sdrbase/resources/res.qrc b/sdrbase/resources/res.qrc index 179cd9eaa..45afba2ea 100644 --- a/sdrbase/resources/res.qrc +++ b/sdrbase/resources/res.qrc @@ -21,8 +21,8 @@ webapi/doc/swagger/include/Perseus.yaml 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/DaemonSink.yaml + webapi/doc/swagger/include/DaemonSource.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 621e6e325..daaf4c9f7 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1416,8 +1416,8 @@ margin-bottom: 20px; "SSBDemodReport" : { "$ref" : "#/definitions/SSBDemodReport" }, - "SDRDaemonChannelSourceReport" : { - "$ref" : "#/definitions/SDRDaemonChannelSourceReport" + "DaemonSourceReport" : { + "$ref" : "#/definitions/DaemonSourceReport" }, "SSBModReport" : { "$ref" : "#/definitions/SSBModReport" @@ -1470,11 +1470,11 @@ margin-bottom: 20px; "NFMModSettings" : { "$ref" : "#/definitions/NFMModSettings" }, - "SDRDaemonChannelSinkSettings" : { - "$ref" : "#/definitions/SDRDaemonChannelSinkSettings" + "DaemonSinkSettings" : { + "$ref" : "#/definitions/DaemonSinkSettings" }, - "SDRDaemonChannelSourceSettings" : { - "$ref" : "#/definitions/SDRDaemonChannelSourceSettings" + "DaemonSourceSettings" : { + "$ref" : "#/definitions/DaemonSourceSettings" }, "SSBModSettings" : { "$ref" : "#/definitions/SSBModSettings" @@ -1675,6 +1675,95 @@ margin-bottom: 20px; } }, "description" : "DV serial device details" +}; + defs.DaemonSinkSettings = { + "properties" : { + "nbFECBlocks" : { + "type" : "integer", + "description" : "Number of FEC blocks per frame" + }, + "dataAddress" : { + "type" : "string", + "description" : "Receiving USB data address" + }, + "dataPort" : { + "type" : "integer", + "description" : "Receiving USB data port" + }, + "txDelay" : { + "type" : "integer", + "description" : "Minimum delay in ms between consecutive USB blocks transmissions" + } + }, + "description" : "Daemon channel sink settings" +}; + defs.DaemonSourceReport = { + "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" + }, + "nbOriginalBlocks" : { + "type" : "integer", + "description" : "Number of original blocks per frame" + }, + "nbFECBlocks" : { + "type" : "integer", + "description" : "Number of FEC blocks per frame" + }, + "centerFreq" : { + "type" : "integer", + "description" : "Stream center frequency setting in kHz" + }, + "sampleRate" : { + "type" : "integer", + "description" : "Stream nominal sample rate in S/s" + } + }, + "description" : "Daemon channel source report" +}; + defs.DaemonSourceSettings = { + "properties" : { + "dataAddress" : { + "type" : "string", + "description" : "Remote USB data address" + }, + "dataPort" : { + "type" : "integer", + "description" : "Remote USB data port" + }, + "rgbColor" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + } + }, + "description" : "Daemon channel source settings" }; defs.DaemonSummaryResponse = { "required" : [ "appname", "architecture", "dspRxBits", "dspTxBits", "os", "pid", "qtVersion", "version" ], @@ -3151,95 +3240,6 @@ margin-bottom: 20px; } }, "description" : "RTLSDR" -}; - defs.SDRDaemonChannelSinkSettings = { - "properties" : { - "nbFECBlocks" : { - "type" : "integer", - "description" : "Number of FEC blocks per frame" - }, - "dataAddress" : { - "type" : "string", - "description" : "Receiving USB data address" - }, - "dataPort" : { - "type" : "integer", - "description" : "Receiving USB data port" - }, - "txDelay" : { - "type" : "integer", - "description" : "Minimum delay in ms between consecutive USB blocks transmissions" - } - }, - "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" - }, - "nbOriginalBlocks" : { - "type" : "integer", - "description" : "Number of original blocks per frame" - }, - "nbFECBlocks" : { - "type" : "integer", - "description" : "Number of FEC blocks per frame" - }, - "centerFreq" : { - "type" : "integer", - "description" : "Stream center frequency setting in kHz" - }, - "sampleRate" : { - "type" : "integer", - "description" : "Stream nominal sample rate in S/s" - } - }, - "description" : "SDRDaemon channel source report" -}; - defs.SDRDaemonChannelSourceSettings = { - "properties" : { - "dataAddress" : { - "type" : "string", - "description" : "Remote USB data address" - }, - "dataPort" : { - "type" : "integer", - "description" : "Remote USB data port" - }, - "rgbColor" : { - "type" : "integer" - }, - "title" : { - "type" : "string" - } - }, - "description" : "Data handling details for SDRDaemon" }; defs.SDRPlayReport = { "properties" : { @@ -28716,7 +28716,7 @@ except ApiException as e:
- Generated 2018-09-04T08:40:33.765+02:00 + Generated 2018-09-04T20:03:50.896+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/SDRDaemonChannelSink.yaml b/sdrbase/resources/webapi/doc/swagger/include/DaemonSink.yaml similarity index 82% rename from sdrbase/resources/webapi/doc/swagger/include/SDRDaemonChannelSink.yaml rename to sdrbase/resources/webapi/doc/swagger/include/DaemonSink.yaml index 63c34423a..5e4c881d8 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/SDRDaemonChannelSink.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/DaemonSink.yaml @@ -1,5 +1,5 @@ -SDRDaemonChannelSinkSettings: - description: "Data handling details for SDRDaemon" +DaemonSinkSettings: + description: "Daemon channel sink settings" properties: nbFECBlocks: description: "Number of FEC blocks per frame" diff --git a/sdrbase/resources/webapi/doc/swagger/include/SDRDaemonChannelSource.yaml b/sdrbase/resources/webapi/doc/swagger/include/DaemonSource.yaml similarity index 88% rename from sdrbase/resources/webapi/doc/swagger/include/SDRDaemonChannelSource.yaml rename to sdrbase/resources/webapi/doc/swagger/include/DaemonSource.yaml index b8e41090e..c1d96de6a 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/SDRDaemonChannelSource.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/DaemonSource.yaml @@ -1,5 +1,5 @@ -SDRDaemonChannelSourceSettings: - description: "Data handling details for SDRDaemon" +DaemonSourceSettings: + description: "Daemon channel source settings" properties: dataAddress: description: "Remote USB data address" @@ -12,8 +12,8 @@ SDRDaemonChannelSourceSettings: title: type: string -SDRDaemonChannelSourceReport: - description: "SDRDaemon channel source report" +DaemonSourceReport: + description: "Daemon channel source report" properties: queueLength: description: "Data read/write queue length in number of data frames" diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index bbf8870b9..68c4791d3 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -2218,10 +2218,10 @@ definitions: $ref: "/doc/swagger/include/NFMDemod.yaml#/NFMDemodSettings" NFMModSettings: $ref: "/doc/swagger/include/NFMMod.yaml#/NFMModSettings" - SDRDaemonChannelSinkSettings: - $ref: "/doc/swagger/include/SDRDaemonChannelSink.yaml#/SDRDaemonChannelSinkSettings" - SDRDaemonChannelSourceSettings: - $ref: "/doc/swagger/include/SDRDaemonChannelSource.yaml#/SDRDaemonChannelSourceSettings" + DaemonSinkSettings: + $ref: "/doc/swagger/include/DaemonSink.yaml#/DaemonSinkSettings" + DaemonSourceSettings: + $ref: "/doc/swagger/include/DaemonSource.yaml#/DaemonSourceSettings" SSBModSettings: $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModSettings" SSBDemodSettings: @@ -2261,8 +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" + DaemonSourceReport: + $ref: "/doc/swagger/include/DaemonSource.yaml#/DaemonSourceReport" SSBModReport: $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport" UDPSinkReport: diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index 493472907..0c3c56fa5 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -2150,10 +2150,10 @@ bool WebAPIRequestMapper::validateChannelSettings( { if (channelSettings.getTx() != 0) { - QJsonObject daemonChannelSourceSettingsJsonObject = jsonObject["SDRDaemonChannelSourceSettings"].toObject(); + QJsonObject daemonChannelSourceSettingsJsonObject = jsonObject["DaemonSourceSettings"].toObject(); channelSettingsKeys = daemonChannelSourceSettingsJsonObject.keys(); - channelSettings.setSdrDaemonChannelSourceSettings(new SWGSDRangel::SWGSDRDaemonChannelSourceSettings()); - channelSettings.getSdrDaemonChannelSourceSettings()->fromJsonObject(daemonChannelSourceSettingsJsonObject); + channelSettings.setDaemonSourceSettings(new SWGSDRangel::SWGDaemonSourceSettings()); + channelSettings.getDaemonSourceSettings()->fromJsonObject(daemonChannelSourceSettingsJsonObject); return true; } else { @@ -2398,8 +2398,8 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings.setDsdDemodSettings(0); channelSettings.setNfmDemodSettings(0); channelSettings.setNfmModSettings(0); - channelSettings.setSdrDaemonChannelSinkSettings(0); - channelSettings.setSdrDaemonChannelSourceSettings(0); + channelSettings.setDaemonSinkSettings(0); + channelSettings.setDaemonSourceSettings(0); channelSettings.setSsbDemodSettings(0); channelSettings.setSsbModSettings(0); channelSettings.setUdpSinkSettings(0); @@ -2419,7 +2419,7 @@ void WebAPIRequestMapper::resetChannelReport(SWGSDRangel::SWGChannelReport& chan channelReport.setDsdDemodReport(0); channelReport.setNfmDemodReport(0); channelReport.setNfmModReport(0); - channelReport.setSdrDaemonChannelSourceReport(0); + channelReport.setDaemonSourceReport(0); channelReport.setSsbDemodReport(0); channelReport.setSsbModReport(0); channelReport.setUdpSinkReport(0); diff --git a/sdrdaemon/channel/sdrdaemonchannelsink.cpp b/sdrdaemon/channel/sdrdaemonchannelsink.cpp index 23a7b5e03..c21e6e902 100644 --- a/sdrdaemon/channel/sdrdaemonchannelsink.cpp +++ b/sdrdaemon/channel/sdrdaemonchannelsink.cpp @@ -319,8 +319,8 @@ int SDRDaemonChannelSink::webapiSettingsGet( SWGSDRangel::SWGChannelSettings& response, QString& errorMessage __attribute__((unused))) { - response.setSdrDaemonChannelSinkSettings(new SWGSDRangel::SWGSDRDaemonChannelSinkSettings()); - response.getSdrDaemonChannelSinkSettings()->init(); + response.setDaemonSinkSettings(new SWGSDRangel::SWGDaemonSinkSettings()); + response.getDaemonSinkSettings()->init(); webapiFormatChannelSettings(response, m_settings); return 200; } @@ -335,18 +335,18 @@ int SDRDaemonChannelSink::webapiSettingsPutPatch( if (channelSettingsKeys.contains("nbFECBlocks")) { - int nbFECBlocks = response.getSdrDaemonChannelSinkSettings()->getNbFecBlocks(); + int nbFECBlocks = response.getDaemonSinkSettings()->getNbFecBlocks(); if ((nbFECBlocks < 0) || (nbFECBlocks > 127)) { settings.m_nbFECBlocks = 8; } else { - settings.m_nbFECBlocks = response.getSdrDaemonChannelSinkSettings()->getNbFecBlocks(); + settings.m_nbFECBlocks = response.getDaemonSinkSettings()->getNbFecBlocks(); } } if (channelSettingsKeys.contains("txDelay")) { - int txDelay = response.getSdrDaemonChannelSinkSettings()->getTxDelay(); + int txDelay = response.getDaemonSinkSettings()->getTxDelay(); if (txDelay < 0) { settings.m_txDelay = 100; @@ -356,12 +356,12 @@ int SDRDaemonChannelSink::webapiSettingsPutPatch( } if (channelSettingsKeys.contains("dataAddress")) { - settings.m_dataAddress = *response.getSdrDaemonChannelSinkSettings()->getDataAddress(); + settings.m_dataAddress = *response.getDaemonSinkSettings()->getDataAddress(); } if (channelSettingsKeys.contains("dataPort")) { - int dataPort = response.getSdrDaemonChannelSinkSettings()->getDataPort(); + int dataPort = response.getDaemonSinkSettings()->getDataPort(); if ((dataPort < 1024) || (dataPort > 65535)) { settings.m_dataPort = 9090; @@ -387,14 +387,14 @@ int SDRDaemonChannelSink::webapiSettingsPutPatch( void SDRDaemonChannelSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const SDRDaemonChannelSinkSettings& settings) { - response.getSdrDaemonChannelSinkSettings()->setNbFecBlocks(settings.m_nbFECBlocks); - response.getSdrDaemonChannelSinkSettings()->setTxDelay(settings.m_txDelay); + response.getDaemonSinkSettings()->setNbFecBlocks(settings.m_nbFECBlocks); + response.getDaemonSinkSettings()->setTxDelay(settings.m_txDelay); - if (response.getSdrDaemonChannelSinkSettings()->getDataAddress()) { - *response.getSdrDaemonChannelSinkSettings()->getDataAddress() = settings.m_dataAddress; + if (response.getDaemonSinkSettings()->getDataAddress()) { + *response.getDaemonSinkSettings()->getDataAddress() = settings.m_dataAddress; } else { - response.getSdrDaemonChannelSinkSettings()->setDataAddress(new QString(settings.m_dataAddress)); + response.getDaemonSinkSettings()->setDataAddress(new QString(settings.m_dataAddress)); } - response.getSdrDaemonChannelSinkSettings()->setDataPort(settings.m_dataPort); + response.getDaemonSinkSettings()->setDataPort(settings.m_dataPort); } diff --git a/sdrdaemon/channel/sdrdaemonchannelsource.cpp b/sdrdaemon/channel/sdrdaemonchannelsource.cpp index 580d2ecba..43f879cd5 100644 --- a/sdrdaemon/channel/sdrdaemonchannelsource.cpp +++ b/sdrdaemon/channel/sdrdaemonchannelsource.cpp @@ -333,8 +333,8 @@ int SDRDaemonChannelSource::webapiSettingsGet( SWGSDRangel::SWGChannelSettings& response, QString& errorMessage __attribute__((unused))) { - response.setSdrDaemonChannelSourceSettings(new SWGSDRangel::SWGSDRDaemonChannelSourceSettings()); - response.getSdrDaemonChannelSourceSettings()->init(); + response.setDaemonSourceSettings(new SWGSDRangel::SWGDaemonSourceSettings()); + response.getDaemonSourceSettings()->init(); webapiFormatChannelSettings(response, m_settings); return 200; } @@ -348,12 +348,12 @@ int SDRDaemonChannelSource::webapiSettingsPutPatch( SDRDaemonChannelSourceSettings settings = m_settings; if (channelSettingsKeys.contains("dataAddress")) { - settings.m_dataAddress = *response.getSdrDaemonChannelSourceSettings()->getDataAddress(); + settings.m_dataAddress = *response.getDaemonSourceSettings()->getDataAddress(); } if (channelSettingsKeys.contains("dataPort")) { - int dataPort = response.getSdrDaemonChannelSourceSettings()->getDataPort(); + int dataPort = response.getDaemonSourceSettings()->getDataPort(); if ((dataPort < 1024) || (dataPort > 65535)) { settings.m_dataPort = 9090; @@ -381,21 +381,21 @@ int SDRDaemonChannelSource::webapiReportGet( SWGSDRangel::SWGChannelReport& response, QString& errorMessage __attribute__((unused))) { - response.setSdrDaemonChannelSourceReport(new SWGSDRangel::SWGSDRDaemonChannelSourceReport()); - response.getSdrDaemonChannelSourceReport()->init(); + response.setDaemonSourceReport(new SWGSDRangel::SWGDaemonSourceReport()); + response.getDaemonSourceReport()->init(); webapiFormatChannelReport(response); return 200; } void SDRDaemonChannelSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const SDRDaemonChannelSourceSettings& settings) { - if (response.getSdrDaemonChannelSourceSettings()->getDataAddress()) { - *response.getSdrDaemonChannelSourceSettings()->getDataAddress() = settings.m_dataAddress; + if (response.getDaemonSourceSettings()->getDataAddress()) { + *response.getDaemonSourceSettings()->getDataAddress() = settings.m_dataAddress; } else { - response.getSdrDaemonChannelSourceSettings()->setDataAddress(new QString(settings.m_dataAddress)); + response.getDaemonSourceSettings()->setDataAddress(new QString(settings.m_dataAddress)); } - response.getSdrDaemonChannelSourceSettings()->setDataPort(settings.m_dataPort); + response.getDaemonSourceSettings()->setDataPort(settings.m_dataPort); } void SDRDaemonChannelSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) @@ -403,11 +403,11 @@ void SDRDaemonChannelSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelRe 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); + response.getDaemonSourceReport()->setTvSec(tv.tv_sec); + response.getDaemonSourceReport()->setTvUSec(tv.tv_usec); + response.getDaemonSourceReport()->setQueueSize(m_dataReadQueue.size()); + response.getDaemonSourceReport()->setQueueLength(m_dataReadQueue.length()); + response.getDaemonSourceReport()->setSamplesCount(m_dataReadQueue.readSampleCount()); + response.getDaemonSourceReport()->setCorrectableErrorsCount(m_nbCorrectableErrors); + response.getDaemonSourceReport()->setUncorrectableErrorsCount(m_nbUncorrectableErrors); } diff --git a/sdrdaemon/webapi/webapirequestmapper.cpp b/sdrdaemon/webapi/webapirequestmapper.cpp index 8b72965d1..25c582148 100644 --- a/sdrdaemon/webapi/webapirequestmapper.cpp +++ b/sdrdaemon/webapi/webapirequestmapper.cpp @@ -577,8 +577,8 @@ bool WebAPIRequestMapper::validateChannelSettings( { QJsonObject sdrDaemonChannelSinkSettingsJsonObject = jsonObject["SDRDaemonChannelSinkSettings"].toObject(); channelSettingsKeys = sdrDaemonChannelSinkSettingsJsonObject.keys(); - channelSettings.setSdrDaemonChannelSinkSettings(new SWGSDRangel::SWGSDRDaemonChannelSinkSettings()); - channelSettings.getSdrDaemonChannelSinkSettings()->fromJsonObject(sdrDaemonChannelSinkSettingsJsonObject); + channelSettings.setDaemonSinkSettings(new SWGSDRangel::SWGDaemonSinkSettings()); + channelSettings.getDaemonSinkSettings()->fromJsonObject(sdrDaemonChannelSinkSettingsJsonObject); return true; } else { @@ -1017,8 +1017,8 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings.setDsdDemodSettings(0); channelSettings.setNfmDemodSettings(0); channelSettings.setNfmModSettings(0); - channelSettings.setSdrDaemonChannelSinkSettings(0); - channelSettings.setSdrDaemonChannelSourceSettings(0); + channelSettings.setDaemonSinkSettings(0); + channelSettings.setDaemonSourceSettings(0); channelSettings.setSsbDemodSettings(0); channelSettings.setSsbModSettings(0); channelSettings.setUdpSinkSettings(0); @@ -1038,7 +1038,7 @@ void WebAPIRequestMapper::resetChannelReport(SWGSDRangel::SWGChannelReport& chan channelReport.setDsdDemodReport(0); channelReport.setNfmDemodReport(0); channelReport.setNfmModReport(0); - channelReport.setSdrDaemonChannelSourceReport(0); + channelReport.setDaemonSourceReport(0); channelReport.setSsbDemodReport(0); channelReport.setSsbModReport(0); channelReport.setUdpSinkReport(0); diff --git a/swagger/sdrangel/api/swagger/include/SDRDaemonChannelSink.yaml b/swagger/sdrangel/api/swagger/include/DaemonSink.yaml similarity index 82% rename from swagger/sdrangel/api/swagger/include/SDRDaemonChannelSink.yaml rename to swagger/sdrangel/api/swagger/include/DaemonSink.yaml index 63c34423a..5e4c881d8 100644 --- a/swagger/sdrangel/api/swagger/include/SDRDaemonChannelSink.yaml +++ b/swagger/sdrangel/api/swagger/include/DaemonSink.yaml @@ -1,5 +1,5 @@ -SDRDaemonChannelSinkSettings: - description: "Data handling details for SDRDaemon" +DaemonSinkSettings: + description: "Daemon channel sink settings" properties: nbFECBlocks: description: "Number of FEC blocks per frame" diff --git a/swagger/sdrangel/api/swagger/include/SDRDaemonChannelSource.yaml b/swagger/sdrangel/api/swagger/include/DaemonSource.yaml similarity index 88% rename from swagger/sdrangel/api/swagger/include/SDRDaemonChannelSource.yaml rename to swagger/sdrangel/api/swagger/include/DaemonSource.yaml index b8e41090e..c1d96de6a 100644 --- a/swagger/sdrangel/api/swagger/include/SDRDaemonChannelSource.yaml +++ b/swagger/sdrangel/api/swagger/include/DaemonSource.yaml @@ -1,5 +1,5 @@ -SDRDaemonChannelSourceSettings: - description: "Data handling details for SDRDaemon" +DaemonSourceSettings: + description: "Daemon channel source settings" properties: dataAddress: description: "Remote USB data address" @@ -12,8 +12,8 @@ SDRDaemonChannelSourceSettings: title: type: string -SDRDaemonChannelSourceReport: - description: "SDRDaemon channel source report" +DaemonSourceReport: + description: "Daemon channel source report" properties: queueLength: description: "Data read/write queue length in number of data frames" diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index fa7612f74..874d677dd 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -2218,10 +2218,10 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/NFMDemod.yaml#/NFMDemodSettings" NFMModSettings: $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" + DaemonSinkSettings: + $ref: "http://localhost:8081/api/swagger/include/DaemonSink.yaml#/DaemonSinkSettings" + DaemonSourceSettings: + $ref: "http://localhost:8081/api/swagger/include/DaemonSource.yaml#/DaemonSourceSettings" SSBModSettings: $ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModSettings" SSBDemodSettings: @@ -2261,8 +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" + DaemonSourceReport: + $ref: "http://localhost:8081/api/swagger/include/DaemonSource.yaml#/DaemonSourceReport" 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 621e6e325..daaf4c9f7 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -1416,8 +1416,8 @@ margin-bottom: 20px; "SSBDemodReport" : { "$ref" : "#/definitions/SSBDemodReport" }, - "SDRDaemonChannelSourceReport" : { - "$ref" : "#/definitions/SDRDaemonChannelSourceReport" + "DaemonSourceReport" : { + "$ref" : "#/definitions/DaemonSourceReport" }, "SSBModReport" : { "$ref" : "#/definitions/SSBModReport" @@ -1470,11 +1470,11 @@ margin-bottom: 20px; "NFMModSettings" : { "$ref" : "#/definitions/NFMModSettings" }, - "SDRDaemonChannelSinkSettings" : { - "$ref" : "#/definitions/SDRDaemonChannelSinkSettings" + "DaemonSinkSettings" : { + "$ref" : "#/definitions/DaemonSinkSettings" }, - "SDRDaemonChannelSourceSettings" : { - "$ref" : "#/definitions/SDRDaemonChannelSourceSettings" + "DaemonSourceSettings" : { + "$ref" : "#/definitions/DaemonSourceSettings" }, "SSBModSettings" : { "$ref" : "#/definitions/SSBModSettings" @@ -1675,6 +1675,95 @@ margin-bottom: 20px; } }, "description" : "DV serial device details" +}; + defs.DaemonSinkSettings = { + "properties" : { + "nbFECBlocks" : { + "type" : "integer", + "description" : "Number of FEC blocks per frame" + }, + "dataAddress" : { + "type" : "string", + "description" : "Receiving USB data address" + }, + "dataPort" : { + "type" : "integer", + "description" : "Receiving USB data port" + }, + "txDelay" : { + "type" : "integer", + "description" : "Minimum delay in ms between consecutive USB blocks transmissions" + } + }, + "description" : "Daemon channel sink settings" +}; + defs.DaemonSourceReport = { + "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" + }, + "nbOriginalBlocks" : { + "type" : "integer", + "description" : "Number of original blocks per frame" + }, + "nbFECBlocks" : { + "type" : "integer", + "description" : "Number of FEC blocks per frame" + }, + "centerFreq" : { + "type" : "integer", + "description" : "Stream center frequency setting in kHz" + }, + "sampleRate" : { + "type" : "integer", + "description" : "Stream nominal sample rate in S/s" + } + }, + "description" : "Daemon channel source report" +}; + defs.DaemonSourceSettings = { + "properties" : { + "dataAddress" : { + "type" : "string", + "description" : "Remote USB data address" + }, + "dataPort" : { + "type" : "integer", + "description" : "Remote USB data port" + }, + "rgbColor" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + } + }, + "description" : "Daemon channel source settings" }; defs.DaemonSummaryResponse = { "required" : [ "appname", "architecture", "dspRxBits", "dspTxBits", "os", "pid", "qtVersion", "version" ], @@ -3151,95 +3240,6 @@ margin-bottom: 20px; } }, "description" : "RTLSDR" -}; - defs.SDRDaemonChannelSinkSettings = { - "properties" : { - "nbFECBlocks" : { - "type" : "integer", - "description" : "Number of FEC blocks per frame" - }, - "dataAddress" : { - "type" : "string", - "description" : "Receiving USB data address" - }, - "dataPort" : { - "type" : "integer", - "description" : "Receiving USB data port" - }, - "txDelay" : { - "type" : "integer", - "description" : "Minimum delay in ms between consecutive USB blocks transmissions" - } - }, - "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" - }, - "nbOriginalBlocks" : { - "type" : "integer", - "description" : "Number of original blocks per frame" - }, - "nbFECBlocks" : { - "type" : "integer", - "description" : "Number of FEC blocks per frame" - }, - "centerFreq" : { - "type" : "integer", - "description" : "Stream center frequency setting in kHz" - }, - "sampleRate" : { - "type" : "integer", - "description" : "Stream nominal sample rate in S/s" - } - }, - "description" : "SDRDaemon channel source report" -}; - defs.SDRDaemonChannelSourceSettings = { - "properties" : { - "dataAddress" : { - "type" : "string", - "description" : "Remote USB data address" - }, - "dataPort" : { - "type" : "integer", - "description" : "Remote USB data port" - }, - "rgbColor" : { - "type" : "integer" - }, - "title" : { - "type" : "string" - } - }, - "description" : "Data handling details for SDRDaemon" }; defs.SDRPlayReport = { "properties" : { @@ -28716,7 +28716,7 @@ except ApiException as e:
- Generated 2018-09-04T08:40:33.765+02:00 + Generated 2018-09-04T20:03:50.896+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp index 520dc6d29..f2a5b33ea 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp @@ -48,8 +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; + daemon_source_report = nullptr; + m_daemon_source_report_isSet = false; ssb_mod_report = nullptr; m_ssb_mod_report_isSet = false; udp_sink_report = nullptr; @@ -88,8 +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; + daemon_source_report = new SWGDaemonSourceReport(); + m_daemon_source_report_isSet = false; ssb_mod_report = new SWGSSBModReport(); m_ssb_mod_report_isSet = false; udp_sink_report = new SWGUDPSinkReport(); @@ -132,8 +132,8 @@ 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(daemon_source_report != nullptr) { + delete daemon_source_report; } if(ssb_mod_report != nullptr) { delete ssb_mod_report; @@ -183,7 +183,7 @@ 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(&daemon_source_report, pJson["DaemonSourceReport"], "SWGDaemonSourceReport", "SWGDaemonSourceReport"); ::SWGSDRangel::setValue(&ssb_mod_report, pJson["SSBModReport"], "SWGSSBModReport", "SWGSSBModReport"); @@ -241,8 +241,8 @@ 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((daemon_source_report != nullptr) && (daemon_source_report->isSet())){ + toJsonValue(QString("DaemonSourceReport"), daemon_source_report, obj, QString("SWGDaemonSourceReport")); } if((ssb_mod_report != nullptr) && (ssb_mod_report->isSet())){ toJsonValue(QString("SSBModReport"), ssb_mod_report, obj, QString("SWGSSBModReport")); @@ -363,14 +363,14 @@ SWGChannelReport::setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report) { this->m_ssb_demod_report_isSet = true; } -SWGSDRDaemonChannelSourceReport* -SWGChannelReport::getSdrDaemonChannelSourceReport() { - return sdr_daemon_channel_source_report; +SWGDaemonSourceReport* +SWGChannelReport::getDaemonSourceReport() { + return daemon_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; +SWGChannelReport::setDaemonSourceReport(SWGDaemonSourceReport* daemon_source_report) { + this->daemon_source_report = daemon_source_report; + this->m_daemon_source_report_isSet = true; } SWGSSBModReport* @@ -438,7 +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(daemon_source_report != nullptr && daemon_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 f6cd8f662..c090b4e2f 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h @@ -27,9 +27,9 @@ #include "SWGATVModReport.h" #include "SWGBFMDemodReport.h" #include "SWGDSDDemodReport.h" +#include "SWGDaemonSourceReport.h" #include "SWGNFMDemodReport.h" #include "SWGNFMModReport.h" -#include "SWGSDRDaemonChannelSourceReport.h" #include "SWGSSBDemodReport.h" #include "SWGSSBModReport.h" #include "SWGUDPSinkReport.h" @@ -86,8 +86,8 @@ public: SWGSSBDemodReport* getSsbDemodReport(); void setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report); - SWGSDRDaemonChannelSourceReport* getSdrDaemonChannelSourceReport(); - void setSdrDaemonChannelSourceReport(SWGSDRDaemonChannelSourceReport* sdr_daemon_channel_source_report); + SWGDaemonSourceReport* getDaemonSourceReport(); + void setDaemonSourceReport(SWGDaemonSourceReport* daemon_source_report); SWGSSBModReport* getSsbModReport(); void setSsbModReport(SWGSSBModReport* ssb_mod_report); @@ -138,8 +138,8 @@ 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; + SWGDaemonSourceReport* daemon_source_report; + bool m_daemon_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 37ef26b00..ab9d493c4 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp @@ -46,10 +46,10 @@ SWGChannelSettings::SWGChannelSettings() { m_nfm_demod_settings_isSet = false; nfm_mod_settings = nullptr; 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; + daemon_sink_settings = nullptr; + m_daemon_sink_settings_isSet = false; + daemon_source_settings = nullptr; + m_daemon_source_settings_isSet = false; ssb_mod_settings = nullptr; m_ssb_mod_settings_isSet = false; ssb_demod_settings = nullptr; @@ -88,10 +88,10 @@ SWGChannelSettings::init() { m_nfm_demod_settings_isSet = false; nfm_mod_settings = new SWGNFMModSettings(); 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; + daemon_sink_settings = new SWGDaemonSinkSettings(); + m_daemon_sink_settings_isSet = false; + daemon_source_settings = new SWGDaemonSourceSettings(); + m_daemon_source_settings_isSet = false; ssb_mod_settings = new SWGSSBModSettings(); m_ssb_mod_settings_isSet = false; ssb_demod_settings = new SWGSSBDemodSettings(); @@ -133,11 +133,11 @@ SWGChannelSettings::cleanup() { if(nfm_mod_settings != nullptr) { delete nfm_mod_settings; } - if(sdr_daemon_channel_sink_settings != nullptr) { - delete sdr_daemon_channel_sink_settings; + if(daemon_sink_settings != nullptr) { + delete daemon_sink_settings; } - if(sdr_daemon_channel_source_settings != nullptr) { - delete sdr_daemon_channel_source_settings; + if(daemon_source_settings != nullptr) { + delete daemon_source_settings; } if(ssb_mod_settings != nullptr) { delete ssb_mod_settings; @@ -188,9 +188,9 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&nfm_mod_settings, pJson["NFMModSettings"], "SWGNFMModSettings", "SWGNFMModSettings"); - ::SWGSDRangel::setValue(&sdr_daemon_channel_sink_settings, pJson["SDRDaemonChannelSinkSettings"], "SWGSDRDaemonChannelSinkSettings", "SWGSDRDaemonChannelSinkSettings"); + ::SWGSDRangel::setValue(&daemon_sink_settings, pJson["DaemonSinkSettings"], "SWGDaemonSinkSettings", "SWGDaemonSinkSettings"); - ::SWGSDRangel::setValue(&sdr_daemon_channel_source_settings, pJson["SDRDaemonChannelSourceSettings"], "SWGSDRDaemonChannelSourceSettings", "SWGSDRDaemonChannelSourceSettings"); + ::SWGSDRangel::setValue(&daemon_source_settings, pJson["DaemonSourceSettings"], "SWGDaemonSourceSettings", "SWGDaemonSourceSettings"); ::SWGSDRangel::setValue(&ssb_mod_settings, pJson["SSBModSettings"], "SWGSSBModSettings", "SWGSSBModSettings"); @@ -247,11 +247,11 @@ SWGChannelSettings::asJsonObject() { if((nfm_mod_settings != nullptr) && (nfm_mod_settings->isSet())){ toJsonValue(QString("NFMModSettings"), nfm_mod_settings, obj, QString("SWGNFMModSettings")); } - 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((daemon_sink_settings != nullptr) && (daemon_sink_settings->isSet())){ + toJsonValue(QString("DaemonSinkSettings"), daemon_sink_settings, obj, QString("SWGDaemonSinkSettings")); } - 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((daemon_source_settings != nullptr) && (daemon_source_settings->isSet())){ + toJsonValue(QString("DaemonSourceSettings"), daemon_source_settings, obj, QString("SWGDaemonSourceSettings")); } if((ssb_mod_settings != nullptr) && (ssb_mod_settings->isSet())){ toJsonValue(QString("SSBModSettings"), ssb_mod_settings, obj, QString("SWGSSBModSettings")); @@ -365,24 +365,24 @@ SWGChannelSettings::setNfmModSettings(SWGNFMModSettings* nfm_mod_settings) { this->m_nfm_mod_settings_isSet = true; } -SWGSDRDaemonChannelSinkSettings* -SWGChannelSettings::getSdrDaemonChannelSinkSettings() { - return sdr_daemon_channel_sink_settings; +SWGDaemonSinkSettings* +SWGChannelSettings::getDaemonSinkSettings() { + return daemon_sink_settings; } void -SWGChannelSettings::setSdrDaemonChannelSinkSettings(SWGSDRDaemonChannelSinkSettings* sdr_daemon_channel_sink_settings) { - this->sdr_daemon_channel_sink_settings = sdr_daemon_channel_sink_settings; - this->m_sdr_daemon_channel_sink_settings_isSet = true; +SWGChannelSettings::setDaemonSinkSettings(SWGDaemonSinkSettings* daemon_sink_settings) { + this->daemon_sink_settings = daemon_sink_settings; + this->m_daemon_sink_settings_isSet = true; } -SWGSDRDaemonChannelSourceSettings* -SWGChannelSettings::getSdrDaemonChannelSourceSettings() { - return sdr_daemon_channel_source_settings; +SWGDaemonSourceSettings* +SWGChannelSettings::getDaemonSourceSettings() { + return daemon_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; +SWGChannelSettings::setDaemonSourceSettings(SWGDaemonSourceSettings* daemon_source_settings) { + this->daemon_source_settings = daemon_source_settings; + this->m_daemon_source_settings_isSet = true; } SWGSSBModSettings* @@ -459,8 +459,8 @@ SWGChannelSettings::isSet(){ if(dsd_demod_settings != nullptr && dsd_demod_settings->isSet()){ isObjectUpdated = true; break;} 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(daemon_sink_settings != nullptr && daemon_sink_settings->isSet()){ isObjectUpdated = true; break;} + if(daemon_source_settings != nullptr && daemon_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 90bdf4c0e..c6c536674 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h @@ -27,10 +27,10 @@ #include "SWGATVModSettings.h" #include "SWGBFMDemodSettings.h" #include "SWGDSDDemodSettings.h" +#include "SWGDaemonSinkSettings.h" +#include "SWGDaemonSourceSettings.h" #include "SWGNFMDemodSettings.h" #include "SWGNFMModSettings.h" -#include "SWGSDRDaemonChannelSinkSettings.h" -#include "SWGSDRDaemonChannelSourceSettings.h" #include "SWGSSBDemodSettings.h" #include "SWGSSBModSettings.h" #include "SWGUDPSinkSettings.h" @@ -84,11 +84,11 @@ public: SWGNFMModSettings* getNfmModSettings(); void setNfmModSettings(SWGNFMModSettings* nfm_mod_settings); - SWGSDRDaemonChannelSinkSettings* getSdrDaemonChannelSinkSettings(); - void setSdrDaemonChannelSinkSettings(SWGSDRDaemonChannelSinkSettings* sdr_daemon_channel_sink_settings); + SWGDaemonSinkSettings* getDaemonSinkSettings(); + void setDaemonSinkSettings(SWGDaemonSinkSettings* daemon_sink_settings); - SWGSDRDaemonChannelSourceSettings* getSdrDaemonChannelSourceSettings(); - void setSdrDaemonChannelSourceSettings(SWGSDRDaemonChannelSourceSettings* sdr_daemon_channel_source_settings); + SWGDaemonSourceSettings* getDaemonSourceSettings(); + void setDaemonSourceSettings(SWGDaemonSourceSettings* daemon_source_settings); SWGSSBModSettings* getSsbModSettings(); void setSsbModSettings(SWGSSBModSettings* ssb_mod_settings); @@ -139,11 +139,11 @@ private: SWGNFMModSettings* nfm_mod_settings; bool m_nfm_mod_settings_isSet; - SWGSDRDaemonChannelSinkSettings* sdr_daemon_channel_sink_settings; - bool m_sdr_daemon_channel_sink_settings_isSet; + SWGDaemonSinkSettings* daemon_sink_settings; + bool m_daemon_sink_settings_isSet; - SWGSDRDaemonChannelSourceSettings* sdr_daemon_channel_source_settings; - bool m_sdr_daemon_channel_source_settings_isSet; + SWGDaemonSourceSettings* daemon_source_settings; + bool m_daemon_source_settings_isSet; SWGSSBModSettings* ssb_mod_settings; bool m_ssb_mod_settings_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGDaemonSinkSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGDaemonSinkSettings.cpp new file mode 100644 index 000000000..9f848ff0f --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDaemonSinkSettings.cpp @@ -0,0 +1,171 @@ +/** + * 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 "SWGDaemonSinkSettings.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGDaemonSinkSettings::SWGDaemonSinkSettings(QString* json) { + init(); + this->fromJson(*json); +} + +SWGDaemonSinkSettings::SWGDaemonSinkSettings() { + nb_fec_blocks = 0; + m_nb_fec_blocks_isSet = false; + data_address = nullptr; + m_data_address_isSet = false; + data_port = 0; + m_data_port_isSet = false; + tx_delay = 0; + m_tx_delay_isSet = false; +} + +SWGDaemonSinkSettings::~SWGDaemonSinkSettings() { + this->cleanup(); +} + +void +SWGDaemonSinkSettings::init() { + nb_fec_blocks = 0; + m_nb_fec_blocks_isSet = false; + data_address = new QString(""); + m_data_address_isSet = false; + data_port = 0; + m_data_port_isSet = false; + tx_delay = 0; + m_tx_delay_isSet = false; +} + +void +SWGDaemonSinkSettings::cleanup() { + + if(data_address != nullptr) { + delete data_address; + } + + +} + +SWGDaemonSinkSettings* +SWGDaemonSinkSettings::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGDaemonSinkSettings::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&nb_fec_blocks, pJson["nbFECBlocks"], "qint32", ""); + + ::SWGSDRangel::setValue(&data_address, pJson["dataAddress"], "QString", "QString"); + + ::SWGSDRangel::setValue(&data_port, pJson["dataPort"], "qint32", ""); + + ::SWGSDRangel::setValue(&tx_delay, pJson["txDelay"], "qint32", ""); + +} + +QString +SWGDaemonSinkSettings::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGDaemonSinkSettings::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_nb_fec_blocks_isSet){ + obj->insert("nbFECBlocks", QJsonValue(nb_fec_blocks)); + } + 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)); + } + if(m_tx_delay_isSet){ + obj->insert("txDelay", QJsonValue(tx_delay)); + } + + return obj; +} + +qint32 +SWGDaemonSinkSettings::getNbFecBlocks() { + return nb_fec_blocks; +} +void +SWGDaemonSinkSettings::setNbFecBlocks(qint32 nb_fec_blocks) { + this->nb_fec_blocks = nb_fec_blocks; + this->m_nb_fec_blocks_isSet = true; +} + +QString* +SWGDaemonSinkSettings::getDataAddress() { + return data_address; +} +void +SWGDaemonSinkSettings::setDataAddress(QString* data_address) { + this->data_address = data_address; + this->m_data_address_isSet = true; +} + +qint32 +SWGDaemonSinkSettings::getDataPort() { + return data_port; +} +void +SWGDaemonSinkSettings::setDataPort(qint32 data_port) { + this->data_port = data_port; + this->m_data_port_isSet = true; +} + +qint32 +SWGDaemonSinkSettings::getTxDelay() { + return tx_delay; +} +void +SWGDaemonSinkSettings::setTxDelay(qint32 tx_delay) { + this->tx_delay = tx_delay; + this->m_tx_delay_isSet = true; +} + + +bool +SWGDaemonSinkSettings::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_nb_fec_blocks_isSet){ isObjectUpdated = true; break;} + if(data_address != nullptr && *data_address != QString("")){ isObjectUpdated = true; break;} + if(m_data_port_isSet){ isObjectUpdated = true; break;} + if(m_tx_delay_isSet){ isObjectUpdated = true; break;} + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGDaemonSinkSettings.h b/swagger/sdrangel/code/qt5/client/SWGDaemonSinkSettings.h new file mode 100644 index 000000000..38750cee9 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDaemonSinkSettings.h @@ -0,0 +1,77 @@ +/** + * 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. + */ + +/* + * SWGDaemonSinkSettings.h + * + * Daemon channel sink settings + */ + +#ifndef SWGDaemonSinkSettings_H_ +#define SWGDaemonSinkSettings_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGDaemonSinkSettings: public SWGObject { +public: + SWGDaemonSinkSettings(); + SWGDaemonSinkSettings(QString* json); + virtual ~SWGDaemonSinkSettings(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGDaemonSinkSettings* fromJson(QString &jsonString) override; + + qint32 getNbFecBlocks(); + void setNbFecBlocks(qint32 nb_fec_blocks); + + QString* getDataAddress(); + void setDataAddress(QString* data_address); + + qint32 getDataPort(); + void setDataPort(qint32 data_port); + + qint32 getTxDelay(); + void setTxDelay(qint32 tx_delay); + + + virtual bool isSet() override; + +private: + qint32 nb_fec_blocks; + bool m_nb_fec_blocks_isSet; + + QString* data_address; + bool m_data_address_isSet; + + qint32 data_port; + bool m_data_port_isSet; + + qint32 tx_delay; + bool m_tx_delay_isSet; + +}; + +} + +#endif /* SWGDaemonSinkSettings_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGDaemonSourceReport.cpp b/swagger/sdrangel/code/qt5/client/SWGDaemonSourceReport.cpp new file mode 100644 index 000000000..b2ba885d2 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDaemonSourceReport.cpp @@ -0,0 +1,316 @@ +/** + * 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 "SWGDaemonSourceReport.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGDaemonSourceReport::SWGDaemonSourceReport(QString* json) { + init(); + this->fromJson(*json); +} + +SWGDaemonSourceReport::SWGDaemonSourceReport() { + 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; + nb_original_blocks = 0; + m_nb_original_blocks_isSet = false; + nb_fec_blocks = 0; + m_nb_fec_blocks_isSet = false; + center_freq = 0; + m_center_freq_isSet = false; + sample_rate = 0; + m_sample_rate_isSet = false; +} + +SWGDaemonSourceReport::~SWGDaemonSourceReport() { + this->cleanup(); +} + +void +SWGDaemonSourceReport::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; + nb_original_blocks = 0; + m_nb_original_blocks_isSet = false; + nb_fec_blocks = 0; + m_nb_fec_blocks_isSet = false; + center_freq = 0; + m_center_freq_isSet = false; + sample_rate = 0; + m_sample_rate_isSet = false; +} + +void +SWGDaemonSourceReport::cleanup() { + + + + + + + + + + + +} + +SWGDaemonSourceReport* +SWGDaemonSourceReport::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGDaemonSourceReport::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", ""); + + ::SWGSDRangel::setValue(&nb_original_blocks, pJson["nbOriginalBlocks"], "qint32", ""); + + ::SWGSDRangel::setValue(&nb_fec_blocks, pJson["nbFECBlocks"], "qint32", ""); + + ::SWGSDRangel::setValue(¢er_freq, pJson["centerFreq"], "qint32", ""); + + ::SWGSDRangel::setValue(&sample_rate, pJson["sampleRate"], "qint32", ""); + +} + +QString +SWGDaemonSourceReport::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGDaemonSourceReport::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)); + } + if(m_nb_original_blocks_isSet){ + obj->insert("nbOriginalBlocks", QJsonValue(nb_original_blocks)); + } + if(m_nb_fec_blocks_isSet){ + obj->insert("nbFECBlocks", QJsonValue(nb_fec_blocks)); + } + if(m_center_freq_isSet){ + obj->insert("centerFreq", QJsonValue(center_freq)); + } + if(m_sample_rate_isSet){ + obj->insert("sampleRate", QJsonValue(sample_rate)); + } + + return obj; +} + +qint32 +SWGDaemonSourceReport::getQueueLength() { + return queue_length; +} +void +SWGDaemonSourceReport::setQueueLength(qint32 queue_length) { + this->queue_length = queue_length; + this->m_queue_length_isSet = true; +} + +qint32 +SWGDaemonSourceReport::getQueueSize() { + return queue_size; +} +void +SWGDaemonSourceReport::setQueueSize(qint32 queue_size) { + this->queue_size = queue_size; + this->m_queue_size_isSet = true; +} + +qint32 +SWGDaemonSourceReport::getSamplesCount() { + return samples_count; +} +void +SWGDaemonSourceReport::setSamplesCount(qint32 samples_count) { + this->samples_count = samples_count; + this->m_samples_count_isSet = true; +} + +qint32 +SWGDaemonSourceReport::getCorrectableErrorsCount() { + return correctable_errors_count; +} +void +SWGDaemonSourceReport::setCorrectableErrorsCount(qint32 correctable_errors_count) { + this->correctable_errors_count = correctable_errors_count; + this->m_correctable_errors_count_isSet = true; +} + +qint32 +SWGDaemonSourceReport::getUncorrectableErrorsCount() { + return uncorrectable_errors_count; +} +void +SWGDaemonSourceReport::setUncorrectableErrorsCount(qint32 uncorrectable_errors_count) { + this->uncorrectable_errors_count = uncorrectable_errors_count; + this->m_uncorrectable_errors_count_isSet = true; +} + +qint32 +SWGDaemonSourceReport::getTvSec() { + return tv_sec; +} +void +SWGDaemonSourceReport::setTvSec(qint32 tv_sec) { + this->tv_sec = tv_sec; + this->m_tv_sec_isSet = true; +} + +qint32 +SWGDaemonSourceReport::getTvUSec() { + return tv_u_sec; +} +void +SWGDaemonSourceReport::setTvUSec(qint32 tv_u_sec) { + this->tv_u_sec = tv_u_sec; + this->m_tv_u_sec_isSet = true; +} + +qint32 +SWGDaemonSourceReport::getNbOriginalBlocks() { + return nb_original_blocks; +} +void +SWGDaemonSourceReport::setNbOriginalBlocks(qint32 nb_original_blocks) { + this->nb_original_blocks = nb_original_blocks; + this->m_nb_original_blocks_isSet = true; +} + +qint32 +SWGDaemonSourceReport::getNbFecBlocks() { + return nb_fec_blocks; +} +void +SWGDaemonSourceReport::setNbFecBlocks(qint32 nb_fec_blocks) { + this->nb_fec_blocks = nb_fec_blocks; + this->m_nb_fec_blocks_isSet = true; +} + +qint32 +SWGDaemonSourceReport::getCenterFreq() { + return center_freq; +} +void +SWGDaemonSourceReport::setCenterFreq(qint32 center_freq) { + this->center_freq = center_freq; + this->m_center_freq_isSet = true; +} + +qint32 +SWGDaemonSourceReport::getSampleRate() { + return sample_rate; +} +void +SWGDaemonSourceReport::setSampleRate(qint32 sample_rate) { + this->sample_rate = sample_rate; + this->m_sample_rate_isSet = true; +} + + +bool +SWGDaemonSourceReport::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;} + if(m_nb_original_blocks_isSet){ isObjectUpdated = true; break;} + if(m_nb_fec_blocks_isSet){ isObjectUpdated = true; break;} + if(m_center_freq_isSet){ isObjectUpdated = true; break;} + if(m_sample_rate_isSet){ isObjectUpdated = true; break;} + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGDaemonSourceReport.h b/swagger/sdrangel/code/qt5/client/SWGDaemonSourceReport.h new file mode 100644 index 000000000..cce8823e6 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDaemonSourceReport.h @@ -0,0 +1,118 @@ +/** + * 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. + */ + +/* + * SWGDaemonSourceReport.h + * + * Daemon channel source report + */ + +#ifndef SWGDaemonSourceReport_H_ +#define SWGDaemonSourceReport_H_ + +#include + + + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGDaemonSourceReport: public SWGObject { +public: + SWGDaemonSourceReport(); + SWGDaemonSourceReport(QString* json); + virtual ~SWGDaemonSourceReport(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGDaemonSourceReport* 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); + + qint32 getNbOriginalBlocks(); + void setNbOriginalBlocks(qint32 nb_original_blocks); + + qint32 getNbFecBlocks(); + void setNbFecBlocks(qint32 nb_fec_blocks); + + qint32 getCenterFreq(); + void setCenterFreq(qint32 center_freq); + + qint32 getSampleRate(); + void setSampleRate(qint32 sample_rate); + + + 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; + + qint32 nb_original_blocks; + bool m_nb_original_blocks_isSet; + + qint32 nb_fec_blocks; + bool m_nb_fec_blocks_isSet; + + qint32 center_freq; + bool m_center_freq_isSet; + + qint32 sample_rate; + bool m_sample_rate_isSet; + +}; + +} + +#endif /* SWGDaemonSourceReport_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGDaemonSourceSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGDaemonSourceSettings.cpp new file mode 100644 index 000000000..006eaf2be --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDaemonSourceSettings.cpp @@ -0,0 +1,173 @@ +/** + * 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 "SWGDaemonSourceSettings.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGDaemonSourceSettings::SWGDaemonSourceSettings(QString* json) { + init(); + this->fromJson(*json); +} + +SWGDaemonSourceSettings::SWGDaemonSourceSettings() { + data_address = nullptr; + m_data_address_isSet = false; + data_port = 0; + m_data_port_isSet = false; + rgb_color = 0; + m_rgb_color_isSet = false; + title = nullptr; + m_title_isSet = false; +} + +SWGDaemonSourceSettings::~SWGDaemonSourceSettings() { + this->cleanup(); +} + +void +SWGDaemonSourceSettings::init() { + data_address = new QString(""); + m_data_address_isSet = false; + data_port = 0; + m_data_port_isSet = false; + rgb_color = 0; + m_rgb_color_isSet = false; + title = new QString(""); + m_title_isSet = false; +} + +void +SWGDaemonSourceSettings::cleanup() { + if(data_address != nullptr) { + delete data_address; + } + + + if(title != nullptr) { + delete title; + } +} + +SWGDaemonSourceSettings* +SWGDaemonSourceSettings::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGDaemonSourceSettings::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&data_address, pJson["dataAddress"], "QString", "QString"); + + ::SWGSDRangel::setValue(&data_port, pJson["dataPort"], "qint32", ""); + + ::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", ""); + + ::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString"); + +} + +QString +SWGDaemonSourceSettings::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGDaemonSourceSettings::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)); + } + if(m_rgb_color_isSet){ + obj->insert("rgbColor", QJsonValue(rgb_color)); + } + if(title != nullptr && *title != QString("")){ + toJsonValue(QString("title"), title, obj, QString("QString")); + } + + return obj; +} + +QString* +SWGDaemonSourceSettings::getDataAddress() { + return data_address; +} +void +SWGDaemonSourceSettings::setDataAddress(QString* data_address) { + this->data_address = data_address; + this->m_data_address_isSet = true; +} + +qint32 +SWGDaemonSourceSettings::getDataPort() { + return data_port; +} +void +SWGDaemonSourceSettings::setDataPort(qint32 data_port) { + this->data_port = data_port; + this->m_data_port_isSet = true; +} + +qint32 +SWGDaemonSourceSettings::getRgbColor() { + return rgb_color; +} +void +SWGDaemonSourceSettings::setRgbColor(qint32 rgb_color) { + this->rgb_color = rgb_color; + this->m_rgb_color_isSet = true; +} + +QString* +SWGDaemonSourceSettings::getTitle() { + return title; +} +void +SWGDaemonSourceSettings::setTitle(QString* title) { + this->title = title; + this->m_title_isSet = true; +} + + +bool +SWGDaemonSourceSettings::isSet(){ + bool isObjectUpdated = false; + do{ + if(data_address != nullptr && *data_address != QString("")){ isObjectUpdated = true; break;} + if(m_data_port_isSet){ isObjectUpdated = true; break;} + if(m_rgb_color_isSet){ isObjectUpdated = true; break;} + if(title != nullptr && *title != QString("")){ isObjectUpdated = true; break;} + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGDaemonSourceSettings.h b/swagger/sdrangel/code/qt5/client/SWGDaemonSourceSettings.h new file mode 100644 index 000000000..a9b0aa714 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDaemonSourceSettings.h @@ -0,0 +1,77 @@ +/** + * 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. + */ + +/* + * SWGDaemonSourceSettings.h + * + * Daemon channel source settings + */ + +#ifndef SWGDaemonSourceSettings_H_ +#define SWGDaemonSourceSettings_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGDaemonSourceSettings: public SWGObject { +public: + SWGDaemonSourceSettings(); + SWGDaemonSourceSettings(QString* json); + virtual ~SWGDaemonSourceSettings(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGDaemonSourceSettings* fromJson(QString &jsonString) override; + + QString* getDataAddress(); + void setDataAddress(QString* data_address); + + qint32 getDataPort(); + void setDataPort(qint32 data_port); + + qint32 getRgbColor(); + void setRgbColor(qint32 rgb_color); + + QString* getTitle(); + void setTitle(QString* title); + + + virtual bool isSet() override; + +private: + QString* data_address; + bool m_data_address_isSet; + + qint32 data_port; + bool m_data_port_isSet; + + qint32 rgb_color; + bool m_rgb_color_isSet; + + QString* title; + bool m_title_isSet; + +}; + +} + +#endif /* SWGDaemonSourceSettings_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 48555ccd4..a4e482e76 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -42,6 +42,9 @@ #include "SWGDSDDemodSettings.h" #include "SWGDVSeralDevices.h" #include "SWGDVSerialDevice.h" +#include "SWGDaemonSinkSettings.h" +#include "SWGDaemonSourceReport.h" +#include "SWGDaemonSourceSettings.h" #include "SWGDaemonSummaryResponse.h" #include "SWGDeviceListItem.h" #include "SWGDeviceReport.h" @@ -89,9 +92,6 @@ #include "SWGRDSReport_altFrequencies.h" #include "SWGRtlSdrReport.h" #include "SWGRtlSdrSettings.h" -#include "SWGSDRDaemonChannelSinkSettings.h" -#include "SWGSDRDaemonChannelSourceReport.h" -#include "SWGSDRDaemonChannelSourceSettings.h" #include "SWGSDRPlayReport.h" #include "SWGSDRPlaySettings.h" #include "SWGSDRdaemonSinkReport.h" @@ -202,6 +202,15 @@ namespace SWGSDRangel { if(QString("SWGDVSerialDevice").compare(type) == 0) { return new SWGDVSerialDevice(); } + if(QString("SWGDaemonSinkSettings").compare(type) == 0) { + return new SWGDaemonSinkSettings(); + } + if(QString("SWGDaemonSourceReport").compare(type) == 0) { + return new SWGDaemonSourceReport(); + } + if(QString("SWGDaemonSourceSettings").compare(type) == 0) { + return new SWGDaemonSourceSettings(); + } if(QString("SWGDaemonSummaryResponse").compare(type) == 0) { return new SWGDaemonSummaryResponse(); } @@ -343,15 +352,6 @@ namespace SWGSDRangel { if(QString("SWGRtlSdrSettings").compare(type) == 0) { return new SWGRtlSdrSettings(); } - 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(); }