From 27ffcedb64bf4a694730b6d69f464f6cc5ba1df6 Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 16 Nov 2021 08:08:24 +0100 Subject: [PATCH] IEEE 802.15.4 modulator: added option to receive UDP data as bytes --- .../mod802.15.4/ieee_802_15_4_mod.cpp | 50 +++++++++++++------ .../channeltx/mod802.15.4/ieee_802_15_4_mod.h | 26 ++++++++-- .../mod802.15.4/ieee_802_15_4_modbaseband.cpp | 13 +++-- .../mod802.15.4/ieee_802_15_4_modgui.cpp | 10 +++- .../mod802.15.4/ieee_802_15_4_modgui.h | 1 + .../mod802.15.4/ieee_802_15_4_modgui.ui | 10 ++++ .../mod802.15.4/ieee_802_15_4_modsettings.cpp | 3 ++ .../mod802.15.4/ieee_802_15_4_modsettings.h | 1 + .../mod802.15.4/ieee_802_15_4_modsource.cpp | 25 ++++++---- .../mod802.15.4/ieee_802_15_4_modsource.h | 5 +- sdrbase/resources/webapi/doc/html2/index.html | 10 ++-- .../swagger/include/IEEE_802_15_4_Mod.yaml | 6 +++ .../webapi/doc/swagger/include/PacketMod.yaml | 3 -- .../swagger/include/IEEE_802_15_4_Mod.yaml | 6 +++ swagger/sdrangel/code/html2/index.html | 10 ++-- .../client/SWGIEEE_802_15_4_ModSettings.cpp | 23 +++++++++ .../qt5/client/SWGIEEE_802_15_4_ModSettings.h | 6 +++ .../code/qt5/client/SWGPacketModSettings.cpp | 23 --------- .../code/qt5/client/SWGPacketModSettings.h | 6 --- 19 files changed, 160 insertions(+), 77 deletions(-) diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp index 4a38eefbe..87d8c36c7 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp @@ -49,7 +49,8 @@ #include "ieee_802_15_4_mod.h" MESSAGE_CLASS_DEFINITION(IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod, Message) -MESSAGE_CLASS_DEFINITION(IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod, Message) +MESSAGE_CLASS_DEFINITION(IEEE_802_15_4_Mod::MsgTxHexString, Message) +MESSAGE_CLASS_DEFINITION(IEEE_802_15_4_Mod::MsgTxBytes, Message) const char* const IEEE_802_15_4_Mod::m_channelIdURI = "sdrangel.channeltx.mod802.15.4"; const char* const IEEE_802_15_4_Mod::m_channelId = "IEEE_802_15_4_Mod"; @@ -118,11 +119,11 @@ bool IEEE_802_15_4_Mod::handleMessage(const Message& cmd) return true; } - else if (MsgTXIEEE_802_15_4_Mod::match(cmd)) + else if (MsgTxHexString::match(cmd)) { // Forward a copy to baseband - MsgTXIEEE_802_15_4_Mod* rep = new MsgTXIEEE_802_15_4_Mod((MsgTXIEEE_802_15_4_Mod&)cmd); - qDebug() << "IEEE_802_15_4_Mod::handleMessage: MsgTXIEEE_802_15_4_Mod"; + MsgTxHexString* rep = new MsgTxHexString((MsgTxHexString&)cmd); + qDebug() << "IEEE_802_15_4_Mod::handleMessage: MsgTxHexString"; m_basebandSource->getInputMessageQueue()->push(rep); return true; @@ -201,6 +202,10 @@ void IEEE_802_15_4_Mod::applySettings(const IEEE_802_15_4_ModSettings& settings, reverseAPIKeys.append("udpEnabled"); } + if ((settings.m_udpBytesFormat != m_settings.m_udpBytesFormat) || force) { + reverseAPIKeys.append("udpBytesFormat"); + } + if ((settings.m_udpAddress != m_settings.m_udpAddress) || force) { reverseAPIKeys.append("udpAddress"); } @@ -209,7 +214,7 @@ void IEEE_802_15_4_Mod::applySettings(const IEEE_802_15_4_ModSettings& settings, reverseAPIKeys.append("udpPort"); } - if ( (settings.m_udpEnabled != m_settings.m_udpEnabled) + if ((settings.m_udpEnabled != m_settings.m_udpEnabled) || (settings.m_udpAddress != m_settings.m_udpAddress) || (settings.m_udpPort != m_settings.m_udpPort) || force) @@ -342,13 +347,16 @@ void IEEE_802_15_4_Mod::webapiUpdateChannelSettings( settings.m_repeatCount = response.getIeee802154ModSettings()->getRepeatCount(); } if (channelSettingsKeys.contains("udpEnabled")) { - settings.m_udpEnabled = response.getPacketDemodSettings()->getUdpEnabled(); + settings.m_udpEnabled = response.getIeee802154ModSettings()->getUdpEnabled() != 0; + } + if (channelSettingsKeys.contains("udpBytesFormat")) { + settings.m_udpBytesFormat = response.getIeee802154ModSettings()->getMUdpBytesFormat() != 0; } if (channelSettingsKeys.contains("udpAddress")) { - settings.m_udpAddress = *response.getPacketDemodSettings()->getUdpAddress(); + settings.m_udpAddress = *response.getIeee802154ModSettings()->getUdpAddress(); } if (channelSettingsKeys.contains("udpPort")) { - settings.m_udpPort = response.getPacketDemodSettings()->getUdpPort(); + settings.m_udpPort = response.getIeee802154ModSettings()->getUdpPort(); } if (channelSettingsKeys.contains("rgbColor")) { settings.m_rgbColor = response.getIeee802154ModSettings()->getRgbColor(); @@ -404,7 +412,7 @@ int IEEE_802_15_4_Mod::webapiActionsPost( { QString data(*dataP); - IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod *msg = IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod::create(data); + IEEE_802_15_4_Mod::MsgTxHexString *msg = IEEE_802_15_4_Mod::MsgTxHexString::create(data); m_basebandSource->getInputMessageQueue()->push(msg); return 202; } @@ -437,7 +445,8 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti response.getIeee802154ModSettings()->setRepeat(settings.m_repeat ? 1 : 0); response.getIeee802154ModSettings()->setRepeatDelay(settings.m_repeatDelay); response.getIeee802154ModSettings()->setRepeatCount(settings.m_repeatCount); - response.getIeee802154ModSettings()->setUdpEnabled(settings.m_udpEnabled); + response.getIeee802154ModSettings()->setUdpEnabled(settings.m_udpEnabled ? 1 : 0); + response.getIeee802154ModSettings()->setMUdpBytesFormat(settings.m_udpBytesFormat ? 1 : 0); response.getIeee802154ModSettings()->setUdpAddress(new QString(settings.m_udpAddress)); response.getIeee802154ModSettings()->setUdpPort(settings.m_udpPort); response.getIeee802154ModSettings()->setRgbColor(settings.m_rgbColor); @@ -552,7 +561,10 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings( swgIEEE_802_15_4_ModSettings->setRepeatCount(settings.m_repeatCount); } if (channelSettingsKeys.contains("udpEnabled") || force) { - swgIEEE_802_15_4_ModSettings->setUdpEnabled(settings.m_udpEnabled); + swgIEEE_802_15_4_ModSettings->setUdpEnabled(settings.m_udpEnabled ? 1 : 0); + } + if (channelSettingsKeys.contains("udpBytesFormat") || force) { + swgIEEE_802_15_4_ModSettings->setMUdpBytesFormat(settings.m_udpBytesFormat ? 1 : 0); } if (channelSettingsKeys.contains("udpAddress") || force) { swgIEEE_802_15_4_ModSettings->setUdpAddress(new QString(settings.m_udpAddress)); @@ -638,9 +650,17 @@ void IEEE_802_15_4_Mod::udpRx() while (m_udpSocket->hasPendingDatagrams()) { QNetworkDatagram datagram = m_udpSocket->receiveDatagram(); - // Convert from binary to hex string - QString string = datagram.data().toHex(' '); - IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod *msg = IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod::create(string); - m_basebandSource->getInputMessageQueue()->push(msg); + if (m_settings.m_udpBytesFormat) + { + IEEE_802_15_4_Mod::MsgTxBytes *msg = IEEE_802_15_4_Mod::MsgTxBytes::create(datagram.data()); + m_basebandSource->getInputMessageQueue()->push(msg); + } + else + { + // Convert from binary to hex string + QString string = datagram.data().toHex(' '); + IEEE_802_15_4_Mod::MsgTxHexString *msg = IEEE_802_15_4_Mod::MsgTxHexString::create(string); + m_basebandSource->getInputMessageQueue()->push(msg); + } } } diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h index 7f2f09adb..a614855c2 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h @@ -68,20 +68,38 @@ public: { } }; - class MsgTXIEEE_802_15_4_Mod : public Message { + class MsgTxHexString : public Message { MESSAGE_CLASS_DECLARATION public: - static MsgTXIEEE_802_15_4_Mod* create(QString data) + static MsgTxHexString* create(QString data) { - return new MsgTXIEEE_802_15_4_Mod(data); + return new MsgTxHexString(data); } QString m_data; private: - MsgTXIEEE_802_15_4_Mod(QString data) : + MsgTxHexString(QString data) : + Message(), + m_data(data) + { } + }; + + class MsgTxBytes : public Message { + MESSAGE_CLASS_DECLARATION + + public: + static MsgTxBytes* create(QByteArray data) { + return new MsgTxBytes(data); + } + + QByteArray m_data; + + private: + + MsgTxBytes(QByteArray data) : Message(), m_data(data) { } diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modbaseband.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modbaseband.cpp index 87d0758e9..03fd02ecb 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modbaseband.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modbaseband.cpp @@ -146,10 +146,17 @@ bool IEEE_802_15_4_ModBaseband::handleMessage(const Message& cmd) return true; } - else if (IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod::match(cmd)) + else if (IEEE_802_15_4_Mod::MsgTxHexString::match(cmd)) { - IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod& tx = (IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod&) cmd; - m_source.addTXFrame(tx.m_data); + IEEE_802_15_4_Mod::MsgTxHexString& tx = (IEEE_802_15_4_Mod::MsgTxHexString&) cmd; + m_source.addTxFrame(tx.m_data); + + return true; + } + else if (IEEE_802_15_4_Mod::MsgTxBytes::match(cmd)) + { + IEEE_802_15_4_Mod::MsgTxBytes& tx = (IEEE_802_15_4_Mod::MsgTxBytes&) cmd; + m_source.addTxFrame(tx.m_data); return true; } diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp index dc9d3a0a5..555fb19a1 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp @@ -288,6 +288,12 @@ void IEEE_802_15_4_ModGUI::on_udpPort_editingFinished() applySettings(); } +void IEEE_802_15_4_ModGUI::on_udpBytesFormat_clicked(bool checked) +{ + m_settings.m_udpBytesFormat = checked; + applySettings(); +} + void IEEE_802_15_4_ModGUI::onWidgetRolled(QWidget* widget, bool rollDown) { (void) widget; @@ -444,8 +450,8 @@ IEEE_802_15_4_ModGUI::~IEEE_802_15_4_ModGUI() void IEEE_802_15_4_ModGUI::transmit() { QString data = ui->frame->text(); - ui->transmittedText->appendPlainText(data + "\n"); - IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod *msg = IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod::create(data); + ui->transmittedText->appendPlainText(data); + IEEE_802_15_4_Mod::MsgTxHexString *msg = IEEE_802_15_4_Mod::MsgTxHexString::create(data); m_IEEE_802_15_4_Mod->getInputMessageQueue()->push(msg); } diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h index ae6cb71d5..07ae39fea 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h @@ -105,6 +105,7 @@ private slots: void on_udpEnabled_clicked(bool checked); void on_udpAddress_editingFinished(); void on_udpPort_editingFinished(); + void on_udpBytesFormat_clicked(bool checked); void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.ui b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.ui index 7d1ae478c..6b20ad96b 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.ui +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.ui @@ -485,6 +485,16 @@ + + + + UDP payload sent in bytes format else blank separated hex string + + + Bytes + + + diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsettings.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsettings.cpp index fd984cdc0..f8b5a4515 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsettings.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsettings.cpp @@ -70,6 +70,7 @@ void IEEE_802_15_4_ModSettings::resetToDefaults() m_beta = 1.0f; m_symbolSpan = 6; m_udpEnabled = false; + m_udpBytesFormat = false; m_udpAddress = "127.0.0.1"; m_udpPort = 9998; } @@ -182,6 +183,7 @@ QByteArray IEEE_802_15_4_ModSettings::serialize() const s.writeBool(34, m_udpEnabled); s.writeString(35, m_udpAddress); s.writeU32(36, m_udpPort); + s.writeBool(37, m_udpBytesFormat); return s.final(); } @@ -259,6 +261,7 @@ bool IEEE_802_15_4_ModSettings::deserialize(const QByteArray& data) } else { m_udpPort = 9998; } + d.readBool(37, &m_udpBytesFormat); return true; } diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsettings.h b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsettings.h index 554fed6af..194fa010d 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsettings.h +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsettings.h @@ -63,6 +63,7 @@ struct IEEE_802_15_4_ModSettings float m_beta; int m_symbolSpan; bool m_udpEnabled; + bool m_udpBytesFormat; //!< true for bytes payload QString m_udpAddress; uint16_t m_udpPort; diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp index 722b83e53..2c5f96305 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp @@ -558,18 +558,24 @@ void IEEE_802_15_4_ModSource::initTX() m_scrambler.init(); } -uint8_t *IEEE_802_15_4_ModSource::hexToBin(uint8_t *p, QString data) +void IEEE_802_15_4_ModSource::convert(const QString dataStr, QByteArray& data) { // Convert string containing space separated list of hex values to binary - QStringList list = data.split(" "); - for (int i = 0; i < list.size(); i++) - { - *p++ = list[i].toInt(nullptr, 16); + QStringList list = dataStr.split(" "); + + for (int i = 0; i < list.size(); i++) { + data.append(list[i].toInt(nullptr, 16)); } - return p; } -void IEEE_802_15_4_ModSource::addTXFrame(QString data) +void IEEE_802_15_4_ModSource::addTxFrame(const QString& data) +{ + QByteArray ba; + convert(data.trimmed(), ba); + addTxFrame(ba); +} + +void IEEE_802_15_4_ModSource::addTxFrame(const QByteArray& data) { uint8_t *crcStart; uint8_t *p; @@ -592,7 +598,8 @@ void IEEE_802_15_4_ModSource::addTXFrame(QString data) // PHY payload crcStart = p; // Data - p = hexToBin(p, data.trimmed()); + std::copy(data.data(), data.data() + data.length(), p); + p += data.length(); // MAC FCS crc.calculate(crcStart, p-crcStart); crcValue = crc.get(); @@ -606,7 +613,7 @@ void IEEE_802_15_4_ModSource::addTXFrame(QString data) // Dump frame QByteArray qb((char *)m_bits, p-m_bits); - qDebug() << "TX: " << qb.toHex(); + qDebug() << "IEEE_802_15_4_ModSource::addTxFrame: Tx: " << qb.toHex(); // Save number of bits in frame m_bitCount = m_bitCountTotal = (p-&m_bits[0]) * 8; diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.h b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.h index bc642db21..38187029d 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.h +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.h @@ -62,8 +62,8 @@ public: void applySettings(const IEEE_802_15_4_ModSettings& settings, bool force = false); void applyChannelSettings(int channelSampleRate, int channelFrequencyOffset, bool force = false); - uint8_t *hexToBin(uint8_t *p, QString data); - void addTXFrame(QString data); + void addTxFrame(const QString& data); + void addTxFrame(const QByteArray& data); private: int m_channelSampleRate; @@ -136,6 +136,7 @@ private: bool chipsValid(); // Are there any chips to transmit int getSymbol(); int getChip(); + void convert(const QString dataStr, QByteArray& data); void initTX(); void createHalfSine(int sampleRate, int chipRate); diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 317fc7d63..f2b0fb06e 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -6267,6 +6267,10 @@ margin-bottom: 20px; "type" : "integer", "description" : "Enable forwarding of frames via UDP" }, + "m_udpBytesFormat" : { + "type" : "integer", + "description" : "Payload format\n * 0 - Blank separated string representation of hex bytes i.e. 00 02 0a\n * 1 - Raw bytes\n" + }, "udpAddress" : { "type" : "string", "description" : "UDP address to listen for frames to transmit on" @@ -8321,10 +8325,6 @@ margin-bottom: 20px; "type" : "number", "format" : "float" }, - "preEmphasisLowFreq" : { - "type" : "number", - "format" : "float" - }, "preEmphasisHighFreq" : { "type" : "number", "format" : "float" @@ -51290,7 +51290,7 @@ except ApiException as e:
- Generated 2021-11-13T22:32:53.016+01:00 + Generated 2021-11-16T00:55:07.690+01:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/IEEE_802_15_4_Mod.yaml b/sdrbase/resources/webapi/doc/swagger/include/IEEE_802_15_4_Mod.yaml index fe6d3ea39..87f6db7b9 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/IEEE_802_15_4_Mod.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/IEEE_802_15_4_Mod.yaml @@ -28,6 +28,12 @@ IEEE_802_15_4_ModSettings: udpEnabled: description: Enable forwarding of frames via UDP type: integer + m_udpBytesFormat: + type: integer + description: > + Payload format + * 0 - Blank separated string representation of hex bytes i.e. 00 02 0a + * 1 - Raw bytes udpAddress: description: UDP address to listen for frames to transmit on type: string diff --git a/sdrbase/resources/webapi/doc/swagger/include/PacketMod.yaml b/sdrbase/resources/webapi/doc/swagger/include/PacketMod.yaml index 6db640ed4..17d393803 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/PacketMod.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/PacketMod.yaml @@ -60,9 +60,6 @@ PacketModSettings: preEmphasisTau: type: number format: float - preEmphasisLowFreq: - type: number - format: float preEmphasisHighFreq: type: number format: float diff --git a/swagger/sdrangel/api/swagger/include/IEEE_802_15_4_Mod.yaml b/swagger/sdrangel/api/swagger/include/IEEE_802_15_4_Mod.yaml index fe6d3ea39..87f6db7b9 100644 --- a/swagger/sdrangel/api/swagger/include/IEEE_802_15_4_Mod.yaml +++ b/swagger/sdrangel/api/swagger/include/IEEE_802_15_4_Mod.yaml @@ -28,6 +28,12 @@ IEEE_802_15_4_ModSettings: udpEnabled: description: Enable forwarding of frames via UDP type: integer + m_udpBytesFormat: + type: integer + description: > + Payload format + * 0 - Blank separated string representation of hex bytes i.e. 00 02 0a + * 1 - Raw bytes udpAddress: description: UDP address to listen for frames to transmit on type: string diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 317fc7d63..f2b0fb06e 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -6267,6 +6267,10 @@ margin-bottom: 20px; "type" : "integer", "description" : "Enable forwarding of frames via UDP" }, + "m_udpBytesFormat" : { + "type" : "integer", + "description" : "Payload format\n * 0 - Blank separated string representation of hex bytes i.e. 00 02 0a\n * 1 - Raw bytes\n" + }, "udpAddress" : { "type" : "string", "description" : "UDP address to listen for frames to transmit on" @@ -8321,10 +8325,6 @@ margin-bottom: 20px; "type" : "number", "format" : "float" }, - "preEmphasisLowFreq" : { - "type" : "number", - "format" : "float" - }, "preEmphasisHighFreq" : { "type" : "number", "format" : "float" @@ -51290,7 +51290,7 @@ except ApiException as e:
- Generated 2021-11-13T22:32:53.016+01:00 + Generated 2021-11-16T00:55:07.690+01:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGIEEE_802_15_4_ModSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGIEEE_802_15_4_ModSettings.cpp index 83376e39a..285349bec 100644 --- a/swagger/sdrangel/code/qt5/client/SWGIEEE_802_15_4_ModSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGIEEE_802_15_4_ModSettings.cpp @@ -46,6 +46,8 @@ SWGIEEE_802_15_4_ModSettings::SWGIEEE_802_15_4_ModSettings() { m_repeat_count_isSet = false; udp_enabled = 0; m_udp_enabled_isSet = false; + m_udp_bytes_format = 0; + m_m_udp_bytes_format_isSet = false; udp_address = nullptr; m_udp_address_isSet = false; udp_port = 0; @@ -92,6 +94,8 @@ SWGIEEE_802_15_4_ModSettings::init() { m_repeat_count_isSet = false; udp_enabled = 0; m_udp_enabled_isSet = false; + m_udp_bytes_format = 0; + m_m_udp_bytes_format_isSet = false; udp_address = new QString(""); m_udp_address_isSet = false; udp_port = 0; @@ -127,6 +131,7 @@ SWGIEEE_802_15_4_ModSettings::cleanup() { + if(udp_address != nullptr) { delete udp_address; } @@ -174,6 +179,8 @@ SWGIEEE_802_15_4_ModSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&udp_enabled, pJson["udpEnabled"], "qint32", ""); + ::SWGSDRangel::setValue(&m_udp_bytes_format, pJson["m_udpBytesFormat"], "qint32", ""); + ::SWGSDRangel::setValue(&udp_address, pJson["udpAddress"], "QString", "QString"); ::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", ""); @@ -237,6 +244,9 @@ SWGIEEE_802_15_4_ModSettings::asJsonObject() { if(m_udp_enabled_isSet){ obj->insert("udpEnabled", QJsonValue(udp_enabled)); } + if(m_m_udp_bytes_format_isSet){ + obj->insert("m_udpBytesFormat", QJsonValue(m_udp_bytes_format)); + } if(udp_address != nullptr && *udp_address != QString("")){ toJsonValue(QString("udpAddress"), udp_address, obj, QString("QString")); } @@ -361,6 +371,16 @@ SWGIEEE_802_15_4_ModSettings::setUdpEnabled(qint32 udp_enabled) { this->m_udp_enabled_isSet = true; } +qint32 +SWGIEEE_802_15_4_ModSettings::getMUdpBytesFormat() { + return m_udp_bytes_format; +} +void +SWGIEEE_802_15_4_ModSettings::setMUdpBytesFormat(qint32 m_udp_bytes_format) { + this->m_udp_bytes_format = m_udp_bytes_format; + this->m_m_udp_bytes_format_isSet = true; +} + QString* SWGIEEE_802_15_4_ModSettings::getUdpAddress() { return udp_address; @@ -493,6 +513,9 @@ SWGIEEE_802_15_4_ModSettings::isSet(){ if(m_udp_enabled_isSet){ isObjectUpdated = true; break; } + if(m_m_udp_bytes_format_isSet){ + isObjectUpdated = true; break; + } if(udp_address && *udp_address != QString("")){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGIEEE_802_15_4_ModSettings.h b/swagger/sdrangel/code/qt5/client/SWGIEEE_802_15_4_ModSettings.h index e32326b64..a6e6a77bc 100644 --- a/swagger/sdrangel/code/qt5/client/SWGIEEE_802_15_4_ModSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGIEEE_802_15_4_ModSettings.h @@ -69,6 +69,9 @@ public: qint32 getUdpEnabled(); void setUdpEnabled(qint32 udp_enabled); + qint32 getMUdpBytesFormat(); + void setMUdpBytesFormat(qint32 m_udp_bytes_format); + QString* getUdpAddress(); void setUdpAddress(QString* udp_address); @@ -130,6 +133,9 @@ private: qint32 udp_enabled; bool m_udp_enabled_isSet; + qint32 m_udp_bytes_format; + bool m_m_udp_bytes_format_isSet; + QString* udp_address; bool m_udp_address_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGPacketModSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGPacketModSettings.cpp index 310c19722..9b254a59b 100644 --- a/swagger/sdrangel/code/qt5/client/SWGPacketModSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGPacketModSettings.cpp @@ -72,8 +72,6 @@ SWGPacketModSettings::SWGPacketModSettings() { m_pre_emphasis_isSet = false; pre_emphasis_tau = 0.0f; m_pre_emphasis_tau_isSet = false; - pre_emphasis_low_freq = 0.0f; - m_pre_emphasis_low_freq_isSet = false; pre_emphasis_high_freq = 0.0f; m_pre_emphasis_high_freq_isSet = false; lpf_taps = 0; @@ -186,8 +184,6 @@ SWGPacketModSettings::init() { m_pre_emphasis_isSet = false; pre_emphasis_tau = 0.0f; m_pre_emphasis_tau_isSet = false; - pre_emphasis_low_freq = 0.0f; - m_pre_emphasis_low_freq_isSet = false; pre_emphasis_high_freq = 0.0f; m_pre_emphasis_high_freq_isSet = false; lpf_taps = 0; @@ -278,7 +274,6 @@ SWGPacketModSettings::cleanup() { - if(callsign != nullptr) { @@ -376,8 +371,6 @@ SWGPacketModSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&pre_emphasis_tau, pJson["preEmphasisTau"], "float", ""); - ::SWGSDRangel::setValue(&pre_emphasis_low_freq, pJson["preEmphasisLowFreq"], "float", ""); - ::SWGSDRangel::setValue(&pre_emphasis_high_freq, pJson["preEmphasisHighFreq"], "float", ""); ::SWGSDRangel::setValue(&lpf_taps, pJson["lpfTaps"], "qint32", ""); @@ -520,9 +513,6 @@ SWGPacketModSettings::asJsonObject() { if(m_pre_emphasis_tau_isSet){ obj->insert("preEmphasisTau", QJsonValue(pre_emphasis_tau)); } - if(m_pre_emphasis_low_freq_isSet){ - obj->insert("preEmphasisLowFreq", QJsonValue(pre_emphasis_low_freq)); - } if(m_pre_emphasis_high_freq_isSet){ obj->insert("preEmphasisHighFreq", QJsonValue(pre_emphasis_high_freq)); } @@ -837,16 +827,6 @@ SWGPacketModSettings::setPreEmphasisTau(float pre_emphasis_tau) { this->m_pre_emphasis_tau_isSet = true; } -float -SWGPacketModSettings::getPreEmphasisLowFreq() { - return pre_emphasis_low_freq; -} -void -SWGPacketModSettings::setPreEmphasisLowFreq(float pre_emphasis_low_freq) { - this->pre_emphasis_low_freq = pre_emphasis_low_freq; - this->m_pre_emphasis_low_freq_isSet = true; -} - float SWGPacketModSettings::getPreEmphasisHighFreq() { return pre_emphasis_high_freq; @@ -1218,9 +1198,6 @@ SWGPacketModSettings::isSet(){ if(m_pre_emphasis_tau_isSet){ isObjectUpdated = true; break; } - if(m_pre_emphasis_low_freq_isSet){ - isObjectUpdated = true; break; - } if(m_pre_emphasis_high_freq_isSet){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGPacketModSettings.h b/swagger/sdrangel/code/qt5/client/SWGPacketModSettings.h index db721abb8..db6475504 100644 --- a/swagger/sdrangel/code/qt5/client/SWGPacketModSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGPacketModSettings.h @@ -108,9 +108,6 @@ public: float getPreEmphasisTau(); void setPreEmphasisTau(float pre_emphasis_tau); - float getPreEmphasisLowFreq(); - void setPreEmphasisLowFreq(float pre_emphasis_low_freq); - float getPreEmphasisHighFreq(); void setPreEmphasisHighFreq(float pre_emphasis_high_freq); @@ -271,9 +268,6 @@ private: float pre_emphasis_tau; bool m_pre_emphasis_tau_isSet; - float pre_emphasis_low_freq; - bool m_pre_emphasis_low_freq_isSet; - float pre_emphasis_high_freq; bool m_pre_emphasis_high_freq_isSet;