From 3530dd33edb24ae8f958905ef3410d879ca792ec Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 22 Mar 2026 21:36:41 +0100 Subject: [PATCH] Meshtastic: implement API properly --- .../demodmeshtastic/meshtasticdemod.cpp | 242 +++--- .../demodmeshtastic/meshtasticdemod.h | 2 + .../meshtasticdemoddecoder.cpp | 3 +- .../demodmeshtastic/meshtasticdemodgui.cpp | 2 + plugins/channelrx/demodmeshtastic/readme.md | 18 +- .../channeltx/modmeshtastic/meshtasticmod.cpp | 196 ++--- sdrbase/resources/webapi/doc/html2/index.html | 332 ++++++++- .../doc/swagger/include/ChannelReport.yaml | 4 + .../doc/swagger/include/ChannelSettings.yaml | 4 + .../doc/swagger/include/MeshtasticDemod.yaml | 187 +++++ .../doc/swagger/include/MeshtasticMod.yaml | 128 ++++ sdrbase/webapi/webapirequestmapper.cpp | 13 +- .../api/swagger/include/ChannelReport.yaml | 4 + .../api/swagger/include/ChannelSettings.yaml | 4 + .../api/swagger/include/MeshtasticDemod.yaml | 187 +++++ .../api/swagger/include/MeshtasticMod.yaml | 128 ++++ swagger/sdrangel/code/html2/index.html | 332 ++++++++- .../code/qt5/client/SWGChannelReport.cpp | 50 ++ .../code/qt5/client/SWGChannelReport.h | 14 + .../code/qt5/client/SWGChannelSettings.cpp | 50 ++ .../code/qt5/client/SWGChannelSettings.h | 14 + .../qt5/client/SWGMeshtasticDemodReport.cpp | 559 ++++++++++++++ .../qt5/client/SWGMeshtasticDemodReport.h | 174 +++++ .../qt5/client/SWGMeshtasticDemodSettings.cpp | 695 ++++++++++++++++++ .../qt5/client/SWGMeshtasticDemodSettings.h | 212 ++++++ .../qt5/client/SWGMeshtasticModReport.cpp | 223 ++++++ .../code/qt5/client/SWGMeshtasticModReport.h | 88 +++ .../qt5/client/SWGMeshtasticModSettings.cpp | 672 +++++++++++++++++ .../qt5/client/SWGMeshtasticModSettings.h | 205 ++++++ .../code/qt5/client/SWGModelFactory.h | 24 + 30 files changed, 4488 insertions(+), 278 deletions(-) create mode 100644 sdrbase/resources/webapi/doc/swagger/include/MeshtasticDemod.yaml create mode 100644 sdrbase/resources/webapi/doc/swagger/include/MeshtasticMod.yaml create mode 100644 swagger/sdrangel/api/swagger/include/MeshtasticDemod.yaml create mode 100644 swagger/sdrangel/api/swagger/include/MeshtasticMod.yaml create mode 100644 swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodReport.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodReport.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodSettings.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodSettings.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGMeshtasticModReport.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGMeshtasticModReport.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGMeshtasticModSettings.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGMeshtasticModSettings.h diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp b/plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp index 2f9fe845d..f53d00f7a 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp @@ -39,7 +39,7 @@ #include "SWGChannelSettings.h" #include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" -#include "SWGChirpChatDemodReport.h" +#include "SWGMeshtasticDemodReport.h" #include "dsp/dspcommands.h" #include "device/deviceapi.h" @@ -530,6 +530,8 @@ bool MeshtasticDemod::handleMessage(const Message& cmd) m_lastMsgHeaderParityStatus = msg.getHeaderParityStatus(); m_lastMsgPayloadCRC = msg.getPayloadCRCStatus(); m_lastMsgPayloadParityStatus = msg.getPayloadParityStatus(); + m_lastMsgPipelineName = msg.getPipelineName(); + m_lastFrameType = QStringLiteral("LORA_FRAME"); QByteArray bytesCopy(m_lastMsgBytes); bytesCopy.truncate(m_lastMsgPacketLength); @@ -550,6 +552,17 @@ bool MeshtasticDemod::handleMessage(const Message& cmd) if (modemmeshtastic::Packet::decodeFrame(m_lastMsgBytes, meshResult, m_settings.m_meshtasticKeySpecList)) { + m_lastMsgString = meshResult.summary; + + for (const modemmeshtastic::DecodeResult::Field& field : meshResult.fields) + { + if (field.path == QStringLiteral("data.port_name")) + { + m_lastFrameType = field.value; + break; + } + } + qInfo() << "MeshtasticDemod::handleMessage:" << meshResult.summary; if (meshResult.dataDecoded && getMessageQueueToGUI()) @@ -658,44 +671,6 @@ bool MeshtasticDemod::handleMessage(const Message& cmd) return true; } - else if (MeshtasticDemodMsg::MsgReportDecodeFT::match(cmd)) - { - qDebug() << "MeshtasticDemod::handleMessage: MsgReportDecodeFT"; - MeshtasticDemodMsg::MsgReportDecodeFT& msg = (MeshtasticDemodMsg::MsgReportDecodeFT&) cmd; - m_lastMsgSignalDb = msg.getSingalDb(); - m_lastMsgNoiseDb = msg.getNoiseDb(); - m_lastMsgSyncWord = msg.getSyncWord(); - m_lastMsgTimestamp = msg.getMsgTimestamp(); - m_lastMsgString = msg.getMessage(); // for now we do not handle message components (call1, ...) - int nbSymbolBits = m_settings.m_spreadFactor - m_settings.m_deBits; - m_lastMsgNbSymbols = (174 / nbSymbolBits) + ((174 % nbSymbolBits) == 0 ? 0 : 1); - - if (m_settings.m_autoNbSymbolsMax) - { - MeshtasticDemodSettings settings = m_settings; - settings.m_nbSymbolsMax = m_lastMsgNbSymbols; - applySettings(settings); - - if (getMessageQueueToGUI()) // forward to GUI if any - { - MsgConfigureMeshtasticDemod *msgToGUI = MsgConfigureMeshtasticDemod::create(settings, false); - getMessageQueueToGUI()->push(msgToGUI); - } - } - - if (m_settings.m_sendViaUDP) - { - const QByteArray& byteArray = m_lastMsgString.toUtf8(); - const uint8_t *bytes = reinterpret_cast(byteArray.data()); - m_udpSink.writeUnbuffered(bytes, byteArray.size()); - } - - if (getMessageQueueToGUI()) { - getMessageQueueToGUI()->push(new MeshtasticDemodMsg::MsgReportDecodeFT(msg)); // make a copy - } - - return true; - } else if (DSPSignalNotification::match(cmd)) { DSPSignalNotification& notif = (DSPSignalNotification&) cmd; @@ -912,8 +887,8 @@ int MeshtasticDemod::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; - response.setChirpChatDemodSettings(new SWGSDRangel::SWGChirpChatDemodSettings()); - response.getChirpChatDemodSettings()->init(); + response.setMeshtasticDemodSettings(new SWGSDRangel::SWGMeshtasticDemodSettings()); + response.getMeshtasticDemodSettings()->init(); webapiFormatChannelSettings(response, m_settings); return 200; @@ -958,81 +933,81 @@ void MeshtasticDemod::webapiUpdateChannelSettings( SWGSDRangel::SWGChannelSettings& response) { if (channelSettingsKeys.contains("inputFrequencyOffset")) { - settings.m_inputFrequencyOffset = response.getChirpChatDemodSettings()->getInputFrequencyOffset(); + settings.m_inputFrequencyOffset = response.getMeshtasticDemodSettings()->getInputFrequencyOffset(); } if (channelSettingsKeys.contains("bandwidthIndex")) { - settings.m_bandwidthIndex = response.getChirpChatDemodSettings()->getBandwidthIndex(); + settings.m_bandwidthIndex = response.getMeshtasticDemodSettings()->getBandwidthIndex(); } if (channelSettingsKeys.contains("spreadFactor")) { - settings.m_spreadFactor = response.getChirpChatDemodSettings()->getSpreadFactor(); + settings.m_spreadFactor = response.getMeshtasticDemodSettings()->getSpreadFactor(); } if (channelSettingsKeys.contains("deBits")) { - settings.m_deBits = response.getChirpChatDemodSettings()->getDeBits(); + settings.m_deBits = response.getMeshtasticDemodSettings()->getDeBits(); } if (channelSettingsKeys.contains("decodeActive")) { - settings.m_decodeActive = response.getChirpChatDemodSettings()->getDecodeActive() != 0; + settings.m_decodeActive = response.getMeshtasticDemodSettings()->getDecodeActive() != 0; } if (channelSettingsKeys.contains("eomSquelchTenths")) { - settings.m_eomSquelchTenths = response.getChirpChatDemodSettings()->getEomSquelchTenths(); + settings.m_eomSquelchTenths = response.getMeshtasticDemodSettings()->getEomSquelchTenths(); } if (channelSettingsKeys.contains("nbSymbolsMax")) { - settings.m_nbSymbolsMax = response.getChirpChatDemodSettings()->getNbSymbolsMax(); + settings.m_nbSymbolsMax = response.getMeshtasticDemodSettings()->getNbSymbolsMax(); } if (channelSettingsKeys.contains("preambleChirps")) { - settings.m_preambleChirps = response.getChirpChatDemodSettings()->getPreambleChirps(); + settings.m_preambleChirps = response.getMeshtasticDemodSettings()->getPreambleChirps(); } if (channelSettingsKeys.contains("nbParityBits")) { - settings.m_nbParityBits = response.getChirpChatDemodSettings()->getNbParityBits(); + settings.m_nbParityBits = response.getMeshtasticDemodSettings()->getNbParityBits(); } if (channelSettingsKeys.contains("packetLength")) { - settings.m_packetLength = response.getChirpChatDemodSettings()->getPacketLength(); + settings.m_packetLength = response.getMeshtasticDemodSettings()->getPacketLength(); } if (channelSettingsKeys.contains("sendViaUDP")) { - settings.m_sendViaUDP = response.getChirpChatDemodSettings()->getSendViaUdp() != 0; + settings.m_sendViaUDP = response.getMeshtasticDemodSettings()->getSendViaUdp() != 0; } if (channelSettingsKeys.contains("udpAddress")) { - settings.m_udpAddress = *response.getChirpChatDemodSettings()->getUdpAddress(); + settings.m_udpAddress = *response.getMeshtasticDemodSettings()->getUdpAddress(); } if (channelSettingsKeys.contains("udpPort")) { - uint16_t port = response.getChirpChatDemodSettings()->getUdpPort(); + uint16_t port = response.getMeshtasticDemodSettings()->getUdpPort(); settings.m_udpPort = port < 1024 ? 1024 : port; } if (channelSettingsKeys.contains("invertRamps")) { - settings.m_invertRamps = response.getChirpChatDemodSettings()->getInvertRamps() != 0; + settings.m_invertRamps = response.getMeshtasticDemodSettings()->getInvertRamps() != 0; } if (channelSettingsKeys.contains("rgbColor")) { - settings.m_rgbColor = response.getChirpChatDemodSettings()->getRgbColor(); + settings.m_rgbColor = response.getMeshtasticDemodSettings()->getRgbColor(); } if (channelSettingsKeys.contains("title")) { - settings.m_title = *response.getChirpChatDemodSettings()->getTitle(); + settings.m_title = *response.getMeshtasticDemodSettings()->getTitle(); } if (channelSettingsKeys.contains("streamIndex")) { - settings.m_streamIndex = response.getChirpChatDemodSettings()->getStreamIndex(); + settings.m_streamIndex = response.getMeshtasticDemodSettings()->getStreamIndex(); } if (channelSettingsKeys.contains("useReverseAPI")) { - settings.m_useReverseAPI = response.getChirpChatDemodSettings()->getUseReverseApi() != 0; + settings.m_useReverseAPI = response.getMeshtasticDemodSettings()->getUseReverseApi() != 0; } if (channelSettingsKeys.contains("reverseAPIAddress")) { - settings.m_reverseAPIAddress = *response.getChirpChatDemodSettings()->getReverseApiAddress(); + settings.m_reverseAPIAddress = *response.getMeshtasticDemodSettings()->getReverseApiAddress(); } if (channelSettingsKeys.contains("reverseAPIPort")) { - settings.m_reverseAPIPort = response.getChirpChatDemodSettings()->getReverseApiPort(); + settings.m_reverseAPIPort = response.getMeshtasticDemodSettings()->getReverseApiPort(); } if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) { - settings.m_reverseAPIDeviceIndex = response.getChirpChatDemodSettings()->getReverseApiDeviceIndex(); + settings.m_reverseAPIDeviceIndex = response.getMeshtasticDemodSettings()->getReverseApiDeviceIndex(); } if (channelSettingsKeys.contains("reverseAPIChannelIndex")) { - settings.m_reverseAPIChannelIndex = response.getChirpChatDemodSettings()->getReverseApiChannelIndex(); + settings.m_reverseAPIChannelIndex = response.getMeshtasticDemodSettings()->getReverseApiChannelIndex(); } if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) { - settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getChirpChatDemodSettings()->getSpectrumConfig()); + settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getMeshtasticDemodSettings()->getSpectrumConfig()); } if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) { - settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getChirpChatDemodSettings()->getChannelMarker()); + settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getMeshtasticDemodSettings()->getChannelMarker()); } if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) { - settings.m_rollupState->updateFrom(channelSettingsKeys, response.getChirpChatDemodSettings()->getRollupState()); + settings.m_rollupState->updateFrom(channelSettingsKeys, response.getMeshtasticDemodSettings()->getRollupState()); } } @@ -1041,97 +1016,93 @@ int MeshtasticDemod::webapiReportGet( QString& errorMessage) { (void) errorMessage; - response.setChirpChatDemodReport(new SWGSDRangel::SWGChirpChatDemodReport()); - response.getChirpChatDemodReport()->init(); + response.setMeshtasticDemodReport(new SWGSDRangel::SWGMeshtasticDemodReport()); + response.getMeshtasticDemodReport()->init(); webapiFormatChannelReport(response); return 200; } void MeshtasticDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const MeshtasticDemodSettings& settings) { - response.getChirpChatDemodSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); - response.getChirpChatDemodSettings()->setBandwidthIndex(settings.m_bandwidthIndex); - response.getChirpChatDemodSettings()->setSpreadFactor(settings.m_spreadFactor); - response.getChirpChatDemodSettings()->setDeBits(settings.m_deBits); - response.getChirpChatDemodSettings()->setCodingScheme((int) settings.m_codingScheme); - response.getChirpChatDemodSettings()->setDecodeActive(settings.m_decodeActive ? 1 : 0); - response.getChirpChatDemodSettings()->setEomSquelchTenths(settings.m_eomSquelchTenths); - response.getChirpChatDemodSettings()->setNbSymbolsMax(settings.m_nbSymbolsMax); - response.getChirpChatDemodSettings()->setAutoNbSymbolsMax(settings.m_autoNbSymbolsMax ? 1 : 0); - response.getChirpChatDemodSettings()->setPreambleChirps(settings.m_preambleChirps); - response.getChirpChatDemodSettings()->setNbParityBits(settings.m_nbParityBits); - response.getChirpChatDemodSettings()->setPacketLength(settings.m_packetLength); - response.getChirpChatDemodSettings()->setHasCrc(settings.m_hasCRC ? 1 : 0); - response.getChirpChatDemodSettings()->setHasHeader(settings.m_hasHeader ? 1 : 0); - response.getChirpChatDemodSettings()->setSendViaUdp(settings.m_sendViaUDP ? 1 : 0); - response.getChirpChatDemodSettings()->setInvertRamps(settings.m_invertRamps ? 1 : 0); + response.getMeshtasticDemodSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); + response.getMeshtasticDemodSettings()->setBandwidthIndex(settings.m_bandwidthIndex); + response.getMeshtasticDemodSettings()->setSpreadFactor(settings.m_spreadFactor); + response.getMeshtasticDemodSettings()->setDeBits(settings.m_deBits); + response.getMeshtasticDemodSettings()->setDecodeActive(settings.m_decodeActive ? 1 : 0); + response.getMeshtasticDemodSettings()->setEomSquelchTenths(settings.m_eomSquelchTenths); + response.getMeshtasticDemodSettings()->setNbSymbolsMax(settings.m_nbSymbolsMax); + response.getMeshtasticDemodSettings()->setPreambleChirps(settings.m_preambleChirps); + response.getMeshtasticDemodSettings()->setNbParityBits(settings.m_nbParityBits); + response.getMeshtasticDemodSettings()->setPacketLength(settings.m_packetLength); + response.getMeshtasticDemodSettings()->setSendViaUdp(settings.m_sendViaUDP ? 1 : 0); + response.getMeshtasticDemodSettings()->setInvertRamps(settings.m_invertRamps ? 1 : 0); - if (response.getChirpChatDemodSettings()->getUdpAddress()) { - *response.getChirpChatDemodSettings()->getUdpAddress() = settings.m_udpAddress; + if (response.getMeshtasticDemodSettings()->getUdpAddress()) { + *response.getMeshtasticDemodSettings()->getUdpAddress() = settings.m_udpAddress; } else { - response.getChirpChatDemodSettings()->setUdpAddress(new QString(settings.m_udpAddress)); + response.getMeshtasticDemodSettings()->setUdpAddress(new QString(settings.m_udpAddress)); } - response.getChirpChatDemodSettings()->setUdpPort(settings.m_udpPort); - response.getChirpChatDemodSettings()->setRgbColor(settings.m_rgbColor); + response.getMeshtasticDemodSettings()->setUdpPort(settings.m_udpPort); + response.getMeshtasticDemodSettings()->setRgbColor(settings.m_rgbColor); - if (response.getChirpChatDemodSettings()->getTitle()) { - *response.getChirpChatDemodSettings()->getTitle() = settings.m_title; + if (response.getMeshtasticDemodSettings()->getTitle()) { + *response.getMeshtasticDemodSettings()->getTitle() = settings.m_title; } else { - response.getChirpChatDemodSettings()->setTitle(new QString(settings.m_title)); + response.getMeshtasticDemodSettings()->setTitle(new QString(settings.m_title)); } - response.getChirpChatDemodSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); + response.getMeshtasticDemodSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); - if (response.getChirpChatDemodSettings()->getReverseApiAddress()) { - *response.getChirpChatDemodSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress; + if (response.getMeshtasticDemodSettings()->getReverseApiAddress()) { + *response.getMeshtasticDemodSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress; } else { - response.getChirpChatDemodSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress)); + response.getMeshtasticDemodSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress)); } - response.getChirpChatDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort); - response.getChirpChatDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); - response.getChirpChatDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex); + response.getMeshtasticDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort); + response.getMeshtasticDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); + response.getMeshtasticDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex); if (settings.m_spectrumGUI) { - if (response.getChirpChatDemodSettings()->getSpectrumConfig()) + if (response.getMeshtasticDemodSettings()->getSpectrumConfig()) { - settings.m_spectrumGUI->formatTo(response.getChirpChatDemodSettings()->getSpectrumConfig()); + settings.m_spectrumGUI->formatTo(response.getMeshtasticDemodSettings()->getSpectrumConfig()); } else { SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum(); settings.m_spectrumGUI->formatTo(swgGLSpectrum); - response.getChirpChatDemodSettings()->setSpectrumConfig(swgGLSpectrum); + response.getMeshtasticDemodSettings()->setSpectrumConfig(swgGLSpectrum); } } if (settings.m_channelMarker) { - if (response.getChirpChatDemodSettings()->getChannelMarker()) + if (response.getMeshtasticDemodSettings()->getChannelMarker()) { - settings.m_channelMarker->formatTo(response.getChirpChatDemodSettings()->getChannelMarker()); + settings.m_channelMarker->formatTo(response.getMeshtasticDemodSettings()->getChannelMarker()); } else { SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); settings.m_channelMarker->formatTo(swgChannelMarker); - response.getChirpChatDemodSettings()->setChannelMarker(swgChannelMarker); + response.getMeshtasticDemodSettings()->setChannelMarker(swgChannelMarker); } } if (settings.m_rollupState) { - if (response.getChirpChatDemodSettings()->getRollupState()) + if (response.getMeshtasticDemodSettings()->getRollupState()) { - settings.m_rollupState->formatTo(response.getChirpChatDemodSettings()->getRollupState()); + settings.m_rollupState->formatTo(response.getMeshtasticDemodSettings()->getRollupState()); } else { SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState(); settings.m_rollupState->formatTo(swgRollupState); - response.getChirpChatDemodSettings()->setRollupState(swgRollupState); + response.getMeshtasticDemodSettings()->setRollupState(swgRollupState); } } } @@ -1139,28 +1110,29 @@ void MeshtasticDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetting void MeshtasticDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) { if (m_running && !m_pipelines.empty() && m_pipelines[0].basebandSink) { - response.getChirpChatDemodReport()->setChannelSampleRate(m_pipelines[0].basebandSink->getChannelSampleRate()); + response.getMeshtasticDemodReport()->setChannelSampleRate(m_pipelines[0].basebandSink->getChannelSampleRate()); } - response.getChirpChatDemodReport()->setChannelPowerDb(CalcDb::dbPower(getTotalPower())); - response.getChirpChatDemodReport()->setSignalPowerDb(m_lastMsgSignalDb); - response.getChirpChatDemodReport()->setNoisePowerDb(CalcDb::dbPower(getCurrentNoiseLevel())); - response.getChirpChatDemodReport()->setSnrPowerDb(m_lastMsgSignalDb - m_lastMsgNoiseDb); - response.getChirpChatDemodReport()->setHasCrc(m_lastMsgHasCRC); - response.getChirpChatDemodReport()->setNbParityBits(m_lastMsgNbParityBits); - response.getChirpChatDemodReport()->setPacketLength(m_lastMsgPacketLength); - response.getChirpChatDemodReport()->setNbSymbols(m_lastMsgNbSymbols); - response.getChirpChatDemodReport()->setNbCodewords(m_lastMsgNbCodewords); - response.getChirpChatDemodReport()->setHeaderParityStatus(m_lastMsgHeaderParityStatus); - response.getChirpChatDemodReport()->setHeaderCrcStatus(m_lastMsgHeaderCRC); - response.getChirpChatDemodReport()->setPayloadParityStatus(m_lastMsgPayloadParityStatus); - response.getChirpChatDemodReport()->setPayloadCrcStatus(m_lastMsgPayloadCRC); - response.getChirpChatDemodReport()->setMessageTimestamp(new QString(m_lastMsgTimestamp)); - response.getChirpChatDemodReport()->setMessageString(new QString(m_lastMsgString)); - response.getChirpChatDemodReport()->setDecoding(getDemodActive() ? 1 : 0); + response.getMeshtasticDemodReport()->setChannelPowerDb(CalcDb::dbPower(getTotalPower())); + response.getMeshtasticDemodReport()->setSignalPowerDb(m_lastMsgSignalDb); + response.getMeshtasticDemodReport()->setNoisePowerDb(CalcDb::dbPower(getCurrentNoiseLevel())); + response.getMeshtasticDemodReport()->setSnrPowerDb(m_lastMsgSignalDb - m_lastMsgNoiseDb); + response.getMeshtasticDemodReport()->setNbParityBits(m_lastMsgNbParityBits); + response.getMeshtasticDemodReport()->setPacketLength(m_lastMsgPacketLength); + response.getMeshtasticDemodReport()->setNbSymbols(m_lastMsgNbSymbols); + response.getMeshtasticDemodReport()->setNbCodewords(m_lastMsgNbCodewords); + response.getMeshtasticDemodReport()->setHeaderParityStatus(m_lastMsgHeaderParityStatus); + response.getMeshtasticDemodReport()->setHeaderCrcStatus(m_lastMsgHeaderCRC); + response.getMeshtasticDemodReport()->setPayloadParityStatus(m_lastMsgPayloadParityStatus); + response.getMeshtasticDemodReport()->setPayloadCrcStatus(m_lastMsgPayloadCRC); + response.getMeshtasticDemodReport()->setMessageTimestamp(new QString(m_lastMsgTimestamp)); + response.getMeshtasticDemodReport()->setMessageString(new QString(m_lastMsgString)); + response.getMeshtasticDemodReport()->setFrameType(new QString(m_lastFrameType)); + response.getMeshtasticDemodReport()->setChannelType(new QString(m_lastMsgPipelineName)); + response.getMeshtasticDemodReport()->setDecoding(getDemodActive() ? 1 : 0); - response.getChirpChatDemodReport()->setMessageBytes(new QList); - QList *bytesStr = response.getChirpChatDemodReport()->getMessageBytes(); + response.getMeshtasticDemodReport()->setMessageBytes(new QList); + QList *bytesStr = response.getMeshtasticDemodReport()->getMessageBytes(); for (QByteArray::const_iterator it = m_lastMsgBytes.begin(); it != m_lastMsgBytes.end(); ++it) { @@ -1230,8 +1202,8 @@ void MeshtasticDemod::webapiFormatChannelSettings( swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet()); swgChannelSettings->setOriginatorDeviceSetIndex(getDeviceSetIndex()); swgChannelSettings->setChannelType(new QString(m_channelId)); - swgChannelSettings->setChirpChatDemodSettings(new SWGSDRangel::SWGChirpChatDemodSettings()); - SWGSDRangel::SWGChirpChatDemodSettings *swgMeshtasticDemodSettings = swgChannelSettings->getChirpChatDemodSettings(); + swgChannelSettings->setMeshtasticDemodSettings(new SWGSDRangel::SWGMeshtasticDemodSettings()); + SWGSDRangel::SWGMeshtasticDemodSettings *swgMeshtasticDemodSettings = swgChannelSettings->getMeshtasticDemodSettings(); // transfer data that has been modified. When force is on transfer all data except reverse API data @@ -1247,9 +1219,6 @@ void MeshtasticDemod::webapiFormatChannelSettings( if (channelSettingsKeys.contains("deBits") || force) { swgMeshtasticDemodSettings->setDeBits(settings.m_deBits); } - if (channelSettingsKeys.contains("codingScheme") || force) { - swgMeshtasticDemodSettings->setCodingScheme((int) settings.m_codingScheme); - } if (channelSettingsKeys.contains("decodeActive") || force) { swgMeshtasticDemodSettings->setDecodeActive(settings.m_decodeActive ? 1 : 0); } @@ -1259,9 +1228,6 @@ void MeshtasticDemod::webapiFormatChannelSettings( if (channelSettingsKeys.contains("nbSymbolsMax") || force) { swgMeshtasticDemodSettings->setNbSymbolsMax(settings.m_nbSymbolsMax); } - if (channelSettingsKeys.contains("autoNbSymbolsMax") || force) { - swgMeshtasticDemodSettings->setAutoNbSymbolsMax(settings.m_autoNbSymbolsMax ? 1 : 0); - } if (channelSettingsKeys.contains("preambleChirps") || force) { swgMeshtasticDemodSettings->setPreambleChirps(settings.m_preambleChirps); } @@ -1271,12 +1237,6 @@ void MeshtasticDemod::webapiFormatChannelSettings( if (channelSettingsKeys.contains("packetLength") || force) { swgMeshtasticDemodSettings->setPacketLength(settings.m_packetLength); } - if (channelSettingsKeys.contains("hasCRC") || force) { - swgMeshtasticDemodSettings->setHasCrc(settings.m_hasCRC ? 1 : 0); - } - if (channelSettingsKeys.contains("hasHeader") || force) { - swgMeshtasticDemodSettings->setHasHeader(settings.m_hasHeader ? 1 : 0); - } if (channelSettingsKeys.contains("sendViaUDP") || force) { swgMeshtasticDemodSettings->setSendViaUdp(settings.m_sendViaUDP ? 1 : 0); } diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemod.h b/plugins/channelrx/demodmeshtastic/meshtasticdemod.h index 875f88f27..c5b92f0a1 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemod.h +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemod.h @@ -181,8 +181,10 @@ private: int m_lastMsgHeaderParityStatus; bool m_lastMsgPayloadCRC; int m_lastMsgPayloadParityStatus; + QString m_lastMsgPipelineName; QString m_lastMsgTimestamp; QString m_lastMsgString; + QString m_lastFrameType; QByteArray m_lastMsgBytes; UDPSinkUtil m_udpSink; diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp b/plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp index 0c2f3c295..f79b7ada7 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp @@ -351,7 +351,8 @@ bool MeshtasticDemodDecoder::handleMessage(const Message& cmd) if (m_outputMessageQueue) { qDebug( - "MeshtasticDemodDecoder::handleMessage: push report ts=%s bytes=%lld pCRC=%d", + "MeshtasticDemodDecoder::handleMessage: push report name=%s ts=%s bytes=%lld pCRC=%d", + qPrintable(m_pipelineName), qPrintable(msgTimestamp), static_cast(msgBytes.size()), m_payloadCRCStatus ? 1 : 0 diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.cpp b/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.cpp index 019f8d32e..6bf81a7f4 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.cpp +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.cpp @@ -196,6 +196,7 @@ bool MeshtasticDemodGUI::handleMessage(const Message& message) } else if (MeshtasticDemodMsg::MsgReportDecodeBytes::match(message)) { + // Populates the upper unstructured view including raw bytes in hex const MeshtasticDemodMsg::MsgReportDecodeBytes& msg = (MeshtasticDemodMsg::MsgReportDecodeBytes&) message; handleMeshAutoLockObservation(msg); @@ -207,6 +208,7 @@ bool MeshtasticDemodGUI::handleMessage(const Message& message) } else if (MeshtasticDemodMsg::MsgReportDecodeString::match(message)) { + // Populates the lower structured tree view with decoded fields if ((m_settings.m_codingScheme == MeshtasticDemodSettings::CodingLoRa)) { showTextMessage(message); } diff --git a/plugins/channelrx/demodmeshtastic/readme.md b/plugins/channelrx/demodmeshtastic/readme.md index 143288db8..486c5bc4b 100644 --- a/plugins/channelrx/demodmeshtastic/readme.md +++ b/plugins/channelrx/demodmeshtastic/readme.md @@ -2,7 +2,7 @@

