diff --git a/doc/img/RemoteOutput_plugin.png b/doc/img/RemoteOutput_plugin.png index e7a01975d..c29389ca0 100644 Binary files a/doc/img/RemoteOutput_plugin.png and b/doc/img/RemoteOutput_plugin.png differ diff --git a/doc/img/RemoteOutput_plugin.xcf b/doc/img/RemoteOutput_plugin.xcf index f02f5f490..41c84086b 100644 Binary files a/doc/img/RemoteOutput_plugin.xcf and b/doc/img/RemoteOutput_plugin.xcf differ diff --git a/plugins/channeltx/remotesource/remotesourcesource.cpp b/plugins/channeltx/remotesource/remotesourcesource.cpp index 414f6ecaf..c3601163d 100644 --- a/plugins/channeltx/remotesource/remotesourcesource.cpp +++ b/plugins/channeltx/remotesource/remotesourcesource.cpp @@ -53,7 +53,7 @@ void RemoteSourceSource::pull(SampleVector::iterator begin, unsigned int nbSampl void RemoteSourceSource::pullOne(Sample& sample) { - m_dataReadQueue.readSample(sample); + m_dataReadQueue.readSample(sample, true); } void RemoteSourceSource::start() diff --git a/plugins/samplesink/remoteoutput/remoteoutput.cpp b/plugins/samplesink/remoteoutput/remoteoutput.cpp index fa046086f..b698847f9 100644 --- a/plugins/samplesink/remoteoutput/remoteoutput.cpp +++ b/plugins/samplesink/remoteoutput/remoteoutput.cpp @@ -279,7 +279,7 @@ void RemoteOutput::applySettings(const RemoteOutputSettings& settings, bool forc if (force || (m_settings.m_dataAddress != settings.m_dataAddress) || (m_settings.m_dataPort != settings.m_dataPort)) { - if (m_remoteOutputWorker != 0) { + if (m_remoteOutputWorker) { m_remoteOutputWorker->setDataAddress(settings.m_dataAddress, settings.m_dataPort); } } @@ -288,15 +288,28 @@ void RemoteOutput::applySettings(const RemoteOutputSettings& settings, bool forc { reverseAPIKeys.append("nbFECBlocks"); - if (m_remoteOutputWorker != 0) { + if (m_remoteOutputWorker) { m_remoteOutputWorker->setNbBlocksFEC(settings.m_nbFECBlocks); } } + if (force || (m_settings.m_nbTxBytes != settings.m_nbTxBytes)) + { + reverseAPIKeys.append("nbTxBytes"); + + if (m_remoteOutputWorker) + { + stopWorker(); + m_remoteOutputWorker->setNbTxBytes(settings.m_nbTxBytes); + startWorker(); + } + } + mutexLocker.unlock(); qDebug() << "RemoteOutput::applySettings:" << " m_nbFECBlocks: " << settings.m_nbFECBlocks + << " m_nbTxBytes: " << settings.m_nbTxBytes << " m_apiAddress: " << settings.m_apiAddress << " m_apiPort: " << settings.m_apiPort << " m_dataAddress: " << settings.m_dataAddress @@ -404,6 +417,9 @@ void RemoteOutput::webapiUpdateDeviceSettings( if (deviceSettingsKeys.contains("nbFECBlocks")) { settings.m_nbFECBlocks = response.getRemoteOutputSettings()->getNbFecBlocks(); } + if (deviceSettingsKeys.contains("nbTxBytes")) { + settings.m_nbTxBytes = response.getRemoteOutputSettings()->getNbTxBytes(); + } if (deviceSettingsKeys.contains("apiAddress")) { settings.m_apiAddress = *response.getRemoteOutputSettings()->getApiAddress(); } @@ -450,6 +466,7 @@ int RemoteOutput::webapiReportGet( void RemoteOutput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const RemoteOutputSettings& settings) { response.getRemoteOutputSettings()->setNbFecBlocks(settings.m_nbFECBlocks); + response.getRemoteOutputSettings()->setNbTxBytes(settings.m_nbTxBytes); response.getRemoteOutputSettings()->setApiAddress(new QString(settings.m_apiAddress)); response.getRemoteOutputSettings()->setApiPort(settings.m_apiPort); response.getRemoteOutputSettings()->setDataAddress(new QString(settings.m_dataAddress)); @@ -657,6 +674,9 @@ void RemoteOutput::webapiReverseSendSettings(QList& deviceSettingsKeys, if (deviceSettingsKeys.contains("nbFECBlocks") || force) { swgRemoteOutputSettings->setNbFecBlocks(settings.m_nbFECBlocks); } + if (deviceSettingsKeys.contains("nbTxBytes") || force) { + swgRemoteOutputSettings->setNbTxBytes(settings.m_nbTxBytes); + } if (deviceSettingsKeys.contains("apiAddress") || force) { swgRemoteOutputSettings->setApiAddress(new QString(settings.m_apiAddress)); } diff --git a/plugins/samplesink/remoteoutput/remoteoutputgui.cpp b/plugins/samplesink/remoteoutput/remoteoutputgui.cpp index 0e011c194..790604b9f 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputgui.cpp +++ b/plugins/samplesink/remoteoutput/remoteoutputgui.cpp @@ -212,6 +212,7 @@ void RemoteOutputSinkGui::displaySettings() blockApplySettings(true); ui->centerFrequency->setText(QString("%L1").arg(m_deviceCenterFrequency)); ui->nbFECBlocks->setValue(m_settings.m_nbFECBlocks); + ui->nbTxBytes->setCurrentIndex(log2(m_settings.m_nbTxBytes)); QString s0 = QString::number(128 + m_settings.m_nbFECBlocks, 'f', 0); QString s1 = QString::number(m_settings.m_nbFECBlocks, 'f', 0); @@ -310,6 +311,12 @@ void RemoteOutputSinkGui::on_channelIndex_returnPressed() sendSettings(); } +void RemoteOutputSinkGui::on_nbTxBytes_currentIndexChanged(int index) +{ + m_settings.m_nbTxBytes = 1 << index; + sendSettings(); +} + void RemoteOutputSinkGui::on_apiAddress_returnPressed() { m_settings.m_apiAddress = ui->apiAddress->text(); diff --git a/plugins/samplesink/remoteoutput/remoteoutputgui.h b/plugins/samplesink/remoteoutput/remoteoutputgui.h index af1bd8c78..7b1964440 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputgui.h +++ b/plugins/samplesink/remoteoutput/remoteoutputgui.h @@ -129,6 +129,7 @@ private slots: void on_nbFECBlocks_valueChanged(int value); void on_deviceIndex_returnPressed(); void on_channelIndex_returnPressed(); + void on_nbTxBytes_currentIndexChanged(int index); void on_apiAddress_returnPressed(); void on_apiPort_returnPressed(); void on_dataAddress_returnPressed(); diff --git a/plugins/samplesink/remoteoutput/remoteoutputgui.ui b/plugins/samplesink/remoteoutput/remoteoutputgui.ui index 2935a78f9..84a293ac8 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputgui.ui +++ b/plugins/samplesink/remoteoutput/remoteoutputgui.ui @@ -239,6 +239,41 @@ + + + + Tx bytes + + + + + + + + 50 + 16777215 + + + + Number of transmitted bytes per I or Q sample + + + + 1 + + + + + 2 + + + + + 4 + + + + diff --git a/plugins/samplesink/remoteoutput/remoteoutputsettings.cpp b/plugins/samplesink/remoteoutput/remoteoutputsettings.cpp index e615e8672..cbff6e6f0 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputsettings.cpp +++ b/plugins/samplesink/remoteoutput/remoteoutputsettings.cpp @@ -26,6 +26,7 @@ RemoteOutputSettings::RemoteOutputSettings() void RemoteOutputSettings::resetToDefaults() { m_nbFECBlocks = 0; + m_nbTxBytes = 2; m_apiAddress = "127.0.0.1"; m_apiPort = 9091; m_dataAddress = "127.0.0.1"; @@ -42,6 +43,7 @@ QByteArray RemoteOutputSettings::serialize() const { SimpleSerializer s(1); + s.writeU32(3, m_nbTxBytes); s.writeU32(4, m_nbFECBlocks); s.writeString(5, m_apiAddress); s.writeU32(6, m_apiPort); @@ -71,6 +73,7 @@ bool RemoteOutputSettings::deserialize(const QByteArray& data) { quint32 uintval; + d.readU32(4, &m_nbTxBytes, 2); d.readU32(4, &m_nbFECBlocks, 0); d.readString(5, &m_apiAddress, "127.0.0.1"); d.readU32(6, &uintval, 9090); diff --git a/plugins/samplesink/remoteoutput/remoteoutputsettings.h b/plugins/samplesink/remoteoutput/remoteoutputsettings.h index cf61d20c0..830e056dd 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputsettings.h +++ b/plugins/samplesink/remoteoutput/remoteoutputsettings.h @@ -23,6 +23,7 @@ struct RemoteOutputSettings { quint32 m_nbFECBlocks; + quint32 m_nbTxBytes; QString m_apiAddress; quint16 m_apiPort; QString m_dataAddress; diff --git a/plugins/samplesink/remoteoutput/remoteoutputworker.cpp b/plugins/samplesink/remoteoutput/remoteoutputworker.cpp index 7c54fee62..173c9630c 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputworker.cpp +++ b/plugins/samplesink/remoteoutput/remoteoutputworker.cpp @@ -48,6 +48,7 @@ RemoteOutputWorker::~RemoteOutputWorker() void RemoteOutputWorker::startWork() { qDebug() << "RemoteOutputWorker::startWork: "; + m_udpSinkFEC.init(); m_udpSinkFEC.startSender(); m_maxThrottlems = 0; m_running = true; @@ -126,14 +127,14 @@ void RemoteOutputWorker::tick() { SampleVector::iterator beginRead = data.begin() + iPart1Begin; unsigned int partSize = iPart1End - iPart1Begin; - m_udpSinkFEC.write(beginRead, partSize); + m_udpSinkFEC.write(beginRead, partSize, true); } if (iPart2Begin != iPart2End) { SampleVector::iterator beginRead = data.begin() + iPart2Begin; unsigned int partSize = iPart2End - iPart2Begin; - m_udpSinkFEC.write(beginRead, partSize); + m_udpSinkFEC.write(beginRead, partSize, true); } } } diff --git a/plugins/samplesink/remoteoutput/remoteoutputworker.h b/plugins/samplesink/remoteoutput/remoteoutputworker.h index 8a20ab52b..4fcbbd8f5 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputworker.h +++ b/plugins/samplesink/remoteoutput/remoteoutputworker.h @@ -49,6 +49,7 @@ public: void setSamplerate(int samplerate); void setNbBlocksFEC(uint32_t nbBlocksFEC) { m_udpSinkFEC.setNbBlocksFEC(nbBlocksFEC); }; + void setNbTxBytes(uint32_t nbTxBytes) { m_udpSinkFEC.setNbTxBytes(nbTxBytes); }; void setDataAddress(const QString& address, uint16_t port) { m_udpSinkFEC.setRemoteAddress(address, port); } bool isRunning() const { return m_running; } diff --git a/plugins/samplesink/remoteoutput/udpsinkfec.cpp b/plugins/samplesink/remoteoutput/udpsinkfec.cpp index b53684571..0ba66ed57 100644 --- a/plugins/samplesink/remoteoutput/udpsinkfec.cpp +++ b/plugins/samplesink/remoteoutput/udpsinkfec.cpp @@ -31,7 +31,6 @@ UDPSinkFEC::UDPSinkFEC() : m_sampleRate(48000), m_nbSamples(0), m_nbBlocksFEC(0), - //m_nbTxBytes(SDR_RX_SAMP_SZ <= 16 ? 2 : 4), m_nbTxBytes(2), m_txDelayRatio(0.0), m_dataFrame(nullptr), @@ -58,6 +57,15 @@ UDPSinkFEC::~UDPSinkFEC() delete m_senderThread; } +void UDPSinkFEC::init() +{ + m_dataFrame = nullptr; + m_txBlockIndex = 0; + m_txBlocksIndex = 0; + m_frameCount = 0; + m_sampleIndex = 0; +} + void UDPSinkFEC::startSender() { qDebug("UDPSinkFEC::startSender"); @@ -92,7 +100,7 @@ void UDPSinkFEC::setRemoteAddress(const QString& address, uint16_t port) m_remoteOutputSender->setDestination(m_remoteAddress, m_remotePort); } -void UDPSinkFEC::write(const SampleVector::iterator& begin, uint32_t sampleChunkSize) +void UDPSinkFEC::write(const SampleVector::iterator& begin, uint32_t sampleChunkSize, bool isTx) { const SampleVector::iterator end = begin + sampleChunkSize; @@ -156,19 +164,13 @@ void UDPSinkFEC::write(const SampleVector::iterator& begin, uint32_t sampleChunk int samplesPerBlock = RemoteNbBytesPerBlock / (m_nbTxBytes * 2); // two I or Q samples if (m_sampleIndex + inRemainingSamples < samplesPerBlock) // there is still room in the current super block { - convertSampleToData(begin + inSamplesIndex, inRemainingSamples); - // memcpy((void *) &m_superBlock.m_protectedBlock.buf[m_sampleIndex*sizeof(Sample)], - // (const void *) &(*(begin+inSamplesIndex)), - // inRemainingSamples * sizeof(Sample)); + convertSampleToData(begin + inSamplesIndex, inRemainingSamples, isTx); m_sampleIndex += inRemainingSamples; it = end; // all input samples are consumed } else // complete super block and initiate the next if not end of frame { - convertSampleToData(begin + inSamplesIndex, samplesPerBlock - m_sampleIndex); - // memcpy((void *) &m_superBlock.m_protectedBlock.buf[m_sampleIndex*sizeof(Sample)], - // (const void *) &(*(begin+inSamplesIndex)), - // (samplesPerBlock - m_sampleIndex) * sizeof(Sample)); + convertSampleToData(begin + inSamplesIndex, samplesPerBlock - m_sampleIndex, isTx); it += samplesPerBlock - m_sampleIndex; m_sampleIndex = 0; diff --git a/plugins/samplesink/remoteoutput/udpsinkfec.h b/plugins/samplesink/remoteoutput/udpsinkfec.h index 82d48a58a..00e06090d 100644 --- a/plugins/samplesink/remoteoutput/udpsinkfec.h +++ b/plugins/samplesink/remoteoutput/udpsinkfec.h @@ -47,13 +47,14 @@ public: /** Destroy UDP sink */ ~UDPSinkFEC(); + void init(); void startSender(); void stopSender(); /** * Write IQ samples */ - void write(const SampleVector::iterator& begin, uint32_t sampleChunkSize); + void write(const SampleVector::iterator& begin, uint32_t sampleChunkSize, bool isTx); /** Return the last error, or return an empty string if there is no error. */ std::string error() @@ -67,6 +68,7 @@ public: void setSampleRate(uint32_t sampleRate); void setNbBlocksFEC(uint32_t nbBlocksFEC); + void setNbTxBytes(uint32_t nbTxBytes) { m_nbTxBytes = nbTxBytes; } void setRemoteAddress(const QString& address, uint16_t port); /** Return true if the stream is OK, return false if there is an error. */ @@ -101,7 +103,7 @@ private: uint32_t getNbSampleBits(); - inline void convertSampleToData(const SampleVector::iterator& begin, int nbSamples) + inline void convertSampleToData(const SampleVector::iterator& begin, int nbSamples, bool isTx) { if (sizeof(Sample) == m_nbTxBytes * 2) // 16 -> 16 or 24 ->24: direct copy { @@ -109,30 +111,59 @@ private: (const void *) &(*(begin)), nbSamples * sizeof(Sample)); } + else if (isTx) + { + if (m_nbTxBytes == 4) // just convert type int16_t -> int32_t (always 16 bit wide) + { + for (int i = 0; i < nbSamples; i++) + { + *((int32_t*) &m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2]) = (begin+i)->m_real; + *((int32_t*) &m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2 + m_nbTxBytes]) = (begin+i)->m_imag; + } + } + else if (m_nbTxBytes == 2) //just convert type int32_t -> int16_t (always 16 bit wide) + { + for (int i = 0; i < nbSamples; i++) + { + *((int16_t*) &m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2]) = (begin+i)->m_real; + *((int16_t*) &m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2 + m_nbTxBytes]) = (begin+i)->m_imag; + } + } + else if (m_nbTxBytes == 1) // 16 -> 8 + { + for (int i = 0; i < nbSamples; i++) + { + m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2] = (uint8_t) ((begin+i)->m_real / 256); + m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2 + m_nbTxBytes] = (uint8_t) ((begin+i)->m_imag / 256); + } + } + } else { if (m_nbTxBytes == 4) // 16 -> 24 { for (int i = 0; i < nbSamples; i++) { - m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2] = (begin+i)->m_real << 8; - m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2 + m_nbTxBytes] = (begin+i)->m_imag << 8; + *((int32_t*) &m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2]) = (begin+i)->m_real << 8; + *((int32_t*) &m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2 + m_nbTxBytes]) = (begin+i)->m_imag << 8; } } else if (m_nbTxBytes == 2) // 24 -> 16 { for (int i = 0; i < nbSamples; i++) { - m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2] = (begin+i)->m_real >> 8; - m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2 + m_nbTxBytes] = (begin+i)->m_imag >> 8; + *((int16_t*) &m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2]) = (begin+i)->m_real >> 8; + *((int16_t*) &m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2 + m_nbTxBytes]) = (begin+i)->m_imag >> 8; } } else if (m_nbTxBytes == 1) // 16 or 24 -> 8 { for (int i = 0; i < nbSamples; i++) { - m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2] = (begin+i)->m_real >> sizeof(Sample)*2; - m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2 + m_nbTxBytes] = (begin+i)->m_imag >> sizeof(Sample)*2; + m_superBlock.m_protectedBlock.buf[(m_sampleIndex+ i)*m_nbTxBytes*2] = + (uint8_t) (((begin+i)->m_real / (1<m_imag / (1<m_superBlocks[blockIndex].m_header.m_sampleBytes * 2; // I/Q sample size in data block int32_t iconv, qconv; @@ -66,12 +66,44 @@ private: { s = *((Sample*) &(m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize])); } + else if (isTx) + { + if (sampleSize == 2) // 8 -> 16 bits + { + int8_t iu = m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize]; + int8_t qu = m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize+1]; + iconv = iu * (1 << 8); + qconv = qu * (1 << 8); + s.setReal(iconv); + s.setImag(qconv); + } + else if (sampleSize == 4) // just convert types (always 16 bits wide) + { + iconv = ((int16_t*) &(m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize]))[0]; + qconv = ((int16_t*) &(m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize+2]))[0]; + s.setReal(iconv); + s.setImag(qconv); + } + else if (sampleSize == 8) // just convert types (always 16 bits wide) + { + iconv = ((int32_t*) &(m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize]))[0]; + qconv = ((int32_t*) &(m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize+4]))[0]; + s.setReal(iconv); + s.setImag(qconv); + } + else // invalid + { + s = Sample{0, 0}; + } + } else { if (sampleSize == 2) // 8 -> 16 or 24 bits { - iconv = ((int32_t*) &(m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize]))[0] << sizeof(Sample)*2; - qconv = ((int32_t*) &(m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize+sampleSize]))[0] << sizeof(Sample)*2; + int8_t iu = m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize]; + int8_t qu = m_dataFrame->m_superBlocks[blockIndex].m_protectedBlock.buf[sampleIndex*sampleSize+1]; + iconv = iu * (1 << sizeof(Sample)*2); + qconv = qu * (1 << sizeof(Sample)*2); s.setReal(iconv); s.setImag(qconv); } diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index bac167a93..18dacf153 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -9863,6 +9863,9 @@ margin-bottom: 20px; "nbFECBlocks" : { "type" : "integer" }, + "nbTxBytes" : { + "type" : "integer" + }, "apiAddress" : { "type" : "string" }, @@ -51622,7 +51625,7 @@ except ApiException as e:
- Generated 2021-12-15T21:39:08.842+01:00 + Generated 2021-12-18T22:54:13.645+01:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/RemoteOutput.yaml b/sdrbase/resources/webapi/doc/swagger/include/RemoteOutput.yaml index dad91083b..9db40eab8 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/RemoteOutput.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/RemoteOutput.yaml @@ -3,6 +3,8 @@ RemoteOutputSettings: properties: nbFECBlocks: type: integer + nbTxBytes: + type: integer apiAddress: type: string apiPort: diff --git a/swagger/sdrangel/api/swagger/include/RemoteOutput.yaml b/swagger/sdrangel/api/swagger/include/RemoteOutput.yaml index dad91083b..9db40eab8 100644 --- a/swagger/sdrangel/api/swagger/include/RemoteOutput.yaml +++ b/swagger/sdrangel/api/swagger/include/RemoteOutput.yaml @@ -3,6 +3,8 @@ RemoteOutputSettings: properties: nbFECBlocks: type: integer + nbTxBytes: + type: integer apiAddress: type: string apiPort: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index bac167a93..18dacf153 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -9863,6 +9863,9 @@ margin-bottom: 20px; "nbFECBlocks" : { "type" : "integer" }, + "nbTxBytes" : { + "type" : "integer" + }, "apiAddress" : { "type" : "string" }, @@ -51622,7 +51625,7 @@ except ApiException as e:
- Generated 2021-12-15T21:39:08.842+01:00 + Generated 2021-12-18T22:54:13.645+01:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGRemoteOutputSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGRemoteOutputSettings.cpp index 64a4143a1..827f50054 100644 --- a/swagger/sdrangel/code/qt5/client/SWGRemoteOutputSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGRemoteOutputSettings.cpp @@ -30,6 +30,8 @@ SWGRemoteOutputSettings::SWGRemoteOutputSettings(QString* json) { SWGRemoteOutputSettings::SWGRemoteOutputSettings() { nb_fec_blocks = 0; m_nb_fec_blocks_isSet = false; + nb_tx_bytes = 0; + m_nb_tx_bytes_isSet = false; api_address = nullptr; m_api_address_isSet = false; api_port = 0; @@ -60,6 +62,8 @@ void SWGRemoteOutputSettings::init() { nb_fec_blocks = 0; m_nb_fec_blocks_isSet = false; + nb_tx_bytes = 0; + m_nb_tx_bytes_isSet = false; api_address = new QString(""); m_api_address_isSet = false; api_port = 0; @@ -85,6 +89,7 @@ SWGRemoteOutputSettings::init() { void SWGRemoteOutputSettings::cleanup() { + if(api_address != nullptr) { delete api_address; } @@ -116,6 +121,8 @@ void SWGRemoteOutputSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&nb_fec_blocks, pJson["nbFECBlocks"], "qint32", ""); + ::SWGSDRangel::setValue(&nb_tx_bytes, pJson["nbTxBytes"], "qint32", ""); + ::SWGSDRangel::setValue(&api_address, pJson["apiAddress"], "QString", "QString"); ::SWGSDRangel::setValue(&api_port, pJson["apiPort"], "qint32", ""); @@ -155,6 +162,9 @@ SWGRemoteOutputSettings::asJsonObject() { if(m_nb_fec_blocks_isSet){ obj->insert("nbFECBlocks", QJsonValue(nb_fec_blocks)); } + if(m_nb_tx_bytes_isSet){ + obj->insert("nbTxBytes", QJsonValue(nb_tx_bytes)); + } if(api_address != nullptr && *api_address != QString("")){ toJsonValue(QString("apiAddress"), api_address, obj, QString("QString")); } @@ -199,6 +209,16 @@ SWGRemoteOutputSettings::setNbFecBlocks(qint32 nb_fec_blocks) { this->m_nb_fec_blocks_isSet = true; } +qint32 +SWGRemoteOutputSettings::getNbTxBytes() { + return nb_tx_bytes; +} +void +SWGRemoteOutputSettings::setNbTxBytes(qint32 nb_tx_bytes) { + this->nb_tx_bytes = nb_tx_bytes; + this->m_nb_tx_bytes_isSet = true; +} + QString* SWGRemoteOutputSettings::getApiAddress() { return api_address; @@ -307,6 +327,9 @@ SWGRemoteOutputSettings::isSet(){ if(m_nb_fec_blocks_isSet){ isObjectUpdated = true; break; } + if(m_nb_tx_bytes_isSet){ + isObjectUpdated = true; break; + } if(api_address && *api_address != QString("")){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGRemoteOutputSettings.h b/swagger/sdrangel/code/qt5/client/SWGRemoteOutputSettings.h index f29c094bf..e647abde8 100644 --- a/swagger/sdrangel/code/qt5/client/SWGRemoteOutputSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGRemoteOutputSettings.h @@ -45,6 +45,9 @@ public: qint32 getNbFecBlocks(); void setNbFecBlocks(qint32 nb_fec_blocks); + qint32 getNbTxBytes(); + void setNbTxBytes(qint32 nb_tx_bytes); + QString* getApiAddress(); void setApiAddress(QString* api_address); @@ -82,6 +85,9 @@ private: qint32 nb_fec_blocks; bool m_nb_fec_blocks_isSet; + qint32 nb_tx_bytes; + bool m_nb_tx_bytes_isSet; + QString* api_address; bool m_api_address_isSet;