Introduction

-This plugin can be used to demodulate and decode transmissions based on Chirp Spread Spectrum (CSS). The basic idea is to transform each symbol of a MFSK modulation to an ascending frequency ramp shifted in time. It could equally be a descending ramp but this one is reserved to detect a break in the preamble sequence (synchronization). This plugin has been designed to work in conjunction with the ChirpChat modulator plugin that should be used ideally on the transmission side. +This plugin can be used to demodulate and decode transmissions based on Chirp Spread Spectrum (CSS). The basic idea is to transform each symbol of a MFSK modulation to an ascending frequency ramp shifted in time. It could equally be a descending ramp but this one is reserved to detect a break in the preamble sequence (synchronization). This plugin may be used in conjunction with the Meshtastic modulator plugin on the transmission side. It has clearly been inspired by the LoRa technique but is designed for experimentation and extension to other protocols mostly inspired by amateur radio techniques using chirp modulation to transmit symbols. Thanks to the MFSK to chirp translation it is possible to adapt any MFSK based mode. @@ -83,11 +83,11 @@ Use the wheels to adjust the frequency shift in Hz from the center frequency of

2: De-chirped channel power

-This is the total power in the FFT of the de-chirped signal in dB. When no ChirpChat signal is detected this corresponds to the power received in the bandwidth (3). It will show a significant increase in presence of a ChirpChat signal that can be detected. +This is the total power in the FFT of the de-chirped signal in dB. When no Meshtastic signal is detected this corresponds to the power received in the bandwidth (3). It will show a significant increase in presence of a Meshtastic signal that can be detected.

3: Bandwidth

-This is the bandwidth of the ChirpChat signal. Similarly to LoRa the signal sweeps between the lower and the upper frequency of this bandwidth. The sample rate of the ChirpChat signal in seconds is exactly one over this bandwidth in Hertz. +This is the bandwidth of the Meshtastic signal. Similarly to LoRa the signal sweeps between the lower and the upper frequency of this bandwidth. The sample rate of the Meshtastic signal in seconds is exactly one over this bandwidth in Hertz. In the LoRa standard there are 2 base bandwidths: 500 and 333.333 kHz. A 400 kHz base has been added. Possible bandwidths are obtained by a division of these base bandwidths by a power of two from 1 to 64. Extra divisor of 128 is provided to achieve smaller bandwidths that can fit in a SSB channel. Finally special divisors from a 384 kHz base are provided to allow even more narrow bandwidths. @@ -122,7 +122,7 @@ Thus available bandwidths are: - **488** (500000 / 1024) Hz not in LoRa standard - **375** (384000 / 1024) Hz not in LoRa standard -The ChirpChat signal is oversampled by two therefore it needs a baseband of at least twice the bandwidth. This drives the maximum value on the slider automatically. +The Meshtastic signal is oversampled by two therefore it needs a baseband of at least twice the bandwidth. This drives the maximum value on the slider automatically.

4: De-chirped noise maximum power

@@ -154,11 +154,11 @@ A choice of FFT Windows to apply to the FFT performed on the de-chirped signal i

8: Spread Factor

-This is the Spread Factor parameter of the ChirpChat signal. This is the log2 of the FFT size used over the bandwidth (3). The number of symbols is 2SF-DE where SF is the spread factor and DE the Distance Enhancement factor (8) +This is the Spread Factor parameter of the Meshtastic signal. This is the log2 of the FFT size used over the bandwidth (3). The number of symbols is 2SF-DE where SF is the spread factor and DE the Distance Enhancement factor (8)

9: Distance Enhancement factor

-The LoRa standard specifies 0 (no DE) or 2 (DE active). The ChirpChat DE range is extended to all values between 0 and 4 bits. +The LoRa standard specifies 0 (no DE) or 2 (DE active). The Meshtastic DE range is extended to all values between 0 and 4 bits. The LoRa standard also specifies that the LowDataRateOptimizatio flag (thus DE=2 vs DE=0 here) should be set when the symbol time defined as BW / 2^SF exceeds 16 ms (See section 4.1.1.6 of the SX127x datasheet). In practice this happens for SF=11 and SF=12 and large enough bandwidths (you can do the maths). @@ -305,11 +305,11 @@ This is the UDP address and port to where the decoded message is sent when (12)

B: De-chirped spectrum

-This is the spectrum of the de-chirped signal when a ChirpChat signal can be decoded. Details on the spectrum view and controls can be found [here](../../../sdrgui/gui/spectrum.md) +This is the spectrum of the de-chirped signal when a Meshtastic signal can be decoded. Details on the spectrum view and controls can be found [here](../../../sdrgui/gui/spectrum.md) -The frequency span corresponds to the bandwidth of the ChirpChat signal (3). Default FFT size is 2SF where SF is the spread factor (7). +The frequency span corresponds to the bandwidth of the Meshtastic signal (3). Default FFT size is 2SF where SF is the spread factor (7). -Sequences of successful ChirpChat signal demodulation are separated by blank lines (generated with a string of high value bins). +Sequences of successful Meshtastic signal demodulation are separated by blank lines (generated with a string of high value bins). Controls are the usual controls of spectrum displays with the following restrictions: diff --git a/plugins/channeltx/modmeshtastic/meshtasticmod.cpp b/plugins/channeltx/modmeshtastic/meshtasticmod.cpp index 06a025e4b..a35be3b3c 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmod.cpp +++ b/plugins/channeltx/modmeshtastic/meshtasticmod.cpp @@ -499,8 +499,8 @@ int MeshtasticMod::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; - response.setChirpChatModSettings(new SWGSDRangel::SWGChirpChatModSettings()); - response.getChirpChatModSettings()->init(); + response.setMeshtasticModSettings(new SWGSDRangel::SWGMeshtasticModSettings()); + response.getMeshtasticModSettings()->init(); webapiFormatChannelSettings(response, m_settings); return 200; @@ -545,97 +545,82 @@ void MeshtasticMod::webapiUpdateChannelSettings( SWGSDRangel::SWGChannelSettings& response) { if (channelSettingsKeys.contains("inputFrequencyOffset")) { - settings.m_inputFrequencyOffset = response.getChirpChatModSettings()->getInputFrequencyOffset(); + settings.m_inputFrequencyOffset = response.getMeshtasticModSettings()->getInputFrequencyOffset(); } if (channelSettingsKeys.contains("bandwidthIndex")) { - settings.m_bandwidthIndex = response.getChirpChatModSettings()->getBandwidthIndex(); + settings.m_bandwidthIndex = response.getMeshtasticModSettings()->getBandwidthIndex(); } if (channelSettingsKeys.contains("spreadFactor")) { - settings.m_spreadFactor = response.getChirpChatModSettings()->getSpreadFactor(); + settings.m_spreadFactor = response.getMeshtasticModSettings()->getSpreadFactor(); } if (channelSettingsKeys.contains("deBits")) { - settings.m_deBits = response.getChirpChatModSettings()->getDeBits(); + settings.m_deBits = response.getMeshtasticModSettings()->getDeBits(); } if (channelSettingsKeys.contains("preambleChirps")) { - settings.m_preambleChirps = response.getChirpChatModSettings()->getPreambleChirps(); + settings.m_preambleChirps = response.getMeshtasticModSettings()->getPreambleChirps(); } if (channelSettingsKeys.contains("quietMillis")) { - settings.m_quietMillis = response.getChirpChatModSettings()->getQuietMillis(); + settings.m_quietMillis = response.getMeshtasticModSettings()->getQuietMillis(); } if (channelSettingsKeys.contains("syncWord")) { - settings.m_syncWord = response.getChirpChatModSettings()->getSyncWord(); + settings.m_syncWord = response.getMeshtasticModSettings()->getSyncWord(); } if (channelSettingsKeys.contains("syncWord")) { - settings.m_syncWord = response.getChirpChatModSettings()->getSyncWord(); + settings.m_syncWord = response.getMeshtasticModSettings()->getSyncWord(); } if (channelSettingsKeys.contains("channelMute")) { - settings.m_channelMute = response.getChirpChatModSettings()->getChannelMute() != 0; + settings.m_channelMute = response.getMeshtasticModSettings()->getChannelMute() != 0; } if (channelSettingsKeys.contains("nbParityBits")) { - settings.m_nbParityBits = response.getChirpChatModSettings()->getNbParityBits(); + settings.m_nbParityBits = response.getMeshtasticModSettings()->getNbParityBits(); } if (channelSettingsKeys.contains("textMessage")) { - settings.m_textMessage = *response.getChirpChatModSettings()->getTextMessage(); - } - if (channelSettingsKeys.contains("bytesMessage")) - { - const QList *bytesStr = response.getChirpChatModSettings()->getBytesMessage(); - settings.m_bytesMessage.clear(); - - for (QList::const_iterator it = bytesStr->begin(); it != bytesStr->end(); ++it) - { - bool bStatus = false; - unsigned int byteInt = (**it).toUInt(&bStatus, 16); - - if (bStatus) { - settings.m_bytesMessage.append((char) (byteInt % 256)); - } - } + settings.m_textMessage = *response.getMeshtasticModSettings()->getTextMessage(); } if (channelSettingsKeys.contains("messageRepeat")) { - settings.m_messageRepeat = response.getChirpChatModSettings()->getMessageRepeat(); + settings.m_messageRepeat = response.getMeshtasticModSettings()->getMessageRepeat(); } if (channelSettingsKeys.contains("udpEnabled")) { - settings.m_udpEnabled = response.getChirpChatModSettings()->getUdpEnabled(); + settings.m_udpEnabled = response.getMeshtasticModSettings()->getUdpEnabled(); } if (channelSettingsKeys.contains("udpAddress")) { - settings.m_udpAddress = *response.getChirpChatModSettings()->getUdpAddress(); + settings.m_udpAddress = *response.getMeshtasticModSettings()->getUdpAddress(); } if (channelSettingsKeys.contains("udpPort")) { - settings.m_udpPort = response.getChirpChatModSettings()->getUdpPort(); + settings.m_udpPort = response.getMeshtasticModSettings()->getUdpPort(); } if (channelSettingsKeys.contains("invertRamps")) { - settings.m_invertRamps = response.getChirpChatModSettings()->getInvertRamps(); + settings.m_invertRamps = response.getMeshtasticModSettings()->getInvertRamps(); } if (channelSettingsKeys.contains("rgbColor")) { - settings.m_rgbColor = response.getChirpChatModSettings()->getRgbColor(); + settings.m_rgbColor = response.getMeshtasticModSettings()->getRgbColor(); } if (channelSettingsKeys.contains("title")) { - settings.m_title = *response.getChirpChatModSettings()->getTitle(); + settings.m_title = *response.getMeshtasticModSettings()->getTitle(); } if (channelSettingsKeys.contains("streamIndex")) { - settings.m_streamIndex = response.getChirpChatModSettings()->getStreamIndex(); + settings.m_streamIndex = response.getMeshtasticModSettings()->getStreamIndex(); } if (channelSettingsKeys.contains("useReverseAPI")) { - settings.m_useReverseAPI = response.getChirpChatModSettings()->getUseReverseApi() != 0; + settings.m_useReverseAPI = response.getMeshtasticModSettings()->getUseReverseApi() != 0; } if (channelSettingsKeys.contains("reverseAPIAddress")) { - settings.m_reverseAPIAddress = *response.getChirpChatModSettings()->getReverseApiAddress(); + settings.m_reverseAPIAddress = *response.getMeshtasticModSettings()->getReverseApiAddress(); } if (channelSettingsKeys.contains("reverseAPIPort")) { - settings.m_reverseAPIPort = response.getChirpChatModSettings()->getReverseApiPort(); + settings.m_reverseAPIPort = response.getMeshtasticModSettings()->getReverseApiPort(); } if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) { - settings.m_reverseAPIDeviceIndex = response.getChirpChatModSettings()->getReverseApiDeviceIndex(); + settings.m_reverseAPIDeviceIndex = response.getMeshtasticModSettings()->getReverseApiDeviceIndex(); } if (channelSettingsKeys.contains("reverseAPIChannelIndex")) { - settings.m_reverseAPIChannelIndex = response.getChirpChatModSettings()->getReverseApiChannelIndex(); + settings.m_reverseAPIChannelIndex = response.getMeshtasticModSettings()->getReverseApiChannelIndex(); } if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) { - settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getChirpChatModSettings()->getChannelMarker()); + settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getMeshtasticModSettings()->getChannelMarker()); } if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) { - settings.m_rollupState->updateFrom(channelSettingsKeys, response.getChirpChatModSettings()->getChannelMarker()); + settings.m_rollupState->updateFrom(channelSettingsKeys, response.getMeshtasticModSettings()->getRollupState()); } } @@ -644,108 +629,95 @@ int MeshtasticMod::webapiReportGet( QString& errorMessage) { (void) errorMessage; - response.setChirpChatModReport(new SWGSDRangel::SWGChirpChatModReport()); - response.getChirpChatModReport()->init(); + response.setMeshtasticModReport(new SWGSDRangel::SWGMeshtasticModReport()); + response.getMeshtasticModReport()->init(); webapiFormatChannelReport(response); return 200; } void MeshtasticMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const MeshtasticModSettings& settings) { - response.getChirpChatModSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); - response.getChirpChatModSettings()->setBandwidthIndex(settings.m_bandwidthIndex); - response.getChirpChatModSettings()->setSpreadFactor(settings.m_spreadFactor); - response.getChirpChatModSettings()->setDeBits(settings.m_deBits); - response.getChirpChatModSettings()->setPreambleChirps(settings.m_preambleChirps); - response.getChirpChatModSettings()->setQuietMillis(settings.m_quietMillis); - response.getChirpChatModSettings()->setSyncWord(settings.m_syncWord); - response.getChirpChatModSettings()->setChannelMute(settings.m_channelMute ? 1 : 0); - response.getChirpChatModSettings()->setCodingScheme((int) settings.m_codingScheme); - response.getChirpChatModSettings()->setNbParityBits(settings.m_nbParityBits); - response.getChirpChatModSettings()->setHasCrc(settings.m_hasCRC ? 1 : 0); - response.getChirpChatModSettings()->setHasHeader(settings.m_hasHeader ? 1 : 0); - response.getChirpChatModSettings()->setMessageType((int) settings.m_messageType); + response.getMeshtasticModSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); + response.getMeshtasticModSettings()->setBandwidthIndex(settings.m_bandwidthIndex); + response.getMeshtasticModSettings()->setSpreadFactor(settings.m_spreadFactor); + response.getMeshtasticModSettings()->setDeBits(settings.m_deBits); + response.getMeshtasticModSettings()->setPreambleChirps(settings.m_preambleChirps); + response.getMeshtasticModSettings()->setQuietMillis(settings.m_quietMillis); + response.getMeshtasticModSettings()->setSyncWord(settings.m_syncWord); + response.getMeshtasticModSettings()->setChannelMute(settings.m_channelMute ? 1 : 0); + response.getMeshtasticModSettings()->setNbParityBits(settings.m_nbParityBits); - if (response.getChirpChatModSettings()->getTextMessage()) { - *response.getChirpChatModSettings()->getTextMessage() = settings.m_textMessage; + if (response.getMeshtasticModSettings()->getTextMessage()) { + *response.getMeshtasticModSettings()->getTextMessage() = settings.m_textMessage; } else { - response.getChirpChatModSettings()->setTextMessage(new QString(settings.m_textMessage)); + response.getMeshtasticModSettings()->setTextMessage(new QString(settings.m_textMessage)); } - response.getChirpChatModSettings()->setBytesMessage(new QList); - QList *bytesStr = response.getChirpChatModSettings()->getBytesMessage(); + response.getMeshtasticModSettings()->setMessageRepeat(settings.m_messageRepeat); + response.getMeshtasticModSettings()->setUdpEnabled(settings.m_udpEnabled); + response.getMeshtasticModSettings()->setUdpAddress(new QString(settings.m_udpAddress)); + response.getMeshtasticModSettings()->setUdpPort(settings.m_udpPort); + response.getMeshtasticModSettings()->setInvertRamps(settings.m_invertRamps ? 1 : 0); - for (QByteArray::const_iterator it = settings.m_bytesMessage.begin(); it != settings.m_bytesMessage.end(); ++it) - { - unsigned char b = *it; - bytesStr->push_back(new QString(tr("%1").arg(b, 2, 16, QChar('0')))); - } + response.getMeshtasticModSettings()->setRgbColor(settings.m_rgbColor); - response.getChirpChatModSettings()->setMessageRepeat(settings.m_messageRepeat); - response.getChirpChatModSettings()->setUdpEnabled(settings.m_udpEnabled); - response.getChirpChatModSettings()->setUdpAddress(new QString(settings.m_udpAddress)); - response.getChirpChatModSettings()->setUdpPort(settings.m_udpPort); - response.getChirpChatModSettings()->setInvertRamps(settings.m_invertRamps ? 1 : 0); - - response.getChirpChatModSettings()->setRgbColor(settings.m_rgbColor); - - if (response.getChirpChatModSettings()->getTitle()) { - *response.getChirpChatModSettings()->getTitle() = settings.m_title; + if (response.getMeshtasticModSettings()->getTitle()) { + *response.getMeshtasticModSettings()->getTitle() = settings.m_title; } else { - response.getChirpChatModSettings()->setTitle(new QString(settings.m_title)); + response.getMeshtasticModSettings()->setTitle(new QString(settings.m_title)); } - response.getChirpChatModSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); + response.getMeshtasticModSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); - if (response.getChirpChatModSettings()->getReverseApiAddress()) { - *response.getChirpChatModSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress; + if (response.getMeshtasticModSettings()->getReverseApiAddress()) { + *response.getMeshtasticModSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress; } else { - response.getChirpChatModSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress)); + response.getMeshtasticModSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress)); } - response.getChirpChatModSettings()->setReverseApiPort(settings.m_reverseAPIPort); - response.getChirpChatModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); - response.getChirpChatModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex); + response.getMeshtasticModSettings()->setReverseApiPort(settings.m_reverseAPIPort); + response.getMeshtasticModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); + response.getMeshtasticModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex); if (settings.m_channelMarker) { - if (response.getChirpChatModSettings()->getChannelMarker()) + if (response.getMeshtasticModSettings()->getChannelMarker()) { - settings.m_channelMarker->formatTo(response.getChirpChatModSettings()->getChannelMarker()); + settings.m_channelMarker->formatTo(response.getMeshtasticModSettings()->getChannelMarker()); } else { SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); settings.m_channelMarker->formatTo(swgChannelMarker); - response.getChirpChatModSettings()->setChannelMarker(swgChannelMarker); + response.getMeshtasticModSettings()->setChannelMarker(swgChannelMarker); } } if (settings.m_rollupState) { - if (response.getChirpChatModSettings()->getRollupState()) + if (response.getMeshtasticModSettings()->getRollupState()) { - settings.m_rollupState->formatTo(response.getChirpChatModSettings()->getRollupState()); + settings.m_rollupState->formatTo(response.getMeshtasticModSettings()->getRollupState()); } else { SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState(); settings.m_rollupState->formatTo(swgRollupState); - response.getChirpChatModSettings()->setRollupState(swgRollupState); + response.getMeshtasticModSettings()->setRollupState(swgRollupState); } } } void MeshtasticMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) { - response.getChirpChatModReport()->setChannelPowerDb(CalcDb::dbPower(getMagSq())); - response.getChirpChatModReport()->setChannelSampleRate(m_basebandSource->getChannelSampleRate()); + response.getMeshtasticModReport()->setChannelPowerDb(CalcDb::dbPower(getMagSq())); + response.getMeshtasticModReport()->setChannelSampleRate(m_basebandSource->getChannelSampleRate()); float fourthsMs = ((1<setPayloadTimeMs(m_currentPayloadTime); - response.getChirpChatModReport()->setTotalTimeMs(m_currentPayloadTime + controlMs); - response.getChirpChatModReport()->setSymbolTimeMs(4.0 * fourthsMs); - response.getChirpChatModReport()->setPlaying(getModulatorActive() ? 1 : 0); + response.getMeshtasticModReport()->setPayloadTimeMs(m_currentPayloadTime); + response.getMeshtasticModReport()->setTotalTimeMs(m_currentPayloadTime + controlMs); + response.getMeshtasticModReport()->setSymbolTimeMs(4.0 * fourthsMs); + response.getMeshtasticModReport()->setPlaying(getModulatorActive() ? 1 : 0); } void MeshtasticMod::webapiReverseSendSettings(QList& channelSettingsKeys, const MeshtasticModSettings& settings, bool force) @@ -809,8 +781,8 @@ void MeshtasticMod::webapiFormatChannelSettings( swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet()); swgChannelSettings->setOriginatorDeviceSetIndex(getDeviceSetIndex()); swgChannelSettings->setChannelType(new QString(m_channelId)); - swgChannelSettings->setChirpChatModSettings(new SWGSDRangel::SWGChirpChatModSettings()); - SWGSDRangel::SWGChirpChatModSettings *swgMeshtasticModSettings = swgChannelSettings->getChirpChatModSettings(); + swgChannelSettings->setMeshtasticModSettings(new SWGSDRangel::SWGMeshtasticModSettings()); + SWGSDRangel::SWGMeshtasticModSettings *swgMeshtasticModSettings = swgChannelSettings->getMeshtasticModSettings(); // transfer data that has been modified. When force is on transfer all data except reverse API data @@ -838,37 +810,13 @@ void MeshtasticMod::webapiFormatChannelSettings( if (channelSettingsKeys.contains("channelMute") || force) { swgMeshtasticModSettings->setChannelMute(settings.m_channelMute ? 1 : 0); } - if (channelSettingsKeys.contains("codingScheme") || force) { - swgMeshtasticModSettings->setCodingScheme((int) settings.m_codingScheme); - } if (channelSettingsKeys.contains("nbParityBits") || force) { swgMeshtasticModSettings->setNbParityBits(settings.m_nbParityBits); } - if (channelSettingsKeys.contains("hasCRC") || force) { - swgMeshtasticModSettings->setHasCrc(settings.m_hasCRC ? 1 : 0); - } - if (channelSettingsKeys.contains("hasHeader") || force) { - swgMeshtasticModSettings->setHasHeader(settings.m_hasHeader ? 1 : 0); - } - if (channelSettingsKeys.contains("messageType") || force) { - swgMeshtasticModSettings->setMessageType((int) settings.m_messageType); - } if (channelSettingsKeys.contains("textMessage") || force) { swgMeshtasticModSettings->setTextMessage(new QString(settings.m_textMessage)); } - if (channelSettingsKeys.contains("bytesMessage") || force) - { - swgMeshtasticModSettings->setBytesMessage(new QList); - QList *bytesStr = swgMeshtasticModSettings-> getBytesMessage(); - - for (QByteArray::const_iterator it = settings.m_bytesMessage.begin(); it != settings.m_bytesMessage.end(); ++it) - { - unsigned char b = *it; - bytesStr->push_back(new QString(tr("%1").arg(b, 2, 16, QChar('0')))); - } - } - if (channelSettingsKeys.contains("messageRepeat") || force) { swgMeshtasticModSettings->setMessageRepeat(settings.m_messageRepeat); } diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index ff970f4ca..b2572adbc 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -4033,6 +4033,12 @@ margin-bottom: 20px; "M17ModReport" : { "$ref" : "#/definitions/M17ModReport" }, + "MeshtasticDemodReport" : { + "$ref" : "#/definitions/MeshtasticDemodReport" + }, + "MeshtasticModReport" : { + "$ref" : "#/definitions/MeshtasticModReport" + }, "NavtexDemodReport" : { "$ref" : "#/definitions/NavtexDemodReport" }, @@ -4230,6 +4236,12 @@ margin-bottom: 20px; "M17ModSettings" : { "$ref" : "#/definitions/M17ModSettings" }, + "MeshtasticDemodSettings" : { + "$ref" : "#/definitions/MeshtasticDemodSettings" + }, + "MeshtasticModSettings" : { + "$ref" : "#/definitions/MeshtasticModSettings" + }, "NavtexDemodSettings" : { "$ref" : "#/definitions/NavtexDemodSettings" }, @@ -10849,6 +10861,324 @@ margin-bottom: 20px; } }, "description" : "Map" +}; + defs.MeshtasticDemodReport = { + "properties" : { + "channelPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "current de-chirped total channel power (dB)" + }, + "noisePowerDB" : { + "type" : "number", + "format" : "float", + "description" : "current de-chirped noise argmax power (dB)" + }, + "signalPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "last message de-chirped signal argmax power (dB)" + }, + "snrPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "last message de-chirped signal to noise ratio power (dB)" + }, + "channelSampleRate" : { + "type" : "integer" + }, + "syncWord" : { + "type" : "integer", + "description" : "2 bytes sync word (0..65535)" + }, + "nbParityBits" : { + "type" : "integer", + "description" : "Hamming FEC parity bits (LoRa)" + }, + "packetLength" : { + "type" : "integer", + "description" : "Packet length in number of bytes (LoRa)" + }, + "nbSymbols" : { + "type" : "integer", + "description" : "Number of symbols in the payload with header and CRC (LoRa)" + }, + "nbCodewords" : { + "type" : "integer", + "description" : "Number of codewords in the payload with header and CRC (LoRa)" + }, + "headerParityStatus" : { + "type" : "integer", + "description" : "Header FEC parity status:\n * 0 - Undefined\n * 1 - Uncorrectable error\n * 2 - Corrected error\n * 3 - OK\n" + }, + "headerCRCStatus" : { + "type" : "integer", + "description" : "header CRC check status. Boolean 1 if OK else 0" + }, + "payloadParityStatus" : { + "type" : "integer", + "description" : "Payload FEC parity status:\n * 0 - Undefined\n * 1 - Uncorrectable error\n * 2 - Corrected error\n * 3 - OK\n" + }, + "payloadCRCStatus" : { + "type" : "integer", + "description" : "payload CRC check status. Boolean 1 if OK else 0" + }, + "messageTimestamp" : { + "type" : "string", + "description" : "timestamp of the last decoded message" + }, + "messageString" : { + "type" : "string", + "description" : "string representation of the last decoded message" + }, + "frameType" : { + "type" : "string", + "description" : "frame type shown in the GUI tree view (for example LORA_FRAME or POSITION_APP)" + }, + "channelType" : { + "type" : "string", + "description" : "Channel type code e.g. LONG_FAST" + }, + "messageBytes" : { + "type" : "array", + "description" : "bytes of the last decoded message as an array of hex string represented bytes (00..FF)", + "items" : { + "type" : "string" + } + }, + "decoding" : { + "type" : "integer", + "description" : "Boolean - decoding status\n * 0 - no decoding\n * 1 - decoding\n" + } + }, + "description" : "MeshtasticDemod" +}; + defs.MeshtasticDemodSettings = { + "properties" : { + "inputFrequencyOffset" : { + "type" : "integer", + "format" : "int64" + }, + "bandwidthIndex" : { + "type" : "integer", + "description" : "standard bandwidths index:\n * 0 - 375 Hz (384000 / 1024)\n * 1 - 750 Hz (384000 / 512)\n * 2 - 1500 Hz (384000 / 256)\n * 3 - 2604 Hz (333333 / 128)\n * 4 - 3125 Hz (400000 / 128)\n * 5 - 3906 Hz (500000 / 128)\n * 6 - 5208 Hz (333333 / 64)\n * 7 - 6250 Hz (400000 / 64)\n * 8 - 7813 Hz (500000 / 64)\n * 9 - 10417 Hz (333333 / 32)\n * 10 - 12500 Hz (400000 / 32)\n * 11 - 15625 Hz (500000 / 32)\n * 12 - 20833 Hz (333333 / 16)\n * 13 - 25000 Hz (400000 / 16)\n * 14 - 31250 Hz (500000 / 16)\n * 15 - 41667 Hz (333333 / 8)\n * 16 - 50000 Hz (400000 / 8)\n * 17 - 62500 Hz (500000 / 8)\n * 18 - 83333 Hz (333333 / 4)\n * 19 - 100000 Hz (400000 / 4)\n * 20 - 125000 Hz (500000 / 4)\n * 21 - 166667 Hz (333333 / 2)\n * 22 - 200000 Hz (400000 / 2)\n * 23 - 250000 Hz (500000 / 2)\n * 24 - 333333 Hz (333333 / 1)\n * 25 - 400000 Hz (400000 / 1)\n * 26 - 500000 Hz (500000 / 1)\n" + }, + "spreadFactor" : { + "type" : "integer" + }, + "deBits" : { + "type" : "integer", + "description" : "Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol" + }, + "decodeActive" : { + "type" : "integer", + "description" : "boolean 1 to activate 0 to de-activate decoder" + }, + "eomSquelchTenths" : { + "type" : "integer", + "description" : "argmax squared magnitude is compared between current multiplied by this factor and maximum during decoding. This value is divided by 10" + }, + "nbSymbolsMax" : { + "type" : "integer", + "description" : "expected maximum number of symbols in a payload" + }, + "preambleChirps" : { + "type" : "integer", + "description" : "Number of expected preamble chirps" + }, + "nbParityBits" : { + "type" : "integer", + "description" : "Hamming FEC parity bits (LoRa)" + }, + "packetLength" : { + "type" : "integer", + "description" : "expected packet length in number of bytes (LoRa)" + }, + "sendViaUDP" : { + "type" : "integer", + "description" : "boolean 1 to send decoded message via UDP else 0" + }, + "udpEnabled" : { + "type" : "integer", + "description" : "Boolean - Send via UDP\n * 0 - Do not send decoded messages via UDP\n * 1 - Send decoded messages via UDP\n" + }, + "udpAddress" : { + "type" : "string", + "description" : "UDP destination udpAddress" + }, + "udpPort" : { + "type" : "integer", + "description" : "UDP destination port" + }, + "invertRamps" : { + "type" : "integer", + "description" : "Invert chirp ramps\n * 0 - Normal chirp ramps (upchirps for preamble and payload)\n * 1 - Inverted chirp ramps (downchirps for preamble and payload)\n" + }, + "rgbColor" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + }, + "streamIndex" : { + "type" : "integer", + "description" : "MIMO channel. Not relevant when connected to SI (single Rx)." + }, + "useReverseAPI" : { + "type" : "integer", + "description" : "Synchronize with reverse API (1 for yes, 0 for no)" + }, + "reverseAPIAddress" : { + "type" : "string" + }, + "reverseAPIPort" : { + "type" : "integer" + }, + "reverseAPIDeviceIndex" : { + "type" : "integer" + }, + "reverseAPIChannelIndex" : { + "type" : "integer" + }, + "spectrumConfig" : { + "$ref" : "#/definitions/GLSpectrum" + }, + "channelMarker" : { + "$ref" : "#/definitions/ChannelMarker" + }, + "rollupState" : { + "$ref" : "#/definitions/RollupState" + } + }, + "description" : "MeshtasticDemod" +}; + defs.MeshtasticModReport = { + "properties" : { + "channelPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "power transmitted in channel (dB)" + }, + "channelSampleRate" : { + "type" : "integer" + }, + "symbolTimeMs" : { + "type" : "number", + "format" : "float", + "description" : "symbol duration (ms)" + }, + "payloadTimeMs" : { + "type" : "number", + "format" : "float", + "description" : "payload duration (ms)" + }, + "totalTimeMs" : { + "type" : "number", + "format" : "float", + "description" : "total message duration inc. preamble and SFD (ms)" + }, + "playing" : { + "type" : "integer", + "description" : "Boolean - modulator is active (playing) including idle time\n * 0 - Modulator not active\n * 1 - Modulator active\n" + } + }, + "description" : "MeshtasticMod" +}; + defs.MeshtasticModSettings = { + "properties" : { + "inputFrequencyOffset" : { + "type" : "integer", + "format" : "int64" + }, + "bandwidthIndex" : { + "type" : "integer", + "description" : "standard bandwidths index:\n * 0 - 375 Hz (384000 / 1024)\n * 1 - 750 Hz (384000 / 512)\n * 2 - 1500 Hz (384000 / 256)\n * 3 - 2604 Hz (333333 / 128)\n * 4 - 3125 Hz (400000 / 128)\n * 5 - 3906 Hz (500000 / 128)\n * 6 - 5208 Hz (333333 / 64)\n * 7 - 6250 Hz (400000 / 64)\n * 8 - 7813 Hz (500000 / 64)\n * 9 - 10417 Hz (333333 / 32)\n * 10 - 12500 Hz (400000 / 32)\n * 11 - 15625 Hz (500000 / 32)\n * 12 - 20833 Hz (333333 / 16)\n * 13 - 25000 Hz (400000 / 16)\n * 14 - 31250 Hz (500000 / 16)\n * 15 - 41667 Hz (333333 / 8)\n * 16 - 50000 Hz (400000 / 8)\n * 17 - 62500 Hz (500000 / 8)\n * 18 - 83333 Hz (333333 / 4)\n * 19 - 100000 Hz (400000 / 4)\n * 20 - 125000 Hz (500000 / 4)\n * 21 - 166667 Hz (333333 / 2)\n * 22 - 200000 Hz (400000 / 2)\n * 23 - 250000 Hz (500000 / 2)\n * 24 - 333333 Hz (333333 / 1)\n * 25 - 400000 Hz (400000 / 1)\n * 26 - 500000 Hz (500000 / 1)\n" + }, + "spreadFactor" : { + "type" : "integer" + }, + "deBits" : { + "type" : "integer", + "description" : "Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol" + }, + "preambleChirps" : { + "type" : "integer", + "description" : "Number of preamble chirps" + }, + "quietMillis" : { + "type" : "integer", + "description" : "Number of milliseconds to pause between transmissions" + }, + "syncWord" : { + "type" : "integer", + "description" : "2 byte (0..65535) synchronization syncWord" + }, + "channelMute" : { + "type" : "integer", + "description" : "boolean" + }, + "nbParityBits" : { + "type" : "integer", + "description" : "Hamming FEC parity bits (LoRa)" + }, + "textMessage" : { + "type" : "string", + "description" : "freeform text message" + }, + "messageRepeat" : { + "type" : "integer", + "description" : "number of repetitions of the same message (0 for infinite)" + }, + "udpEnabled" : { + "type" : "integer", + "description" : "boolean 1 to enable forwarding messages via UDP else 0" + }, + "udpAddress" : { + "type" : "string", + "description" : "UDP address to listen for messages to transmit on" + }, + "udpPort" : { + "type" : "integer", + "description" : "UDP port to listen for messages to transmit on" + }, + "invertRamps" : { + "type" : "integer", + "description" : "Invert chirp ramps\n * 0 - Normal chirp ramps (upchirps for preamble and payload)\n * 1 - Inverted chirp ramps (downchirps for preamble and payload)\n" + }, + "rgbColor" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + }, + "streamIndex" : { + "type" : "integer", + "description" : "MIMO channel. Not relevant when connected to SI (single Rx)." + }, + "useReverseAPI" : { + "type" : "integer", + "description" : "Synchronize with reverse API (1 for yes, 0 for no)" + }, + "reverseAPIAddress" : { + "type" : "string" + }, + "reverseAPIPort" : { + "type" : "integer" + }, + "reverseAPIDeviceIndex" : { + "type" : "integer" + }, + "reverseAPIChannelIndex" : { + "type" : "integer" + }, + "channelMarker" : { + "$ref" : "#/definitions/ChannelMarker" + }, + "rollupState" : { + "$ref" : "#/definitions/RollupState" + } + }, + "description" : "MeshtasticMod" }; defs.MetisMISOSettings = { "properties" : { @@ -59982,7 +60312,7 @@ except ApiException as e:
- Generated 2026-02-07T23:22:00.482+01:00 + Generated 2026-03-22T19:58:59.376+01:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/ChannelReport.yaml b/sdrbase/resources/webapi/doc/swagger/include/ChannelReport.yaml index e59ad2003..524401bf3 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/ChannelReport.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/ChannelReport.yaml @@ -69,6 +69,10 @@ ChannelReport: $ref: "/doc/swagger/include/M17Demod.yaml#/M17DemodReport" M17ModReport: $ref: "/doc/swagger/include/M17Mod.yaml#/M17ModReport" + MeshtasticDemodReport: + $ref: "/doc/swagger/include/MeshtasticDemod.yaml#/MeshtasticDemodReport" + MeshtasticModReport: + $ref: "/doc/swagger/include/MeshtasticMod.yaml#/MeshtasticModReport" NavtexDemodReport: $ref: "/doc/swagger/include/NavtexDemod.yaml#/NavtexDemodReport" NFMDemodReport: diff --git a/sdrbase/resources/webapi/doc/swagger/include/ChannelSettings.yaml b/sdrbase/resources/webapi/doc/swagger/include/ChannelSettings.yaml index a7718035a..f4e18c23c 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/ChannelSettings.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/ChannelSettings.yaml @@ -87,6 +87,10 @@ ChannelSettings: $ref: "/doc/swagger/include/M17Demod.yaml#/M17DemodSettings" M17ModSettings: $ref: "/doc/swagger/include/M17Mod.yaml#/M17ModSettings" + MeshtasticDemodSettings: + $ref: "/doc/swagger/include/MeshtasticDemod.yaml#/MeshtasticDemodSettings" + MeshtasticModSettings: + $ref: "/doc/swagger/include/MeshtasticMod.yaml#/MeshtasticModSettings" NavtexDemodSettings: $ref: "/doc/swagger/include/NavtexDemod.yaml#/NavtexDemodSettings" NFMDemodSettings: diff --git a/sdrbase/resources/webapi/doc/swagger/include/MeshtasticDemod.yaml b/sdrbase/resources/webapi/doc/swagger/include/MeshtasticDemod.yaml new file mode 100644 index 000000000..7666da80b --- /dev/null +++ b/sdrbase/resources/webapi/doc/swagger/include/MeshtasticDemod.yaml @@ -0,0 +1,187 @@ +MeshtasticDemodSettings: + description: MeshtasticDemod + properties: + inputFrequencyOffset: + type: integer + format: int64 + bandwidthIndex: + type: integer + description: > + standard bandwidths index: + * 0 - 375 Hz (384000 / 1024) + * 1 - 750 Hz (384000 / 512) + * 2 - 1500 Hz (384000 / 256) + * 3 - 2604 Hz (333333 / 128) + * 4 - 3125 Hz (400000 / 128) + * 5 - 3906 Hz (500000 / 128) + * 6 - 5208 Hz (333333 / 64) + * 7 - 6250 Hz (400000 / 64) + * 8 - 7813 Hz (500000 / 64) + * 9 - 10417 Hz (333333 / 32) + * 10 - 12500 Hz (400000 / 32) + * 11 - 15625 Hz (500000 / 32) + * 12 - 20833 Hz (333333 / 16) + * 13 - 25000 Hz (400000 / 16) + * 14 - 31250 Hz (500000 / 16) + * 15 - 41667 Hz (333333 / 8) + * 16 - 50000 Hz (400000 / 8) + * 17 - 62500 Hz (500000 / 8) + * 18 - 83333 Hz (333333 / 4) + * 19 - 100000 Hz (400000 / 4) + * 20 - 125000 Hz (500000 / 4) + * 21 - 166667 Hz (333333 / 2) + * 22 - 200000 Hz (400000 / 2) + * 23 - 250000 Hz (500000 / 2) + * 24 - 333333 Hz (333333 / 1) + * 25 - 400000 Hz (400000 / 1) + * 26 - 500000 Hz (500000 / 1) + spreadFactor: + type: integer + deBits: + description: Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol + type: integer + decodeActive: + description: boolean 1 to activate 0 to de-activate decoder + type: integer + eomSquelchTenths: + description: argmax squared magnitude is compared between current multiplied by this factor and maximum during decoding. This value is divided by 10 + type: integer + nbSymbolsMax: + description: expected maximum number of symbols in a payload + type: integer + preambleChirps: + description: Number of expected preamble chirps + type: integer + nbParityBits: + description: Hamming FEC parity bits (LoRa) + type: integer + packetLength: + description: expected packet length in number of bytes (LoRa) + type: integer + sendViaUDP: + description: boolean 1 to send decoded message via UDP else 0 + type: integer + udpEnabled: + type: integer + description: > + Boolean - Send via UDP + * 0 - Do not send decoded messages via UDP + * 1 - Send decoded messages via UDP + udpAddress: + description: UDP destination udpAddress + type: string + udpPort: + description: UDP destination port + type: integer + invertRamps: + type: integer + description: > + Invert chirp ramps + * 0 - Normal chirp ramps (upchirps for preamble and payload) + * 1 - Inverted chirp ramps (downchirps for preamble and payload) + rgbColor: + type: integer + title: + type: string + streamIndex: + description: MIMO channel. Not relevant when connected to SI (single Rx). + type: integer + useReverseAPI: + description: Synchronize with reverse API (1 for yes, 0 for no) + type: integer + reverseAPIAddress: + type: string + reverseAPIPort: + type: integer + reverseAPIDeviceIndex: + type: integer + reverseAPIChannelIndex: + type: integer + spectrumConfig: + $ref: "/doc/swagger/include/GLSpectrum.yaml#/GLSpectrum" + channelMarker: + $ref: "/doc/swagger/include/ChannelMarker.yaml#/ChannelMarker" + rollupState: + $ref: "/doc/swagger/include/RollupState.yaml#/RollupState" + +MeshtasticDemodReport: + description: MeshtasticDemod + properties: + channelPowerDB: + description: current de-chirped total channel power (dB) + type: number + format: float + noisePowerDB: + description: current de-chirped noise argmax power (dB) + type: number + format: float + signalPowerDB: + description: last message de-chirped signal argmax power (dB) + type: number + format: float + snrPowerDB: + description: last message de-chirped signal to noise ratio power (dB) + type: number + format: float + channelSampleRate: + type: integer + syncWord: + description: 2 bytes sync word (0..65535) + type: integer + nbParityBits: + description: Hamming FEC parity bits (LoRa) + type: integer + packetLength: + description: Packet length in number of bytes (LoRa) + type: integer + nbSymbols: + description: Number of symbols in the payload with header and CRC (LoRa) + type: integer + nbCodewords: + description: Number of codewords in the payload with header and CRC (LoRa) + type: integer + headerParityStatus: + type: integer + description: > + Header FEC parity status: + * 0 - Undefined + * 1 - Uncorrectable error + * 2 - Corrected error + * 3 - OK + headerCRCStatus: + description: header CRC check status. Boolean 1 if OK else 0 + type: integer + payloadParityStatus: + type: integer + description: > + Payload FEC parity status: + * 0 - Undefined + * 1 - Uncorrectable error + * 2 - Corrected error + * 3 - OK + payloadCRCStatus: + description: payload CRC check status. Boolean 1 if OK else 0 + type: integer + messageTimestamp: + description: timestamp of the last decoded message + type: string + messageString: + description: string representation of the last decoded message + type: string + frameType: + description: frame type shown in the GUI tree view (for example LORA_FRAME or POSITION_APP) + type: string + channelType: + description: Channel type code e.g. LONG_FAST + type: string + messageBytes: + description: bytes of the last decoded message as an array of hex string represented bytes (00..FF) + type: array + items: + type: string + decoding: + type: integer + description: > + Boolean - decoding status + * 0 - no decoding + * 1 - decoding diff --git a/sdrbase/resources/webapi/doc/swagger/include/MeshtasticMod.yaml b/sdrbase/resources/webapi/doc/swagger/include/MeshtasticMod.yaml new file mode 100644 index 000000000..becee7420 --- /dev/null +++ b/sdrbase/resources/webapi/doc/swagger/include/MeshtasticMod.yaml @@ -0,0 +1,128 @@ +MeshtasticModSettings: + description: MeshtasticMod + properties: + inputFrequencyOffset: + type: integer + format: int64 + bandwidthIndex: + type: integer + description: > + standard bandwidths index: + * 0 - 375 Hz (384000 / 1024) + * 1 - 750 Hz (384000 / 512) + * 2 - 1500 Hz (384000 / 256) + * 3 - 2604 Hz (333333 / 128) + * 4 - 3125 Hz (400000 / 128) + * 5 - 3906 Hz (500000 / 128) + * 6 - 5208 Hz (333333 / 64) + * 7 - 6250 Hz (400000 / 64) + * 8 - 7813 Hz (500000 / 64) + * 9 - 10417 Hz (333333 / 32) + * 10 - 12500 Hz (400000 / 32) + * 11 - 15625 Hz (500000 / 32) + * 12 - 20833 Hz (333333 / 16) + * 13 - 25000 Hz (400000 / 16) + * 14 - 31250 Hz (500000 / 16) + * 15 - 41667 Hz (333333 / 8) + * 16 - 50000 Hz (400000 / 8) + * 17 - 62500 Hz (500000 / 8) + * 18 - 83333 Hz (333333 / 4) + * 19 - 100000 Hz (400000 / 4) + * 20 - 125000 Hz (500000 / 4) + * 21 - 166667 Hz (333333 / 2) + * 22 - 200000 Hz (400000 / 2) + * 23 - 250000 Hz (500000 / 2) + * 24 - 333333 Hz (333333 / 1) + * 25 - 400000 Hz (400000 / 1) + * 26 - 500000 Hz (500000 / 1) + spreadFactor: + type: integer + deBits: + description: Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol + type: integer + preambleChirps: + description: Number of preamble chirps + type: integer + quietMillis: + description: Number of milliseconds to pause between transmissions + type: integer + syncWord: + description: 2 byte (0..65535) synchronization syncWord + type: integer + channelMute: + description: boolean + type: integer + nbParityBits: + description: Hamming FEC parity bits (LoRa) + type: integer + textMessage: + description: freeform text message + type: string + messageRepeat: + description: number of repetitions of the same message (0 for infinite) + type: integer + udpEnabled: + description: boolean 1 to enable forwarding messages via UDP else 0 + type: integer + udpAddress: + description: UDP address to listen for messages to transmit on + type: string + udpPort: + description: UDP port to listen for messages to transmit on + type: integer + invertRamps: + type: integer + description: > + Invert chirp ramps + * 0 - Normal chirp ramps (upchirps for preamble and payload) + * 1 - Inverted chirp ramps (downchirps for preamble and payload) + rgbColor: + type: integer + title: + type: string + streamIndex: + description: MIMO channel. Not relevant when connected to SI (single Rx). + type: integer + useReverseAPI: + description: Synchronize with reverse API (1 for yes, 0 for no) + type: integer + reverseAPIAddress: + type: string + reverseAPIPort: + type: integer + reverseAPIDeviceIndex: + type: integer + reverseAPIChannelIndex: + type: integer + channelMarker: + $ref: "/doc/swagger/include/ChannelMarker.yaml#/ChannelMarker" + rollupState: + $ref: "/doc/swagger/include/RollupState.yaml#/RollupState" + +MeshtasticModReport: + description: MeshtasticMod + properties: + channelPowerDB: + description: power transmitted in channel (dB) + type: number + format: float + channelSampleRate: + type: integer + symbolTimeMs: + description: symbol duration (ms) + type: number + format: float + payloadTimeMs: + description: payload duration (ms) + type: number + format: float + totalTimeMs: + description: total message duration inc. preamble and SFD (ms) + type: number + format: float + playing: + type: integer + description: > + Boolean - modulator is active (playing) including idle time + * 0 - Modulator not active + * 1 - Modulator active diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index edc59c566..50417187c 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -4625,6 +4625,18 @@ bool WebAPIRequestMapper::getChannelSettings( channelSettings->getM17ModSettings()->init(); channelSettings->getM17ModSettings()->fromJsonObject(settingsJsonObject); } + else if (channelSettingsKey == "MeshtasticDemodSettings") + { + channelSettings->setMeshtasticDemodSettings(new SWGSDRangel::SWGMeshtasticDemodSettings()); + channelSettings->getMeshtasticDemodSettings()->init(); + channelSettings->getMeshtasticDemodSettings()->fromJsonObject(settingsJsonObject); + } + else if (channelSettingsKey == "MeshtasticModSettings") + { + channelSettings->setMeshtasticModSettings(new SWGSDRangel::SWGMeshtasticModSettings()); + channelSettings->getMeshtasticModSettings()->init(); + channelSettings->getMeshtasticModSettings()->fromJsonObject(settingsJsonObject); + } else if (channelSettingsKey == "NFMDemodSettings") { channelSettings->setNfmDemodSettings(new SWGSDRangel::SWGNFMDemodSettings()); @@ -5719,4 +5731,3 @@ void WebAPIRequestMapper::resetFeatureActions(SWGSDRangel::SWGFeatureActions& fe featureActions.setStarTrackerActions(nullptr); featureActions.setVorLocalizerActions(nullptr); } - diff --git a/swagger/sdrangel/api/swagger/include/ChannelReport.yaml b/swagger/sdrangel/api/swagger/include/ChannelReport.yaml index 5afdbafbc..a8cbc4e82 100644 --- a/swagger/sdrangel/api/swagger/include/ChannelReport.yaml +++ b/swagger/sdrangel/api/swagger/include/ChannelReport.yaml @@ -69,6 +69,10 @@ ChannelReport: $ref: "http://swgserver:8081/api/swagger/include/M17Demod.yaml#/M17DemodReport" M17ModReport: $ref: "http://swgserver:8081/api/swagger/include/M17Mod.yaml#/M17ModReport" + MeshtasticDemodReport: + $ref: "http://swgserver:8081/api/swagger/include/MeshtasticDemod.yaml#/MeshtasticDemodReport" + MeshtasticModReport: + $ref: "http://swgserver:8081/api/swagger/include/MeshtasticMod.yaml#/MeshtasticModReport" NavtexDemodReport: $ref: "http://swgserver:8081/api/swagger/include/NavtexDemod.yaml#/NavtexDemodReport" NFMDemodReport: diff --git a/swagger/sdrangel/api/swagger/include/ChannelSettings.yaml b/swagger/sdrangel/api/swagger/include/ChannelSettings.yaml index 7d35c9fe1..20c641069 100644 --- a/swagger/sdrangel/api/swagger/include/ChannelSettings.yaml +++ b/swagger/sdrangel/api/swagger/include/ChannelSettings.yaml @@ -87,6 +87,10 @@ ChannelSettings: $ref: "http://swgserver:8081/api/swagger/include/M17Demod.yaml#/M17DemodSettings" M17ModSettings: $ref: "http://swgserver:8081/api/swagger/include/M17Mod.yaml#/M17ModSettings" + MeshtasticDemodSettings: + $ref: "http://swgserver:8081/api/swagger/include/MeshtasticDemod.yaml#/MeshtasticDemodSettings" + MeshtasticModSettings: + $ref: "http://swgserver:8081/api/swagger/include/MeshtasticMod.yaml#/MeshtasticModSettings" NavtexDemodSettings: $ref: "http://swgserver:8081/api/swagger/include/NavtexDemod.yaml#/NavtexDemodSettings" NFMDemodSettings: diff --git a/swagger/sdrangel/api/swagger/include/MeshtasticDemod.yaml b/swagger/sdrangel/api/swagger/include/MeshtasticDemod.yaml new file mode 100644 index 000000000..15b19c688 --- /dev/null +++ b/swagger/sdrangel/api/swagger/include/MeshtasticDemod.yaml @@ -0,0 +1,187 @@ +MeshtasticDemodSettings: + description: MeshtasticDemod + properties: + inputFrequencyOffset: + type: integer + format: int64 + bandwidthIndex: + type: integer + description: > + standard bandwidths index: + * 0 - 375 Hz (384000 / 1024) + * 1 - 750 Hz (384000 / 512) + * 2 - 1500 Hz (384000 / 256) + * 3 - 2604 Hz (333333 / 128) + * 4 - 3125 Hz (400000 / 128) + * 5 - 3906 Hz (500000 / 128) + * 6 - 5208 Hz (333333 / 64) + * 7 - 6250 Hz (400000 / 64) + * 8 - 7813 Hz (500000 / 64) + * 9 - 10417 Hz (333333 / 32) + * 10 - 12500 Hz (400000 / 32) + * 11 - 15625 Hz (500000 / 32) + * 12 - 20833 Hz (333333 / 16) + * 13 - 25000 Hz (400000 / 16) + * 14 - 31250 Hz (500000 / 16) + * 15 - 41667 Hz (333333 / 8) + * 16 - 50000 Hz (400000 / 8) + * 17 - 62500 Hz (500000 / 8) + * 18 - 83333 Hz (333333 / 4) + * 19 - 100000 Hz (400000 / 4) + * 20 - 125000 Hz (500000 / 4) + * 21 - 166667 Hz (333333 / 2) + * 22 - 200000 Hz (400000 / 2) + * 23 - 250000 Hz (500000 / 2) + * 24 - 333333 Hz (333333 / 1) + * 25 - 400000 Hz (400000 / 1) + * 26 - 500000 Hz (500000 / 1) + spreadFactor: + type: integer + deBits: + description: Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol + type: integer + decodeActive: + description: boolean 1 to activate 0 to de-activate decoder + type: integer + eomSquelchTenths: + description: argmax squared magnitude is compared between current multiplied by this factor and maximum during decoding. This value is divided by 10 + type: integer + nbSymbolsMax: + description: expected maximum number of symbols in a payload + type: integer + preambleChirps: + description: Number of expected preamble chirps + type: integer + nbParityBits: + description: Hamming FEC parity bits (LoRa) + type: integer + packetLength: + description: expected packet length in number of bytes (LoRa) + type: integer + sendViaUDP: + description: boolean 1 to send decoded message via UDP else 0 + type: integer + udpEnabled: + type: integer + description: > + Boolean - Send via UDP + * 0 - Do not send decoded messages via UDP + * 1 - Send decoded messages via UDP + udpAddress: + description: UDP destination udpAddress + type: string + udpPort: + description: UDP destination port + type: integer + invertRamps: + type: integer + description: > + Invert chirp ramps + * 0 - Normal chirp ramps (upchirps for preamble and payload) + * 1 - Inverted chirp ramps (downchirps for preamble and payload) + rgbColor: + type: integer + title: + type: string + streamIndex: + description: MIMO channel. Not relevant when connected to SI (single Rx). + type: integer + useReverseAPI: + description: Synchronize with reverse API (1 for yes, 0 for no) + type: integer + reverseAPIAddress: + type: string + reverseAPIPort: + type: integer + reverseAPIDeviceIndex: + type: integer + reverseAPIChannelIndex: + type: integer + spectrumConfig: + $ref: "http://swgserver:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum" + channelMarker: + $ref: "http://swgserver:8081/api/swagger/include/ChannelMarker.yaml#/ChannelMarker" + rollupState: + $ref: "http://swgserver:8081/api/swagger/include/RollupState.yaml#/RollupState" + +MeshtasticDemodReport: + description: MeshtasticDemod + properties: + channelPowerDB: + description: current de-chirped total channel power (dB) + type: number + format: float + noisePowerDB: + description: current de-chirped noise argmax power (dB) + type: number + format: float + signalPowerDB: + description: last message de-chirped signal argmax power (dB) + type: number + format: float + snrPowerDB: + description: last message de-chirped signal to noise ratio power (dB) + type: number + format: float + channelSampleRate: + type: integer + syncWord: + description: 2 bytes sync word (0..65535) + type: integer + nbParityBits: + description: Hamming FEC parity bits (LoRa) + type: integer + packetLength: + description: Packet length in number of bytes (LoRa) + type: integer + nbSymbols: + description: Number of symbols in the payload with header and CRC (LoRa) + type: integer + nbCodewords: + description: Number of codewords in the payload with header and CRC (LoRa) + type: integer + headerParityStatus: + type: integer + description: > + Header FEC parity status: + * 0 - Undefined + * 1 - Uncorrectable error + * 2 - Corrected error + * 3 - OK + headerCRCStatus: + description: header CRC check status. Boolean 1 if OK else 0 + type: integer + payloadParityStatus: + type: integer + description: > + Payload FEC parity status: + * 0 - Undefined + * 1 - Uncorrectable error + * 2 - Corrected error + * 3 - OK + payloadCRCStatus: + description: payload CRC check status. Boolean 1 if OK else 0 + type: integer + messageTimestamp: + description: timestamp of the last decoded message + type: string + messageString: + description: string representation of the last decoded message + type: string + frameType: + description: frame type shown in the GUI tree view (for example LORA_FRAME or POSITION_APP) + type: string + channelType: + description: Channel type code e.g. LONG_FAST + type: string + messageBytes: + description: bytes of the last decoded message as an array of hex string represented bytes (00..FF) + type: array + items: + type: string + decoding: + type: integer + description: > + Boolean - decoding status + * 0 - no decoding + * 1 - decoding diff --git a/swagger/sdrangel/api/swagger/include/MeshtasticMod.yaml b/swagger/sdrangel/api/swagger/include/MeshtasticMod.yaml new file mode 100644 index 000000000..90059f2c3 --- /dev/null +++ b/swagger/sdrangel/api/swagger/include/MeshtasticMod.yaml @@ -0,0 +1,128 @@ +MeshtasticModSettings: + description: MeshtasticMod + properties: + inputFrequencyOffset: + type: integer + format: int64 + bandwidthIndex: + type: integer + description: > + standard bandwidths index: + * 0 - 375 Hz (384000 / 1024) + * 1 - 750 Hz (384000 / 512) + * 2 - 1500 Hz (384000 / 256) + * 3 - 2604 Hz (333333 / 128) + * 4 - 3125 Hz (400000 / 128) + * 5 - 3906 Hz (500000 / 128) + * 6 - 5208 Hz (333333 / 64) + * 7 - 6250 Hz (400000 / 64) + * 8 - 7813 Hz (500000 / 64) + * 9 - 10417 Hz (333333 / 32) + * 10 - 12500 Hz (400000 / 32) + * 11 - 15625 Hz (500000 / 32) + * 12 - 20833 Hz (333333 / 16) + * 13 - 25000 Hz (400000 / 16) + * 14 - 31250 Hz (500000 / 16) + * 15 - 41667 Hz (333333 / 8) + * 16 - 50000 Hz (400000 / 8) + * 17 - 62500 Hz (500000 / 8) + * 18 - 83333 Hz (333333 / 4) + * 19 - 100000 Hz (400000 / 4) + * 20 - 125000 Hz (500000 / 4) + * 21 - 166667 Hz (333333 / 2) + * 22 - 200000 Hz (400000 / 2) + * 23 - 250000 Hz (500000 / 2) + * 24 - 333333 Hz (333333 / 1) + * 25 - 400000 Hz (400000 / 1) + * 26 - 500000 Hz (500000 / 1) + spreadFactor: + type: integer + deBits: + description: Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol + type: integer + preambleChirps: + description: Number of preamble chirps + type: integer + quietMillis: + description: Number of milliseconds to pause between transmissions + type: integer + syncWord: + description: 2 byte (0..65535) synchronization syncWord + type: integer + channelMute: + description: boolean + type: integer + nbParityBits: + description: Hamming FEC parity bits (LoRa) + type: integer + textMessage: + description: freeform text message + type: string + messageRepeat: + description: number of repetitions of the same message (0 for infinite) + type: integer + udpEnabled: + description: boolean 1 to enable forwarding messages via UDP else 0 + type: integer + udpAddress: + description: UDP address to listen for messages to transmit on + type: string + udpPort: + description: UDP port to listen for messages to transmit on + type: integer + invertRamps: + type: integer + description: > + Invert chirp ramps + * 0 - Normal chirp ramps (upchirps for preamble and payload) + * 1 - Inverted chirp ramps (downchirps for preamble and payload) + rgbColor: + type: integer + title: + type: string + streamIndex: + description: MIMO channel. Not relevant when connected to SI (single Rx). + type: integer + useReverseAPI: + description: Synchronize with reverse API (1 for yes, 0 for no) + type: integer + reverseAPIAddress: + type: string + reverseAPIPort: + type: integer + reverseAPIDeviceIndex: + type: integer + reverseAPIChannelIndex: + type: integer + channelMarker: + $ref: "http://swgserver:8081/api/swagger/include/ChannelMarker.yaml#/ChannelMarker" + rollupState: + $ref: "http://swgserver:8081/api/swagger/include/RollupState.yaml#/RollupState" + +MeshtasticModReport: + description: MeshtasticMod + properties: + channelPowerDB: + description: power transmitted in channel (dB) + type: number + format: float + channelSampleRate: + type: integer + symbolTimeMs: + description: symbol duration (ms) + type: number + format: float + payloadTimeMs: + description: payload duration (ms) + type: number + format: float + totalTimeMs: + description: total message duration inc. preamble and SFD (ms) + type: number + format: float + playing: + type: integer + description: > + Boolean - modulator is active (playing) including idle time + * 0 - Modulator not active + * 1 - Modulator active diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index ff970f4ca..b2572adbc 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -4033,6 +4033,12 @@ margin-bottom: 20px; "M17ModReport" : { "$ref" : "#/definitions/M17ModReport" }, + "MeshtasticDemodReport" : { + "$ref" : "#/definitions/MeshtasticDemodReport" + }, + "MeshtasticModReport" : { + "$ref" : "#/definitions/MeshtasticModReport" + }, "NavtexDemodReport" : { "$ref" : "#/definitions/NavtexDemodReport" }, @@ -4230,6 +4236,12 @@ margin-bottom: 20px; "M17ModSettings" : { "$ref" : "#/definitions/M17ModSettings" }, + "MeshtasticDemodSettings" : { + "$ref" : "#/definitions/MeshtasticDemodSettings" + }, + "MeshtasticModSettings" : { + "$ref" : "#/definitions/MeshtasticModSettings" + }, "NavtexDemodSettings" : { "$ref" : "#/definitions/NavtexDemodSettings" }, @@ -10849,6 +10861,324 @@ margin-bottom: 20px; } }, "description" : "Map" +}; + defs.MeshtasticDemodReport = { + "properties" : { + "channelPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "current de-chirped total channel power (dB)" + }, + "noisePowerDB" : { + "type" : "number", + "format" : "float", + "description" : "current de-chirped noise argmax power (dB)" + }, + "signalPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "last message de-chirped signal argmax power (dB)" + }, + "snrPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "last message de-chirped signal to noise ratio power (dB)" + }, + "channelSampleRate" : { + "type" : "integer" + }, + "syncWord" : { + "type" : "integer", + "description" : "2 bytes sync word (0..65535)" + }, + "nbParityBits" : { + "type" : "integer", + "description" : "Hamming FEC parity bits (LoRa)" + }, + "packetLength" : { + "type" : "integer", + "description" : "Packet length in number of bytes (LoRa)" + }, + "nbSymbols" : { + "type" : "integer", + "description" : "Number of symbols in the payload with header and CRC (LoRa)" + }, + "nbCodewords" : { + "type" : "integer", + "description" : "Number of codewords in the payload with header and CRC (LoRa)" + }, + "headerParityStatus" : { + "type" : "integer", + "description" : "Header FEC parity status:\n * 0 - Undefined\n * 1 - Uncorrectable error\n * 2 - Corrected error\n * 3 - OK\n" + }, + "headerCRCStatus" : { + "type" : "integer", + "description" : "header CRC check status. Boolean 1 if OK else 0" + }, + "payloadParityStatus" : { + "type" : "integer", + "description" : "Payload FEC parity status:\n * 0 - Undefined\n * 1 - Uncorrectable error\n * 2 - Corrected error\n * 3 - OK\n" + }, + "payloadCRCStatus" : { + "type" : "integer", + "description" : "payload CRC check status. Boolean 1 if OK else 0" + }, + "messageTimestamp" : { + "type" : "string", + "description" : "timestamp of the last decoded message" + }, + "messageString" : { + "type" : "string", + "description" : "string representation of the last decoded message" + }, + "frameType" : { + "type" : "string", + "description" : "frame type shown in the GUI tree view (for example LORA_FRAME or POSITION_APP)" + }, + "channelType" : { + "type" : "string", + "description" : "Channel type code e.g. LONG_FAST" + }, + "messageBytes" : { + "type" : "array", + "description" : "bytes of the last decoded message as an array of hex string represented bytes (00..FF)", + "items" : { + "type" : "string" + } + }, + "decoding" : { + "type" : "integer", + "description" : "Boolean - decoding status\n * 0 - no decoding\n * 1 - decoding\n" + } + }, + "description" : "MeshtasticDemod" +}; + defs.MeshtasticDemodSettings = { + "properties" : { + "inputFrequencyOffset" : { + "type" : "integer", + "format" : "int64" + }, + "bandwidthIndex" : { + "type" : "integer", + "description" : "standard bandwidths index:\n * 0 - 375 Hz (384000 / 1024)\n * 1 - 750 Hz (384000 / 512)\n * 2 - 1500 Hz (384000 / 256)\n * 3 - 2604 Hz (333333 / 128)\n * 4 - 3125 Hz (400000 / 128)\n * 5 - 3906 Hz (500000 / 128)\n * 6 - 5208 Hz (333333 / 64)\n * 7 - 6250 Hz (400000 / 64)\n * 8 - 7813 Hz (500000 / 64)\n * 9 - 10417 Hz (333333 / 32)\n * 10 - 12500 Hz (400000 / 32)\n * 11 - 15625 Hz (500000 / 32)\n * 12 - 20833 Hz (333333 / 16)\n * 13 - 25000 Hz (400000 / 16)\n * 14 - 31250 Hz (500000 / 16)\n * 15 - 41667 Hz (333333 / 8)\n * 16 - 50000 Hz (400000 / 8)\n * 17 - 62500 Hz (500000 / 8)\n * 18 - 83333 Hz (333333 / 4)\n * 19 - 100000 Hz (400000 / 4)\n * 20 - 125000 Hz (500000 / 4)\n * 21 - 166667 Hz (333333 / 2)\n * 22 - 200000 Hz (400000 / 2)\n * 23 - 250000 Hz (500000 / 2)\n * 24 - 333333 Hz (333333 / 1)\n * 25 - 400000 Hz (400000 / 1)\n * 26 - 500000 Hz (500000 / 1)\n" + }, + "spreadFactor" : { + "type" : "integer" + }, + "deBits" : { + "type" : "integer", + "description" : "Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol" + }, + "decodeActive" : { + "type" : "integer", + "description" : "boolean 1 to activate 0 to de-activate decoder" + }, + "eomSquelchTenths" : { + "type" : "integer", + "description" : "argmax squared magnitude is compared between current multiplied by this factor and maximum during decoding. This value is divided by 10" + }, + "nbSymbolsMax" : { + "type" : "integer", + "description" : "expected maximum number of symbols in a payload" + }, + "preambleChirps" : { + "type" : "integer", + "description" : "Number of expected preamble chirps" + }, + "nbParityBits" : { + "type" : "integer", + "description" : "Hamming FEC parity bits (LoRa)" + }, + "packetLength" : { + "type" : "integer", + "description" : "expected packet length in number of bytes (LoRa)" + }, + "sendViaUDP" : { + "type" : "integer", + "description" : "boolean 1 to send decoded message via UDP else 0" + }, + "udpEnabled" : { + "type" : "integer", + "description" : "Boolean - Send via UDP\n * 0 - Do not send decoded messages via UDP\n * 1 - Send decoded messages via UDP\n" + }, + "udpAddress" : { + "type" : "string", + "description" : "UDP destination udpAddress" + }, + "udpPort" : { + "type" : "integer", + "description" : "UDP destination port" + }, + "invertRamps" : { + "type" : "integer", + "description" : "Invert chirp ramps\n * 0 - Normal chirp ramps (upchirps for preamble and payload)\n * 1 - Inverted chirp ramps (downchirps for preamble and payload)\n" + }, + "rgbColor" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + }, + "streamIndex" : { + "type" : "integer", + "description" : "MIMO channel. Not relevant when connected to SI (single Rx)." + }, + "useReverseAPI" : { + "type" : "integer", + "description" : "Synchronize with reverse API (1 for yes, 0 for no)" + }, + "reverseAPIAddress" : { + "type" : "string" + }, + "reverseAPIPort" : { + "type" : "integer" + }, + "reverseAPIDeviceIndex" : { + "type" : "integer" + }, + "reverseAPIChannelIndex" : { + "type" : "integer" + }, + "spectrumConfig" : { + "$ref" : "#/definitions/GLSpectrum" + }, + "channelMarker" : { + "$ref" : "#/definitions/ChannelMarker" + }, + "rollupState" : { + "$ref" : "#/definitions/RollupState" + } + }, + "description" : "MeshtasticDemod" +}; + defs.MeshtasticModReport = { + "properties" : { + "channelPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "power transmitted in channel (dB)" + }, + "channelSampleRate" : { + "type" : "integer" + }, + "symbolTimeMs" : { + "type" : "number", + "format" : "float", + "description" : "symbol duration (ms)" + }, + "payloadTimeMs" : { + "type" : "number", + "format" : "float", + "description" : "payload duration (ms)" + }, + "totalTimeMs" : { + "type" : "number", + "format" : "float", + "description" : "total message duration inc. preamble and SFD (ms)" + }, + "playing" : { + "type" : "integer", + "description" : "Boolean - modulator is active (playing) including idle time\n * 0 - Modulator not active\n * 1 - Modulator active\n" + } + }, + "description" : "MeshtasticMod" +}; + defs.MeshtasticModSettings = { + "properties" : { + "inputFrequencyOffset" : { + "type" : "integer", + "format" : "int64" + }, + "bandwidthIndex" : { + "type" : "integer", + "description" : "standard bandwidths index:\n * 0 - 375 Hz (384000 / 1024)\n * 1 - 750 Hz (384000 / 512)\n * 2 - 1500 Hz (384000 / 256)\n * 3 - 2604 Hz (333333 / 128)\n * 4 - 3125 Hz (400000 / 128)\n * 5 - 3906 Hz (500000 / 128)\n * 6 - 5208 Hz (333333 / 64)\n * 7 - 6250 Hz (400000 / 64)\n * 8 - 7813 Hz (500000 / 64)\n * 9 - 10417 Hz (333333 / 32)\n * 10 - 12500 Hz (400000 / 32)\n * 11 - 15625 Hz (500000 / 32)\n * 12 - 20833 Hz (333333 / 16)\n * 13 - 25000 Hz (400000 / 16)\n * 14 - 31250 Hz (500000 / 16)\n * 15 - 41667 Hz (333333 / 8)\n * 16 - 50000 Hz (400000 / 8)\n * 17 - 62500 Hz (500000 / 8)\n * 18 - 83333 Hz (333333 / 4)\n * 19 - 100000 Hz (400000 / 4)\n * 20 - 125000 Hz (500000 / 4)\n * 21 - 166667 Hz (333333 / 2)\n * 22 - 200000 Hz (400000 / 2)\n * 23 - 250000 Hz (500000 / 2)\n * 24 - 333333 Hz (333333 / 1)\n * 25 - 400000 Hz (400000 / 1)\n * 26 - 500000 Hz (500000 / 1)\n" + }, + "spreadFactor" : { + "type" : "integer" + }, + "deBits" : { + "type" : "integer", + "description" : "Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol" + }, + "preambleChirps" : { + "type" : "integer", + "description" : "Number of preamble chirps" + }, + "quietMillis" : { + "type" : "integer", + "description" : "Number of milliseconds to pause between transmissions" + }, + "syncWord" : { + "type" : "integer", + "description" : "2 byte (0..65535) synchronization syncWord" + }, + "channelMute" : { + "type" : "integer", + "description" : "boolean" + }, + "nbParityBits" : { + "type" : "integer", + "description" : "Hamming FEC parity bits (LoRa)" + }, + "textMessage" : { + "type" : "string", + "description" : "freeform text message" + }, + "messageRepeat" : { + "type" : "integer", + "description" : "number of repetitions of the same message (0 for infinite)" + }, + "udpEnabled" : { + "type" : "integer", + "description" : "boolean 1 to enable forwarding messages via UDP else 0" + }, + "udpAddress" : { + "type" : "string", + "description" : "UDP address to listen for messages to transmit on" + }, + "udpPort" : { + "type" : "integer", + "description" : "UDP port to listen for messages to transmit on" + }, + "invertRamps" : { + "type" : "integer", + "description" : "Invert chirp ramps\n * 0 - Normal chirp ramps (upchirps for preamble and payload)\n * 1 - Inverted chirp ramps (downchirps for preamble and payload)\n" + }, + "rgbColor" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + }, + "streamIndex" : { + "type" : "integer", + "description" : "MIMO channel. Not relevant when connected to SI (single Rx)." + }, + "useReverseAPI" : { + "type" : "integer", + "description" : "Synchronize with reverse API (1 for yes, 0 for no)" + }, + "reverseAPIAddress" : { + "type" : "string" + }, + "reverseAPIPort" : { + "type" : "integer" + }, + "reverseAPIDeviceIndex" : { + "type" : "integer" + }, + "reverseAPIChannelIndex" : { + "type" : "integer" + }, + "channelMarker" : { + "$ref" : "#/definitions/ChannelMarker" + }, + "rollupState" : { + "$ref" : "#/definitions/RollupState" + } + }, + "description" : "MeshtasticMod" }; defs.MetisMISOSettings = { "properties" : { @@ -59982,7 +60312,7 @@ except ApiException as e:
- Generated 2026-02-07T23:22:00.482+01:00 + Generated 2026-03-22T19:58:59.376+01:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp index 46d9f65f7..499370b74 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp @@ -90,6 +90,10 @@ SWGChannelReport::SWGChannelReport() { m_m17_demod_report_isSet = false; m17_mod_report = nullptr; m_m17_mod_report_isSet = false; + meshtastic_demod_report = nullptr; + m_meshtastic_demod_report_isSet = false; + meshtastic_mod_report = nullptr; + m_meshtastic_mod_report_isSet = false; navtex_demod_report = nullptr; m_navtex_demod_report_isSet = false; nfm_demod_report = nullptr; @@ -206,6 +210,10 @@ SWGChannelReport::init() { m_m17_demod_report_isSet = false; m17_mod_report = new SWGM17ModReport(); m_m17_mod_report_isSet = false; + meshtastic_demod_report = new SWGMeshtasticDemodReport(); + m_meshtastic_demod_report_isSet = false; + meshtastic_mod_report = new SWGMeshtasticModReport(); + m_meshtastic_mod_report_isSet = false; navtex_demod_report = new SWGNavtexDemodReport(); m_navtex_demod_report_isSet = false; nfm_demod_report = new SWGNFMDemodReport(); @@ -347,6 +355,12 @@ SWGChannelReport::cleanup() { if(m17_mod_report != nullptr) { delete m17_mod_report; } + if(meshtastic_demod_report != nullptr) { + delete meshtastic_demod_report; + } + if(meshtastic_mod_report != nullptr) { + delete meshtastic_mod_report; + } if(navtex_demod_report != nullptr) { delete navtex_demod_report; } @@ -491,6 +505,10 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&m17_mod_report, pJson["M17ModReport"], "SWGM17ModReport", "SWGM17ModReport"); + ::SWGSDRangel::setValue(&meshtastic_demod_report, pJson["MeshtasticDemodReport"], "SWGMeshtasticDemodReport", "SWGMeshtasticDemodReport"); + + ::SWGSDRangel::setValue(&meshtastic_mod_report, pJson["MeshtasticModReport"], "SWGMeshtasticModReport", "SWGMeshtasticModReport"); + ::SWGSDRangel::setValue(&navtex_demod_report, pJson["NavtexDemodReport"], "SWGNavtexDemodReport", "SWGNavtexDemodReport"); ::SWGSDRangel::setValue(&nfm_demod_report, pJson["NFMDemodReport"], "SWGNFMDemodReport", "SWGNFMDemodReport"); @@ -646,6 +664,12 @@ SWGChannelReport::asJsonObject() { if((m17_mod_report != nullptr) && (m17_mod_report->isSet())){ toJsonValue(QString("M17ModReport"), m17_mod_report, obj, QString("SWGM17ModReport")); } + if((meshtastic_demod_report != nullptr) && (meshtastic_demod_report->isSet())){ + toJsonValue(QString("MeshtasticDemodReport"), meshtastic_demod_report, obj, QString("SWGMeshtasticDemodReport")); + } + if((meshtastic_mod_report != nullptr) && (meshtastic_mod_report->isSet())){ + toJsonValue(QString("MeshtasticModReport"), meshtastic_mod_report, obj, QString("SWGMeshtasticModReport")); + } if((navtex_demod_report != nullptr) && (navtex_demod_report->isSet())){ toJsonValue(QString("NavtexDemodReport"), navtex_demod_report, obj, QString("SWGNavtexDemodReport")); } @@ -1029,6 +1053,26 @@ SWGChannelReport::setM17ModReport(SWGM17ModReport* m17_mod_report) { this->m_m17_mod_report_isSet = true; } +SWGMeshtasticDemodReport* +SWGChannelReport::getMeshtasticDemodReport() { + return meshtastic_demod_report; +} +void +SWGChannelReport::setMeshtasticDemodReport(SWGMeshtasticDemodReport* meshtastic_demod_report) { + this->meshtastic_demod_report = meshtastic_demod_report; + this->m_meshtastic_demod_report_isSet = true; +} + +SWGMeshtasticModReport* +SWGChannelReport::getMeshtasticModReport() { + return meshtastic_mod_report; +} +void +SWGChannelReport::setMeshtasticModReport(SWGMeshtasticModReport* meshtastic_mod_report) { + this->meshtastic_mod_report = meshtastic_mod_report; + this->m_meshtastic_mod_report_isSet = true; +} + SWGNavtexDemodReport* SWGChannelReport::getNavtexDemodReport() { return navtex_demod_report; @@ -1357,6 +1401,12 @@ SWGChannelReport::isSet(){ if(m17_mod_report && m17_mod_report->isSet()){ isObjectUpdated = true; break; } + if(meshtastic_demod_report && meshtastic_demod_report->isSet()){ + isObjectUpdated = true; break; + } + if(meshtastic_mod_report && meshtastic_mod_report->isSet()){ + isObjectUpdated = true; break; + } if(navtex_demod_report && navtex_demod_report->isSet()){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h index e8008d4ce..36efef47a 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h @@ -51,6 +51,8 @@ #include "SWGInmarsatDemodReport.h" #include "SWGM17DemodReport.h" #include "SWGM17ModReport.h" +#include "SWGMeshtasticDemodReport.h" +#include "SWGMeshtasticModReport.h" #include "SWGNFMDemodReport.h" #include "SWGNFMModReport.h" #include "SWGNavtexDemodReport.h" @@ -187,6 +189,12 @@ public: SWGM17ModReport* getM17ModReport(); void setM17ModReport(SWGM17ModReport* m17_mod_report); + SWGMeshtasticDemodReport* getMeshtasticDemodReport(); + void setMeshtasticDemodReport(SWGMeshtasticDemodReport* meshtastic_demod_report); + + SWGMeshtasticModReport* getMeshtasticModReport(); + void setMeshtasticModReport(SWGMeshtasticModReport* meshtastic_mod_report); + SWGNavtexDemodReport* getNavtexDemodReport(); void setNavtexDemodReport(SWGNavtexDemodReport* navtex_demod_report); @@ -353,6 +361,12 @@ private: SWGM17ModReport* m17_mod_report; bool m_m17_mod_report_isSet; + SWGMeshtasticDemodReport* meshtastic_demod_report; + bool m_meshtastic_demod_report_isSet; + + SWGMeshtasticModReport* meshtastic_mod_report; + bool m_meshtastic_mod_report_isSet; + SWGNavtexDemodReport* navtex_demod_report; bool m_navtex_demod_report_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp index 98fb7a081..578f29ce0 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp @@ -106,6 +106,10 @@ SWGChannelSettings::SWGChannelSettings() { m_m17_demod_settings_isSet = false; m17_mod_settings = nullptr; m_m17_mod_settings_isSet = false; + meshtastic_demod_settings = nullptr; + m_meshtastic_demod_settings_isSet = false; + meshtastic_mod_settings = nullptr; + m_meshtastic_mod_settings_isSet = false; navtex_demod_settings = nullptr; m_navtex_demod_settings_isSet = false; nfm_demod_settings = nullptr; @@ -246,6 +250,10 @@ SWGChannelSettings::init() { m_m17_demod_settings_isSet = false; m17_mod_settings = new SWGM17ModSettings(); m_m17_mod_settings_isSet = false; + meshtastic_demod_settings = new SWGMeshtasticDemodSettings(); + m_meshtastic_demod_settings_isSet = false; + meshtastic_mod_settings = new SWGMeshtasticModSettings(); + m_meshtastic_mod_settings_isSet = false; navtex_demod_settings = new SWGNavtexDemodSettings(); m_navtex_demod_settings_isSet = false; nfm_demod_settings = new SWGNFMDemodSettings(); @@ -415,6 +423,12 @@ SWGChannelSettings::cleanup() { if(m17_mod_settings != nullptr) { delete m17_mod_settings; } + if(meshtastic_demod_settings != nullptr) { + delete meshtastic_demod_settings; + } + if(meshtastic_mod_settings != nullptr) { + delete meshtastic_mod_settings; + } if(navtex_demod_settings != nullptr) { delete navtex_demod_settings; } @@ -587,6 +601,10 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&m17_mod_settings, pJson["M17ModSettings"], "SWGM17ModSettings", "SWGM17ModSettings"); + ::SWGSDRangel::setValue(&meshtastic_demod_settings, pJson["MeshtasticDemodSettings"], "SWGMeshtasticDemodSettings", "SWGMeshtasticDemodSettings"); + + ::SWGSDRangel::setValue(&meshtastic_mod_settings, pJson["MeshtasticModSettings"], "SWGMeshtasticModSettings", "SWGMeshtasticModSettings"); + ::SWGSDRangel::setValue(&navtex_demod_settings, pJson["NavtexDemodSettings"], "SWGNavtexDemodSettings", "SWGNavtexDemodSettings"); ::SWGSDRangel::setValue(&nfm_demod_settings, pJson["NFMDemodSettings"], "SWGNFMDemodSettings", "SWGNFMDemodSettings"); @@ -774,6 +792,12 @@ SWGChannelSettings::asJsonObject() { if((m17_mod_settings != nullptr) && (m17_mod_settings->isSet())){ toJsonValue(QString("M17ModSettings"), m17_mod_settings, obj, QString("SWGM17ModSettings")); } + if((meshtastic_demod_settings != nullptr) && (meshtastic_demod_settings->isSet())){ + toJsonValue(QString("MeshtasticDemodSettings"), meshtastic_demod_settings, obj, QString("SWGMeshtasticDemodSettings")); + } + if((meshtastic_mod_settings != nullptr) && (meshtastic_mod_settings->isSet())){ + toJsonValue(QString("MeshtasticModSettings"), meshtastic_mod_settings, obj, QString("SWGMeshtasticModSettings")); + } if((navtex_demod_settings != nullptr) && (navtex_demod_settings->isSet())){ toJsonValue(QString("NavtexDemodSettings"), navtex_demod_settings, obj, QString("SWGNavtexDemodSettings")); } @@ -1249,6 +1273,26 @@ SWGChannelSettings::setM17ModSettings(SWGM17ModSettings* m17_mod_settings) { this->m_m17_mod_settings_isSet = true; } +SWGMeshtasticDemodSettings* +SWGChannelSettings::getMeshtasticDemodSettings() { + return meshtastic_demod_settings; +} +void +SWGChannelSettings::setMeshtasticDemodSettings(SWGMeshtasticDemodSettings* meshtastic_demod_settings) { + this->meshtastic_demod_settings = meshtastic_demod_settings; + this->m_meshtastic_demod_settings_isSet = true; +} + +SWGMeshtasticModSettings* +SWGChannelSettings::getMeshtasticModSettings() { + return meshtastic_mod_settings; +} +void +SWGChannelSettings::setMeshtasticModSettings(SWGMeshtasticModSettings* meshtastic_mod_settings) { + this->meshtastic_mod_settings = meshtastic_mod_settings; + this->m_meshtastic_mod_settings_isSet = true; +} + SWGNavtexDemodSettings* SWGChannelSettings::getNavtexDemodSettings() { return navtex_demod_settings; @@ -1641,6 +1685,12 @@ SWGChannelSettings::isSet(){ if(m17_mod_settings && m17_mod_settings->isSet()){ isObjectUpdated = true; break; } + if(meshtastic_demod_settings && meshtastic_demod_settings->isSet()){ + isObjectUpdated = true; break; + } + if(meshtastic_mod_settings && meshtastic_mod_settings->isSet()){ + isObjectUpdated = true; break; + } if(navtex_demod_settings && navtex_demod_settings->isSet()){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h index 635a839a7..3e1411f3c 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h @@ -59,6 +59,8 @@ #include "SWGLocalSourceSettings.h" #include "SWGM17DemodSettings.h" #include "SWGM17ModSettings.h" +#include "SWGMeshtasticDemodSettings.h" +#include "SWGMeshtasticModSettings.h" #include "SWGNFMDemodSettings.h" #include "SWGNFMModSettings.h" #include "SWGNavtexDemodSettings.h" @@ -221,6 +223,12 @@ public: SWGM17ModSettings* getM17ModSettings(); void setM17ModSettings(SWGM17ModSettings* m17_mod_settings); + SWGMeshtasticDemodSettings* getMeshtasticDemodSettings(); + void setMeshtasticDemodSettings(SWGMeshtasticDemodSettings* meshtastic_demod_settings); + + SWGMeshtasticModSettings* getMeshtasticModSettings(); + void setMeshtasticModSettings(SWGMeshtasticModSettings* meshtastic_mod_settings); + SWGNavtexDemodSettings* getNavtexDemodSettings(); void setNavtexDemodSettings(SWGNavtexDemodSettings* navtex_demod_settings); @@ -423,6 +431,12 @@ private: SWGM17ModSettings* m17_mod_settings; bool m_m17_mod_settings_isSet; + SWGMeshtasticDemodSettings* meshtastic_demod_settings; + bool m_meshtastic_demod_settings_isSet; + + SWGMeshtasticModSettings* meshtastic_mod_settings; + bool m_meshtastic_mod_settings_isSet; + SWGNavtexDemodSettings* navtex_demod_settings; bool m_navtex_demod_settings_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodReport.cpp b/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodReport.cpp new file mode 100644 index 000000000..75ec06390 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodReport.cpp @@ -0,0 +1,559 @@ +/** + * 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: 7.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGMeshtasticDemodReport.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGMeshtasticDemodReport::SWGMeshtasticDemodReport(QString* json) { + init(); + this->fromJson(*json); +} + +SWGMeshtasticDemodReport::SWGMeshtasticDemodReport() { + channel_power_db = 0.0f; + m_channel_power_db_isSet = false; + noise_power_db = 0.0f; + m_noise_power_db_isSet = false; + signal_power_db = 0.0f; + m_signal_power_db_isSet = false; + snr_power_db = 0.0f; + m_snr_power_db_isSet = false; + channel_sample_rate = 0; + m_channel_sample_rate_isSet = false; + sync_word = 0; + m_sync_word_isSet = false; + nb_parity_bits = 0; + m_nb_parity_bits_isSet = false; + packet_length = 0; + m_packet_length_isSet = false; + nb_symbols = 0; + m_nb_symbols_isSet = false; + nb_codewords = 0; + m_nb_codewords_isSet = false; + header_parity_status = 0; + m_header_parity_status_isSet = false; + header_crc_status = 0; + m_header_crc_status_isSet = false; + payload_parity_status = 0; + m_payload_parity_status_isSet = false; + payload_crc_status = 0; + m_payload_crc_status_isSet = false; + message_timestamp = nullptr; + m_message_timestamp_isSet = false; + message_string = nullptr; + m_message_string_isSet = false; + frame_type = nullptr; + m_frame_type_isSet = false; + channel_type = nullptr; + m_channel_type_isSet = false; + message_bytes = nullptr; + m_message_bytes_isSet = false; + decoding = 0; + m_decoding_isSet = false; +} + +SWGMeshtasticDemodReport::~SWGMeshtasticDemodReport() { + this->cleanup(); +} + +void +SWGMeshtasticDemodReport::init() { + channel_power_db = 0.0f; + m_channel_power_db_isSet = false; + noise_power_db = 0.0f; + m_noise_power_db_isSet = false; + signal_power_db = 0.0f; + m_signal_power_db_isSet = false; + snr_power_db = 0.0f; + m_snr_power_db_isSet = false; + channel_sample_rate = 0; + m_channel_sample_rate_isSet = false; + sync_word = 0; + m_sync_word_isSet = false; + nb_parity_bits = 0; + m_nb_parity_bits_isSet = false; + packet_length = 0; + m_packet_length_isSet = false; + nb_symbols = 0; + m_nb_symbols_isSet = false; + nb_codewords = 0; + m_nb_codewords_isSet = false; + header_parity_status = 0; + m_header_parity_status_isSet = false; + header_crc_status = 0; + m_header_crc_status_isSet = false; + payload_parity_status = 0; + m_payload_parity_status_isSet = false; + payload_crc_status = 0; + m_payload_crc_status_isSet = false; + message_timestamp = new QString(""); + m_message_timestamp_isSet = false; + message_string = new QString(""); + m_message_string_isSet = false; + frame_type = new QString(""); + m_frame_type_isSet = false; + channel_type = new QString(""); + m_channel_type_isSet = false; + message_bytes = new QList(); + m_message_bytes_isSet = false; + decoding = 0; + m_decoding_isSet = false; +} + +void +SWGMeshtasticDemodReport::cleanup() { + + + + + + + + + + + + + + + if(message_timestamp != nullptr) { + delete message_timestamp; + } + if(message_string != nullptr) { + delete message_string; + } + if(frame_type != nullptr) { + delete frame_type; + } + if(channel_type != nullptr) { + delete channel_type; + } + if(message_bytes != nullptr) { + auto arr = message_bytes; + for(auto o: *arr) { + delete o; + } + delete message_bytes; + } + +} + +SWGMeshtasticDemodReport* +SWGMeshtasticDemodReport::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGMeshtasticDemodReport::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", ""); + + ::SWGSDRangel::setValue(&noise_power_db, pJson["noisePowerDB"], "float", ""); + + ::SWGSDRangel::setValue(&signal_power_db, pJson["signalPowerDB"], "float", ""); + + ::SWGSDRangel::setValue(&snr_power_db, pJson["snrPowerDB"], "float", ""); + + ::SWGSDRangel::setValue(&channel_sample_rate, pJson["channelSampleRate"], "qint32", ""); + + ::SWGSDRangel::setValue(&sync_word, pJson["syncWord"], "qint32", ""); + + ::SWGSDRangel::setValue(&nb_parity_bits, pJson["nbParityBits"], "qint32", ""); + + ::SWGSDRangel::setValue(&packet_length, pJson["packetLength"], "qint32", ""); + + ::SWGSDRangel::setValue(&nb_symbols, pJson["nbSymbols"], "qint32", ""); + + ::SWGSDRangel::setValue(&nb_codewords, pJson["nbCodewords"], "qint32", ""); + + ::SWGSDRangel::setValue(&header_parity_status, pJson["headerParityStatus"], "qint32", ""); + + ::SWGSDRangel::setValue(&header_crc_status, pJson["headerCRCStatus"], "qint32", ""); + + ::SWGSDRangel::setValue(&payload_parity_status, pJson["payloadParityStatus"], "qint32", ""); + + ::SWGSDRangel::setValue(&payload_crc_status, pJson["payloadCRCStatus"], "qint32", ""); + + ::SWGSDRangel::setValue(&message_timestamp, pJson["messageTimestamp"], "QString", "QString"); + + ::SWGSDRangel::setValue(&message_string, pJson["messageString"], "QString", "QString"); + + ::SWGSDRangel::setValue(&frame_type, pJson["frameType"], "QString", "QString"); + + ::SWGSDRangel::setValue(&channel_type, pJson["channelType"], "QString", "QString"); + + + ::SWGSDRangel::setValue(&message_bytes, pJson["messageBytes"], "QList", "QString"); + ::SWGSDRangel::setValue(&decoding, pJson["decoding"], "qint32", ""); + +} + +QString +SWGMeshtasticDemodReport::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGMeshtasticDemodReport::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_channel_power_db_isSet){ + obj->insert("channelPowerDB", QJsonValue(channel_power_db)); + } + if(m_noise_power_db_isSet){ + obj->insert("noisePowerDB", QJsonValue(noise_power_db)); + } + if(m_signal_power_db_isSet){ + obj->insert("signalPowerDB", QJsonValue(signal_power_db)); + } + if(m_snr_power_db_isSet){ + obj->insert("snrPowerDB", QJsonValue(snr_power_db)); + } + if(m_channel_sample_rate_isSet){ + obj->insert("channelSampleRate", QJsonValue(channel_sample_rate)); + } + if(m_sync_word_isSet){ + obj->insert("syncWord", QJsonValue(sync_word)); + } + if(m_nb_parity_bits_isSet){ + obj->insert("nbParityBits", QJsonValue(nb_parity_bits)); + } + if(m_packet_length_isSet){ + obj->insert("packetLength", QJsonValue(packet_length)); + } + if(m_nb_symbols_isSet){ + obj->insert("nbSymbols", QJsonValue(nb_symbols)); + } + if(m_nb_codewords_isSet){ + obj->insert("nbCodewords", QJsonValue(nb_codewords)); + } + if(m_header_parity_status_isSet){ + obj->insert("headerParityStatus", QJsonValue(header_parity_status)); + } + if(m_header_crc_status_isSet){ + obj->insert("headerCRCStatus", QJsonValue(header_crc_status)); + } + if(m_payload_parity_status_isSet){ + obj->insert("payloadParityStatus", QJsonValue(payload_parity_status)); + } + if(m_payload_crc_status_isSet){ + obj->insert("payloadCRCStatus", QJsonValue(payload_crc_status)); + } + if(message_timestamp != nullptr && *message_timestamp != QString("")){ + toJsonValue(QString("messageTimestamp"), message_timestamp, obj, QString("QString")); + } + if(message_string != nullptr && *message_string != QString("")){ + toJsonValue(QString("messageString"), message_string, obj, QString("QString")); + } + if(frame_type != nullptr && *frame_type != QString("")){ + toJsonValue(QString("frameType"), frame_type, obj, QString("QString")); + } + if(channel_type != nullptr && *channel_type != QString("")){ + toJsonValue(QString("channelType"), channel_type, obj, QString("QString")); + } + if(message_bytes && message_bytes->size() > 0){ + toJsonArray((QList*)message_bytes, obj, "messageBytes", "QString"); + } + if(m_decoding_isSet){ + obj->insert("decoding", QJsonValue(decoding)); + } + + return obj; +} + +float +SWGMeshtasticDemodReport::getChannelPowerDb() { + return channel_power_db; +} +void +SWGMeshtasticDemodReport::setChannelPowerDb(float channel_power_db) { + this->channel_power_db = channel_power_db; + this->m_channel_power_db_isSet = true; +} + +float +SWGMeshtasticDemodReport::getNoisePowerDb() { + return noise_power_db; +} +void +SWGMeshtasticDemodReport::setNoisePowerDb(float noise_power_db) { + this->noise_power_db = noise_power_db; + this->m_noise_power_db_isSet = true; +} + +float +SWGMeshtasticDemodReport::getSignalPowerDb() { + return signal_power_db; +} +void +SWGMeshtasticDemodReport::setSignalPowerDb(float signal_power_db) { + this->signal_power_db = signal_power_db; + this->m_signal_power_db_isSet = true; +} + +float +SWGMeshtasticDemodReport::getSnrPowerDb() { + return snr_power_db; +} +void +SWGMeshtasticDemodReport::setSnrPowerDb(float snr_power_db) { + this->snr_power_db = snr_power_db; + this->m_snr_power_db_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getChannelSampleRate() { + return channel_sample_rate; +} +void +SWGMeshtasticDemodReport::setChannelSampleRate(qint32 channel_sample_rate) { + this->channel_sample_rate = channel_sample_rate; + this->m_channel_sample_rate_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getSyncWord() { + return sync_word; +} +void +SWGMeshtasticDemodReport::setSyncWord(qint32 sync_word) { + this->sync_word = sync_word; + this->m_sync_word_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getNbParityBits() { + return nb_parity_bits; +} +void +SWGMeshtasticDemodReport::setNbParityBits(qint32 nb_parity_bits) { + this->nb_parity_bits = nb_parity_bits; + this->m_nb_parity_bits_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getPacketLength() { + return packet_length; +} +void +SWGMeshtasticDemodReport::setPacketLength(qint32 packet_length) { + this->packet_length = packet_length; + this->m_packet_length_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getNbSymbols() { + return nb_symbols; +} +void +SWGMeshtasticDemodReport::setNbSymbols(qint32 nb_symbols) { + this->nb_symbols = nb_symbols; + this->m_nb_symbols_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getNbCodewords() { + return nb_codewords; +} +void +SWGMeshtasticDemodReport::setNbCodewords(qint32 nb_codewords) { + this->nb_codewords = nb_codewords; + this->m_nb_codewords_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getHeaderParityStatus() { + return header_parity_status; +} +void +SWGMeshtasticDemodReport::setHeaderParityStatus(qint32 header_parity_status) { + this->header_parity_status = header_parity_status; + this->m_header_parity_status_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getHeaderCrcStatus() { + return header_crc_status; +} +void +SWGMeshtasticDemodReport::setHeaderCrcStatus(qint32 header_crc_status) { + this->header_crc_status = header_crc_status; + this->m_header_crc_status_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getPayloadParityStatus() { + return payload_parity_status; +} +void +SWGMeshtasticDemodReport::setPayloadParityStatus(qint32 payload_parity_status) { + this->payload_parity_status = payload_parity_status; + this->m_payload_parity_status_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getPayloadCrcStatus() { + return payload_crc_status; +} +void +SWGMeshtasticDemodReport::setPayloadCrcStatus(qint32 payload_crc_status) { + this->payload_crc_status = payload_crc_status; + this->m_payload_crc_status_isSet = true; +} + +QString* +SWGMeshtasticDemodReport::getMessageTimestamp() { + return message_timestamp; +} +void +SWGMeshtasticDemodReport::setMessageTimestamp(QString* message_timestamp) { + this->message_timestamp = message_timestamp; + this->m_message_timestamp_isSet = true; +} + +QString* +SWGMeshtasticDemodReport::getMessageString() { + return message_string; +} +void +SWGMeshtasticDemodReport::setMessageString(QString* message_string) { + this->message_string = message_string; + this->m_message_string_isSet = true; +} + +QString* +SWGMeshtasticDemodReport::getFrameType() { + return frame_type; +} +void +SWGMeshtasticDemodReport::setFrameType(QString* frame_type) { + this->frame_type = frame_type; + this->m_frame_type_isSet = true; +} + +QString* +SWGMeshtasticDemodReport::getChannelType() { + return channel_type; +} +void +SWGMeshtasticDemodReport::setChannelType(QString* channel_type) { + this->channel_type = channel_type; + this->m_channel_type_isSet = true; +} + +QList* +SWGMeshtasticDemodReport::getMessageBytes() { + return message_bytes; +} +void +SWGMeshtasticDemodReport::setMessageBytes(QList* message_bytes) { + this->message_bytes = message_bytes; + this->m_message_bytes_isSet = true; +} + +qint32 +SWGMeshtasticDemodReport::getDecoding() { + return decoding; +} +void +SWGMeshtasticDemodReport::setDecoding(qint32 decoding) { + this->decoding = decoding; + this->m_decoding_isSet = true; +} + + +bool +SWGMeshtasticDemodReport::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_channel_power_db_isSet){ + isObjectUpdated = true; break; + } + if(m_noise_power_db_isSet){ + isObjectUpdated = true; break; + } + if(m_signal_power_db_isSet){ + isObjectUpdated = true; break; + } + if(m_snr_power_db_isSet){ + isObjectUpdated = true; break; + } + if(m_channel_sample_rate_isSet){ + isObjectUpdated = true; break; + } + if(m_sync_word_isSet){ + isObjectUpdated = true; break; + } + if(m_nb_parity_bits_isSet){ + isObjectUpdated = true; break; + } + if(m_packet_length_isSet){ + isObjectUpdated = true; break; + } + if(m_nb_symbols_isSet){ + isObjectUpdated = true; break; + } + if(m_nb_codewords_isSet){ + isObjectUpdated = true; break; + } + if(m_header_parity_status_isSet){ + isObjectUpdated = true; break; + } + if(m_header_crc_status_isSet){ + isObjectUpdated = true; break; + } + if(m_payload_parity_status_isSet){ + isObjectUpdated = true; break; + } + if(m_payload_crc_status_isSet){ + isObjectUpdated = true; break; + } + if(message_timestamp && *message_timestamp != QString("")){ + isObjectUpdated = true; break; + } + if(message_string && *message_string != QString("")){ + isObjectUpdated = true; break; + } + if(frame_type && *frame_type != QString("")){ + isObjectUpdated = true; break; + } + if(channel_type && *channel_type != QString("")){ + isObjectUpdated = true; break; + } + if(message_bytes && (message_bytes->size() > 0)){ + isObjectUpdated = true; break; + } + if(m_decoding_isSet){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodReport.h b/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodReport.h new file mode 100644 index 000000000..2a96f5684 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodReport.h @@ -0,0 +1,174 @@ +/** + * 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: 7.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGMeshtasticDemodReport.h + * + * MeshtasticDemod + */ + +#ifndef SWGMeshtasticDemodReport_H_ +#define SWGMeshtasticDemodReport_H_ + +#include + + +#include +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGMeshtasticDemodReport: public SWGObject { +public: + SWGMeshtasticDemodReport(); + SWGMeshtasticDemodReport(QString* json); + virtual ~SWGMeshtasticDemodReport(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGMeshtasticDemodReport* fromJson(QString &jsonString) override; + + float getChannelPowerDb(); + void setChannelPowerDb(float channel_power_db); + + float getNoisePowerDb(); + void setNoisePowerDb(float noise_power_db); + + float getSignalPowerDb(); + void setSignalPowerDb(float signal_power_db); + + float getSnrPowerDb(); + void setSnrPowerDb(float snr_power_db); + + qint32 getChannelSampleRate(); + void setChannelSampleRate(qint32 channel_sample_rate); + + qint32 getSyncWord(); + void setSyncWord(qint32 sync_word); + + qint32 getNbParityBits(); + void setNbParityBits(qint32 nb_parity_bits); + + qint32 getPacketLength(); + void setPacketLength(qint32 packet_length); + + qint32 getNbSymbols(); + void setNbSymbols(qint32 nb_symbols); + + qint32 getNbCodewords(); + void setNbCodewords(qint32 nb_codewords); + + qint32 getHeaderParityStatus(); + void setHeaderParityStatus(qint32 header_parity_status); + + qint32 getHeaderCrcStatus(); + void setHeaderCrcStatus(qint32 header_crc_status); + + qint32 getPayloadParityStatus(); + void setPayloadParityStatus(qint32 payload_parity_status); + + qint32 getPayloadCrcStatus(); + void setPayloadCrcStatus(qint32 payload_crc_status); + + QString* getMessageTimestamp(); + void setMessageTimestamp(QString* message_timestamp); + + QString* getMessageString(); + void setMessageString(QString* message_string); + + QString* getFrameType(); + void setFrameType(QString* frame_type); + + QString* getChannelType(); + void setChannelType(QString* channel_type); + + QList* getMessageBytes(); + void setMessageBytes(QList* message_bytes); + + qint32 getDecoding(); + void setDecoding(qint32 decoding); + + + virtual bool isSet() override; + +private: + float channel_power_db; + bool m_channel_power_db_isSet; + + float noise_power_db; + bool m_noise_power_db_isSet; + + float signal_power_db; + bool m_signal_power_db_isSet; + + float snr_power_db; + bool m_snr_power_db_isSet; + + qint32 channel_sample_rate; + bool m_channel_sample_rate_isSet; + + qint32 sync_word; + bool m_sync_word_isSet; + + qint32 nb_parity_bits; + bool m_nb_parity_bits_isSet; + + qint32 packet_length; + bool m_packet_length_isSet; + + qint32 nb_symbols; + bool m_nb_symbols_isSet; + + qint32 nb_codewords; + bool m_nb_codewords_isSet; + + qint32 header_parity_status; + bool m_header_parity_status_isSet; + + qint32 header_crc_status; + bool m_header_crc_status_isSet; + + qint32 payload_parity_status; + bool m_payload_parity_status_isSet; + + qint32 payload_crc_status; + bool m_payload_crc_status_isSet; + + QString* message_timestamp; + bool m_message_timestamp_isSet; + + QString* message_string; + bool m_message_string_isSet; + + QString* frame_type; + bool m_frame_type_isSet; + + QString* channel_type; + bool m_channel_type_isSet; + + QList* message_bytes; + bool m_message_bytes_isSet; + + qint32 decoding; + bool m_decoding_isSet; + +}; + +} + +#endif /* SWGMeshtasticDemodReport_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodSettings.cpp new file mode 100644 index 000000000..6c71097d5 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodSettings.cpp @@ -0,0 +1,695 @@ +/** + * 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: 7.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGMeshtasticDemodSettings.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGMeshtasticDemodSettings::SWGMeshtasticDemodSettings(QString* json) { + init(); + this->fromJson(*json); +} + +SWGMeshtasticDemodSettings::SWGMeshtasticDemodSettings() { + input_frequency_offset = 0L; + m_input_frequency_offset_isSet = false; + bandwidth_index = 0; + m_bandwidth_index_isSet = false; + spread_factor = 0; + m_spread_factor_isSet = false; + de_bits = 0; + m_de_bits_isSet = false; + decode_active = 0; + m_decode_active_isSet = false; + eom_squelch_tenths = 0; + m_eom_squelch_tenths_isSet = false; + nb_symbols_max = 0; + m_nb_symbols_max_isSet = false; + preamble_chirps = 0; + m_preamble_chirps_isSet = false; + nb_parity_bits = 0; + m_nb_parity_bits_isSet = false; + packet_length = 0; + m_packet_length_isSet = false; + send_via_udp = 0; + m_send_via_udp_isSet = false; + udp_enabled = 0; + m_udp_enabled_isSet = false; + udp_address = nullptr; + m_udp_address_isSet = false; + udp_port = 0; + m_udp_port_isSet = false; + invert_ramps = 0; + m_invert_ramps_isSet = false; + rgb_color = 0; + m_rgb_color_isSet = false; + title = nullptr; + m_title_isSet = false; + stream_index = 0; + m_stream_index_isSet = false; + use_reverse_api = 0; + m_use_reverse_api_isSet = false; + reverse_api_address = nullptr; + m_reverse_api_address_isSet = false; + reverse_api_port = 0; + m_reverse_api_port_isSet = false; + reverse_api_device_index = 0; + m_reverse_api_device_index_isSet = false; + reverse_api_channel_index = 0; + m_reverse_api_channel_index_isSet = false; + spectrum_config = nullptr; + m_spectrum_config_isSet = false; + channel_marker = nullptr; + m_channel_marker_isSet = false; + rollup_state = nullptr; + m_rollup_state_isSet = false; +} + +SWGMeshtasticDemodSettings::~SWGMeshtasticDemodSettings() { + this->cleanup(); +} + +void +SWGMeshtasticDemodSettings::init() { + input_frequency_offset = 0L; + m_input_frequency_offset_isSet = false; + bandwidth_index = 0; + m_bandwidth_index_isSet = false; + spread_factor = 0; + m_spread_factor_isSet = false; + de_bits = 0; + m_de_bits_isSet = false; + decode_active = 0; + m_decode_active_isSet = false; + eom_squelch_tenths = 0; + m_eom_squelch_tenths_isSet = false; + nb_symbols_max = 0; + m_nb_symbols_max_isSet = false; + preamble_chirps = 0; + m_preamble_chirps_isSet = false; + nb_parity_bits = 0; + m_nb_parity_bits_isSet = false; + packet_length = 0; + m_packet_length_isSet = false; + send_via_udp = 0; + m_send_via_udp_isSet = false; + udp_enabled = 0; + m_udp_enabled_isSet = false; + udp_address = new QString(""); + m_udp_address_isSet = false; + udp_port = 0; + m_udp_port_isSet = false; + invert_ramps = 0; + m_invert_ramps_isSet = false; + rgb_color = 0; + m_rgb_color_isSet = false; + title = new QString(""); + m_title_isSet = false; + stream_index = 0; + m_stream_index_isSet = false; + use_reverse_api = 0; + m_use_reverse_api_isSet = false; + reverse_api_address = new QString(""); + m_reverse_api_address_isSet = false; + reverse_api_port = 0; + m_reverse_api_port_isSet = false; + reverse_api_device_index = 0; + m_reverse_api_device_index_isSet = false; + reverse_api_channel_index = 0; + m_reverse_api_channel_index_isSet = false; + spectrum_config = new SWGGLSpectrum(); + m_spectrum_config_isSet = false; + channel_marker = new SWGChannelMarker(); + m_channel_marker_isSet = false; + rollup_state = new SWGRollupState(); + m_rollup_state_isSet = false; +} + +void +SWGMeshtasticDemodSettings::cleanup() { + + + + + + + + + + + + + if(udp_address != nullptr) { + delete udp_address; + } + + + + if(title != nullptr) { + delete title; + } + + + if(reverse_api_address != nullptr) { + delete reverse_api_address; + } + + + + if(spectrum_config != nullptr) { + delete spectrum_config; + } + if(channel_marker != nullptr) { + delete channel_marker; + } + if(rollup_state != nullptr) { + delete rollup_state; + } +} + +SWGMeshtasticDemodSettings* +SWGMeshtasticDemodSettings::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGMeshtasticDemodSettings::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", ""); + + ::SWGSDRangel::setValue(&bandwidth_index, pJson["bandwidthIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&spread_factor, pJson["spreadFactor"], "qint32", ""); + + ::SWGSDRangel::setValue(&de_bits, pJson["deBits"], "qint32", ""); + + ::SWGSDRangel::setValue(&decode_active, pJson["decodeActive"], "qint32", ""); + + ::SWGSDRangel::setValue(&eom_squelch_tenths, pJson["eomSquelchTenths"], "qint32", ""); + + ::SWGSDRangel::setValue(&nb_symbols_max, pJson["nbSymbolsMax"], "qint32", ""); + + ::SWGSDRangel::setValue(&preamble_chirps, pJson["preambleChirps"], "qint32", ""); + + ::SWGSDRangel::setValue(&nb_parity_bits, pJson["nbParityBits"], "qint32", ""); + + ::SWGSDRangel::setValue(&packet_length, pJson["packetLength"], "qint32", ""); + + ::SWGSDRangel::setValue(&send_via_udp, pJson["sendViaUDP"], "qint32", ""); + + ::SWGSDRangel::setValue(&udp_enabled, pJson["udpEnabled"], "qint32", ""); + + ::SWGSDRangel::setValue(&udp_address, pJson["udpAddress"], "QString", "QString"); + + ::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", ""); + + ::SWGSDRangel::setValue(&invert_ramps, pJson["invertRamps"], "qint32", ""); + + ::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", ""); + + ::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString"); + + ::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", ""); + + ::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString"); + + ::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", ""); + + ::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&spectrum_config, pJson["spectrumConfig"], "SWGGLSpectrum", "SWGGLSpectrum"); + + ::SWGSDRangel::setValue(&channel_marker, pJson["channelMarker"], "SWGChannelMarker", "SWGChannelMarker"); + + ::SWGSDRangel::setValue(&rollup_state, pJson["rollupState"], "SWGRollupState", "SWGRollupState"); + +} + +QString +SWGMeshtasticDemodSettings::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGMeshtasticDemodSettings::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_input_frequency_offset_isSet){ + obj->insert("inputFrequencyOffset", QJsonValue(input_frequency_offset)); + } + if(m_bandwidth_index_isSet){ + obj->insert("bandwidthIndex", QJsonValue(bandwidth_index)); + } + if(m_spread_factor_isSet){ + obj->insert("spreadFactor", QJsonValue(spread_factor)); + } + if(m_de_bits_isSet){ + obj->insert("deBits", QJsonValue(de_bits)); + } + if(m_decode_active_isSet){ + obj->insert("decodeActive", QJsonValue(decode_active)); + } + if(m_eom_squelch_tenths_isSet){ + obj->insert("eomSquelchTenths", QJsonValue(eom_squelch_tenths)); + } + if(m_nb_symbols_max_isSet){ + obj->insert("nbSymbolsMax", QJsonValue(nb_symbols_max)); + } + if(m_preamble_chirps_isSet){ + obj->insert("preambleChirps", QJsonValue(preamble_chirps)); + } + if(m_nb_parity_bits_isSet){ + obj->insert("nbParityBits", QJsonValue(nb_parity_bits)); + } + if(m_packet_length_isSet){ + obj->insert("packetLength", QJsonValue(packet_length)); + } + if(m_send_via_udp_isSet){ + obj->insert("sendViaUDP", QJsonValue(send_via_udp)); + } + if(m_udp_enabled_isSet){ + obj->insert("udpEnabled", QJsonValue(udp_enabled)); + } + if(udp_address != nullptr && *udp_address != QString("")){ + toJsonValue(QString("udpAddress"), udp_address, obj, QString("QString")); + } + if(m_udp_port_isSet){ + obj->insert("udpPort", QJsonValue(udp_port)); + } + if(m_invert_ramps_isSet){ + obj->insert("invertRamps", QJsonValue(invert_ramps)); + } + if(m_rgb_color_isSet){ + obj->insert("rgbColor", QJsonValue(rgb_color)); + } + if(title != nullptr && *title != QString("")){ + toJsonValue(QString("title"), title, obj, QString("QString")); + } + if(m_stream_index_isSet){ + obj->insert("streamIndex", QJsonValue(stream_index)); + } + if(m_use_reverse_api_isSet){ + obj->insert("useReverseAPI", QJsonValue(use_reverse_api)); + } + if(reverse_api_address != nullptr && *reverse_api_address != QString("")){ + toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString")); + } + if(m_reverse_api_port_isSet){ + obj->insert("reverseAPIPort", QJsonValue(reverse_api_port)); + } + if(m_reverse_api_device_index_isSet){ + obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index)); + } + if(m_reverse_api_channel_index_isSet){ + obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index)); + } + if((spectrum_config != nullptr) && (spectrum_config->isSet())){ + toJsonValue(QString("spectrumConfig"), spectrum_config, obj, QString("SWGGLSpectrum")); + } + if((channel_marker != nullptr) && (channel_marker->isSet())){ + toJsonValue(QString("channelMarker"), channel_marker, obj, QString("SWGChannelMarker")); + } + if((rollup_state != nullptr) && (rollup_state->isSet())){ + toJsonValue(QString("rollupState"), rollup_state, obj, QString("SWGRollupState")); + } + + return obj; +} + +qint64 +SWGMeshtasticDemodSettings::getInputFrequencyOffset() { + return input_frequency_offset; +} +void +SWGMeshtasticDemodSettings::setInputFrequencyOffset(qint64 input_frequency_offset) { + this->input_frequency_offset = input_frequency_offset; + this->m_input_frequency_offset_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getBandwidthIndex() { + return bandwidth_index; +} +void +SWGMeshtasticDemodSettings::setBandwidthIndex(qint32 bandwidth_index) { + this->bandwidth_index = bandwidth_index; + this->m_bandwidth_index_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getSpreadFactor() { + return spread_factor; +} +void +SWGMeshtasticDemodSettings::setSpreadFactor(qint32 spread_factor) { + this->spread_factor = spread_factor; + this->m_spread_factor_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getDeBits() { + return de_bits; +} +void +SWGMeshtasticDemodSettings::setDeBits(qint32 de_bits) { + this->de_bits = de_bits; + this->m_de_bits_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getDecodeActive() { + return decode_active; +} +void +SWGMeshtasticDemodSettings::setDecodeActive(qint32 decode_active) { + this->decode_active = decode_active; + this->m_decode_active_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getEomSquelchTenths() { + return eom_squelch_tenths; +} +void +SWGMeshtasticDemodSettings::setEomSquelchTenths(qint32 eom_squelch_tenths) { + this->eom_squelch_tenths = eom_squelch_tenths; + this->m_eom_squelch_tenths_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getNbSymbolsMax() { + return nb_symbols_max; +} +void +SWGMeshtasticDemodSettings::setNbSymbolsMax(qint32 nb_symbols_max) { + this->nb_symbols_max = nb_symbols_max; + this->m_nb_symbols_max_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getPreambleChirps() { + return preamble_chirps; +} +void +SWGMeshtasticDemodSettings::setPreambleChirps(qint32 preamble_chirps) { + this->preamble_chirps = preamble_chirps; + this->m_preamble_chirps_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getNbParityBits() { + return nb_parity_bits; +} +void +SWGMeshtasticDemodSettings::setNbParityBits(qint32 nb_parity_bits) { + this->nb_parity_bits = nb_parity_bits; + this->m_nb_parity_bits_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getPacketLength() { + return packet_length; +} +void +SWGMeshtasticDemodSettings::setPacketLength(qint32 packet_length) { + this->packet_length = packet_length; + this->m_packet_length_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getSendViaUdp() { + return send_via_udp; +} +void +SWGMeshtasticDemodSettings::setSendViaUdp(qint32 send_via_udp) { + this->send_via_udp = send_via_udp; + this->m_send_via_udp_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getUdpEnabled() { + return udp_enabled; +} +void +SWGMeshtasticDemodSettings::setUdpEnabled(qint32 udp_enabled) { + this->udp_enabled = udp_enabled; + this->m_udp_enabled_isSet = true; +} + +QString* +SWGMeshtasticDemodSettings::getUdpAddress() { + return udp_address; +} +void +SWGMeshtasticDemodSettings::setUdpAddress(QString* udp_address) { + this->udp_address = udp_address; + this->m_udp_address_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getUdpPort() { + return udp_port; +} +void +SWGMeshtasticDemodSettings::setUdpPort(qint32 udp_port) { + this->udp_port = udp_port; + this->m_udp_port_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getInvertRamps() { + return invert_ramps; +} +void +SWGMeshtasticDemodSettings::setInvertRamps(qint32 invert_ramps) { + this->invert_ramps = invert_ramps; + this->m_invert_ramps_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getRgbColor() { + return rgb_color; +} +void +SWGMeshtasticDemodSettings::setRgbColor(qint32 rgb_color) { + this->rgb_color = rgb_color; + this->m_rgb_color_isSet = true; +} + +QString* +SWGMeshtasticDemodSettings::getTitle() { + return title; +} +void +SWGMeshtasticDemodSettings::setTitle(QString* title) { + this->title = title; + this->m_title_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getStreamIndex() { + return stream_index; +} +void +SWGMeshtasticDemodSettings::setStreamIndex(qint32 stream_index) { + this->stream_index = stream_index; + this->m_stream_index_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getUseReverseApi() { + return use_reverse_api; +} +void +SWGMeshtasticDemodSettings::setUseReverseApi(qint32 use_reverse_api) { + this->use_reverse_api = use_reverse_api; + this->m_use_reverse_api_isSet = true; +} + +QString* +SWGMeshtasticDemodSettings::getReverseApiAddress() { + return reverse_api_address; +} +void +SWGMeshtasticDemodSettings::setReverseApiAddress(QString* reverse_api_address) { + this->reverse_api_address = reverse_api_address; + this->m_reverse_api_address_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getReverseApiPort() { + return reverse_api_port; +} +void +SWGMeshtasticDemodSettings::setReverseApiPort(qint32 reverse_api_port) { + this->reverse_api_port = reverse_api_port; + this->m_reverse_api_port_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getReverseApiDeviceIndex() { + return reverse_api_device_index; +} +void +SWGMeshtasticDemodSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) { + this->reverse_api_device_index = reverse_api_device_index; + this->m_reverse_api_device_index_isSet = true; +} + +qint32 +SWGMeshtasticDemodSettings::getReverseApiChannelIndex() { + return reverse_api_channel_index; +} +void +SWGMeshtasticDemodSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) { + this->reverse_api_channel_index = reverse_api_channel_index; + this->m_reverse_api_channel_index_isSet = true; +} + +SWGGLSpectrum* +SWGMeshtasticDemodSettings::getSpectrumConfig() { + return spectrum_config; +} +void +SWGMeshtasticDemodSettings::setSpectrumConfig(SWGGLSpectrum* spectrum_config) { + this->spectrum_config = spectrum_config; + this->m_spectrum_config_isSet = true; +} + +SWGChannelMarker* +SWGMeshtasticDemodSettings::getChannelMarker() { + return channel_marker; +} +void +SWGMeshtasticDemodSettings::setChannelMarker(SWGChannelMarker* channel_marker) { + this->channel_marker = channel_marker; + this->m_channel_marker_isSet = true; +} + +SWGRollupState* +SWGMeshtasticDemodSettings::getRollupState() { + return rollup_state; +} +void +SWGMeshtasticDemodSettings::setRollupState(SWGRollupState* rollup_state) { + this->rollup_state = rollup_state; + this->m_rollup_state_isSet = true; +} + + +bool +SWGMeshtasticDemodSettings::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_input_frequency_offset_isSet){ + isObjectUpdated = true; break; + } + if(m_bandwidth_index_isSet){ + isObjectUpdated = true; break; + } + if(m_spread_factor_isSet){ + isObjectUpdated = true; break; + } + if(m_de_bits_isSet){ + isObjectUpdated = true; break; + } + if(m_decode_active_isSet){ + isObjectUpdated = true; break; + } + if(m_eom_squelch_tenths_isSet){ + isObjectUpdated = true; break; + } + if(m_nb_symbols_max_isSet){ + isObjectUpdated = true; break; + } + if(m_preamble_chirps_isSet){ + isObjectUpdated = true; break; + } + if(m_nb_parity_bits_isSet){ + isObjectUpdated = true; break; + } + if(m_packet_length_isSet){ + isObjectUpdated = true; break; + } + if(m_send_via_udp_isSet){ + isObjectUpdated = true; break; + } + if(m_udp_enabled_isSet){ + isObjectUpdated = true; break; + } + if(udp_address && *udp_address != QString("")){ + isObjectUpdated = true; break; + } + if(m_udp_port_isSet){ + isObjectUpdated = true; break; + } + if(m_invert_ramps_isSet){ + isObjectUpdated = true; break; + } + if(m_rgb_color_isSet){ + isObjectUpdated = true; break; + } + if(title && *title != QString("")){ + isObjectUpdated = true; break; + } + if(m_stream_index_isSet){ + isObjectUpdated = true; break; + } + if(m_use_reverse_api_isSet){ + isObjectUpdated = true; break; + } + if(reverse_api_address && *reverse_api_address != QString("")){ + isObjectUpdated = true; break; + } + if(m_reverse_api_port_isSet){ + isObjectUpdated = true; break; + } + if(m_reverse_api_device_index_isSet){ + isObjectUpdated = true; break; + } + if(m_reverse_api_channel_index_isSet){ + isObjectUpdated = true; break; + } + if(spectrum_config && spectrum_config->isSet()){ + isObjectUpdated = true; break; + } + if(channel_marker && channel_marker->isSet()){ + isObjectUpdated = true; break; + } + if(rollup_state && rollup_state->isSet()){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodSettings.h b/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodSettings.h new file mode 100644 index 000000000..6116f11ec --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGMeshtasticDemodSettings.h @@ -0,0 +1,212 @@ +/** + * 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: 7.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGMeshtasticDemodSettings.h + * + * MeshtasticDemod + */ + +#ifndef SWGMeshtasticDemodSettings_H_ +#define SWGMeshtasticDemodSettings_H_ + +#include + + +#include "SWGChannelMarker.h" +#include "SWGGLSpectrum.h" +#include "SWGRollupState.h" +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGMeshtasticDemodSettings: public SWGObject { +public: + SWGMeshtasticDemodSettings(); + SWGMeshtasticDemodSettings(QString* json); + virtual ~SWGMeshtasticDemodSettings(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGMeshtasticDemodSettings* fromJson(QString &jsonString) override; + + qint64 getInputFrequencyOffset(); + void setInputFrequencyOffset(qint64 input_frequency_offset); + + qint32 getBandwidthIndex(); + void setBandwidthIndex(qint32 bandwidth_index); + + qint32 getSpreadFactor(); + void setSpreadFactor(qint32 spread_factor); + + qint32 getDeBits(); + void setDeBits(qint32 de_bits); + + qint32 getDecodeActive(); + void setDecodeActive(qint32 decode_active); + + qint32 getEomSquelchTenths(); + void setEomSquelchTenths(qint32 eom_squelch_tenths); + + qint32 getNbSymbolsMax(); + void setNbSymbolsMax(qint32 nb_symbols_max); + + qint32 getPreambleChirps(); + void setPreambleChirps(qint32 preamble_chirps); + + qint32 getNbParityBits(); + void setNbParityBits(qint32 nb_parity_bits); + + qint32 getPacketLength(); + void setPacketLength(qint32 packet_length); + + qint32 getSendViaUdp(); + void setSendViaUdp(qint32 send_via_udp); + + qint32 getUdpEnabled(); + void setUdpEnabled(qint32 udp_enabled); + + QString* getUdpAddress(); + void setUdpAddress(QString* udp_address); + + qint32 getUdpPort(); + void setUdpPort(qint32 udp_port); + + qint32 getInvertRamps(); + void setInvertRamps(qint32 invert_ramps); + + qint32 getRgbColor(); + void setRgbColor(qint32 rgb_color); + + QString* getTitle(); + void setTitle(QString* title); + + qint32 getStreamIndex(); + void setStreamIndex(qint32 stream_index); + + qint32 getUseReverseApi(); + void setUseReverseApi(qint32 use_reverse_api); + + QString* getReverseApiAddress(); + void setReverseApiAddress(QString* reverse_api_address); + + qint32 getReverseApiPort(); + void setReverseApiPort(qint32 reverse_api_port); + + qint32 getReverseApiDeviceIndex(); + void setReverseApiDeviceIndex(qint32 reverse_api_device_index); + + qint32 getReverseApiChannelIndex(); + void setReverseApiChannelIndex(qint32 reverse_api_channel_index); + + SWGGLSpectrum* getSpectrumConfig(); + void setSpectrumConfig(SWGGLSpectrum* spectrum_config); + + SWGChannelMarker* getChannelMarker(); + void setChannelMarker(SWGChannelMarker* channel_marker); + + SWGRollupState* getRollupState(); + void setRollupState(SWGRollupState* rollup_state); + + + virtual bool isSet() override; + +private: + qint64 input_frequency_offset; + bool m_input_frequency_offset_isSet; + + qint32 bandwidth_index; + bool m_bandwidth_index_isSet; + + qint32 spread_factor; + bool m_spread_factor_isSet; + + qint32 de_bits; + bool m_de_bits_isSet; + + qint32 decode_active; + bool m_decode_active_isSet; + + qint32 eom_squelch_tenths; + bool m_eom_squelch_tenths_isSet; + + qint32 nb_symbols_max; + bool m_nb_symbols_max_isSet; + + qint32 preamble_chirps; + bool m_preamble_chirps_isSet; + + qint32 nb_parity_bits; + bool m_nb_parity_bits_isSet; + + qint32 packet_length; + bool m_packet_length_isSet; + + qint32 send_via_udp; + bool m_send_via_udp_isSet; + + qint32 udp_enabled; + bool m_udp_enabled_isSet; + + QString* udp_address; + bool m_udp_address_isSet; + + qint32 udp_port; + bool m_udp_port_isSet; + + qint32 invert_ramps; + bool m_invert_ramps_isSet; + + qint32 rgb_color; + bool m_rgb_color_isSet; + + QString* title; + bool m_title_isSet; + + qint32 stream_index; + bool m_stream_index_isSet; + + qint32 use_reverse_api; + bool m_use_reverse_api_isSet; + + QString* reverse_api_address; + bool m_reverse_api_address_isSet; + + qint32 reverse_api_port; + bool m_reverse_api_port_isSet; + + qint32 reverse_api_device_index; + bool m_reverse_api_device_index_isSet; + + qint32 reverse_api_channel_index; + bool m_reverse_api_channel_index_isSet; + + SWGGLSpectrum* spectrum_config; + bool m_spectrum_config_isSet; + + SWGChannelMarker* channel_marker; + bool m_channel_marker_isSet; + + SWGRollupState* rollup_state; + bool m_rollup_state_isSet; + +}; + +} + +#endif /* SWGMeshtasticDemodSettings_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGMeshtasticModReport.cpp b/swagger/sdrangel/code/qt5/client/SWGMeshtasticModReport.cpp new file mode 100644 index 000000000..9cdfbe517 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGMeshtasticModReport.cpp @@ -0,0 +1,223 @@ +/** + * 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: 7.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGMeshtasticModReport.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGMeshtasticModReport::SWGMeshtasticModReport(QString* json) { + init(); + this->fromJson(*json); +} + +SWGMeshtasticModReport::SWGMeshtasticModReport() { + channel_power_db = 0.0f; + m_channel_power_db_isSet = false; + channel_sample_rate = 0; + m_channel_sample_rate_isSet = false; + symbol_time_ms = 0.0f; + m_symbol_time_ms_isSet = false; + payload_time_ms = 0.0f; + m_payload_time_ms_isSet = false; + total_time_ms = 0.0f; + m_total_time_ms_isSet = false; + playing = 0; + m_playing_isSet = false; +} + +SWGMeshtasticModReport::~SWGMeshtasticModReport() { + this->cleanup(); +} + +void +SWGMeshtasticModReport::init() { + channel_power_db = 0.0f; + m_channel_power_db_isSet = false; + channel_sample_rate = 0; + m_channel_sample_rate_isSet = false; + symbol_time_ms = 0.0f; + m_symbol_time_ms_isSet = false; + payload_time_ms = 0.0f; + m_payload_time_ms_isSet = false; + total_time_ms = 0.0f; + m_total_time_ms_isSet = false; + playing = 0; + m_playing_isSet = false; +} + +void +SWGMeshtasticModReport::cleanup() { + + + + + + +} + +SWGMeshtasticModReport* +SWGMeshtasticModReport::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGMeshtasticModReport::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", ""); + + ::SWGSDRangel::setValue(&channel_sample_rate, pJson["channelSampleRate"], "qint32", ""); + + ::SWGSDRangel::setValue(&symbol_time_ms, pJson["symbolTimeMs"], "float", ""); + + ::SWGSDRangel::setValue(&payload_time_ms, pJson["payloadTimeMs"], "float", ""); + + ::SWGSDRangel::setValue(&total_time_ms, pJson["totalTimeMs"], "float", ""); + + ::SWGSDRangel::setValue(&playing, pJson["playing"], "qint32", ""); + +} + +QString +SWGMeshtasticModReport::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGMeshtasticModReport::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_channel_power_db_isSet){ + obj->insert("channelPowerDB", QJsonValue(channel_power_db)); + } + if(m_channel_sample_rate_isSet){ + obj->insert("channelSampleRate", QJsonValue(channel_sample_rate)); + } + if(m_symbol_time_ms_isSet){ + obj->insert("symbolTimeMs", QJsonValue(symbol_time_ms)); + } + if(m_payload_time_ms_isSet){ + obj->insert("payloadTimeMs", QJsonValue(payload_time_ms)); + } + if(m_total_time_ms_isSet){ + obj->insert("totalTimeMs", QJsonValue(total_time_ms)); + } + if(m_playing_isSet){ + obj->insert("playing", QJsonValue(playing)); + } + + return obj; +} + +float +SWGMeshtasticModReport::getChannelPowerDb() { + return channel_power_db; +} +void +SWGMeshtasticModReport::setChannelPowerDb(float channel_power_db) { + this->channel_power_db = channel_power_db; + this->m_channel_power_db_isSet = true; +} + +qint32 +SWGMeshtasticModReport::getChannelSampleRate() { + return channel_sample_rate; +} +void +SWGMeshtasticModReport::setChannelSampleRate(qint32 channel_sample_rate) { + this->channel_sample_rate = channel_sample_rate; + this->m_channel_sample_rate_isSet = true; +} + +float +SWGMeshtasticModReport::getSymbolTimeMs() { + return symbol_time_ms; +} +void +SWGMeshtasticModReport::setSymbolTimeMs(float symbol_time_ms) { + this->symbol_time_ms = symbol_time_ms; + this->m_symbol_time_ms_isSet = true; +} + +float +SWGMeshtasticModReport::getPayloadTimeMs() { + return payload_time_ms; +} +void +SWGMeshtasticModReport::setPayloadTimeMs(float payload_time_ms) { + this->payload_time_ms = payload_time_ms; + this->m_payload_time_ms_isSet = true; +} + +float +SWGMeshtasticModReport::getTotalTimeMs() { + return total_time_ms; +} +void +SWGMeshtasticModReport::setTotalTimeMs(float total_time_ms) { + this->total_time_ms = total_time_ms; + this->m_total_time_ms_isSet = true; +} + +qint32 +SWGMeshtasticModReport::getPlaying() { + return playing; +} +void +SWGMeshtasticModReport::setPlaying(qint32 playing) { + this->playing = playing; + this->m_playing_isSet = true; +} + + +bool +SWGMeshtasticModReport::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_channel_power_db_isSet){ + isObjectUpdated = true; break; + } + if(m_channel_sample_rate_isSet){ + isObjectUpdated = true; break; + } + if(m_symbol_time_ms_isSet){ + isObjectUpdated = true; break; + } + if(m_payload_time_ms_isSet){ + isObjectUpdated = true; break; + } + if(m_total_time_ms_isSet){ + isObjectUpdated = true; break; + } + if(m_playing_isSet){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGMeshtasticModReport.h b/swagger/sdrangel/code/qt5/client/SWGMeshtasticModReport.h new file mode 100644 index 000000000..93064f611 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGMeshtasticModReport.h @@ -0,0 +1,88 @@ +/** + * 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: 7.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGMeshtasticModReport.h + * + * MeshtasticMod + */ + +#ifndef SWGMeshtasticModReport_H_ +#define SWGMeshtasticModReport_H_ + +#include + + + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGMeshtasticModReport: public SWGObject { +public: + SWGMeshtasticModReport(); + SWGMeshtasticModReport(QString* json); + virtual ~SWGMeshtasticModReport(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGMeshtasticModReport* fromJson(QString &jsonString) override; + + float getChannelPowerDb(); + void setChannelPowerDb(float channel_power_db); + + qint32 getChannelSampleRate(); + void setChannelSampleRate(qint32 channel_sample_rate); + + float getSymbolTimeMs(); + void setSymbolTimeMs(float symbol_time_ms); + + float getPayloadTimeMs(); + void setPayloadTimeMs(float payload_time_ms); + + float getTotalTimeMs(); + void setTotalTimeMs(float total_time_ms); + + qint32 getPlaying(); + void setPlaying(qint32 playing); + + + virtual bool isSet() override; + +private: + float channel_power_db; + bool m_channel_power_db_isSet; + + qint32 channel_sample_rate; + bool m_channel_sample_rate_isSet; + + float symbol_time_ms; + bool m_symbol_time_ms_isSet; + + float payload_time_ms; + bool m_payload_time_ms_isSet; + + float total_time_ms; + bool m_total_time_ms_isSet; + + qint32 playing; + bool m_playing_isSet; + +}; + +} + +#endif /* SWGMeshtasticModReport_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGMeshtasticModSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGMeshtasticModSettings.cpp new file mode 100644 index 000000000..29f86154e --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGMeshtasticModSettings.cpp @@ -0,0 +1,672 @@ +/** + * 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: 7.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGMeshtasticModSettings.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGMeshtasticModSettings::SWGMeshtasticModSettings(QString* json) { + init(); + this->fromJson(*json); +} + +SWGMeshtasticModSettings::SWGMeshtasticModSettings() { + input_frequency_offset = 0L; + m_input_frequency_offset_isSet = false; + bandwidth_index = 0; + m_bandwidth_index_isSet = false; + spread_factor = 0; + m_spread_factor_isSet = false; + de_bits = 0; + m_de_bits_isSet = false; + preamble_chirps = 0; + m_preamble_chirps_isSet = false; + quiet_millis = 0; + m_quiet_millis_isSet = false; + sync_word = 0; + m_sync_word_isSet = false; + channel_mute = 0; + m_channel_mute_isSet = false; + nb_parity_bits = 0; + m_nb_parity_bits_isSet = false; + text_message = nullptr; + m_text_message_isSet = false; + message_repeat = 0; + m_message_repeat_isSet = false; + udp_enabled = 0; + m_udp_enabled_isSet = false; + udp_address = nullptr; + m_udp_address_isSet = false; + udp_port = 0; + m_udp_port_isSet = false; + invert_ramps = 0; + m_invert_ramps_isSet = false; + rgb_color = 0; + m_rgb_color_isSet = false; + title = nullptr; + m_title_isSet = false; + stream_index = 0; + m_stream_index_isSet = false; + use_reverse_api = 0; + m_use_reverse_api_isSet = false; + reverse_api_address = nullptr; + m_reverse_api_address_isSet = false; + reverse_api_port = 0; + m_reverse_api_port_isSet = false; + reverse_api_device_index = 0; + m_reverse_api_device_index_isSet = false; + reverse_api_channel_index = 0; + m_reverse_api_channel_index_isSet = false; + channel_marker = nullptr; + m_channel_marker_isSet = false; + rollup_state = nullptr; + m_rollup_state_isSet = false; +} + +SWGMeshtasticModSettings::~SWGMeshtasticModSettings() { + this->cleanup(); +} + +void +SWGMeshtasticModSettings::init() { + input_frequency_offset = 0L; + m_input_frequency_offset_isSet = false; + bandwidth_index = 0; + m_bandwidth_index_isSet = false; + spread_factor = 0; + m_spread_factor_isSet = false; + de_bits = 0; + m_de_bits_isSet = false; + preamble_chirps = 0; + m_preamble_chirps_isSet = false; + quiet_millis = 0; + m_quiet_millis_isSet = false; + sync_word = 0; + m_sync_word_isSet = false; + channel_mute = 0; + m_channel_mute_isSet = false; + nb_parity_bits = 0; + m_nb_parity_bits_isSet = false; + text_message = new QString(""); + m_text_message_isSet = false; + message_repeat = 0; + m_message_repeat_isSet = false; + udp_enabled = 0; + m_udp_enabled_isSet = false; + udp_address = new QString(""); + m_udp_address_isSet = false; + udp_port = 0; + m_udp_port_isSet = false; + invert_ramps = 0; + m_invert_ramps_isSet = false; + rgb_color = 0; + m_rgb_color_isSet = false; + title = new QString(""); + m_title_isSet = false; + stream_index = 0; + m_stream_index_isSet = false; + use_reverse_api = 0; + m_use_reverse_api_isSet = false; + reverse_api_address = new QString(""); + m_reverse_api_address_isSet = false; + reverse_api_port = 0; + m_reverse_api_port_isSet = false; + reverse_api_device_index = 0; + m_reverse_api_device_index_isSet = false; + reverse_api_channel_index = 0; + m_reverse_api_channel_index_isSet = false; + channel_marker = new SWGChannelMarker(); + m_channel_marker_isSet = false; + rollup_state = new SWGRollupState(); + m_rollup_state_isSet = false; +} + +void +SWGMeshtasticModSettings::cleanup() { + + + + + + + + + + if(text_message != nullptr) { + delete text_message; + } + + + if(udp_address != nullptr) { + delete udp_address; + } + + + + if(title != nullptr) { + delete title; + } + + + if(reverse_api_address != nullptr) { + delete reverse_api_address; + } + + + + if(channel_marker != nullptr) { + delete channel_marker; + } + if(rollup_state != nullptr) { + delete rollup_state; + } +} + +SWGMeshtasticModSettings* +SWGMeshtasticModSettings::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGMeshtasticModSettings::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", ""); + + ::SWGSDRangel::setValue(&bandwidth_index, pJson["bandwidthIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&spread_factor, pJson["spreadFactor"], "qint32", ""); + + ::SWGSDRangel::setValue(&de_bits, pJson["deBits"], "qint32", ""); + + ::SWGSDRangel::setValue(&preamble_chirps, pJson["preambleChirps"], "qint32", ""); + + ::SWGSDRangel::setValue(&quiet_millis, pJson["quietMillis"], "qint32", ""); + + ::SWGSDRangel::setValue(&sync_word, pJson["syncWord"], "qint32", ""); + + ::SWGSDRangel::setValue(&channel_mute, pJson["channelMute"], "qint32", ""); + + ::SWGSDRangel::setValue(&nb_parity_bits, pJson["nbParityBits"], "qint32", ""); + + ::SWGSDRangel::setValue(&text_message, pJson["textMessage"], "QString", "QString"); + + ::SWGSDRangel::setValue(&message_repeat, pJson["messageRepeat"], "qint32", ""); + + ::SWGSDRangel::setValue(&udp_enabled, pJson["udpEnabled"], "qint32", ""); + + ::SWGSDRangel::setValue(&udp_address, pJson["udpAddress"], "QString", "QString"); + + ::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", ""); + + ::SWGSDRangel::setValue(&invert_ramps, pJson["invertRamps"], "qint32", ""); + + ::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", ""); + + ::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString"); + + ::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", ""); + + ::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString"); + + ::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", ""); + + ::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&channel_marker, pJson["channelMarker"], "SWGChannelMarker", "SWGChannelMarker"); + + ::SWGSDRangel::setValue(&rollup_state, pJson["rollupState"], "SWGRollupState", "SWGRollupState"); + +} + +QString +SWGMeshtasticModSettings::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGMeshtasticModSettings::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_input_frequency_offset_isSet){ + obj->insert("inputFrequencyOffset", QJsonValue(input_frequency_offset)); + } + if(m_bandwidth_index_isSet){ + obj->insert("bandwidthIndex", QJsonValue(bandwidth_index)); + } + if(m_spread_factor_isSet){ + obj->insert("spreadFactor", QJsonValue(spread_factor)); + } + if(m_de_bits_isSet){ + obj->insert("deBits", QJsonValue(de_bits)); + } + if(m_preamble_chirps_isSet){ + obj->insert("preambleChirps", QJsonValue(preamble_chirps)); + } + if(m_quiet_millis_isSet){ + obj->insert("quietMillis", QJsonValue(quiet_millis)); + } + if(m_sync_word_isSet){ + obj->insert("syncWord", QJsonValue(sync_word)); + } + if(m_channel_mute_isSet){ + obj->insert("channelMute", QJsonValue(channel_mute)); + } + if(m_nb_parity_bits_isSet){ + obj->insert("nbParityBits", QJsonValue(nb_parity_bits)); + } + if(text_message != nullptr && *text_message != QString("")){ + toJsonValue(QString("textMessage"), text_message, obj, QString("QString")); + } + if(m_message_repeat_isSet){ + obj->insert("messageRepeat", QJsonValue(message_repeat)); + } + if(m_udp_enabled_isSet){ + obj->insert("udpEnabled", QJsonValue(udp_enabled)); + } + if(udp_address != nullptr && *udp_address != QString("")){ + toJsonValue(QString("udpAddress"), udp_address, obj, QString("QString")); + } + if(m_udp_port_isSet){ + obj->insert("udpPort", QJsonValue(udp_port)); + } + if(m_invert_ramps_isSet){ + obj->insert("invertRamps", QJsonValue(invert_ramps)); + } + if(m_rgb_color_isSet){ + obj->insert("rgbColor", QJsonValue(rgb_color)); + } + if(title != nullptr && *title != QString("")){ + toJsonValue(QString("title"), title, obj, QString("QString")); + } + if(m_stream_index_isSet){ + obj->insert("streamIndex", QJsonValue(stream_index)); + } + if(m_use_reverse_api_isSet){ + obj->insert("useReverseAPI", QJsonValue(use_reverse_api)); + } + if(reverse_api_address != nullptr && *reverse_api_address != QString("")){ + toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString")); + } + if(m_reverse_api_port_isSet){ + obj->insert("reverseAPIPort", QJsonValue(reverse_api_port)); + } + if(m_reverse_api_device_index_isSet){ + obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index)); + } + if(m_reverse_api_channel_index_isSet){ + obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index)); + } + if((channel_marker != nullptr) && (channel_marker->isSet())){ + toJsonValue(QString("channelMarker"), channel_marker, obj, QString("SWGChannelMarker")); + } + if((rollup_state != nullptr) && (rollup_state->isSet())){ + toJsonValue(QString("rollupState"), rollup_state, obj, QString("SWGRollupState")); + } + + return obj; +} + +qint64 +SWGMeshtasticModSettings::getInputFrequencyOffset() { + return input_frequency_offset; +} +void +SWGMeshtasticModSettings::setInputFrequencyOffset(qint64 input_frequency_offset) { + this->input_frequency_offset = input_frequency_offset; + this->m_input_frequency_offset_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getBandwidthIndex() { + return bandwidth_index; +} +void +SWGMeshtasticModSettings::setBandwidthIndex(qint32 bandwidth_index) { + this->bandwidth_index = bandwidth_index; + this->m_bandwidth_index_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getSpreadFactor() { + return spread_factor; +} +void +SWGMeshtasticModSettings::setSpreadFactor(qint32 spread_factor) { + this->spread_factor = spread_factor; + this->m_spread_factor_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getDeBits() { + return de_bits; +} +void +SWGMeshtasticModSettings::setDeBits(qint32 de_bits) { + this->de_bits = de_bits; + this->m_de_bits_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getPreambleChirps() { + return preamble_chirps; +} +void +SWGMeshtasticModSettings::setPreambleChirps(qint32 preamble_chirps) { + this->preamble_chirps = preamble_chirps; + this->m_preamble_chirps_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getQuietMillis() { + return quiet_millis; +} +void +SWGMeshtasticModSettings::setQuietMillis(qint32 quiet_millis) { + this->quiet_millis = quiet_millis; + this->m_quiet_millis_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getSyncWord() { + return sync_word; +} +void +SWGMeshtasticModSettings::setSyncWord(qint32 sync_word) { + this->sync_word = sync_word; + this->m_sync_word_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getChannelMute() { + return channel_mute; +} +void +SWGMeshtasticModSettings::setChannelMute(qint32 channel_mute) { + this->channel_mute = channel_mute; + this->m_channel_mute_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getNbParityBits() { + return nb_parity_bits; +} +void +SWGMeshtasticModSettings::setNbParityBits(qint32 nb_parity_bits) { + this->nb_parity_bits = nb_parity_bits; + this->m_nb_parity_bits_isSet = true; +} + +QString* +SWGMeshtasticModSettings::getTextMessage() { + return text_message; +} +void +SWGMeshtasticModSettings::setTextMessage(QString* text_message) { + this->text_message = text_message; + this->m_text_message_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getMessageRepeat() { + return message_repeat; +} +void +SWGMeshtasticModSettings::setMessageRepeat(qint32 message_repeat) { + this->message_repeat = message_repeat; + this->m_message_repeat_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getUdpEnabled() { + return udp_enabled; +} +void +SWGMeshtasticModSettings::setUdpEnabled(qint32 udp_enabled) { + this->udp_enabled = udp_enabled; + this->m_udp_enabled_isSet = true; +} + +QString* +SWGMeshtasticModSettings::getUdpAddress() { + return udp_address; +} +void +SWGMeshtasticModSettings::setUdpAddress(QString* udp_address) { + this->udp_address = udp_address; + this->m_udp_address_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getUdpPort() { + return udp_port; +} +void +SWGMeshtasticModSettings::setUdpPort(qint32 udp_port) { + this->udp_port = udp_port; + this->m_udp_port_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getInvertRamps() { + return invert_ramps; +} +void +SWGMeshtasticModSettings::setInvertRamps(qint32 invert_ramps) { + this->invert_ramps = invert_ramps; + this->m_invert_ramps_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getRgbColor() { + return rgb_color; +} +void +SWGMeshtasticModSettings::setRgbColor(qint32 rgb_color) { + this->rgb_color = rgb_color; + this->m_rgb_color_isSet = true; +} + +QString* +SWGMeshtasticModSettings::getTitle() { + return title; +} +void +SWGMeshtasticModSettings::setTitle(QString* title) { + this->title = title; + this->m_title_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getStreamIndex() { + return stream_index; +} +void +SWGMeshtasticModSettings::setStreamIndex(qint32 stream_index) { + this->stream_index = stream_index; + this->m_stream_index_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getUseReverseApi() { + return use_reverse_api; +} +void +SWGMeshtasticModSettings::setUseReverseApi(qint32 use_reverse_api) { + this->use_reverse_api = use_reverse_api; + this->m_use_reverse_api_isSet = true; +} + +QString* +SWGMeshtasticModSettings::getReverseApiAddress() { + return reverse_api_address; +} +void +SWGMeshtasticModSettings::setReverseApiAddress(QString* reverse_api_address) { + this->reverse_api_address = reverse_api_address; + this->m_reverse_api_address_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getReverseApiPort() { + return reverse_api_port; +} +void +SWGMeshtasticModSettings::setReverseApiPort(qint32 reverse_api_port) { + this->reverse_api_port = reverse_api_port; + this->m_reverse_api_port_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getReverseApiDeviceIndex() { + return reverse_api_device_index; +} +void +SWGMeshtasticModSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) { + this->reverse_api_device_index = reverse_api_device_index; + this->m_reverse_api_device_index_isSet = true; +} + +qint32 +SWGMeshtasticModSettings::getReverseApiChannelIndex() { + return reverse_api_channel_index; +} +void +SWGMeshtasticModSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) { + this->reverse_api_channel_index = reverse_api_channel_index; + this->m_reverse_api_channel_index_isSet = true; +} + +SWGChannelMarker* +SWGMeshtasticModSettings::getChannelMarker() { + return channel_marker; +} +void +SWGMeshtasticModSettings::setChannelMarker(SWGChannelMarker* channel_marker) { + this->channel_marker = channel_marker; + this->m_channel_marker_isSet = true; +} + +SWGRollupState* +SWGMeshtasticModSettings::getRollupState() { + return rollup_state; +} +void +SWGMeshtasticModSettings::setRollupState(SWGRollupState* rollup_state) { + this->rollup_state = rollup_state; + this->m_rollup_state_isSet = true; +} + + +bool +SWGMeshtasticModSettings::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_input_frequency_offset_isSet){ + isObjectUpdated = true; break; + } + if(m_bandwidth_index_isSet){ + isObjectUpdated = true; break; + } + if(m_spread_factor_isSet){ + isObjectUpdated = true; break; + } + if(m_de_bits_isSet){ + isObjectUpdated = true; break; + } + if(m_preamble_chirps_isSet){ + isObjectUpdated = true; break; + } + if(m_quiet_millis_isSet){ + isObjectUpdated = true; break; + } + if(m_sync_word_isSet){ + isObjectUpdated = true; break; + } + if(m_channel_mute_isSet){ + isObjectUpdated = true; break; + } + if(m_nb_parity_bits_isSet){ + isObjectUpdated = true; break; + } + if(text_message && *text_message != QString("")){ + isObjectUpdated = true; break; + } + if(m_message_repeat_isSet){ + isObjectUpdated = true; break; + } + if(m_udp_enabled_isSet){ + isObjectUpdated = true; break; + } + if(udp_address && *udp_address != QString("")){ + isObjectUpdated = true; break; + } + if(m_udp_port_isSet){ + isObjectUpdated = true; break; + } + if(m_invert_ramps_isSet){ + isObjectUpdated = true; break; + } + if(m_rgb_color_isSet){ + isObjectUpdated = true; break; + } + if(title && *title != QString("")){ + isObjectUpdated = true; break; + } + if(m_stream_index_isSet){ + isObjectUpdated = true; break; + } + if(m_use_reverse_api_isSet){ + isObjectUpdated = true; break; + } + if(reverse_api_address && *reverse_api_address != QString("")){ + isObjectUpdated = true; break; + } + if(m_reverse_api_port_isSet){ + isObjectUpdated = true; break; + } + if(m_reverse_api_device_index_isSet){ + isObjectUpdated = true; break; + } + if(m_reverse_api_channel_index_isSet){ + isObjectUpdated = true; break; + } + if(channel_marker && channel_marker->isSet()){ + isObjectUpdated = true; break; + } + if(rollup_state && rollup_state->isSet()){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGMeshtasticModSettings.h b/swagger/sdrangel/code/qt5/client/SWGMeshtasticModSettings.h new file mode 100644 index 000000000..876d57fb3 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGMeshtasticModSettings.h @@ -0,0 +1,205 @@ +/** + * 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: 7.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGMeshtasticModSettings.h + * + * MeshtasticMod + */ + +#ifndef SWGMeshtasticModSettings_H_ +#define SWGMeshtasticModSettings_H_ + +#include + + +#include "SWGChannelMarker.h" +#include "SWGRollupState.h" +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGMeshtasticModSettings: public SWGObject { +public: + SWGMeshtasticModSettings(); + SWGMeshtasticModSettings(QString* json); + virtual ~SWGMeshtasticModSettings(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGMeshtasticModSettings* fromJson(QString &jsonString) override; + + qint64 getInputFrequencyOffset(); + void setInputFrequencyOffset(qint64 input_frequency_offset); + + qint32 getBandwidthIndex(); + void setBandwidthIndex(qint32 bandwidth_index); + + qint32 getSpreadFactor(); + void setSpreadFactor(qint32 spread_factor); + + qint32 getDeBits(); + void setDeBits(qint32 de_bits); + + qint32 getPreambleChirps(); + void setPreambleChirps(qint32 preamble_chirps); + + qint32 getQuietMillis(); + void setQuietMillis(qint32 quiet_millis); + + qint32 getSyncWord(); + void setSyncWord(qint32 sync_word); + + qint32 getChannelMute(); + void setChannelMute(qint32 channel_mute); + + qint32 getNbParityBits(); + void setNbParityBits(qint32 nb_parity_bits); + + QString* getTextMessage(); + void setTextMessage(QString* text_message); + + qint32 getMessageRepeat(); + void setMessageRepeat(qint32 message_repeat); + + qint32 getUdpEnabled(); + void setUdpEnabled(qint32 udp_enabled); + + QString* getUdpAddress(); + void setUdpAddress(QString* udp_address); + + qint32 getUdpPort(); + void setUdpPort(qint32 udp_port); + + qint32 getInvertRamps(); + void setInvertRamps(qint32 invert_ramps); + + qint32 getRgbColor(); + void setRgbColor(qint32 rgb_color); + + QString* getTitle(); + void setTitle(QString* title); + + qint32 getStreamIndex(); + void setStreamIndex(qint32 stream_index); + + qint32 getUseReverseApi(); + void setUseReverseApi(qint32 use_reverse_api); + + QString* getReverseApiAddress(); + void setReverseApiAddress(QString* reverse_api_address); + + qint32 getReverseApiPort(); + void setReverseApiPort(qint32 reverse_api_port); + + qint32 getReverseApiDeviceIndex(); + void setReverseApiDeviceIndex(qint32 reverse_api_device_index); + + qint32 getReverseApiChannelIndex(); + void setReverseApiChannelIndex(qint32 reverse_api_channel_index); + + SWGChannelMarker* getChannelMarker(); + void setChannelMarker(SWGChannelMarker* channel_marker); + + SWGRollupState* getRollupState(); + void setRollupState(SWGRollupState* rollup_state); + + + virtual bool isSet() override; + +private: + qint64 input_frequency_offset; + bool m_input_frequency_offset_isSet; + + qint32 bandwidth_index; + bool m_bandwidth_index_isSet; + + qint32 spread_factor; + bool m_spread_factor_isSet; + + qint32 de_bits; + bool m_de_bits_isSet; + + qint32 preamble_chirps; + bool m_preamble_chirps_isSet; + + qint32 quiet_millis; + bool m_quiet_millis_isSet; + + qint32 sync_word; + bool m_sync_word_isSet; + + qint32 channel_mute; + bool m_channel_mute_isSet; + + qint32 nb_parity_bits; + bool m_nb_parity_bits_isSet; + + QString* text_message; + bool m_text_message_isSet; + + qint32 message_repeat; + bool m_message_repeat_isSet; + + qint32 udp_enabled; + bool m_udp_enabled_isSet; + + QString* udp_address; + bool m_udp_address_isSet; + + qint32 udp_port; + bool m_udp_port_isSet; + + qint32 invert_ramps; + bool m_invert_ramps_isSet; + + qint32 rgb_color; + bool m_rgb_color_isSet; + + QString* title; + bool m_title_isSet; + + qint32 stream_index; + bool m_stream_index_isSet; + + qint32 use_reverse_api; + bool m_use_reverse_api_isSet; + + QString* reverse_api_address; + bool m_reverse_api_address_isSet; + + qint32 reverse_api_port; + bool m_reverse_api_port_isSet; + + qint32 reverse_api_device_index; + bool m_reverse_api_device_index_isSet; + + qint32 reverse_api_channel_index; + bool m_reverse_api_channel_index_isSet; + + SWGChannelMarker* channel_marker; + bool m_channel_marker_isSet; + + SWGRollupState* rollup_state; + bool m_rollup_state_isSet; + +}; + +} + +#endif /* SWGMeshtasticModSettings_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 97b85c5b5..4bf9cca40 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -226,6 +226,10 @@ #include "SWGMapItem_2.h" #include "SWGMapReport.h" #include "SWGMapSettings.h" +#include "SWGMeshtasticDemodReport.h" +#include "SWGMeshtasticDemodSettings.h" +#include "SWGMeshtasticModReport.h" +#include "SWGMeshtasticModSettings.h" #include "SWGMetisMISOSettings.h" #include "SWGMorseDecoderActions.h" #include "SWGMorseDecoderSettings.h" @@ -1456,6 +1460,26 @@ namespace SWGSDRangel { obj->init(); return obj; } + if(QString("SWGMeshtasticDemodReport").compare(type) == 0) { + SWGMeshtasticDemodReport *obj = new SWGMeshtasticDemodReport(); + obj->init(); + return obj; + } + if(QString("SWGMeshtasticDemodSettings").compare(type) == 0) { + SWGMeshtasticDemodSettings *obj = new SWGMeshtasticDemodSettings(); + obj->init(); + return obj; + } + if(QString("SWGMeshtasticModReport").compare(type) == 0) { + SWGMeshtasticModReport *obj = new SWGMeshtasticModReport(); + obj->init(); + return obj; + } + if(QString("SWGMeshtasticModSettings").compare(type) == 0) { + SWGMeshtasticModSettings *obj = new SWGMeshtasticModSettings(); + obj->init(); + return obj; + } if(QString("SWGMetisMISOSettings").compare(type) == 0) { SWGMetisMISOSettings *obj = new SWGMetisMISOSettings(); obj->init();