diff --git a/doc/img/LoRaDemod_message_binary.png b/doc/img/ChirpChatDemod_message_binary.png similarity index 100% rename from doc/img/LoRaDemod_message_binary.png rename to doc/img/ChirpChatDemod_message_binary.png diff --git a/doc/img/LoRaDemod_message_binary.xcf b/doc/img/ChirpChatDemod_message_binary.xcf similarity index 100% rename from doc/img/LoRaDemod_message_binary.xcf rename to doc/img/ChirpChatDemod_message_binary.xcf diff --git a/doc/img/LoRaDemod_message_string.png b/doc/img/ChirpChatDemod_message_string.png similarity index 100% rename from doc/img/LoRaDemod_message_string.png rename to doc/img/ChirpChatDemod_message_string.png diff --git a/doc/img/LoRaDemod_message_string.xcf b/doc/img/ChirpChatDemod_message_string.xcf similarity index 100% rename from doc/img/LoRaDemod_message_string.xcf rename to doc/img/ChirpChatDemod_message_string.xcf diff --git a/doc/img/LoRaDemod_payload.png b/doc/img/ChirpChatDemod_payload.png similarity index 100% rename from doc/img/LoRaDemod_payload.png rename to doc/img/ChirpChatDemod_payload.png diff --git a/doc/img/LoRaDemod_payload.xcf b/doc/img/ChirpChatDemod_payload.xcf similarity index 100% rename from doc/img/LoRaDemod_payload.xcf rename to doc/img/ChirpChatDemod_payload.xcf diff --git a/doc/img/ChirpChatDemod_plugin.png b/doc/img/ChirpChatDemod_plugin.png new file mode 100644 index 000000000..8979738bc Binary files /dev/null and b/doc/img/ChirpChatDemod_plugin.png differ diff --git a/doc/img/LoRaDemod_plugin.xcf b/doc/img/ChirpChatDemod_plugin.xcf similarity index 90% rename from doc/img/LoRaDemod_plugin.xcf rename to doc/img/ChirpChatDemod_plugin.xcf index 2b6a1ce93..0c4d90237 100644 Binary files a/doc/img/LoRaDemod_plugin.xcf and b/doc/img/ChirpChatDemod_plugin.xcf differ diff --git a/doc/img/LoRaDemod_plugin.png b/doc/img/LoRaDemod_plugin.png deleted file mode 100644 index 30dc1c403..000000000 Binary files a/doc/img/LoRaDemod_plugin.png and /dev/null differ diff --git a/plugins/channelrx/CMakeLists.txt b/plugins/channelrx/CMakeLists.txt index 040371539..3b65fc952 100644 --- a/plugins/channelrx/CMakeLists.txt +++ b/plugins/channelrx/CMakeLists.txt @@ -8,7 +8,7 @@ add_subdirectory(udpsink) add_subdirectory(demodwfm) add_subdirectory(localsink) add_subdirectory(freqtracker) -add_subdirectory(demodlora) +add_subdirectory(demodchirpchat) if(LIBDSDCC_FOUND AND LIBMBE_FOUND) add_subdirectory(demoddsd) diff --git a/plugins/channelrx/demodchirpchat/CMakeLists.txt b/plugins/channelrx/demodchirpchat/CMakeLists.txt new file mode 100644 index 000000000..6f81da7a5 --- /dev/null +++ b/plugins/channelrx/demodchirpchat/CMakeLists.txt @@ -0,0 +1,66 @@ +project(chirpchat) + +set(chirpchat_SOURCES + chirpchatdemod.cpp + chirpchatdemodsettings.cpp + chirpchatdemodsink.cpp + chirpchatdemodbaseband.cpp + chirpchatplugin.cpp + chirpchatdemoddecoder.cpp + chirpchatdemoddecodertty.cpp + chirpchatdemoddecoderascii.cpp + chirpchatdemoddecoderlora.cpp + chirpchatdemodmsg.cpp +) + +set(chirpchat_HEADERS + chirpchatdemod.h + chirpchatdemodsettings.h + chirpchatdemodsink.h + chirpchatdemodbaseband.h + chirpchatdemoddecoder.h + chirpchatdemoddecodertty.h + chirpchatdemoddecoderascii.h + chirpchatdemoddecoderlora.h + chirpchatdemodmsg.h + chirpchatplugin.h +) + +include_directories( + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client +) + +if(NOT SERVER_MODE) + set(chirpchat_SOURCES + ${chirpchat_SOURCES} + chirpchatdemodgui.cpp + chirpchatdemodgui.ui + ) + set(chirpchat_HEADERS + ${chirpchat_HEADERS} + chirpchatdemodgui.h + ) + set(TARGET_NAME demodchirpchat) + set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB_GUI "sdrgui") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) +else() + set(TARGET_NAME demodchirpchatsrv) + set(TARGET_LIB "") + set(TARGET_LIB_GUI "") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) +endif() + +add_library(${TARGET_NAME} SHARED + ${chirpchat_SOURCES} +) + +target_link_libraries(${TARGET_NAME} + Qt5::Core + ${TARGET_LIB} + sdrbase + ${TARGET_LIB_GUI} + swagger +) + +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channelrx/demodlora/lorademod.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp similarity index 61% rename from plugins/channelrx/demodlora/lorademod.cpp rename to plugins/channelrx/demodchirpchat/chirpchatdemod.cpp index 9a27846b4..3ae35cd97 100644 --- a/plugins/channelrx/demodlora/lorademod.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp @@ -33,19 +33,19 @@ #include "SWGChannelSettings.h" #include "SWGChannelReport.h" -#include "SWGLoRaDemodReport.h" +#include "SWGChirpChatDemodReport.h" -#include "lorademodmsg.h" -#include "lorademod.h" +#include "chirpchatdemodmsg.h" +#include "chirpchatdemod.h" -MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgConfigureLoRaDemod, Message) -MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgReportDecodeBytes, Message) -MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgReportDecodeString, Message) +MESSAGE_CLASS_DEFINITION(ChirpChatDemod::MsgConfigureChirpChatDemod, Message) +MESSAGE_CLASS_DEFINITION(ChirpChatDemod::MsgReportDecodeBytes, Message) +MESSAGE_CLASS_DEFINITION(ChirpChatDemod::MsgReportDecodeString, Message) -const QString LoRaDemod::m_channelIdURI = "sdrangel.channel.lorademod"; -const QString LoRaDemod::m_channelId = "LoRaDemod"; +const QString ChirpChatDemod::m_channelIdURI = "sdrangel.channel.chirpchatdemod"; +const QString ChirpChatDemod::m_channelId = "ChirpChatDemod"; -LoRaDemod::LoRaDemod(DeviceAPI* deviceAPI) : +ChirpChatDemod::ChirpChatDemod(DeviceAPI* deviceAPI) : ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink), m_deviceAPI(deviceAPI), m_basebandSampleRate(0), @@ -67,7 +67,7 @@ LoRaDemod::LoRaDemod(DeviceAPI* deviceAPI) : setObjectName(m_channelId); m_thread = new QThread(this); - m_basebandSink = new LoRaDemodBaseband(); + m_basebandSink = new ChirpChatDemodBaseband(); m_basebandSink->setDecoderMessageQueue(getInputMessageQueue()); // Decoder held on the main thread m_basebandSink->moveToThread(m_thread); @@ -77,7 +77,7 @@ LoRaDemod::LoRaDemod(DeviceAPI* deviceAPI) : m_deviceAPI->addChannelSinkAPI(this); } -LoRaDemod::~LoRaDemod() +ChirpChatDemod::~ChirpChatDemod() { m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this); @@ -85,20 +85,20 @@ LoRaDemod::~LoRaDemod() delete m_thread; } -uint32_t LoRaDemod::getNumberOfDeviceStreams() const +uint32_t ChirpChatDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); } -void LoRaDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool pO) +void ChirpChatDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool pO) { (void) pO; m_basebandSink->feed(begin, end); } -void LoRaDemod::start() +void ChirpChatDemod::start() { - qDebug() << "LoRaDemod::start"; + qDebug() << "ChirpChatDemod::start"; if (m_basebandSampleRate != 0) { m_basebandSink->setBasebandSampleRate(m_basebandSampleRate); @@ -108,33 +108,33 @@ void LoRaDemod::start() m_thread->start(); } -void LoRaDemod::stop() +void ChirpChatDemod::stop() { - qDebug() << "LoRaDemod::stop"; + qDebug() << "ChirpChatDemod::stop"; m_thread->exit(); m_thread->wait(); } -bool LoRaDemod::handleMessage(const Message& cmd) +bool ChirpChatDemod::handleMessage(const Message& cmd) { - if (MsgConfigureLoRaDemod::match(cmd)) + if (MsgConfigureChirpChatDemod::match(cmd)) { - qDebug() << "LoRaDemod::handleMessage: MsgConfigureLoRaDemod"; - MsgConfigureLoRaDemod& cfg = (MsgConfigureLoRaDemod&) cmd; - LoRaDemodSettings settings = cfg.getSettings(); + qDebug() << "ChirpChatDemod::handleMessage: MsgConfigureChirpChatDemod"; + MsgConfigureChirpChatDemod& cfg = (MsgConfigureChirpChatDemod&) cmd; + ChirpChatDemodSettings settings = cfg.getSettings(); applySettings(settings, cfg.getForce()); return true; } - else if (LoRaDemodMsg::MsgDecodeSymbols::match(cmd)) + else if (ChirpChatDemodMsg::MsgDecodeSymbols::match(cmd)) { - qDebug() << "LoRaDemod::handleMessage: MsgDecodeSymbols"; - LoRaDemodMsg::MsgDecodeSymbols& msg = (LoRaDemodMsg::MsgDecodeSymbols&) cmd; + qDebug() << "ChirpChatDemod::handleMessage: MsgDecodeSymbols"; + ChirpChatDemodMsg::MsgDecodeSymbols& msg = (ChirpChatDemodMsg::MsgDecodeSymbols&) cmd; m_lastMsgSignalDb = msg.getSingalDb(); m_lastMsgNoiseDb = msg.getNoiseDb(); m_lastMsgSyncWord = msg.getSyncWord(); - if (m_settings.m_codingScheme == LoRaDemodSettings::CodingLoRa) + if (m_settings.m_codingScheme == ChirpChatDemodSettings::CodingLoRa) { m_decoder.decodeSymbols(msg.getSymbols(), m_lastMsgBytes); QDateTime dt = QDateTime::currentDateTime(); @@ -182,13 +182,13 @@ bool LoRaDemod::handleMessage(const Message& cmd) if (m_settings.m_autoNbSymbolsMax) { - LoRaDemodSettings settings = m_settings; + ChirpChatDemodSettings settings = m_settings; settings.m_nbSymbolsMax = m_lastMsgNbSymbols; applySettings(settings); if (getMessageQueueToGUI()) // forward to GUI if any { - MsgConfigureLoRaDemod *msgToGUI = MsgConfigureLoRaDemod::create(settings, false); + MsgConfigureChirpChatDemod *msgToGUI = MsgConfigureChirpChatDemod::create(settings, false); getMessageQueueToGUI()->push(msgToGUI); } } @@ -224,7 +224,7 @@ bool LoRaDemod::handleMessage(const Message& cmd) m_basebandSampleRate = notif.getSampleRate(); // Forward to the sink DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy - qDebug() << "LoRaDemod::handleMessage: DSPSignalNotification: m_basebandSampleRate: " << m_basebandSampleRate; + qDebug() << "ChirpChatDemod::handleMessage: DSPSignalNotification: m_basebandSampleRate: " << m_basebandSampleRate; m_basebandSink->getInputMessageQueue()->push(rep); if (getMessageQueueToGUI()) @@ -241,31 +241,31 @@ bool LoRaDemod::handleMessage(const Message& cmd) } } -QByteArray LoRaDemod::serialize() const +QByteArray ChirpChatDemod::serialize() const { return m_settings.serialize(); } -bool LoRaDemod::deserialize(const QByteArray& data) +bool ChirpChatDemod::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { - MsgConfigureLoRaDemod *msg = MsgConfigureLoRaDemod::create(m_settings, true); + MsgConfigureChirpChatDemod *msg = MsgConfigureChirpChatDemod::create(m_settings, true); m_inputMessageQueue.push(msg); return true; } else { m_settings.resetToDefaults(); - MsgConfigureLoRaDemod *msg = MsgConfigureLoRaDemod::create(m_settings, true); + MsgConfigureChirpChatDemod *msg = MsgConfigureChirpChatDemod::create(m_settings, true); m_inputMessageQueue.push(msg); return false; } } -void LoRaDemod::applySettings(const LoRaDemodSettings& settings, bool force) +void ChirpChatDemod::applySettings(const ChirpChatDemodSettings& settings, bool force) { - qDebug() << "LoRaDemod::applySettings:" + qDebug() << "ChirpChatDemod::applySettings:" << " m_inputFrequencyOffset: " << settings.m_inputFrequencyOffset << " m_bandwidthIndex: " << settings.m_bandwidthIndex << " m_spreadFactor: " << settings.m_spreadFactor @@ -383,7 +383,8 @@ void LoRaDemod::applySettings(const LoRaDemodSettings& settings, bool force) reverseAPIKeys.append("streamIndex"); } - LoRaDemodBaseband::MsgConfigureLoRaDemodBaseband *msg = LoRaDemodBaseband::MsgConfigureLoRaDemodBaseband::create(settings, force); + ChirpChatDemodBaseband::MsgConfigureChirpChatDemodBaseband *msg = + ChirpChatDemodBaseband::MsgConfigureChirpChatDemodBaseband::create(settings, force); m_basebandSink->getInputMessageQueue()->push(msg); if (settings.m_useReverseAPI) @@ -399,34 +400,34 @@ void LoRaDemod::applySettings(const LoRaDemodSettings& settings, bool force) m_settings = settings; } -int LoRaDemod::webapiSettingsGet( +int ChirpChatDemod::webapiSettingsGet( SWGSDRangel::SWGChannelSettings& response, QString& errorMessage) { (void) errorMessage; - response.setLoRaDemodSettings(new SWGSDRangel::SWGLoRaDemodSettings()); - response.getLoRaDemodSettings()->init(); + response.setChirpChatDemodSettings(new SWGSDRangel::SWGChirpChatDemodSettings()); + response.getChirpChatDemodSettings()->init(); webapiFormatChannelSettings(response, m_settings); return 200; } -int LoRaDemod::webapiSettingsPutPatch( +int ChirpChatDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings& response, QString& errorMessage) { (void) errorMessage; - LoRaDemodSettings settings = m_settings; + ChirpChatDemodSettings settings = m_settings; webapiUpdateChannelSettings(settings, channelSettingsKeys, response); - MsgConfigureLoRaDemod *msg = MsgConfigureLoRaDemod::create(settings, force); + MsgConfigureChirpChatDemod *msg = MsgConfigureChirpChatDemod::create(settings, force); m_inputMessageQueue.push(msg); if (m_guiMessageQueue) // forward to GUI if any { - MsgConfigureLoRaDemod *msgToGUI = MsgConfigureLoRaDemod::create(settings, force); + MsgConfigureChirpChatDemod *msgToGUI = MsgConfigureChirpChatDemod::create(settings, force); m_guiMessageQueue->push(msgToGUI); } @@ -435,167 +436,167 @@ int LoRaDemod::webapiSettingsPutPatch( return 200; } -void LoRaDemod::webapiUpdateChannelSettings( - LoRaDemodSettings& settings, +void ChirpChatDemod::webapiUpdateChannelSettings( + ChirpChatDemodSettings& settings, const QStringList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings& response) { if (channelSettingsKeys.contains("inputFrequencyOffset")) { - settings.m_inputFrequencyOffset = response.getLoRaDemodSettings()->getInputFrequencyOffset(); + settings.m_inputFrequencyOffset = response.getChirpChatDemodSettings()->getInputFrequencyOffset(); } if (channelSettingsKeys.contains("bandwidthIndex")) { - settings.m_bandwidthIndex = response.getLoRaDemodSettings()->getBandwidthIndex(); + settings.m_bandwidthIndex = response.getChirpChatDemodSettings()->getBandwidthIndex(); } if (channelSettingsKeys.contains("spreadFactor")) { - settings.m_spreadFactor = response.getLoRaDemodSettings()->getSpreadFactor(); + settings.m_spreadFactor = response.getChirpChatDemodSettings()->getSpreadFactor(); } if (channelSettingsKeys.contains("deBits")) { - settings.m_deBits = response.getLoRaDemodSettings()->getDeBits(); + settings.m_deBits = response.getChirpChatDemodSettings()->getDeBits(); } if (channelSettingsKeys.contains("codingScheme")) { - settings.m_codingScheme = (LoRaDemodSettings::CodingScheme) response.getLoRaDemodSettings()->getCodingScheme(); + settings.m_codingScheme = (ChirpChatDemodSettings::CodingScheme) response.getChirpChatDemodSettings()->getCodingScheme(); } if (channelSettingsKeys.contains("decodeActive")) { - settings.m_decodeActive = response.getLoRaDemodSettings()->getDecodeActive() != 0; + settings.m_decodeActive = response.getChirpChatDemodSettings()->getDecodeActive() != 0; } if (channelSettingsKeys.contains("eomSquelchTenths")) { - settings.m_eomSquelchTenths = response.getLoRaDemodSettings()->getEomSquelchTenths(); + settings.m_eomSquelchTenths = response.getChirpChatDemodSettings()->getEomSquelchTenths(); } if (channelSettingsKeys.contains("nbSymbolsMax")) { - settings.m_nbSymbolsMax = response.getLoRaDemodSettings()->getNbSymbolsMax(); + settings.m_nbSymbolsMax = response.getChirpChatDemodSettings()->getNbSymbolsMax(); } if (channelSettingsKeys.contains("autoNbSymbolsMax")) { - settings.m_autoNbSymbolsMax = response.getLoRaDemodSettings()->getAutoNbSymbolsMax() != 0; + settings.m_autoNbSymbolsMax = response.getChirpChatDemodSettings()->getAutoNbSymbolsMax() != 0; } if (channelSettingsKeys.contains("preambleChirps")) { - settings.m_preambleChirps = response.getLoRaDemodSettings()->getPreambleChirps(); + settings.m_preambleChirps = response.getChirpChatDemodSettings()->getPreambleChirps(); } if (channelSettingsKeys.contains("nbParityBits")) { - settings.m_nbParityBits = response.getLoRaDemodSettings()->getNbParityBits(); + settings.m_nbParityBits = response.getChirpChatDemodSettings()->getNbParityBits(); } if (channelSettingsKeys.contains("packetLength")) { - settings.m_packetLength = response.getLoRaDemodSettings()->getPacketLength(); + settings.m_packetLength = response.getChirpChatDemodSettings()->getPacketLength(); } if (channelSettingsKeys.contains("hasCRC")) { - settings.m_hasCRC = response.getLoRaDemodSettings()->getHasCrc() != 0; + settings.m_hasCRC = response.getChirpChatDemodSettings()->getHasCrc() != 0; } if (channelSettingsKeys.contains("hasHeader")) { - settings.m_hasHeader = response.getLoRaDemodSettings()->getHasHeader() != 0; + settings.m_hasHeader = response.getChirpChatDemodSettings()->getHasHeader() != 0; } if (channelSettingsKeys.contains("sendViaUDP")) { - settings.m_sendViaUDP = response.getLoRaDemodSettings()->getSendViaUdp() != 0; + settings.m_sendViaUDP = response.getChirpChatDemodSettings()->getSendViaUdp() != 0; } if (channelSettingsKeys.contains("udpAddress")) { - settings.m_udpAddress = *response.getLoRaDemodSettings()->getUdpAddress(); + settings.m_udpAddress = *response.getChirpChatDemodSettings()->getUdpAddress(); } if (channelSettingsKeys.contains("udpPort")) { - uint16_t port = response.getLoRaDemodSettings()->getUdpPort(); + uint16_t port = response.getChirpChatDemodSettings()->getUdpPort(); settings.m_udpPort = port < 1024 ? 1024 : port > 65535 ? 65535 : port; } if (channelSettingsKeys.contains("rgbColor")) { - settings.m_rgbColor = response.getLoRaDemodSettings()->getRgbColor(); + settings.m_rgbColor = response.getChirpChatDemodSettings()->getRgbColor(); } if (channelSettingsKeys.contains("title")) { - settings.m_title = *response.getLoRaDemodSettings()->getTitle(); + settings.m_title = *response.getChirpChatDemodSettings()->getTitle(); } if (channelSettingsKeys.contains("streamIndex")) { - settings.m_streamIndex = response.getLoRaDemodSettings()->getStreamIndex(); + settings.m_streamIndex = response.getChirpChatDemodSettings()->getStreamIndex(); } if (channelSettingsKeys.contains("useReverseAPI")) { - settings.m_useReverseAPI = response.getLoRaDemodSettings()->getUseReverseApi() != 0; + settings.m_useReverseAPI = response.getChirpChatDemodSettings()->getUseReverseApi() != 0; } if (channelSettingsKeys.contains("reverseAPIAddress")) { - settings.m_reverseAPIAddress = *response.getLoRaDemodSettings()->getReverseApiAddress(); + settings.m_reverseAPIAddress = *response.getChirpChatDemodSettings()->getReverseApiAddress(); } if (channelSettingsKeys.contains("reverseAPIPort")) { - settings.m_reverseAPIPort = response.getLoRaDemodSettings()->getReverseApiPort(); + settings.m_reverseAPIPort = response.getChirpChatDemodSettings()->getReverseApiPort(); } if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) { - settings.m_reverseAPIDeviceIndex = response.getLoRaDemodSettings()->getReverseApiDeviceIndex(); + settings.m_reverseAPIDeviceIndex = response.getChirpChatDemodSettings()->getReverseApiDeviceIndex(); } if (channelSettingsKeys.contains("reverseAPIChannelIndex")) { - settings.m_reverseAPIChannelIndex = response.getLoRaDemodSettings()->getReverseApiChannelIndex(); + settings.m_reverseAPIChannelIndex = response.getChirpChatDemodSettings()->getReverseApiChannelIndex(); } } -int LoRaDemod::webapiReportGet( +int ChirpChatDemod::webapiReportGet( SWGSDRangel::SWGChannelReport& response, QString& errorMessage) { (void) errorMessage; - response.setLoRaDemodReport(new SWGSDRangel::SWGLoRaDemodReport()); - response.getLoRaDemodReport()->init(); + response.setChirpChatDemodReport(new SWGSDRangel::SWGChirpChatDemodReport()); + response.getChirpChatDemodReport()->init(); webapiFormatChannelReport(response); return 200; } -void LoRaDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const LoRaDemodSettings& settings) +void ChirpChatDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const ChirpChatDemodSettings& settings) { - response.getLoRaDemodSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); - response.getLoRaDemodSettings()->setBandwidthIndex(settings.m_bandwidthIndex); - response.getLoRaDemodSettings()->setSpreadFactor(settings.m_spreadFactor); - response.getLoRaDemodSettings()->setDeBits(settings.m_deBits); - response.getLoRaDemodSettings()->setCodingScheme((int) settings.m_codingScheme); - response.getLoRaDemodSettings()->setDecodeActive(settings.m_decodeActive ? 1 : 0); - response.getLoRaDemodSettings()->setEomSquelchTenths(settings.m_eomSquelchTenths); - response.getLoRaDemodSettings()->setNbSymbolsMax(settings.m_nbSymbolsMax); - response.getLoRaDemodSettings()->setAutoNbSymbolsMax(settings.m_autoNbSymbolsMax ? 1 : 0); - response.getLoRaDemodSettings()->setPreambleChirps(settings.m_preambleChirps); - response.getLoRaDemodSettings()->setNbParityBits(settings.m_nbParityBits); - response.getLoRaDemodSettings()->setHasCrc(settings.m_hasCRC ? 1 : 0); - response.getLoRaDemodSettings()->setHasHeader(settings.m_hasHeader ? 1 : 0); - response.getLoRaDemodSettings()->setSendViaUdp(settings.m_sendViaUDP ? 1 : 0); + 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()->setHasCrc(settings.m_hasCRC ? 1 : 0); + response.getChirpChatDemodSettings()->setHasHeader(settings.m_hasHeader ? 1 : 0); + response.getChirpChatDemodSettings()->setSendViaUdp(settings.m_sendViaUDP ? 1 : 0); - if (response.getLoRaDemodSettings()->getUdpAddress()) { - *response.getLoRaDemodSettings()->getUdpAddress() = settings.m_udpAddress; + if (response.getChirpChatDemodSettings()->getUdpAddress()) { + *response.getChirpChatDemodSettings()->getUdpAddress() = settings.m_udpAddress; } else { - response.getLoRaDemodSettings()->setUdpAddress(new QString(settings.m_udpAddress)); + response.getChirpChatDemodSettings()->setUdpAddress(new QString(settings.m_udpAddress)); } - response.getLoRaDemodSettings()->setUdpPort(settings.m_udpPort); - response.getLoRaDemodSettings()->setRgbColor(settings.m_rgbColor); + response.getChirpChatDemodSettings()->setUdpPort(settings.m_udpPort); + response.getChirpChatDemodSettings()->setRgbColor(settings.m_rgbColor); - if (response.getLoRaDemodSettings()->getTitle()) { - *response.getLoRaDemodSettings()->getTitle() = settings.m_title; + if (response.getChirpChatDemodSettings()->getTitle()) { + *response.getChirpChatDemodSettings()->getTitle() = settings.m_title; } else { - response.getLoRaDemodSettings()->setTitle(new QString(settings.m_title)); + response.getChirpChatDemodSettings()->setTitle(new QString(settings.m_title)); } - response.getLoRaDemodSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); + response.getChirpChatDemodSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); - if (response.getLoRaDemodSettings()->getReverseApiAddress()) { - *response.getLoRaDemodSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress; + if (response.getChirpChatDemodSettings()->getReverseApiAddress()) { + *response.getChirpChatDemodSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress; } else { - response.getLoRaDemodSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress)); + response.getChirpChatDemodSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress)); } - response.getLoRaDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort); - response.getLoRaDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); - response.getLoRaDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex); + response.getChirpChatDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort); + response.getChirpChatDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); + response.getChirpChatDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex); } -void LoRaDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) +void ChirpChatDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) { - response.getLoRaDemodReport()->setChannelPowerDb(CalcDb::dbPower(getTotalPower())); - response.getLoRaDemodReport()->setSignalPowerDb(m_lastMsgSignalDb); - response.getLoRaDemodReport()->setNoisePowerDb(CalcDb::dbPower(getCurrentNoiseLevel())); - response.getLoRaDemodReport()->setSnrPowerDb(m_lastMsgSignalDb - m_lastMsgNoiseDb); - response.getLoRaDemodReport()->setChannelSampleRate(m_basebandSink->getChannelSampleRate()); - response.getLoRaDemodReport()->setHasCrc(m_lastMsgHasCRC); - response.getLoRaDemodReport()->setNbParityBits(m_lastMsgNbParityBits); - response.getLoRaDemodReport()->setPacketLength(m_lastMsgPacketLength); - response.getLoRaDemodReport()->setNbSymbols(m_lastMsgNbSymbols); - response.getLoRaDemodReport()->setNbCodewords(m_lastMsgNbCodewords); - response.getLoRaDemodReport()->setHeaderParityStatus(m_lastMsgHeaderParityStatus); - response.getLoRaDemodReport()->setHeaderCrcStatus(m_lastMsgHeaderCRC); - response.getLoRaDemodReport()->setPayloadParityStatus(m_lastMsgPayloadParityStatus); - response.getLoRaDemodReport()->setPayloadCrcStatus(m_lastMsgPayloadCRC); - response.getLoRaDemodReport()->setMessageTimestamp(new QString(m_lastMsgTimestamp)); - response.getLoRaDemodReport()->setMessageString(new QString(m_lastMsgString)); + 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()->setChannelSampleRate(m_basebandSink->getChannelSampleRate()); + 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.getLoRaDemodReport()->setMessageBytes(new QList); - QList *bytesStr = response.getLoRaDemodReport()->getMessageBytes(); + response.getChirpChatDemodReport()->setMessageBytes(new QList); + QList *bytesStr = response.getChirpChatDemodReport()->getMessageBytes(); for (QByteArray::const_iterator it = m_lastMsgBytes.begin(); it != m_lastMsgBytes.end(); ++it) { @@ -604,71 +605,71 @@ void LoRaDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& respons } } -void LoRaDemod::webapiReverseSendSettings(QList& channelSettingsKeys, const LoRaDemodSettings& settings, bool force) +void ChirpChatDemod::webapiReverseSendSettings(QList& channelSettingsKeys, const ChirpChatDemodSettings& settings, bool force) { SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); swgChannelSettings->setDirection(1); // single source (Tx) swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet()); swgChannelSettings->setOriginatorDeviceSetIndex(getDeviceSetIndex()); - swgChannelSettings->setChannelType(new QString("LoRaMod")); - swgChannelSettings->setLoRaModSettings(new SWGSDRangel::SWGLoRaModSettings()); - SWGSDRangel::SWGLoRaDemodSettings *swgLoRaDemodSettings = swgChannelSettings->getLoRaDemodSettings(); + swgChannelSettings->setChannelType(new QString("ChirpChatDemod")); + swgChannelSettings->setChirpChatDemodSettings(new SWGSDRangel::SWGChirpChatDemodSettings()); + SWGSDRangel::SWGChirpChatDemodSettings *swgChirpChatDemodSettings = swgChannelSettings->getChirpChatDemodSettings(); // transfer data that has been modified. When force is on transfer all data except reverse API data if (channelSettingsKeys.contains("inputFrequencyOffset") || force) { - swgLoRaDemodSettings->setInputFrequencyOffset(settings.m_inputFrequencyOffset); + swgChirpChatDemodSettings->setInputFrequencyOffset(settings.m_inputFrequencyOffset); } if (channelSettingsKeys.contains("bandwidthIndex") || force) { - swgLoRaDemodSettings->setBandwidthIndex(settings.m_bandwidthIndex); + swgChirpChatDemodSettings->setBandwidthIndex(settings.m_bandwidthIndex); } if (channelSettingsKeys.contains("spreadFactor") || force) { - swgLoRaDemodSettings->setSpreadFactor(settings.m_spreadFactor); + swgChirpChatDemodSettings->setSpreadFactor(settings.m_spreadFactor); } if (channelSettingsKeys.contains("deBits") || force) { - swgLoRaDemodSettings->setDeBits(settings.m_deBits); + swgChirpChatDemodSettings->setDeBits(settings.m_deBits); } if (channelSettingsKeys.contains("codingScheme") || force) { - swgLoRaDemodSettings->setCodingScheme((int) settings.m_codingScheme); + swgChirpChatDemodSettings->setCodingScheme((int) settings.m_codingScheme); } if (channelSettingsKeys.contains("decodeActive") || force) { - swgLoRaDemodSettings->setDecodeActive(settings.m_decodeActive ? 1 : 0); + swgChirpChatDemodSettings->setDecodeActive(settings.m_decodeActive ? 1 : 0); } if (channelSettingsKeys.contains("eomSquelchTenths") || force) { - swgLoRaDemodSettings->setEomSquelchTenths(settings.m_eomSquelchTenths); + swgChirpChatDemodSettings->setEomSquelchTenths(settings.m_eomSquelchTenths); } if (channelSettingsKeys.contains("nbSymbolsMax") || force) { - swgLoRaDemodSettings->setNbSymbolsMax(settings.m_nbSymbolsMax); + swgChirpChatDemodSettings->setNbSymbolsMax(settings.m_nbSymbolsMax); } if (channelSettingsKeys.contains("autoNbSymbolsMax") || force) { - swgLoRaDemodSettings->setAutoNbSymbolsMax(settings.m_nbSymbolsMax ? 1 : 0); + swgChirpChatDemodSettings->setAutoNbSymbolsMax(settings.m_nbSymbolsMax ? 1 : 0); } if (channelSettingsKeys.contains("preambleChirps") || force) { - swgLoRaDemodSettings->setPreambleChirps(settings.m_preambleChirps); + swgChirpChatDemodSettings->setPreambleChirps(settings.m_preambleChirps); } if (channelSettingsKeys.contains("nbParityBits") || force) { - swgLoRaDemodSettings->setNbParityBits(settings.m_nbParityBits); + swgChirpChatDemodSettings->setNbParityBits(settings.m_nbParityBits); } if (channelSettingsKeys.contains("hasCRC") || force) { - swgLoRaDemodSettings->setHasCrc(settings.m_hasCRC ? 1 : 0); + swgChirpChatDemodSettings->setHasCrc(settings.m_hasCRC ? 1 : 0); } if (channelSettingsKeys.contains("hasHeader") || force) { - swgLoRaDemodSettings->setHasHeader(settings.m_hasHeader ? 1 : 0); + swgChirpChatDemodSettings->setHasHeader(settings.m_hasHeader ? 1 : 0); } if (channelSettingsKeys.contains("sendViaUDP") || force) { - swgLoRaDemodSettings->setSendViaUdp(settings.m_sendViaUDP ? 1 : 0); + swgChirpChatDemodSettings->setSendViaUdp(settings.m_sendViaUDP ? 1 : 0); } if (channelSettingsKeys.contains("udpAddress") || force) { - swgLoRaDemodSettings->setUdpAddress(new QString(settings.m_udpAddress)); + swgChirpChatDemodSettings->setUdpAddress(new QString(settings.m_udpAddress)); } if (channelSettingsKeys.contains("updPort") || force) { - swgLoRaDemodSettings->setUdpPort(settings.m_udpPort); + swgChirpChatDemodSettings->setUdpPort(settings.m_udpPort); } if (channelSettingsKeys.contains("rgbColor") || force) { - swgLoRaDemodSettings->setRgbColor(settings.m_rgbColor); + swgChirpChatDemodSettings->setRgbColor(settings.m_rgbColor); } if (channelSettingsKeys.contains("title") || force) { - swgLoRaDemodSettings->setTitle(new QString(settings.m_title)); + swgChirpChatDemodSettings->setTitle(new QString(settings.m_title)); } QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings") @@ -691,13 +692,13 @@ void LoRaDemod::webapiReverseSendSettings(QList& channelSettingsKeys, c delete swgChannelSettings; } -void LoRaDemod::networkManagerFinished(QNetworkReply *reply) +void ChirpChatDemod::networkManagerFinished(QNetworkReply *reply) { QNetworkReply::NetworkError replyError = reply->error(); if (replyError) { - qWarning() << "LoRaDemod::networkManagerFinished:" + qWarning() << "ChirpChatDemod::networkManagerFinished:" << " error(" << (int) replyError << "): " << replyError << ": " << reply->errorString(); @@ -706,23 +707,23 @@ void LoRaDemod::networkManagerFinished(QNetworkReply *reply) { QString answer = reply->readAll(); answer.chop(1); // remove last \n - qDebug("LoRaDemod::networkManagerFinished: reply:\n%s", answer.toStdString().c_str()); + qDebug("ChirpChatDemod::networkManagerFinished: reply:\n%s", answer.toStdString().c_str()); } reply->deleteLater(); } -bool LoRaDemod::getDemodActive() const +bool ChirpChatDemod::getDemodActive() const { return m_basebandSink->getDemodActive(); } -double LoRaDemod::getCurrentNoiseLevel() const +double ChirpChatDemod::getCurrentNoiseLevel() const { return m_basebandSink->getCurrentNoiseLevel(); } -double LoRaDemod::getTotalPower() const +double ChirpChatDemod::getTotalPower() const { return m_basebandSink->getTotalPower(); } diff --git a/plugins/channelrx/demodlora/lorademod.h b/plugins/channelrx/demodchirpchat/chirpchatdemod.h similarity index 89% rename from plugins/channelrx/demodlora/lorademod.h rename to plugins/channelrx/demodchirpchat/chirpchatdemod.h index ba9c078a3..88270d2ee 100644 --- a/plugins/channelrx/demodlora/lorademod.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.h @@ -17,8 +17,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LORADEMOD_H -#define INCLUDE_LORADEMOD_H +#ifndef INCLUDE_CHIRPCHATDEMOD_H +#define INCLUDE_CHIRPCHATDEMOD_H #include @@ -29,33 +29,33 @@ #include "util/message.h" #include "util/udpsinkutil.h" -#include "lorademodbaseband.h" -#include "lorademoddecoder.h" +#include "chirpchatdemodbaseband.h" +#include "chirpchatdemoddecoder.h" class QNetworkAccessManager; class QNetworkReply; class DeviceAPI; class QThread; -class LoRaDemod : public BasebandSampleSink, public ChannelAPI { +class ChirpChatDemod : public BasebandSampleSink, public ChannelAPI { public: - class MsgConfigureLoRaDemod : public Message { + class MsgConfigureChirpChatDemod : public Message { MESSAGE_CLASS_DECLARATION public: - const LoRaDemodSettings& getSettings() const { return m_settings; } + const ChirpChatDemodSettings& getSettings() const { return m_settings; } bool getForce() const { return m_force; } - static MsgConfigureLoRaDemod* create(const LoRaDemodSettings& settings, bool force) + static MsgConfigureChirpChatDemod* create(const ChirpChatDemodSettings& settings, bool force) { - return new MsgConfigureLoRaDemod(settings, force); + return new MsgConfigureChirpChatDemod(settings, force); } private: - LoRaDemodSettings m_settings; + ChirpChatDemodSettings m_settings; bool m_force; - MsgConfigureLoRaDemod(const LoRaDemodSettings& settings, bool force) : + MsgConfigureChirpChatDemod(const ChirpChatDemodSettings& settings, bool force) : Message(), m_settings(settings), m_force(force) @@ -197,8 +197,8 @@ public: { } }; - LoRaDemod(DeviceAPI* deviceAPI); - virtual ~LoRaDemod(); + ChirpChatDemod(DeviceAPI* deviceAPI); + virtual ~ChirpChatDemod(); virtual void destroy() { delete this; } void setSpectrumSink(BasebandSampleSink* sampleSink) { m_basebandSink->setSpectrumSink(sampleSink); } @@ -240,10 +240,10 @@ public: static void webapiFormatChannelSettings( SWGSDRangel::SWGChannelSettings& response, - const LoRaDemodSettings& settings); + const ChirpChatDemodSettings& settings); static void webapiUpdateChannelSettings( - LoRaDemodSettings& settings, + ChirpChatDemodSettings& settings, const QStringList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings& response); @@ -259,9 +259,9 @@ public: private: DeviceAPI *m_deviceAPI; QThread *m_thread; - LoRaDemodBaseband* m_basebandSink; - LoRaDemodDecoder m_decoder; - LoRaDemodSettings m_settings; + ChirpChatDemodBaseband* m_basebandSink; + ChirpChatDemodDecoder m_decoder; + ChirpChatDemodSettings m_settings; int m_basebandSampleRate; //!< stored from device message used when starting baseband sink float m_lastMsgSignalDb; float m_lastMsgNoiseDb; @@ -284,12 +284,12 @@ private: QNetworkAccessManager *m_networkManager; QNetworkRequest m_networkRequest; - void applySettings(const LoRaDemodSettings& settings, bool force = false); + void applySettings(const ChirpChatDemodSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); - void webapiReverseSendSettings(QList& channelSettingsKeys, const LoRaDemodSettings& settings, bool force); + void webapiReverseSendSettings(QList& channelSettingsKeys, const ChirpChatDemodSettings& settings, bool force); private slots: void networkManagerFinished(QNetworkReply *reply); }; -#endif // INCLUDE_LORADEMOD_H +#endif // INCLUDE_CHIRPCHATDEMOD_H diff --git a/plugins/channelrx/demodlora/lorademodbaseband.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemodbaseband.cpp similarity index 73% rename from plugins/channelrx/demodlora/lorademodbaseband.cpp rename to plugins/channelrx/demodchirpchat/chirpchatdemodbaseband.cpp index 467dc6c27..125f22588 100644 --- a/plugins/channelrx/demodlora/lorademodbaseband.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodbaseband.cpp @@ -21,45 +21,45 @@ #include "dsp/dspcommands.h" #include "dsp/downchannelizer.h" -#include "lorademodbaseband.h" +#include "chirpchatdemodbaseband.h" -MESSAGE_CLASS_DEFINITION(LoRaDemodBaseband::MsgConfigureLoRaDemodBaseband, Message) +MESSAGE_CLASS_DEFINITION(ChirpChatDemodBaseband::MsgConfigureChirpChatDemodBaseband, Message) -LoRaDemodBaseband::LoRaDemodBaseband() : +ChirpChatDemodBaseband::ChirpChatDemodBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_channelizer = new DownChannelizer(&m_sink); - qDebug("LoRaDemodBaseband::LoRaDemodBaseband"); + qDebug("ChirpChatDemodBaseband::ChirpChatDemodBaseband"); QObject::connect( &m_sampleFifo, &SampleSinkFifo::dataReady, this, - &LoRaDemodBaseband::handleData, + &ChirpChatDemodBaseband::handleData, Qt::QueuedConnection ); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages())); } -LoRaDemodBaseband::~LoRaDemodBaseband() +ChirpChatDemodBaseband::~ChirpChatDemodBaseband() { delete m_channelizer; } -void LoRaDemodBaseband::reset() +void ChirpChatDemodBaseband::reset() { QMutexLocker mutexLocker(&m_mutex); m_sampleFifo.reset(); } -void LoRaDemodBaseband::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end) +void ChirpChatDemodBaseband::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end) { m_sampleFifo.write(begin, end); } -void LoRaDemodBaseband::handleData() +void ChirpChatDemodBaseband::handleData() { QMutexLocker mutexLocker(&m_mutex); @@ -86,7 +86,7 @@ void LoRaDemodBaseband::handleData() } } -void LoRaDemodBaseband::handleInputMessages() +void ChirpChatDemodBaseband::handleInputMessages() { Message* message; @@ -98,13 +98,13 @@ void LoRaDemodBaseband::handleInputMessages() } } -bool LoRaDemodBaseband::handleMessage(const Message& cmd) +bool ChirpChatDemodBaseband::handleMessage(const Message& cmd) { - if (MsgConfigureLoRaDemodBaseband::match(cmd)) + if (MsgConfigureChirpChatDemodBaseband::match(cmd)) { QMutexLocker mutexLocker(&m_mutex); - MsgConfigureLoRaDemodBaseband& cfg = (MsgConfigureLoRaDemodBaseband&) cmd; - qDebug() << "LoRaDemodBaseband::handleMessage: MsgConfigureLoRaDemodBaseband"; + MsgConfigureChirpChatDemodBaseband& cfg = (MsgConfigureChirpChatDemodBaseband&) cmd; + qDebug() << "ChirpChatDemodBaseband::handleMessage: MsgConfigureChirpChatDemodBaseband"; applySettings(cfg.getSettings(), cfg.getForce()); @@ -114,12 +114,12 @@ bool LoRaDemodBaseband::handleMessage(const Message& cmd) { QMutexLocker mutexLocker(&m_mutex); DSPSignalNotification& notif = (DSPSignalNotification&) cmd; - qDebug() << "LoRaDemodBaseband::handleMessage: DSPSignalNotification: basebandSampleRate: " << notif.getSampleRate(); + qDebug() << "ChirpChatDemodBaseband::handleMessage: DSPSignalNotification: basebandSampleRate: " << notif.getSampleRate(); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(notif.getSampleRate())); m_channelizer->setBasebandSampleRate(notif.getSampleRate()); m_sink.applyChannelSettings( m_channelizer->getChannelSampleRate(), - LoRaDemodSettings::bandwidths[m_settings.m_bandwidthIndex], + ChirpChatDemodSettings::bandwidths[m_settings.m_bandwidthIndex], m_channelizer->getChannelFrequencyOffset() ); @@ -131,18 +131,18 @@ bool LoRaDemodBaseband::handleMessage(const Message& cmd) } } -void LoRaDemodBaseband::applySettings(const LoRaDemodSettings& settings, bool force) +void ChirpChatDemodBaseband::applySettings(const ChirpChatDemodSettings& settings, bool force) { if ((settings.m_bandwidthIndex != m_settings.m_bandwidthIndex) || (settings.m_inputFrequencyOffset != m_settings.m_inputFrequencyOffset) || force) { m_channelizer->setChannelization( - LoRaDemodSettings::bandwidths[settings.m_bandwidthIndex]*LoRaDemodSettings::oversampling, + ChirpChatDemodSettings::bandwidths[settings.m_bandwidthIndex]*ChirpChatDemodSettings::oversampling, settings.m_inputFrequencyOffset ); m_sink.applyChannelSettings( m_channelizer->getChannelSampleRate(), - LoRaDemodSettings::bandwidths[settings.m_bandwidthIndex], + ChirpChatDemodSettings::bandwidths[settings.m_bandwidthIndex], m_channelizer->getChannelFrequencyOffset() ); } @@ -152,18 +152,18 @@ void LoRaDemodBaseband::applySettings(const LoRaDemodSettings& settings, bool fo m_settings = settings; } -int LoRaDemodBaseband::getChannelSampleRate() const +int ChirpChatDemodBaseband::getChannelSampleRate() const { return m_channelizer->getChannelSampleRate(); } -void LoRaDemodBaseband::setBasebandSampleRate(int sampleRate) +void ChirpChatDemodBaseband::setBasebandSampleRate(int sampleRate) { m_channelizer->setBasebandSampleRate(sampleRate); m_sink.applyChannelSettings( m_channelizer->getChannelSampleRate(), - LoRaDemodSettings::bandwidths[m_settings.m_bandwidthIndex], + ChirpChatDemodSettings::bandwidths[m_settings.m_bandwidthIndex], m_channelizer->getChannelFrequencyOffset() ); } diff --git a/plugins/channelrx/demodlora/lorademodbaseband.h b/plugins/channelrx/demodchirpchat/chirpchatdemodbaseband.h similarity index 76% rename from plugins/channelrx/demodlora/lorademodbaseband.h rename to plugins/channelrx/demodchirpchat/chirpchatdemodbaseband.h index 0766dca45..fc7bf8182 100644 --- a/plugins/channelrx/demodlora/lorademodbaseband.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodbaseband.h @@ -15,8 +15,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LORADEMODBASEBAND_H -#define INCLUDE_LORADEMODBASEBAND_H +#ifndef INCLUDE_CHIRPCHATDEMODBASEBAND_H +#define INCLUDE_CHIRPCHATDEMODBASEBAND_H #include #include @@ -25,39 +25,39 @@ #include "util/message.h" #include "util/messagequeue.h" -#include "lorademodsink.h" +#include "chirpchatdemodsink.h" class DownChannelizer; -class LoRaDemodBaseband : public QObject +class ChirpChatDemodBaseband : public QObject { Q_OBJECT public: - class MsgConfigureLoRaDemodBaseband : public Message { + class MsgConfigureChirpChatDemodBaseband : public Message { MESSAGE_CLASS_DECLARATION public: - const LoRaDemodSettings& getSettings() const { return m_settings; } + const ChirpChatDemodSettings& getSettings() const { return m_settings; } bool getForce() const { return m_force; } - static MsgConfigureLoRaDemodBaseband* create(const LoRaDemodSettings& settings, bool force) + static MsgConfigureChirpChatDemodBaseband* create(const ChirpChatDemodSettings& settings, bool force) { - return new MsgConfigureLoRaDemodBaseband(settings, force); + return new MsgConfigureChirpChatDemodBaseband(settings, force); } private: - LoRaDemodSettings m_settings; + ChirpChatDemodSettings m_settings; bool m_force; - MsgConfigureLoRaDemodBaseband(const LoRaDemodSettings& settings, bool force) : + MsgConfigureChirpChatDemodBaseband(const ChirpChatDemodSettings& settings, bool force) : Message(), m_settings(settings), m_force(force) { } }; - LoRaDemodBaseband(); - ~LoRaDemodBaseband(); + ChirpChatDemodBaseband(); + ~ChirpChatDemodBaseband(); void reset(); void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } //!< Get the queue for asynchronous inbound communication @@ -72,17 +72,17 @@ public: private: SampleSinkFifo m_sampleFifo; DownChannelizer *m_channelizer; - LoRaDemodSink m_sink; + ChirpChatDemodSink m_sink; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication - LoRaDemodSettings m_settings; + ChirpChatDemodSettings m_settings; QMutex m_mutex; bool handleMessage(const Message& cmd); - void applySettings(const LoRaDemodSettings& settings, bool force = false); + void applySettings(const ChirpChatDemodSettings& settings, bool force = false); private slots: void handleInputMessages(); void handleData(); //!< Handle data when samples have to be processed }; -#endif // INCLUDE_LORADEMODBASEBAND_H +#endif // INCLUDE_CHIRPCHATDEMODBASEBAND_H diff --git a/plugins/channelrx/demodlora/lorademoddecoder.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoder.cpp similarity index 72% rename from plugins/channelrx/demodlora/lorademoddecoder.cpp rename to plugins/channelrx/demodchirpchat/chirpchatdemoddecoder.cpp index e9d46cb38..7551c43fc 100644 --- a/plugins/channelrx/demodlora/lorademoddecoder.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoder.cpp @@ -15,23 +15,23 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include "lorademoddecoder.h" -#include "lorademoddecodertty.h" -#include "lorademoddecoderascii.h" -#include "lorademoddecoderlora.h" +#include "chirpchatdemoddecoder.h" +#include "chirpchatdemoddecodertty.h" +#include "chirpchatdemoddecoderascii.h" +#include "chirpchatdemoddecoderlora.h" -LoRaDemodDecoder::LoRaDemodDecoder() : - m_codingScheme(LoRaDemodSettings::CodingTTY), +ChirpChatDemodDecoder::ChirpChatDemodDecoder() : + m_codingScheme(ChirpChatDemodSettings::CodingTTY), m_nbSymbolBits(5), m_nbParityBits(1), m_hasCRC(true), m_hasHeader(true) {} -LoRaDemodDecoder::~LoRaDemodDecoder() +ChirpChatDemodDecoder::~ChirpChatDemodDecoder() {} -void LoRaDemodDecoder::setNbSymbolBits(unsigned int spreadFactor, unsigned int deBits) +void ChirpChatDemodDecoder::setNbSymbolBits(unsigned int spreadFactor, unsigned int deBits) { m_spreadFactor = spreadFactor; @@ -44,18 +44,18 @@ void LoRaDemodDecoder::setNbSymbolBits(unsigned int spreadFactor, unsigned int d m_nbSymbolBits = m_spreadFactor - m_deBits; } -void LoRaDemodDecoder::decodeSymbols(const std::vector& symbols, QString& str) +void ChirpChatDemodDecoder::decodeSymbols(const std::vector& symbols, QString& str) { switch(m_codingScheme) { - case LoRaDemodSettings::CodingTTY: + case ChirpChatDemodSettings::CodingTTY: if (m_nbSymbolBits == 5) { - LoRaDemodDecoderTTY::decodeSymbols(symbols, str); + ChirpChatDemodDecoderTTY::decodeSymbols(symbols, str); } break; - case LoRaDemodSettings::CodingASCII: + case ChirpChatDemodSettings::CodingASCII: if (m_nbSymbolBits == 5) { - LoRaDemodDecoderASCII::decodeSymbols(symbols, str); + ChirpChatDemodDecoderASCII::decodeSymbols(symbols, str); } break; default: @@ -63,14 +63,14 @@ void LoRaDemodDecoder::decodeSymbols(const std::vector& symbols, } } -void LoRaDemodDecoder::decodeSymbols(const std::vector& symbols, QByteArray& bytes) +void ChirpChatDemodDecoder::decodeSymbols(const std::vector& symbols, QByteArray& bytes) { switch(m_codingScheme) { - case LoRaDemodSettings::CodingLoRa: + case ChirpChatDemodSettings::CodingLoRa: if (m_nbSymbolBits >= 5) { - LoRaDemodDecoderLoRa::decodeBytes( + ChirpChatDemodDecoderLoRa::decodeBytes( bytes, symbols, m_nbSymbolBits, @@ -84,7 +84,7 @@ void LoRaDemodDecoder::decodeSymbols(const std::vector& symbols, m_payloadParityStatus, m_payloadCRCStatus ); - LoRaDemodDecoderLoRa::getCodingMetrics( + ChirpChatDemodDecoderLoRa::getCodingMetrics( m_nbSymbolBits, m_nbParityBits, m_packetLength, diff --git a/plugins/channelrx/demodlora/lorademoddecoder.h b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoder.h similarity index 89% rename from plugins/channelrx/demodlora/lorademoddecoder.h rename to plugins/channelrx/demodchirpchat/chirpchatdemoddecoder.h index ffe79a88e..194690787 100644 --- a/plugins/channelrx/demodlora/lorademoddecoder.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoder.h @@ -15,19 +15,19 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LORADEMODDECODER_H -#define INCLUDE_LORADEMODDECODER_H +#ifndef INCLUDE_CHIRPCHATDEMODDECODER_H +#define INCLUDE_CHIRPCHATDEMODDECODER_H #include -#include "lorademodsettings.h" +#include "chirpchatdemodsettings.h" -class LoRaDemodDecoder +class ChirpChatDemodDecoder { public: - LoRaDemodDecoder(); - ~LoRaDemodDecoder(); + ChirpChatDemodDecoder(); + ~ChirpChatDemodDecoder(); - void setCodingScheme(LoRaDemodSettings::CodingScheme codingScheme) { m_codingScheme = codingScheme; } + void setCodingScheme(ChirpChatDemodSettings::CodingScheme codingScheme) { m_codingScheme = codingScheme; } void setNbSymbolBits(unsigned int spreadFactor, unsigned int deBits); void setLoRaParityBits(unsigned int parityBits) { m_nbParityBits = parityBits; } void setLoRaHasHeader(bool hasHeader) { m_hasHeader = hasHeader; } @@ -47,7 +47,7 @@ public: bool getPayloadCRCStatus() const { return m_payloadCRCStatus; } private: - LoRaDemodSettings::CodingScheme m_codingScheme; + ChirpChatDemodSettings::CodingScheme m_codingScheme; unsigned int m_spreadFactor; unsigned int m_deBits; unsigned int m_nbSymbolBits; @@ -65,4 +65,4 @@ private: bool m_payloadCRCStatus; }; -#endif // INCLUDE_LORADEMODDECODER_H +#endif // INCLUDE_CHIRPCHATDEMODDECODER_H diff --git a/plugins/channelrx/demodlora/lorademoddecoderascii.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoderascii.cpp similarity index 91% rename from plugins/channelrx/demodlora/lorademoddecoderascii.cpp rename to plugins/channelrx/demodchirpchat/chirpchatdemoddecoderascii.cpp index f70043fbe..a46424c0a 100644 --- a/plugins/channelrx/demodlora/lorademoddecoderascii.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoderascii.cpp @@ -15,9 +15,9 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include "lorademoddecoderascii.h" +#include "chirpchatdemoddecoderascii.h" -void LoRaDemodDecoderASCII::decodeSymbols(const std::vector& symbols, QString& str) +void ChirpChatDemodDecoderASCII::decodeSymbols(const std::vector& symbols, QString& str) { std::vector::const_iterator it = symbols.begin(); QByteArray bytes; diff --git a/plugins/channelrx/demodlora/lorademoddecoderascii.h b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoderascii.h similarity index 89% rename from plugins/channelrx/demodlora/lorademoddecoderascii.h rename to plugins/channelrx/demodchirpchat/chirpchatdemoddecoderascii.h index a014dd94f..29df80541 100644 --- a/plugins/channelrx/demodlora/lorademoddecoderascii.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoderascii.h @@ -15,16 +15,16 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LORADEMODDECODERASCII_H -#define INCLUDE_LORADEMODDECODERASCII_H +#ifndef INCLUDE_CHIRPCHATDEMODDECODERASCII_H +#define INCLUDE_CHIRPCHATDEMODDECODERASCII_H #include #include -class LoRaDemodDecoderASCII +class ChirpChatDemodDecoderASCII { public: static void decodeSymbols(const std::vector& symbols, QString& str); }; -#endif // INCLUDE_LORADEMODDECODERASCII_H +#endif // INCLUDE_CHIRPCHATDEMODDECODERASCII_H diff --git a/plugins/channelrx/demodlora/lorademoddecoderlora.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoderlora.cpp similarity index 95% rename from plugins/channelrx/demodlora/lorademoddecoderlora.cpp rename to plugins/channelrx/demodchirpchat/chirpchatdemoddecoderlora.cpp index 530ba599a..19aa9e3d5 100644 --- a/plugins/channelrx/demodlora/lorademoddecoderlora.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoderlora.cpp @@ -17,9 +17,9 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include "lorademoddecoderlora.h" +#include "chirpchatdemoddecoderlora.h" -void LoRaDemodDecoderLoRa::decodeHeader( +void ChirpChatDemodDecoderLoRa::decodeHeader( const std::vector& inSymbols, unsigned int nbSymbolBits, bool& hasCRC, @@ -96,7 +96,7 @@ void LoRaDemodDecoderLoRa::decodeHeader( packetLength = bytes[0]; } -void LoRaDemodDecoderLoRa::decodeBytes( +void ChirpChatDemodDecoderLoRa::decodeBytes( QByteArray& inBytes, const std::vector& inSymbols, unsigned int nbSymbolBits, @@ -114,7 +114,7 @@ void LoRaDemodDecoderLoRa::decodeBytes( // need at least a header (8 symbols of 8 bit codewords) whether an actual header is sent or not if (inSymbols.size() < headerSymbols) { - qDebug("LoRaDemodDecoderLoRa::decodeBytes: need at least %u symbols for header", headerSymbols); + qDebug("ChirpChatDemodDecoderLoRa::decodeBytes: need at least %u symbols for header", headerSymbols); earlyEOM = true; return; } @@ -136,12 +136,12 @@ void LoRaDemodDecoderLoRa::decodeBytes( ); } - qDebug("LoRaDemodDecoderLoRa::decodeBytes: crc: %s nbParityBits: %u packetLength: %u", + qDebug("ChirpChatDemodDecoderLoRa::decodeBytes: crc: %s nbParityBits: %u packetLength: %u", hasCRC ? "on": "off", nbParityBits, packetLength); if (nbParityBits > 4) { - qDebug("LoRaDemodDecoderLoRa::decodeBytes: invalid parity bits in header: %u", nbParityBits); + qDebug("ChirpChatDemodDecoderLoRa::decodeBytes: invalid parity bits in header: %u", nbParityBits); return; } @@ -222,7 +222,7 @@ void LoRaDemodDecoderLoRa::decodeBytes( if (dataLength > bytes.size()) { - qDebug("LoRaDemodDecoderLoRa::decodeBytes: not enough data %lu vs %u", bytes.size(), dataLength); + qDebug("ChirpChatDemodDecoderLoRa::decodeBytes: not enough data %lu vs %u", bytes.size(), dataLength); earlyEOM = true; return; } @@ -352,7 +352,7 @@ void LoRaDemodDecoderLoRa::decodeBytes( std::copy(bytes.data() + dOfs, bytes.data() + dOfs + dataLength, inBytes.data()); } -void LoRaDemodDecoderLoRa::getCodingMetrics( +void ChirpChatDemodDecoderLoRa::getCodingMetrics( unsigned int nbSymbolBits, unsigned int nbParityBits, unsigned int packetLength, diff --git a/plugins/channelrx/demodlora/lorademoddecoderlora.h b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoderlora.h similarity index 98% rename from plugins/channelrx/demodlora/lorademoddecoderlora.h rename to plugins/channelrx/demodchirpchat/chirpchatdemoddecoderlora.h index 3f1bf4d84..25926f9a2 100644 --- a/plugins/channelrx/demodlora/lorademoddecoderlora.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemoddecoderlora.h @@ -17,13 +17,13 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LORADEMODDECODERLORA_H -#define INCLUDE_LORADEMODDECODERLORA_H +#ifndef INCLUDE_CHIRPCHATDEMODDECODERLORA_H +#define INCLUDE_CHIRPCHATDEMODDECODERLORA_H #include #include -class LoRaDemodDecoderLoRa +class ChirpChatDemodDecoderLoRa { public: enum ParityStatus @@ -354,4 +354,4 @@ private: } }; -#endif // INCLUDE_LORADEMODDECODERLORA_H +#endif // INCLUDE_CHIRPCHATDEMODDECODERLORA_H diff --git a/plugins/channelrx/demodlora/lorademoddecodertty.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemoddecodertty.cpp similarity index 90% rename from plugins/channelrx/demodlora/lorademoddecodertty.cpp rename to plugins/channelrx/demodchirpchat/chirpchatdemoddecodertty.cpp index 277a8ca95..6c746f624 100644 --- a/plugins/channelrx/demodlora/lorademoddecodertty.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemoddecodertty.cpp @@ -15,23 +15,23 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include "lorademoddecodertty.h" +#include "chirpchatdemoddecodertty.h" -const char LoRaDemodDecoderTTY::ttyLetters[32] = { +const char ChirpChatDemodDecoderTTY::ttyLetters[32] = { '\0', 'E', '\n', 'A', ' ', 'S', 'I', 'U', '\r', 'D', 'R', 'J', 'N', 'F', 'C', 'K', 'T', 'Z', 'L', 'W', 'H', 'Y', 'P', 'Q', 'O', 'B', 'G', ' ', 'M', 'X', 'V', ' ' }; -const char LoRaDemodDecoderTTY::ttyFigures[32] = { // U.S. standard +const char ChirpChatDemodDecoderTTY::ttyFigures[32] = { // U.S. standard '\0', '3', '\n', '-', ' ', '\a', '8', '7', '\r', '$', '4', '\'', ',', '!', ':', '(', '5', '"', ')', '2', '#', '6', '0', '1', '9', '?', '&', ' ', '.', '/', ';', ' ' }; -void LoRaDemodDecoderTTY::decodeSymbols(const std::vector& symbols, QString& str) +void ChirpChatDemodDecoderTTY::decodeSymbols(const std::vector& symbols, QString& str) { std::vector::const_iterator it = symbols.begin(); QByteArray bytes; diff --git a/plugins/channelrx/demodlora/lorademoddecodertty.h b/plugins/channelrx/demodchirpchat/chirpchatdemoddecodertty.h similarity index 91% rename from plugins/channelrx/demodlora/lorademoddecodertty.h rename to plugins/channelrx/demodchirpchat/chirpchatdemoddecodertty.h index 349491d3c..469afcadf 100644 --- a/plugins/channelrx/demodlora/lorademoddecodertty.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemoddecodertty.h @@ -15,13 +15,13 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LORADEMODDECODERTTY_H -#define INCLUDE_LORADEMODDECODERTTY_H +#ifndef INCLUDE_CHIRPCHATDEMODDECODERTTY_H +#define INCLUDE_CHIRPCHATDEMODDECODERTTY_H #include #include -class LoRaDemodDecoderTTY +class ChirpChatDemodDecoderTTY { public: static void decodeSymbols(const std::vector& symbols, QString& str); @@ -39,4 +39,4 @@ private: static const char figuresTag = 0x1b; }; -#endif // INCLUDE_LORADEMODDECODERTTY_H \ No newline at end of file +#endif // INCLUDE_CHIRPCHATDEMODDECODERTTY_H \ No newline at end of file diff --git a/plugins/channelrx/demodlora/lorademodgui.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.cpp similarity index 77% rename from plugins/channelrx/demodlora/lorademodgui.cpp rename to plugins/channelrx/demodchirpchat/chirpchatdemodgui.cpp index 9f43ddd1b..36bb245ba 100644 --- a/plugins/channelrx/demodlora/lorademodgui.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.cpp @@ -19,7 +19,7 @@ #include #include -#include "ui_lorademodgui.h" +#include "ui_chirpchatdemodgui.h" #include "dsp/spectrumvis.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -32,53 +32,53 @@ #include "util/db.h" #include "mainwindow.h" -#include "lorademod.h" -#include "lorademodgui.h" +#include "chirpchatdemod.h" +#include "chirpchatdemodgui.h" -LoRaDemodGUI* LoRaDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) +ChirpChatDemodGUI* ChirpChatDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - LoRaDemodGUI* gui = new LoRaDemodGUI(pluginAPI, deviceUISet, rxChannel); + ChirpChatDemodGUI* gui = new ChirpChatDemodGUI(pluginAPI, deviceUISet, rxChannel); return gui; } -void LoRaDemodGUI::destroy() +void ChirpChatDemodGUI::destroy() { delete this; } -void LoRaDemodGUI::setName(const QString& name) +void ChirpChatDemodGUI::setName(const QString& name) { setObjectName(name); } -QString LoRaDemodGUI::getName() const +QString ChirpChatDemodGUI::getName() const { return objectName(); } -qint64 LoRaDemodGUI::getCenterFrequency() const { +qint64 ChirpChatDemodGUI::getCenterFrequency() const { return m_channelMarker.getCenterFrequency(); } -void LoRaDemodGUI::setCenterFrequency(qint64 centerFrequency) +void ChirpChatDemodGUI::setCenterFrequency(qint64 centerFrequency) { m_channelMarker.setCenterFrequency(centerFrequency); applySettings(); } -void LoRaDemodGUI::resetToDefaults() +void ChirpChatDemodGUI::resetToDefaults() { m_settings.resetToDefaults(); displaySettings(); applySettings(true); } -QByteArray LoRaDemodGUI::serialize() const +QByteArray ChirpChatDemodGUI::serialize() const { return m_settings.serialize(); } -bool LoRaDemodGUI::deserialize(const QByteArray& data) +bool ChirpChatDemodGUI::deserialize(const QByteArray& data) { resetLoRaStatus(); @@ -95,13 +95,13 @@ bool LoRaDemodGUI::deserialize(const QByteArray& data) } } -bool LoRaDemodGUI::handleMessage(const Message& message) +bool ChirpChatDemodGUI::handleMessage(const Message& message) { if (DSPSignalNotification::match(message)) { DSPSignalNotification& notif = (DSPSignalNotification&) message; int basebandSampleRate = notif.getSampleRate(); - qDebug() << "LoRaDemodGUI::handleMessage: DSPSignalNotification: m_basebandSampleRate: " << basebandSampleRate; + qDebug() << "ChirpChatDemodGUI::handleMessage: DSPSignalNotification: m_basebandSampleRate: " << basebandSampleRate; if (basebandSampleRate != m_basebandSampleRate) { @@ -111,27 +111,27 @@ bool LoRaDemodGUI::handleMessage(const Message& message) return true; } - else if (LoRaDemod::MsgReportDecodeBytes::match(message)) + else if (ChirpChatDemod::MsgReportDecodeBytes::match(message)) { - if (m_settings.m_codingScheme == LoRaDemodSettings::CodingLoRa) { + if (m_settings.m_codingScheme == ChirpChatDemodSettings::CodingLoRa) { showLoRaMessage(message); } return true; } - else if (LoRaDemod::MsgReportDecodeString::match(message)) + else if (ChirpChatDemod::MsgReportDecodeString::match(message)) { - if ((m_settings.m_codingScheme == LoRaDemodSettings::CodingASCII) - || (m_settings.m_codingScheme == LoRaDemodSettings::CodingTTY)) { + if ((m_settings.m_codingScheme == ChirpChatDemodSettings::CodingASCII) + || (m_settings.m_codingScheme == ChirpChatDemodSettings::CodingTTY)) { showTextMessage(message); } return true; } - else if (LoRaDemod::MsgConfigureLoRaDemod::match(message)) + else if (ChirpChatDemod::MsgConfigureChirpChatDemod::match(message)) { - qDebug("LoRaDemod::handleMessage: NFMDemod::MsgConfigureLoRaDemod"); - const LoRaDemod::MsgConfigureLoRaDemod& cfg = (LoRaDemod::MsgConfigureLoRaDemod&) message; + qDebug("ChirpChatDemodGUI::handleMessage: NFMDemod::MsgConfigureChirpChatDemod"); + const ChirpChatDemod::MsgConfigureChirpChatDemod& cfg = (ChirpChatDemod::MsgConfigureChirpChatDemod&) message; m_settings = cfg.getSettings(); blockApplySettings(true); displaySettings(); @@ -145,7 +145,7 @@ bool LoRaDemodGUI::handleMessage(const Message& message) } } -void LoRaDemodGUI::handleInputMessages() +void ChirpChatDemodGUI::handleInputMessages() { Message* message; @@ -157,36 +157,36 @@ void LoRaDemodGUI::handleInputMessages() } } -void LoRaDemodGUI::channelMarkerChangedByCursor() +void ChirpChatDemodGUI::channelMarkerChangedByCursor() { ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency()); m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency(); applySettings(); } -void LoRaDemodGUI::on_deltaFrequency_changed(qint64 value) +void ChirpChatDemodGUI::on_deltaFrequency_changed(qint64 value) { m_channelMarker.setCenterFrequency(value); m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency(); applySettings(); } -void LoRaDemodGUI::channelMarkerHighlightedByCursor() +void ChirpChatDemodGUI::channelMarkerHighlightedByCursor() { setHighlighted(m_channelMarker.getHighlighted()); } -void LoRaDemodGUI::on_BW_valueChanged(int value) +void ChirpChatDemodGUI::on_BW_valueChanged(int value) { if (value < 0) { m_settings.m_bandwidthIndex = 0; - } else if (value < LoRaDemodSettings::nbBandwidths) { + } else if (value < ChirpChatDemodSettings::nbBandwidths) { m_settings.m_bandwidthIndex = value; } else { - m_settings.m_bandwidthIndex = LoRaDemodSettings::nbBandwidths - 1; + m_settings.m_bandwidthIndex = ChirpChatDemodSettings::nbBandwidths - 1; } - int thisBW = LoRaDemodSettings::bandwidths[value]; + int thisBW = ChirpChatDemodSettings::bandwidths[value]; ui->BWText->setText(QString("%1 Hz").arg(thisBW)); m_channelMarker.setBandwidth(thisBW); ui->glSpectrum->setSampleRate(thisBW); @@ -195,7 +195,7 @@ void LoRaDemodGUI::on_BW_valueChanged(int value) applySettings(); } -void LoRaDemodGUI::on_Spread_valueChanged(int value) +void ChirpChatDemodGUI::on_Spread_valueChanged(int value) { m_settings.m_spreadFactor = value; ui->SpreadText->setText(tr("%1").arg(value)); @@ -204,65 +204,65 @@ void LoRaDemodGUI::on_Spread_valueChanged(int value) applySettings(); } -void LoRaDemodGUI::on_deBits_valueChanged(int value) +void ChirpChatDemodGUI::on_deBits_valueChanged(int value) { m_settings.m_deBits = value; ui->deBitsText->setText(tr("%1").arg(m_settings.m_deBits)); applySettings(); } -void LoRaDemodGUI::on_preambleChirps_valueChanged(int value) +void ChirpChatDemodGUI::on_preambleChirps_valueChanged(int value) { m_settings.m_preambleChirps = value; ui->preambleChirpsText->setText(tr("%1").arg(m_settings.m_preambleChirps)); applySettings(); } -void LoRaDemodGUI::on_scheme_currentIndexChanged(int index) +void ChirpChatDemodGUI::on_scheme_currentIndexChanged(int index) { - m_settings.m_codingScheme = (LoRaDemodSettings::CodingScheme) index; + m_settings.m_codingScheme = (ChirpChatDemodSettings::CodingScheme) index; - if (m_settings.m_codingScheme != LoRaDemodSettings::CodingLoRa) { + if (m_settings.m_codingScheme != ChirpChatDemodSettings::CodingLoRa) { resetLoRaStatus(); } applySettings(); } -void LoRaDemodGUI::on_mute_toggled(bool checked) +void ChirpChatDemodGUI::on_mute_toggled(bool checked) { m_settings.m_decodeActive = !checked; applySettings(); } -void LoRaDemodGUI::on_clear_clicked(bool checked) +void ChirpChatDemodGUI::on_clear_clicked(bool checked) { (void) checked; ui->messageText->clear(); ui->hexText->clear(); } -void LoRaDemodGUI::on_eomSquelch_valueChanged(int value) +void ChirpChatDemodGUI::on_eomSquelch_valueChanged(int value) { m_settings.m_eomSquelchTenths = value; displaySquelch(); applySettings(); } -void LoRaDemodGUI::on_messageLength_valueChanged(int value) +void ChirpChatDemodGUI::on_messageLength_valueChanged(int value) { m_settings.m_nbSymbolsMax = value; ui->messageLengthText->setText(tr("%1").arg(m_settings.m_nbSymbolsMax)); applySettings(); } -void LoRaDemodGUI::on_messageLengthAuto_stateChanged(int state) +void ChirpChatDemodGUI::on_messageLengthAuto_stateChanged(int state) { m_settings.m_autoNbSymbolsMax = (state == Qt::Checked); applySettings(); } -void LoRaDemodGUI::on_header_stateChanged(int state) +void ChirpChatDemodGUI::on_header_stateChanged(int state) { m_settings.m_hasHeader = (state == Qt::Checked); @@ -283,39 +283,39 @@ void LoRaDemodGUI::on_header_stateChanged(int state) applySettings(); } -void LoRaDemodGUI::on_fecParity_valueChanged(int value) +void ChirpChatDemodGUI::on_fecParity_valueChanged(int value) { m_settings.m_nbParityBits = value; ui->fecParityText->setText(tr("%1").arg(m_settings.m_nbParityBits)); applySettings(); } -void LoRaDemodGUI::on_crc_stateChanged(int state) +void ChirpChatDemodGUI::on_crc_stateChanged(int state) { m_settings.m_hasCRC = (state == Qt::Checked); applySettings(); } -void LoRaDemodGUI::on_packetLength_valueChanged(int value) +void ChirpChatDemodGUI::on_packetLength_valueChanged(int value) { m_settings.m_packetLength = value; ui->packetLengthText->setText(tr("%1").arg(m_settings.m_packetLength)); applySettings(); } -void LoRaDemodGUI::on_udpSend_stateChanged(int state) +void ChirpChatDemodGUI::on_udpSend_stateChanged(int state) { m_settings.m_sendViaUDP = (state == Qt::Checked); applySettings(); } -void LoRaDemodGUI::on_udpAddress_editingFinished() +void ChirpChatDemodGUI::on_udpAddress_editingFinished() { m_settings.m_udpAddress = ui->udpAddress->text(); applySettings(); } -void LoRaDemodGUI::on_udpPort_editingFinished() +void ChirpChatDemodGUI::on_udpPort_editingFinished() { bool ok; quint16 udpPort = ui->udpPort->text().toInt(&ok); @@ -329,13 +329,13 @@ void LoRaDemodGUI::on_udpPort_editingFinished() applySettings(); } -void LoRaDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) +void ChirpChatDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) { (void) widget; (void) rollDown; } -void LoRaDemodGUI::onMenuDialogCalled(const QPoint &p) +void ChirpChatDemodGUI::onMenuDialogCalled(const QPoint &p) { if (m_contextMenuType == ContextMenuChannelSettings) { @@ -365,7 +365,7 @@ void LoRaDemodGUI::onMenuDialogCalled(const QPoint &p) else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine)) { DeviceStreamSelectionDialog dialog(this); - dialog.setNumberOfStreams(m_LoRaDemod->getNumberOfDeviceStreams()); + dialog.setNumberOfStreams(m_chirpChatDemod->getNumberOfDeviceStreams()); dialog.setStreamIndex(m_settings.m_streamIndex); dialog.move(p); dialog.exec(); @@ -380,9 +380,9 @@ void LoRaDemodGUI::onMenuDialogCalled(const QPoint &p) resetContextMenuType(); } -LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) : +ChirpChatDemodGUI::ChirpChatDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) : RollupWidget(parent), - ui(new Ui::LoRaDemodGUI), + ui(new Ui::ChirpChatDemodGUI), m_pluginAPI(pluginAPI), m_deviceUISet(deviceUISet), m_channelMarker(this), @@ -396,9 +396,9 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); m_spectrumVis = new SpectrumVis(SDR_RX_SCALEF, ui->glSpectrum); - m_LoRaDemod = (LoRaDemod*) rxChannel; //new LoRaDemod(m_deviceUISet->m_deviceSourceAPI); - m_LoRaDemod->setSpectrumSink(m_spectrumVis); - m_LoRaDemod->setMessageQueueToGUI(getInputMessageQueue()); + m_chirpChatDemod = (ChirpChatDemod*) rxChannel; + m_chirpChatDemod->setSpectrumSink(m_spectrumVis); + m_chirpChatDemod->setMessageQueueToGUI(getInputMessageQueue()); connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); @@ -419,7 +419,7 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor())); connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor())); - m_deviceUISet->registerRxChannelInstance(LoRaDemod::m_channelIdURI, this); + m_deviceUISet->registerRxChannelInstance(ChirpChatDemod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); @@ -436,32 +436,32 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb applySettings(true); } -LoRaDemodGUI::~LoRaDemodGUI() +ChirpChatDemodGUI::~ChirpChatDemodGUI() { m_deviceUISet->removeRxChannelInstance(this); - delete m_LoRaDemod; // TODO: check this: when the GUI closes it has to delete the demodulator + delete m_chirpChatDemod; // TODO: check this: when the GUI closes it has to delete the demodulator delete m_spectrumVis; delete ui; } -void LoRaDemodGUI::blockApplySettings(bool block) +void ChirpChatDemodGUI::blockApplySettings(bool block) { m_doApplySettings = !block; } -void LoRaDemodGUI::applySettings(bool force) +void ChirpChatDemodGUI::applySettings(bool force) { if (m_doApplySettings) { setTitleColor(m_channelMarker.getColor()); - LoRaDemod::MsgConfigureLoRaDemod* message = LoRaDemod::MsgConfigureLoRaDemod::create( m_settings, force); - m_LoRaDemod->getInputMessageQueue()->push(message); + ChirpChatDemod::MsgConfigureChirpChatDemod* message = ChirpChatDemod::MsgConfigureChirpChatDemod::create( m_settings, force); + m_chirpChatDemod->getInputMessageQueue()->push(message); } } -void LoRaDemodGUI::displaySettings() +void ChirpChatDemodGUI::displaySettings() { - int thisBW = LoRaDemodSettings::bandwidths[m_settings.m_bandwidthIndex]; + int thisBW = ChirpChatDemodSettings::bandwidths[m_settings.m_bandwidthIndex]; m_channelMarker.blockSignals(true); m_channelMarker.setTitle(m_settings.m_title); @@ -512,7 +512,7 @@ void LoRaDemodGUI::displaySettings() blockApplySettings(false); } -void LoRaDemodGUI::displayStreamIndex() +void ChirpChatDemodGUI::displayStreamIndex() { if (m_deviceUISet->m_deviceMIMOEngine) { setStreamIndicator(tr("%1").arg(m_settings.m_streamIndex)); @@ -521,7 +521,7 @@ void LoRaDemodGUI::displayStreamIndex() } } -void LoRaDemodGUI::displaySquelch() +void ChirpChatDemodGUI::displaySquelch() { ui->eomSquelch->setValue(m_settings.m_eomSquelchTenths); @@ -532,7 +532,7 @@ void LoRaDemodGUI::displaySquelch() } } -void LoRaDemodGUI::displayLoRaStatus(int headerParityStatus, bool headerCRCStatus, int payloadParityStatus, bool payloadCRCStatus) +void ChirpChatDemodGUI::displayLoRaStatus(int headerParityStatus, bool headerCRCStatus, int payloadParityStatus, bool payloadCRCStatus) { if (m_settings.m_hasHeader && (headerParityStatus == (int) ParityOK)) { ui->headerHammingStatus->setStyleSheet("QLabel { background-color : green; }"); @@ -569,7 +569,7 @@ void LoRaDemodGUI::displayLoRaStatus(int headerParityStatus, bool headerCRCStatu } } -void LoRaDemodGUI::resetLoRaStatus() +void ChirpChatDemodGUI::resetLoRaStatus() { ui->headerHammingStatus->setStyleSheet("QLabel { background:rgb(79,79,79); }"); ui->headerCRCStatus->setStyleSheet("QLabel { background:rgb(79,79,79); }"); @@ -579,26 +579,26 @@ void LoRaDemodGUI::resetLoRaStatus() ui->nbCodewordsText->setText("---"); } -void LoRaDemodGUI::setBandwidths() +void ChirpChatDemodGUI::setBandwidths() { - int maxBandwidth = m_basebandSampleRate/LoRaDemodSettings::oversampling; + int maxBandwidth = m_basebandSampleRate/ChirpChatDemodSettings::oversampling; int maxIndex = 0; - for (; (maxIndex < LoRaDemodSettings::nbBandwidths) && (LoRaDemodSettings::bandwidths[maxIndex] <= maxBandwidth); maxIndex++) + for (; (maxIndex < ChirpChatDemodSettings::nbBandwidths) && (ChirpChatDemodSettings::bandwidths[maxIndex] <= maxBandwidth); maxIndex++) {} if (maxIndex != 0) { - qDebug("LoRaDemodGUI::setBandwidths: avl: %d max: %d", maxBandwidth, LoRaDemodSettings::bandwidths[maxIndex-1]); + qDebug("ChirpChatDemodGUI::setBandwidths: avl: %d max: %d", maxBandwidth, ChirpChatDemodSettings::bandwidths[maxIndex-1]); ui->BW->setMaximum(maxIndex - 1); int index = ui->BW->value(); - ui->BWText->setText(QString("%1 Hz").arg(LoRaDemodSettings::bandwidths[index])); + ui->BWText->setText(QString("%1 Hz").arg(ChirpChatDemodSettings::bandwidths[index])); } } -void LoRaDemodGUI::showLoRaMessage(const Message& message) +void ChirpChatDemodGUI::showLoRaMessage(const Message& message) { - const LoRaDemod::MsgReportDecodeBytes& msg = (LoRaDemod::MsgReportDecodeBytes&) message; + const ChirpChatDemod::MsgReportDecodeBytes& msg = (ChirpChatDemod::MsgReportDecodeBytes&) message; QByteArray bytes = msg.getBytes(); QString syncWordStr((tr("%1").arg(msg.getSyncWord(), 2, 16, QChar('0')))); @@ -666,9 +666,9 @@ void LoRaDemodGUI::showLoRaMessage(const Message& message) ui->nbCodewordsText->setText(tr("%1").arg(msg.getNbCodewords())); } -void LoRaDemodGUI::showTextMessage(const Message& message) +void ChirpChatDemodGUI::showTextMessage(const Message& message) { - const LoRaDemod::MsgReportDecodeString& msg = (LoRaDemod::MsgReportDecodeString&) message; + const ChirpChatDemod::MsgReportDecodeString& msg = (ChirpChatDemod::MsgReportDecodeString&) message; QDateTime dt = QDateTime::currentDateTime(); QString dateStr = dt.toString("HH:mm:ss"); @@ -686,7 +686,7 @@ void LoRaDemodGUI::showTextMessage(const Message& message) displayStatus(status); } -void LoRaDemodGUI::displayText(const QString& header, const QString& text) +void ChirpChatDemodGUI::displayText(const QString& header, const QString& text) { QTextCursor cursor = ui->messageText->textCursor(); cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor); @@ -697,7 +697,7 @@ void LoRaDemodGUI::displayText(const QString& header, const QString& text) ui->messageText->verticalScrollBar()->setValue(ui->messageText->verticalScrollBar()->maximum()); } -void LoRaDemodGUI::displayBytes(const QString& header, const QByteArray& bytes) +void ChirpChatDemodGUI::displayBytes(const QString& header, const QByteArray& bytes) { QTextCursor cursor = ui->hexText->textCursor(); cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor); @@ -732,7 +732,7 @@ void LoRaDemodGUI::displayBytes(const QString& header, const QByteArray& bytes) ui->hexText->verticalScrollBar()->setValue(ui->hexText->verticalScrollBar()->maximum()); } -void LoRaDemodGUI::displayStatus(const QString& status) +void ChirpChatDemodGUI::displayStatus(const QString& status) { QTextCursor cursor = ui->hexText->textCursor(); cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor); @@ -745,7 +745,7 @@ void LoRaDemodGUI::displayStatus(const QString& status) ui->hexText->verticalScrollBar()->setValue(ui->hexText->verticalScrollBar()->maximum()); } -QString LoRaDemodGUI::getParityStr(int parityStatus) +QString ChirpChatDemodGUI::getParityStr(int parityStatus) { if (parityStatus == (int) ParityError) { return "err"; @@ -758,7 +758,7 @@ QString LoRaDemodGUI::getParityStr(int parityStatus) } } -void LoRaDemodGUI::tick() +void ChirpChatDemodGUI::tick() { if (m_tickCount < 10) { @@ -768,10 +768,10 @@ void LoRaDemodGUI::tick() { m_tickCount = 0; - ui->nText->setText(tr("%1").arg(CalcDb::dbPower(m_LoRaDemod->getCurrentNoiseLevel()), 0, 'f', 1)); - ui->channelPower->setText(tr("%1 dB").arg(CalcDb::dbPower(m_LoRaDemod->getTotalPower()), 0, 'f', 1)); + ui->nText->setText(tr("%1").arg(CalcDb::dbPower(m_chirpChatDemod->getCurrentNoiseLevel()), 0, 'f', 1)); + ui->channelPower->setText(tr("%1 dB").arg(CalcDb::dbPower(m_chirpChatDemod->getTotalPower()), 0, 'f', 1)); - if (m_LoRaDemod->getDemodActive()) { + if (m_chirpChatDemod->getDemodActive()) { ui->mute->setStyleSheet("QToolButton { background-color : green; }"); } else { ui->mute->setStyleSheet("QToolButton { background:rgb(79,79,79); }"); diff --git a/plugins/channelrx/demodlora/lorademodgui.h b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.h similarity index 85% rename from plugins/channelrx/demodlora/lorademodgui.h rename to plugins/channelrx/demodchirpchat/chirpchatdemodgui.h index cd4ec3eaa..dac83c6ad 100644 --- a/plugins/channelrx/demodlora/lorademodgui.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.h @@ -15,31 +15,31 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LoRaDEMODGUI_H -#define INCLUDE_LoRaDEMODGUI_H +#ifndef INCLUDE_CHIRPCHATDEMODGUI_H +#define INCLUDE_CHIRPCHATDEMODGUI_H #include #include "gui/rollupwidget.h" #include "dsp/channelmarker.h" #include "util/messagequeue.h" -#include "lorademodsettings.h" +#include "chirpchatdemodsettings.h" class PluginAPI; class DeviceUISet; -class LoRaDemod; +class ChirpChatDemod; class SpectrumVis; class BasebandSampleSink; namespace Ui { - class LoRaDemodGUI; + class ChirpChatDemodGUI; } -class LoRaDemodGUI : public RollupWidget, public PluginInstanceGUI { +class ChirpChatDemodGUI : public RollupWidget, public PluginInstanceGUI { Q_OBJECT public: - static LoRaDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceAPI, BasebandSampleSink *rxChannel); + static ChirpChatDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceAPI, BasebandSampleSink *rxChannel); virtual void destroy(); void setName(const QString& name); @@ -80,7 +80,7 @@ private slots: void tick(); private: - enum ParityStatus // matches LoRa decoder status + enum ParityStatus // matches decoder status { ParityUndefined, ParityError, @@ -88,21 +88,21 @@ private: ParityOK }; - Ui::LoRaDemodGUI* ui; + Ui::ChirpChatDemodGUI* ui; PluginAPI* m_pluginAPI; DeviceUISet* m_deviceUISet; ChannelMarker m_channelMarker; - LoRaDemodSettings m_settings; + ChirpChatDemodSettings m_settings; int m_basebandSampleRate; bool m_doApplySettings; - LoRaDemod* m_LoRaDemod; + ChirpChatDemod* m_chirpChatDemod; SpectrumVis* m_spectrumVis; MessageQueue m_inputMessageQueue; unsigned int m_tickCount; - explicit LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0); - virtual ~LoRaDemodGUI(); + explicit ChirpChatDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0); + virtual ~ChirpChatDemodGUI(); void blockApplySettings(bool block); void applySettings(bool force = false); @@ -120,4 +120,4 @@ private: void resetLoRaStatus(); }; -#endif // INCLUDE_LoRaDEMODGUI_H +#endif // INCLUDE_CHIRPCHATDEMODGUI_H diff --git a/plugins/channelrx/demodlora/lorademodgui.ui b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.ui similarity index 99% rename from plugins/channelrx/demodlora/lorademodgui.ui rename to plugins/channelrx/demodchirpchat/chirpchatdemodgui.ui index 5e82d66d2..6309d0ec1 100644 --- a/plugins/channelrx/demodlora/lorademodgui.ui +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.ui @@ -1,7 +1,7 @@ - LoRaDemodGUI - + ChirpChatDemodGUI + 0 @@ -23,7 +23,7 @@ - LoRa Demodulator + ChirpChat Demodulator diff --git a/plugins/channelrx/demodlora/lorademodmsg.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemodmsg.cpp similarity index 92% rename from plugins/channelrx/demodlora/lorademodmsg.cpp rename to plugins/channelrx/demodchirpchat/chirpchatdemodmsg.cpp index 458d89238..4e5603ca3 100644 --- a/plugins/channelrx/demodlora/lorademodmsg.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodmsg.cpp @@ -15,6 +15,6 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include "lorademodmsg.h" +#include "chirpchatdemodmsg.h" -MESSAGE_CLASS_DEFINITION(LoRaDemodMsg::MsgDecodeSymbols, Message) +MESSAGE_CLASS_DEFINITION(ChirpChatDemodMsg::MsgDecodeSymbols, Message) diff --git a/plugins/channelrx/demodlora/lorademodmsg.h b/plugins/channelrx/demodchirpchat/chirpchatdemodmsg.h similarity index 95% rename from plugins/channelrx/demodlora/lorademodmsg.h rename to plugins/channelrx/demodchirpchat/chirpchatdemodmsg.h index 7088225dd..5f8fba50a 100644 --- a/plugins/channelrx/demodlora/lorademodmsg.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodmsg.h @@ -15,13 +15,13 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LORADEMODMSG_H -#define INCLUDE_LORADEMODMSG_H +#ifndef INCLUDE_CHIRPCHATDEMODMSG_H +#define INCLUDE_CHIRPCHATDEMODMSG_H #include #include "util/message.h" -namespace LoRaDemodMsg +namespace ChirpChatDemodMsg { class MsgDecodeSymbols : public Message { MESSAGE_CLASS_DECLARATION @@ -76,4 +76,4 @@ namespace LoRaDemodMsg }; } -#endif // INCLUDE_LORADEMODMSG_H +#endif // INCLUDE_CHIRPCHATDEMODMSG_H diff --git a/plugins/channelrx/demodlora/lorademodsettings.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemodsettings.cpp similarity index 91% rename from plugins/channelrx/demodlora/lorademodsettings.cpp rename to plugins/channelrx/demodchirpchat/chirpchatdemodsettings.cpp index da1376185..61f0ba013 100644 --- a/plugins/channelrx/demodlora/lorademodsettings.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodsettings.cpp @@ -15,16 +15,15 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include "lorademodsettings.h" - #include #include "dsp/dspengine.h" #include "util/simpleserializer.h" #include "settings/serializable.h" -#include "lorademodsettings.h" -const int LoRaDemodSettings::bandwidths[] = { +#include "chirpchatdemodsettings.h" + +const int ChirpChatDemodSettings::bandwidths[] = { 2604, // 333k / 128 3125, // 400k / 128 3906, // 500k / 128 @@ -50,10 +49,10 @@ const int LoRaDemodSettings::bandwidths[] = { 400000, // 400k / 1 500000 // 500k / 1 }; -const int LoRaDemodSettings::nbBandwidths = 3*8; -const int LoRaDemodSettings::oversampling = 2; +const int ChirpChatDemodSettings::nbBandwidths = 3*8; +const int ChirpChatDemodSettings::oversampling = 2; -LoRaDemodSettings::LoRaDemodSettings() : +ChirpChatDemodSettings::ChirpChatDemodSettings() : m_inputFrequencyOffset(0), m_channelMarker(0), m_spectrumGUI(0) @@ -61,7 +60,7 @@ LoRaDemodSettings::LoRaDemodSettings() : resetToDefaults(); } -void LoRaDemodSettings::resetToDefaults() +void ChirpChatDemodSettings::resetToDefaults() { m_bandwidthIndex = 5; m_spreadFactor = 7; @@ -79,7 +78,7 @@ void LoRaDemodSettings::resetToDefaults() m_udpAddress = "127.0.0.1"; m_udpPort = 9999; m_rgbColor = QColor(255, 0, 255).rgb(); - m_title = "LoRa Demodulator"; + m_title = "ChirpChat Demodulator"; m_streamIndex = 0; m_useReverseAPI = false; m_reverseAPIAddress = "127.0.0.1"; @@ -88,7 +87,7 @@ void LoRaDemodSettings::resetToDefaults() m_reverseAPIChannelIndex = 0; } -QByteArray LoRaDemodSettings::serialize() const +QByteArray ChirpChatDemodSettings::serialize() const { SimpleSerializer s(1); s.writeS32(1, m_inputFrequencyOffset); @@ -127,7 +126,7 @@ QByteArray LoRaDemodSettings::serialize() const return s.final(); } -bool LoRaDemodSettings::deserialize(const QByteArray& data) +bool ChirpChatDemodSettings::deserialize(const QByteArray& data) { SimpleDeserializer d(data); @@ -157,7 +156,7 @@ bool LoRaDemodSettings::deserialize(const QByteArray& data) m_channelMarker->deserialize(bytetmp); } - d.readString(6, &m_title, "LoRa Demodulator"); + d.readString(6, &m_title, "ChirpChat Demodulator"); d.readS32(7, &m_deBits, 0); d.readS32(8, &tmp); m_codingScheme = (CodingScheme) tmp; diff --git a/plugins/channelrx/demodlora/lorademodsettings.h b/plugins/channelrx/demodchirpchat/chirpchatdemodsettings.h similarity index 92% rename from plugins/channelrx/demodlora/lorademodsettings.h rename to plugins/channelrx/demodchirpchat/chirpchatdemodsettings.h index 0c012bc9d..1b685cae4 100644 --- a/plugins/channelrx/demodlora/lorademodsettings.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodsettings.h @@ -16,8 +16,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef PLUGINS_CHANNELRX_DEMODLORA_LORADEMODSETTINGS_H_ -#define PLUGINS_CHANNELRX_DEMODLORA_LORADEMODSETTINGS_H_ +#ifndef PLUGINS_CHANNELRX_DEMODCHIRPCHAT_CHIRPCHATDEMODSETTINGS_H_ +#define PLUGINS_CHANNELRX_DEMODCHIRPCHAT_CHIRPCHATDEMODSETTINGS_H_ #include #include @@ -26,7 +26,7 @@ class Serializable; -struct LoRaDemodSettings +struct ChirpChatDemodSettings { enum CodingScheme { @@ -68,7 +68,7 @@ struct LoRaDemodSettings static const int nbBandwidths; static const int oversampling; - LoRaDemodSettings(); + ChirpChatDemodSettings(); void resetToDefaults(); void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; } void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; } @@ -78,4 +78,4 @@ struct LoRaDemodSettings -#endif /* PLUGINS_CHANNELRX_DEMODLORA_LORADEMODSETTINGS_H_ */ +#endif /* PLUGINS_CHANNELRX_DEMODCHIRPCHAT_CHIRPCHATDEMODSETTINGS_H_ */ diff --git a/plugins/channelrx/demodlora/lorademodsink.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemodsink.cpp similarity index 83% rename from plugins/channelrx/demodlora/lorademodsink.cpp rename to plugins/channelrx/demodchirpchat/chirpchatdemodsink.cpp index d5c95dae5..8c99c70a1 100644 --- a/plugins/channelrx/demodlora/lorademodsink.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodsink.cpp @@ -24,10 +24,10 @@ #include "dsp/fftengine.h" #include "util/db.h" -#include "lorademodmsg.h" -#include "lorademodsink.h" +#include "chirpchatdemodmsg.h" +#include "chirpchatdemodsink.h" -LoRaDemodSink::LoRaDemodSink() : +ChirpChatDemodSink::ChirpChatDemodSink() : m_decodeMsg(nullptr), m_decoderMsgQueue(nullptr), m_spectrumSink(nullptr), @@ -37,7 +37,7 @@ LoRaDemodSink::LoRaDemodSink() : m_spectrumLine(nullptr) { m_demodActive = false; - m_bandwidth = LoRaDemodSettings::bandwidths[0]; + m_bandwidth = ChirpChatDemodSettings::bandwidths[0]; m_channelSampleRate = 96000; m_channelFrequencyOffset = 0; m_nco.setFreq(m_channelFrequencyOffset, m_channelSampleRate); @@ -45,7 +45,7 @@ LoRaDemodSink::LoRaDemodSink() : m_interpolatorDistance = (Real) m_channelSampleRate / (Real) m_bandwidth; m_sampleDistanceRemain = 0; - m_state = LoRaStateReset; + m_state = ChirpChatStateReset; m_chirp = 0; m_chirp0 = 0; @@ -55,7 +55,7 @@ LoRaDemodSink::LoRaDemodSink() : initSF(m_settings.m_spreadFactor, m_settings.m_deBits); } -LoRaDemodSink::~LoRaDemodSink() +ChirpChatDemodSink::~ChirpChatDemodSink() { delete m_fft; delete m_fftSFD; @@ -65,7 +65,7 @@ LoRaDemodSink::~LoRaDemodSink() delete[] m_spectrumLine; } -void LoRaDemodSink::initSF(unsigned int sf, unsigned int deBits) +void ChirpChatDemodSink::initSF(unsigned int sf, unsigned int deBits) { if (m_downChirps) { delete[] m_downChirps; @@ -85,7 +85,7 @@ void LoRaDemodSink::initSF(unsigned int sf, unsigned int deBits) m_fftLength = m_nbSymbols; m_fft->configure(m_fftInterpolation*m_fftLength, false); m_fftSFD->configure(m_fftInterpolation*m_fftLength, false); - m_state = LoRaStateReset; + m_state = ChirpChatStateReset; m_sfdSkip = m_fftLength / 4; m_fftWindow.create(FFTWindow::Function::Kaiser, m_fftLength); m_fftWindow.setKaiserAlpha(M_PI); @@ -112,7 +112,7 @@ void LoRaDemodSink::initSF(unsigned int sf, unsigned int deBits) std::copy(m_upChirps, m_upChirps+m_fftLength, m_upChirps+m_fftLength); } -void LoRaDemodSink::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end) +void ChirpChatDemodSink::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end) { int newangle; Complex ci; @@ -130,16 +130,16 @@ void LoRaDemodSink::feed(const SampleVector::const_iterator& begin, const Sample } } -void LoRaDemodSink::processSample(const Complex& ci) +void ChirpChatDemodSink::processSample(const Complex& ci) { - if (m_state == LoRaStateReset) // start over + if (m_state == ChirpChatStateReset) // start over { m_demodActive = false; reset(); std::queue().swap(m_magsqQueue); // this clears the queue - m_state = LoRaStateDetectPreamble; + m_state = ChirpChatStateDetectPreamble; } - else if (m_state == LoRaStateDetectPreamble) // look for preamble + else if (m_state == ChirpChatStateDetectPreamble) // look for preamble { m_fft->in()[m_fftCounter++] = ci * m_downChirps[m_chirp]; // de-chirp the up ramp @@ -189,12 +189,12 @@ void LoRaDemodSink::processSample(const Complex& ci) m_spectrumSink->feed(m_spectrumBuffer, m_nbSymbols); } - qDebug("LoRaDemodSink::processSample: preamble found: %u|%f", m_argMaxHistory[0], magsq); + qDebug("ChirpChatDemodSink::processSample: preamble found: %u|%f", m_argMaxHistory[0], magsq); m_chirp = m_argMaxHistory[0]; m_fftCounter = m_chirp; m_chirp0 = 0; m_chirpCount = 0; - m_state = LoRaStatePreambleResyc; + m_state = ChirpChatStatePreambleResyc; } else { @@ -203,7 +203,7 @@ void LoRaDemodSink::processSample(const Complex& ci) } } } - else if (m_state == LoRaStatePreambleResyc) + else if (m_state == ChirpChatStatePreambleResyc) { m_fftCounter++; @@ -215,10 +215,10 @@ void LoRaDemodSink::processSample(const Complex& ci) m_fftCounter = 0; m_demodActive = true; - m_state = LoRaStatePreamble; + m_state = ChirpChatStatePreamble; } } - else if (m_state == LoRaStatePreamble) // preamble found look for SFD start + else if (m_state == ChirpChatStatePreamble) // preamble found look for SFD start { m_fft->in()[m_fftCounter] = ci * m_downChirps[m_chirp]; // de-chirp the up ramp m_fftSFD->in()[m_fftCounter] = ci * m_upChirps[m_chirp]; // de-chiro the down ramp @@ -267,14 +267,14 @@ void LoRaDemodSink::processSample(const Complex& ci) if (m_chirpCount < 3) // too early { - m_state = LoRaStateReset; - qDebug("LoRaDemodSink::processSample: SFD search: signal drop is too early"); + m_state = ChirpChatStateReset; + qDebug("ChirpChatDemodSink::processSample: SFD search: signal drop is too early"); } else { m_syncWord = round(m_preambleHistory[m_chirpCount-2] / 8.0); m_syncWord += 16 * round(m_preambleHistory[m_chirpCount-3] / 8.0); - qDebug("LoRaDemodSink::processSample: SFD found: up: %4u|%11.6f - down: %4u|%11.6f sync: %x", imax, magsq, imaxSFD, magsqSFD, m_syncWord); + qDebug("ChirpChatDemodSink::processSample: SFD found: up: %4u|%11.6f - down: %4u|%11.6f sync: %x", imax, magsq, imaxSFD, magsqSFD, m_syncWord); int sadj = 0; int nadj = 0; @@ -289,19 +289,19 @@ void LoRaDemodSink::processSample(const Complex& ci) zadj = nadj == 0 ? 0 : sadj / nadj; zadj = zadj < -(sfdSkip/2) ? -(sfdSkip/2) : zadj > sfdSkip/2 ? sfdSkip/2 : zadj; - qDebug("LoRaDemodSink::processSample: zero adjust: %d (%d)", zadj, nadj); + qDebug("ChirpChatDemodSink::processSample: zero adjust: %d (%d)", zadj, nadj); m_sfdSkipCounter = 0; m_fftCounter = m_fftLength - m_sfdSkip + zadj; m_chirp += zadj; - m_state = LoRaStateSkipSFD; //LoRaStateSlideSFD; + m_state = ChirpChatStateSkipSFD; //ChirpChatStateSlideSFD; } } else if (m_chirpCount > (m_settings.m_preambleChirps - m_requiredPreambleChirps + 2)) // SFD missed start over { - qDebug("LoRaDemodSink::processSample: SFD search: number of possible chirps exceeded"); + qDebug("ChirpChatDemodSink::processSample: SFD search: number of possible chirps exceeded"); m_magsqTotalAvg(magsqTotal); - m_state = LoRaStateReset; + m_state = ChirpChatStateReset; } else { @@ -309,13 +309,13 @@ void LoRaDemodSink::processSample(const Complex& ci) m_spectrumSink->feed(m_spectrumBuffer, m_nbSymbols); } - qDebug("LoRaDemodSink::processSample: SFD search: up: %4u|%11.6f - down: %4u|%11.6f", imax, magsq, imaxSFD, magsqSFD); + qDebug("ChirpChatDemodSink::processSample: SFD search: up: %4u|%11.6f - down: %4u|%11.6f", imax, magsq, imaxSFD, magsqSFD); m_magsqTotalAvg(magsqTotal); m_magsqOnAvg(magsq); } } } - else if (m_state == LoRaStateSkipSFD) // Just skip SFD + else if (m_state == ChirpChatStateSkipSFD) // Just skip SFD { m_fftCounter++; @@ -326,19 +326,19 @@ void LoRaDemodSink::processSample(const Complex& ci) if (m_sfdSkipCounter == m_sfdFourths) // 1.25 SFD chips left { - qDebug("LoRaDemodSink::processSample: SFD skipped"); + qDebug("ChirpChatDemodSink::processSample: SFD skipped"); m_chirp = m_chirp0; m_fftCounter = 0; m_chirpCount = 0; int correction = 0; m_magsqMax = 0.0; - m_decodeMsg = LoRaDemodMsg::MsgDecodeSymbols::create(); + m_decodeMsg = ChirpChatDemodMsg::MsgDecodeSymbols::create(); m_decodeMsg->setSyncWord(m_syncWord); - m_state = LoRaStateReadPayload; + m_state = ChirpChatStateReadPayload; } } } - else if (m_state == LoRaStateReadPayload) + else if (m_state == ChirpChatStateReadPayload) { m_fft->in()[m_fftCounter] = ci * m_downChirps[m_chirp]; // de-chirp the up ramp m_fftCounter++; @@ -379,14 +379,14 @@ void LoRaDemodSink::processSample(const Complex& ci) || (m_settings.m_eomSquelchTenths == 121) // max - disable squelch || ((m_settings.m_eomSquelchTenths*magsq)/10.0 > m_magsqMax)) { - qDebug("LoRaDemodSink::processSample: symbol %02u: %4u|%11.6f", m_chirpCount, symbol, magsq); + qDebug("ChirpChatDemodSink::processSample: symbol %02u: %4u|%11.6f", m_chirpCount, symbol, magsq); m_magsqOnAvg(magsq); m_chirpCount++; if (m_chirpCount > m_settings.m_nbSymbolsMax) { - qDebug("LoRaDemodSink::processSample: message length exceeded"); - m_state = LoRaStateReset; + qDebug("ChirpChatDemodSink::processSample: message length exceeded"); + m_state = ChirpChatStateReset; m_decodeMsg->setSignalDb(CalcDb::dbPower(m_magsqOnAvg.asDouble() / (1<setNoiseDb(CalcDb::dbPower(m_magsqOffAvg.asDouble() / (1<popSymbol(); // last symbol is garbage m_decodeMsg->setSignalDb(CalcDb::dbPower(m_magsqOnAvg.asDouble() / (1<setNoiseDb(CalcDb::dbPower(m_magsqOffAvg.asDouble() / (1< intSize/2) { return u - intSize; @@ -552,7 +552,7 @@ int LoRaDemodSink::toSigned(int u, int intSize) } } -unsigned int LoRaDemodSink::evalSymbol(unsigned int rawSymbol) +unsigned int ChirpChatDemodSink::evalSymbol(unsigned int rawSymbol) { unsigned int spread = m_fftInterpolation * (1<. // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LORADEMODSINK_H -#define INCLUDE_LORADEMODSINK_H +#ifndef INCLUDE_CHIRPCHATDEMODSINK_H +#define INCLUDE_CHIRPCHATDEMODSINK_H #include #include @@ -28,19 +28,19 @@ #include "util/message.h" #include "util/movingaverage.h" -#include "lorademodsettings.h" +#include "chirpchatdemodsettings.h" class BasebandSampleSink; class FFTEngine; -namespace LoRaDemodMsg { +namespace ChirpChatDemodMsg { class MsgDecodeSymbols; } class MessageQueue; -class LoRaDemodSink : public ChannelSampleSink { +class ChirpChatDemodSink : public ChannelSampleSink { public: - LoRaDemodSink(); - ~LoRaDemodSink(); + ChirpChatDemodSink(); + ~ChirpChatDemodSink(); virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); @@ -48,26 +48,26 @@ public: void setDecoderMessageQueue(MessageQueue *messageQueue) { m_decoderMsgQueue = messageQueue; } void setSpectrumSink(BasebandSampleSink* spectrumSink) { m_spectrumSink = spectrumSink; } void applyChannelSettings(int channelSampleRate, int bandwidth, int channelFrequencyOffset, bool force = false); - void applySettings(const LoRaDemodSettings& settings, bool force = false); + void applySettings(const ChirpChatDemodSettings& settings, bool force = false); double getCurrentNoiseLevel() const { return m_magsqOffAvg.instantAverage() / (1<init(); - LoRaDemod::webapiFormatChannelSettings(response, m_settings); + response.setChirpChatDemodSettings(new SWGSDRangel::SWGChirpChatDemodSettings()); + response.getChirpChatDemodSettings()->init(); + ChirpChatDemod::webapiFormatChannelSettings(response, m_settings); return 200; } -int LoRaDemodWebAPIAdapter::webapiSettingsPutPatch( +int ChirpChatDemodWebAPIAdapter::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings& response, QString& errorMessage) { (void) errorMessage; - LoRaDemod::webapiUpdateChannelSettings(m_settings, channelSettingsKeys, response); - LoRaDemod::webapiFormatChannelSettings(response, m_settings); + ChirpChatDemod::webapiUpdateChannelSettings(m_settings, channelSettingsKeys, response); + ChirpChatDemod::webapiFormatChannelSettings(response, m_settings); return 200; } diff --git a/plugins/channelrx/demodlora/lorademodwebapiadapter.h b/plugins/channelrx/demodchirpchat/chirpchatdemodwebapiadapter.h similarity index 84% rename from plugins/channelrx/demodlora/lorademodwebapiadapter.h rename to plugins/channelrx/demodchirpchat/chirpchatdemodwebapiadapter.h index ac36d123f..aa29a24d7 100644 --- a/plugins/channelrx/demodlora/lorademodwebapiadapter.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodwebapiadapter.h @@ -15,19 +15,19 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LORADEMOD_WEBAPIADAPTER_H -#define INCLUDE_LORADEMOD_WEBAPIADAPTER_H +#ifndef INCLUDE_CHIRPCHATDEMOD_WEBAPIADAPTER_H +#define INCLUDE_CHIRPCHATDEMOD_WEBAPIADAPTER_H #include "channel/channelwebapiadapter.h" -#include "lorademodsettings.h" +#include "chirpchatdemodsettings.h" /** * Standalone API adapter only for the settings */ -class LoRaDemodWebAPIAdapter : public ChannelWebAPIAdapter { +class ChirpChatDemodWebAPIAdapter : public ChannelWebAPIAdapter { public: - LoRaDemodWebAPIAdapter(); - virtual ~LoRaDemodWebAPIAdapter(); + ChirpChatDemodWebAPIAdapter(); + virtual ~ChirpChatDemodWebAPIAdapter(); virtual QByteArray serialize() const { return m_settings.serialize(); } virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } @@ -43,7 +43,7 @@ public: QString& errorMessage); private: - LoRaDemodSettings m_settings; + ChirpChatDemodSettings m_settings; }; -#endif // INCLUDE_LORAMOD_WEBAPIADAPTER_H +#endif // INCLUDE_CHIRPCHATDEMOD_WEBAPIADAPTER_H diff --git a/plugins/channelrx/demodlora/loraplugin.cpp b/plugins/channelrx/demodchirpchat/chirpchatplugin.cpp similarity index 64% rename from plugins/channelrx/demodlora/loraplugin.cpp rename to plugins/channelrx/demodchirpchat/chirpchatplugin.cpp index 0ed5c1cf0..54f079fc4 100644 --- a/plugins/channelrx/demodlora/loraplugin.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatplugin.cpp @@ -18,62 +18,62 @@ #include #include "plugin/pluginapi.h" -#include "loraplugin.h" +#include "chirpchatplugin.h" #ifndef SERVER_MODE -#include "lorademodgui.h" +#include "chirpchatdemodgui.h" #endif -#include "lorademod.h" +#include "chirpchatdemod.h" -const PluginDescriptor LoRaPlugin::m_pluginDescriptor = { - LoRaDemod::m_channelId, - QString("LoRa Demodulator"), - QString("5.2.0"), +const PluginDescriptor ChirpChatPlugin::m_pluginDescriptor = { + ChirpChatDemod::m_channelId, + QString("ChirpChat Demodulator"), + QString("5.3.0"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, QString("https://github.com/f4exb/sdrangel") }; -LoRaPlugin::LoRaPlugin(QObject* parent) : +ChirpChatPlugin::ChirpChatPlugin(QObject* parent) : QObject(parent), m_pluginAPI(nullptr) { } -const PluginDescriptor& LoRaPlugin::getPluginDescriptor() const +const PluginDescriptor& ChirpChatPlugin::getPluginDescriptor() const { return m_pluginDescriptor; } -void LoRaPlugin::initPlugin(PluginAPI* pluginAPI) +void ChirpChatPlugin::initPlugin(PluginAPI* pluginAPI) { m_pluginAPI = pluginAPI; // register demodulator - m_pluginAPI->registerRxChannel(LoRaDemod::m_channelIdURI, LoRaDemod::m_channelId, this); + m_pluginAPI->registerRxChannel(ChirpChatDemod::m_channelIdURI, ChirpChatDemod::m_channelId, this); } #ifdef SERVER_MODE -PluginInstanceGUI* LoRaPlugin::createRxChannelGUI( +PluginInstanceGUI* ChirpChatPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const { return 0; } #else -PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const +PluginInstanceGUI* ChirpChatPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const { - return LoRaDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); + return ChirpChatDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); } #endif -BasebandSampleSink* LoRaPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const +BasebandSampleSink* ChirpChatPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const { - return new LoRaDemod(deviceAPI); + return new ChirpChatDemod(deviceAPI); } -ChannelAPI* LoRaPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const +ChannelAPI* ChirpChatPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const { - return new LoRaDemod(deviceAPI); + return new ChirpChatDemod(deviceAPI); } diff --git a/plugins/channelrx/demodlora/loraplugin.h b/plugins/channelrx/demodchirpchat/chirpchatplugin.h similarity index 89% rename from plugins/channelrx/demodlora/loraplugin.h rename to plugins/channelrx/demodchirpchat/chirpchatplugin.h index 0111339d5..b720af1f3 100644 --- a/plugins/channelrx/demodlora/loraplugin.h +++ b/plugins/channelrx/demodchirpchat/chirpchatplugin.h @@ -15,8 +15,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_LoRaPLUGIN_H -#define INCLUDE_LoRaPLUGIN_H +#ifndef INCLUDE_CHIRPCHATPLUGIN_H +#define INCLUDE_CHIRPCHATPLUGIN_H #include #include "plugin/plugininterface.h" @@ -24,13 +24,13 @@ class DeviceUISet; class BasebandSampleSink; -class LoRaPlugin : public QObject, PluginInterface { +class ChirpChatPlugin : public QObject, PluginInterface { Q_OBJECT Q_INTERFACES(PluginInterface) - Q_PLUGIN_METADATA(IID "sdrangel.channel.lorademod") + Q_PLUGIN_METADATA(IID "sdrangel.channel.chirpchatdemod") public: - explicit LoRaPlugin(QObject* parent = nullptr); + explicit ChirpChatPlugin(QObject* parent = nullptr); const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); diff --git a/plugins/channelrx/demodlora/readme.md b/plugins/channelrx/demodchirpchat/readme.md similarity index 73% rename from plugins/channelrx/demodlora/readme.md rename to plugins/channelrx/demodchirpchat/readme.md index a7b3ebdaa..4747f9cb7 100644 --- a/plugins/channelrx/demodlora/readme.md +++ b/plugins/channelrx/demodchirpchat/readme.md @@ -1,21 +1,25 @@ -

LoRa demodulator plugin

+

ChirpChat demodulator plugin

Introduction

-This plugin can be used to demodulate and decode LoRa transmissions. +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. + +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. + +LoRa is a property of Semtech and the details of the protocol are not made public. However a LoRa compatible protocol has been implemented based on the reverse engineering performed by the community. It is mainly based on the work done in https://github.com/myriadrf/LoRa-SDR. You can find more information about LoRa and chirp modulation here: - To get an idea of what is LoRa: [here](https://www.link-labs.com/blog/what-is-lora) - A detailed inspection of LoRa modulation and protocol: [here](https://static1.squarespace.com/static/54cecce7e4b054df1848b5f9/t/57489e6e07eaa0105215dc6c/1464376943218/Reversing-Lora-Knight.pdf) -This plugin has been designed to work in conjunction with the LoRa modulator plugin. However it can receive transmissions from the RN2483 module when the Distance Enhancement is engaged (4 FFT bins per symbol) which happens with spread factors 11 and 12. Il is very difficult in general to get good decodes when only one FFT bin is used by symbol. It has not been tested with Semtech SX127x hardware. +Transmissions from the RN2483 module with the Distance Enhancement feature (spread factors 11 and 12) could be successfully received. It has not been tested with Semtech SX127x hardware. This LoRa decoder is designed for experimentation. For production grade applications it is recommended to use dedicated hardware instead. -This plugin is designed to experiment with chirp modulation and LoRa technique. It does not replace dedicated hardware for production grade links. +Modulation characteristics from LoRa have been augmented with more bandwidths and FFT bin collations (DE factor). Plain TTY and ASCII have also been added and there are plans to add some more complex typically amateur radio MFSK based modes like JT65. Note: this plugin is available in version 5 only (since 5.2.0).

Interface

-![LoRa Demodulator plugin GUI](../../../doc/img/LoRaDemod_plugin.png) +![ChirpChat Demodulator plugin GUI](../../../doc/img/ChirpChatDemod_plugin.png)

1: Frequency shift from center frequency of reception

@@ -23,11 +27,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 LoRa signal is detected this corresponds to the power received in the bandwidth (3). It will show a significant increase in presence of a LoRa signal that can be detected. +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.

3: Bandwidth

-This is the bandwidth of the LoRa signal. AS per LoRa specs the signal sweeps between the lower and the upper frequency of this bandwidth. The sample rate of the LoRa signal in seconds is exactly one over this bandwidth in Hertz. +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. 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. An extra divisor of 128 is provided to achieve smaller bandwidths that can fit in a SSB channel. @@ -58,7 +62,7 @@ Thus available bandwidths are: - **3125** (400000 / 128) Hz not in LoRa standard - **2604** (333333 / 128) Hz not in LoRa standard -The LoRa 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 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.

4: De-chirped noise maximum power

@@ -76,19 +80,19 @@ Decode errors are very likely to happen when this value falls below 4 dB.

7: Spread Factor

-This is the Spread Factor parameter of the LoRa 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 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)

8: Distance Enhancement factor

-The LoRa standard specifies 0 (no DE) or 2 (DE active). The present range is extended to all values between 0 and 4 bits. +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. This is the log2 of the number of FFT bins used for one symbol. Extending the numbe of FFT bins per symbol decreases the probabilty to detect the wrong symbol as an adjacent bin. It can also overcome frequency drift on long messages. -In practice it is difficult to make correct decodes if only one FFT bin is used to code one symbol (DE=0). +In practice it is difficult to make correct decodes if only one FFT bin is used to code one symbol (DE=0) therefore it is recommended to use a DE factor of 2 or more. With medium SNR DE=1 can still achieve good results.

A: Payload controls and indicators

-![LoRa Demodulator payload controls](../../../doc/img/LoRaDemod_payload.png) +![ChirpChat Demodulator payload controls](../../../doc/img/ChirpChatDemod_payload.png)

A.1: Coding scheme

@@ -185,7 +189,7 @@ This is where the messages formatted as strings are displayed. Use the sweep ico The format of a message line is the following: -![LoRa Demodulator message string window](../../../doc/img/LoRaDemod_message_string.png) +![ChirpChat Demodulator message string window](../../../doc/img/ChirpChatDemod_message_string.png) - 1: Timestamp in HH:MM:SS format - 2: Sync word @@ -195,7 +199,7 @@ The format of a message line is the following: This is to display the message payload as hex formatted bytes with mesasge status. -![LoRa Demodulator message bytes window](../../../doc/img/LoRaDemod_message_binary.png) +![ChirpChat Demodulator message bytes window](../../../doc/img/ChirpChatDemod_message_binary.png)

11.1: Timestamp in HH:NN:SS format

@@ -265,13 +269,13 @@ 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 LoRa signal can be decoded. +This is the spectrum of the de-chirped signal when a ChirpChat signal can be decoded. -The frequency span corresponds to the bandwidth of the LoRa signal (3). Default FFT size is 2SF where SF is the spread factor (7). +The frequency span corresponds to the bandwidth of the ChirpChat signal (3). Default FFT size is 2SF where SF is the spread factor (7). -Sequences of successful LoRa signal demodulation are separated by blank lines (genreated with a string of high value bins). +Sequences of successful ChirpChat signal demodulation are separated by blank lines (genreated with a string of high value bins). Controls are the usual controls of spectrum displays with the following restrictions: - - The window type is non operating because the FFT analysis of the LoRa signal is always done with a Kaiser window + - The window type is non operating because the FFT analysis of the ChirpChat signal is always done with a Kaiser window - The FFT size can be changed however it is set to 2SF where SF is the spread factor and thus displays correctly diff --git a/plugins/channelrx/demodlora/CMakeLists.txt b/plugins/channelrx/demodlora/CMakeLists.txt deleted file mode 100644 index 4e84ae514..000000000 --- a/plugins/channelrx/demodlora/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -project(lora) - -set(lora_SOURCES - lorademod.cpp - lorademodsettings.cpp - lorademodsink.cpp - lorademodbaseband.cpp - loraplugin.cpp - lorademoddecoder.cpp - lorademoddecodertty.cpp - lorademoddecoderascii.cpp - lorademoddecoderlora.cpp - lorademodmsg.cpp -) - -set(lora_HEADERS - lorademod.h - lorademodsettings.h - lorademodsink.h - lorademodbaseband.h - lorademoddecoder.h - lorademoddecodertty.h - lorademoddecoderascii.h - lorademoddecoderlora.h - lorademodmsg.h - loraplugin.h -) - -include_directories( - ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client -) - -if(NOT SERVER_MODE) - set(lora_SOURCES - ${lora_SOURCES} - lorademodgui.cpp - lorademodgui.ui - ) - set(lora_HEADERS - ${lora_HEADERS} - lorademodgui.h - ) - set(TARGET_NAME demodlora) - set(TARGET_LIB "Qt5::Widgets") - set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) -else() - set(TARGET_NAME demodlorasrv) - set(TARGET_LIB "") - set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) -endif() - -add_library(${TARGET_NAME} SHARED - ${lora_SOURCES} -) - -target_link_libraries(${TARGET_NAME} - Qt5::Core - ${TARGET_LIB} - sdrbase - ${TARGET_LIB_GUI} - swagger -) - -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/sdrbase/resources/webapi.qrc b/sdrbase/resources/webapi.qrc index 861389134..44f85c0c3 100644 --- a/sdrbase/resources/webapi.qrc +++ b/sdrbase/resources/webapi.qrc @@ -15,6 +15,7 @@ webapi/doc/swagger/include/BladeRF2.yaml webapi/doc/swagger/include/ChannelAnalyzer.yaml webapi/doc/swagger/include/ChannelSettings.yaml + webapi/doc/swagger/include/ChirpChatDemod.yaml webapi/doc/swagger/include/Command.yaml webapi/doc/swagger/include/CWKeyer.yaml webapi/doc/swagger/include/DATVDemod.yaml @@ -36,7 +37,6 @@ webapi/doc/swagger/include/KiwiSDR.yaml webapi/doc/swagger/include/LocalInput.yaml webapi/doc/swagger/include/LocalOutput.yaml - webapi/doc/swagger/include/LoRaDemod.yaml webapi/doc/swagger/include/LoRaMod.yaml webapi/doc/swagger/include/NFMDemod.yaml webapi/doc/swagger/include/NFMMod.yaml diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 47d5086ff..512727d6f 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -2169,6 +2169,9 @@ margin-bottom: 20px; "BFMDemodReport" : { "$ref" : "#/definitions/BFMDemodReport" }, + "ChirpChatDemodReport" : { + "$ref" : "#/definitions/ChirpChatDemodReport" + }, "DSDDemodReport" : { "$ref" : "#/definitions/DSDDemodReport" }, @@ -2184,9 +2187,6 @@ margin-bottom: 20px; "FreqTrackerReport" : { "$ref" : "#/definitions/FreqTrackerReport" }, - "LoRaDemodReport" : { - "$ref" : "#/definitions/LoRaDemodReport" - }, "LoRaModReport" : { "$ref" : "#/definitions/LoRaModReport" }, @@ -2261,6 +2261,9 @@ margin-bottom: 20px; "ChannelAnalyzerSettings" : { "$ref" : "#/definitions/ChannelAnalyzerSettings" }, + "ChirpChatDemodSettings" : { + "$ref" : "#/definitions/ChirpChatDemodSettings" + }, "DATVDemodSettings" : { "$ref" : "#/definitions/DATVDemodSettings" }, @@ -2282,9 +2285,6 @@ margin-bottom: 20px; "InterferometerSettings" : { "$ref" : "#/definitions/InterferometerSettings" }, - "LoRaDemodSettings" : { - "$ref" : "#/definitions/LoRaDemodSettings" - }, "LoRaModSettings" : { "$ref" : "#/definitions/LoRaModSettings" }, @@ -2343,6 +2343,187 @@ margin-bottom: 20px; } }, "description" : "All channels detailed information" +}; + defs.ChirpChatDemodReport = { + "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)" + }, + "hasCRC" : { + "type" : "integer", + "description" : "boolean 1 if payload CRC is present else 0 (LoRa)" + }, + "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" + }, + "messageBytes" : { + "type" : "array", + "description" : "bytes of the last decoded message as an array of hex string represented bytes (00..FF)", + "items" : { + "type" : "string" + } + } + }, + "description" : "ChirpChatDemod" +}; + defs.ChirpChatDemodSettings = { + "properties" : { + "inputFrequencyOffset" : { + "type" : "integer", + "format" : "int64" + }, + "bandwidthIndex" : { + "type" : "integer", + "description" : "standard bandwidths index:\n * 0 - 2604 Hz (333333 / 128)\n * 1 - 3125 Hz (400000 / 128)\n * 2 - 3906 Hz (500000 / 128)\n * 3 - 5208 Hz (333333 / 64)\n * 4 - 6250 Hz (400000 / 64)\n * 5 - 7813 Hz (500000 / 64)\n * 6 - 10417 Hz (333333 / 32)\n * 7 - 12500 Hz (400000 / 32)\n * 8 - 15625 Hz (500000 / 32)\n * 9 - 20833 Hz (333333 / 16)\n * 10 - 25000 Hz (400000 / 16)\n * 11 - 31250 Hz (500000 / 16)\n * 12 - 41667 Hz (333333 / 8)\n * 13 - 50000 Hz (400000 / 8)\n * 14 - 62500 Hz (500000 / 8)\n * 15 - 83333 Hz (333333 / 4)\n * 16 - 100000 Hz (400000 / 4)\n * 17 - 125000 Hz (500000 / 4)\n * 18 - 166667 Hz (333333 / 2)\n * 19 - 200000 Hz (400000 / 2)\n * 20 - 250000 Hz (500000 / 2)\n * 21 - 333333 Hz (333333 / 1)\n * 22 - 400000 Hz (400000 / 1)\n * 23 - 500000 Hz (500000 / 1)\n" + }, + "spreadFactor" : { + "type" : "integer" + }, + "deBits" : { + "type" : "integer", + "description" : "Low data rate optmize (DE) bits i.e. nb of FFT bins per effective symbol" + }, + "codingScheme" : { + "type" : "integer", + "description" : "message encoding scheme (LoRaModSettings::CodingScheme):\n * 0 - LoRa\n * 1 - Plain ASCII (7 bit)\n * 2 - Teletype (5 bit Baudot) a.k.a TTY\n" + }, + "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" + }, + "autoNbSymbolsMax" : { + "type" : "integer", + "description" : "adjust maximum number of symbols in a payload to the value just received (LoRa)" + }, + "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)" + }, + "hasCRC" : { + "type" : "integer", + "description" : "Payload has CRC (LoRa)" + }, + "hasHeader" : { + "type" : "integer", + "description" : "Header present before actual payload (LoRa)" + }, + "sendViaUDP" : { + "type" : "integer", + "description" : "boolean 1 to send decoded message via UDP else 0" + }, + "udpAddress" : { + "type" : "string", + "description" : "UDP destination udpAddress" + }, + "udpPort" : { + "type" : "integer", + "description" : "UDP destination properties" + }, + "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" + } + }, + "description" : "ChirpChatDemod" }; defs.Command = { "properties" : { @@ -4385,187 +4566,6 @@ margin-bottom: 20px; } }, "description" : "LimeSDR" -}; - defs.LoRaDemodReport = { - "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)" - }, - "hasCRC" : { - "type" : "integer", - "description" : "boolean 1 if payload CRC is present else 0 (LoRa)" - }, - "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" - }, - "messageBytes" : { - "type" : "array", - "description" : "bytes of the last decoded message as an array of hex string represented bytes (00..FF)", - "items" : { - "type" : "string" - } - } - }, - "description" : "LoRaDemod" -}; - defs.LoRaDemodSettings = { - "properties" : { - "inputFrequencyOffset" : { - "type" : "integer", - "format" : "int64" - }, - "bandwidthIndex" : { - "type" : "integer", - "description" : "standard bandwidths index:\n * 0 - 2604 Hz (333333 / 128)\n * 1 - 3125 Hz (400000 / 128)\n * 2 - 3906 Hz (500000 / 128)\n * 3 - 5208 Hz (333333 / 64)\n * 4 - 6250 Hz (400000 / 64)\n * 5 - 7813 Hz (500000 / 64)\n * 6 - 10417 Hz (333333 / 32)\n * 7 - 12500 Hz (400000 / 32)\n * 8 - 15625 Hz (500000 / 32)\n * 9 - 20833 Hz (333333 / 16)\n * 10 - 25000 Hz (400000 / 16)\n * 11 - 31250 Hz (500000 / 16)\n * 12 - 41667 Hz (333333 / 8)\n * 13 - 50000 Hz (400000 / 8)\n * 14 - 62500 Hz (500000 / 8)\n * 15 - 83333 Hz (333333 / 4)\n * 16 - 100000 Hz (400000 / 4)\n * 17 - 125000 Hz (500000 / 4)\n * 18 - 166667 Hz (333333 / 2)\n * 19 - 200000 Hz (400000 / 2)\n * 20 - 250000 Hz (500000 / 2)\n * 21 - 333333 Hz (333333 / 1)\n * 22 - 400000 Hz (400000 / 1)\n * 23 - 500000 Hz (500000 / 1)\n" - }, - "spreadFactor" : { - "type" : "integer" - }, - "deBits" : { - "type" : "integer", - "description" : "Low data rate optmize (DE) bits i.e. nb of FFT bins per effective symbol" - }, - "codingScheme" : { - "type" : "integer", - "description" : "message encoding scheme (LoRaModSettings::CodingScheme):\n * 0 - LoRa\n * 1 - Plain ASCII (7 bit)\n * 2 - Teletype (5 bit Baudot) a.k.a TTY\n" - }, - "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" - }, - "autoNbSymbolsMax" : { - "type" : "integer", - "description" : "adjust maximum number of symbols in a payload to the value just received (LoRa)" - }, - "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)" - }, - "hasCRC" : { - "type" : "integer", - "description" : "Payload has CRC (LoRa)" - }, - "hasHeader" : { - "type" : "integer", - "description" : "Header present before actual payload (LoRa)" - }, - "sendViaUDP" : { - "type" : "integer", - "description" : "boolean 1 to send decoded message via UDP else 0" - }, - "udpAddress" : { - "type" : "string", - "description" : "UDP destination udpAddress" - }, - "udpPort" : { - "type" : "integer", - "description" : "UDP destination properties" - }, - "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" - } - }, - "description" : "LoRaDemod" }; defs.LoRaModReport = { "properties" : { @@ -32618,7 +32618,7 @@ except ApiException as e:
- Generated 2020-02-25T14:33:44.826+01:00 + Generated 2020-03-03T20:19:50.511+01:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/ChannelSettings.yaml b/sdrbase/resources/webapi/doc/swagger/include/ChannelSettings.yaml index 57410e97a..f0a622e78 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/ChannelSettings.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/ChannelSettings.yaml @@ -31,6 +31,8 @@ ChannelSettings: $ref: "/doc/swagger/include/BFMDemod.yaml#/BFMDemodSettings" ChannelAnalyzerSettings: $ref: "/doc/swagger/include/ChannelAnalyzer.yaml#/ChannelAnalyzerSettings" + ChirpChatDemodSettings: + $ref: "/doc/swagger/include/ChirpChatDemod.yaml#/ChirpChatDemodSettings" DATVDemodSettings: $ref: "/doc/swagger/include/DATVDemod.yaml#/DATVDemodSettings" DSDDemodSettings: @@ -45,8 +47,6 @@ ChannelSettings: $ref: "/doc/swagger/include/FreqTracker.yaml#/FreqTrackerSettings" InterferometerSettings: $ref: "/doc/swagger/include/Interferometer.yaml#/InterferometerSettings" - LoRaDemodSettings: - $ref: "/doc/swagger/include/LoRaDemod.yaml#/LoRaDemodSettings" LoRaModSettings: $ref: "/doc/swagger/include/LoRaMod.yaml#/LoRaModSettings" NFMDemodSettings: diff --git a/swagger/sdrangel/api/swagger/include/LoRaDemod.yaml b/sdrbase/resources/webapi/doc/swagger/include/ChirpChatDemod.yaml similarity index 98% rename from swagger/sdrangel/api/swagger/include/LoRaDemod.yaml rename to sdrbase/resources/webapi/doc/swagger/include/ChirpChatDemod.yaml index 7f91f480c..7194cf866 100644 --- a/swagger/sdrangel/api/swagger/include/LoRaDemod.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/ChirpChatDemod.yaml @@ -1,5 +1,5 @@ -LoRaDemodSettings: - description: LoRaDemod +ChirpChatDemodSettings: + description: ChirpChatDemod properties: inputFrequencyOffset: type: integer @@ -99,8 +99,8 @@ LoRaDemodSettings: reverseAPIChannelIndex: type: integer -LoRaDemodReport: - description: LoRaDemod +ChirpChatDemodReport: + description: ChirpChatDemod properties: channelPowerDB: description: current de-chirped total channel power (dB) diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index 3538f004c..6a94d4dc6 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -2262,6 +2262,8 @@ definitions: $ref: "/doc/swagger/include/ATVMod.yaml#/ATVModReport" BFMDemodReport: $ref: "/doc/swagger/include/BFMDemod.yaml#/BFMDemodReport" + ChirpChatDemodReport: + $ref: "/doc/swagger/include/ChirpChatDemod.yaml#/ChirpChatDemodReport" DSDDemodReport: $ref: "/doc/swagger/include/DSDDemod.yaml#/DSDDemodReport" FileSourceReport: @@ -2272,8 +2274,6 @@ definitions: $ref: "/doc/swagger/include/FreeDVMod.yaml#/FreeDVModReport" FreqTrackerReport: $ref: "/doc/swagger/include/FreqTracker.yaml#/FreqTrackerReport" - LoRaDemodReport: - $ref: "/doc/swagger/include/LoRaDemod.yaml#/LoRaDemodReport" LoRaModReport: $ref: "/doc/swagger/include/LoRaMod.yaml#/LoRaModReport" NFMDemodReport: diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index 50a50abcf..7bef3af39 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -59,6 +59,7 @@ const QMap WebAPIRequestMapper::m_channelURIToSettingsKey = { {"sdrangel.channel.chanalyzer", "ChannelAnalyzerSettings"}, {"sdrangel.channel.chanalyzerng", "ChannelAnalyzerSettings"}, // remap {"org.f4exb.sdrangelove.channel.chanalyzer", "ChannelAnalyzerSettings"}, // remap + {"sdrangel.channel.chirpchatdemod", "ChirpChatDemodSettings"}, {"sdrangel.channel.demodatv", "ATVDemodSettings"}, {"sdrangel.channel.demoddatv", "DATVDemodSettings"}, {"sdrangel.channel.dsddemod", "DSDDemodSettings"}, @@ -72,7 +73,6 @@ const QMap WebAPIRequestMapper::m_channelURIToSettingsKey = { {"sdrangel.demod.localsink", "LocalSinkSettings"}, {"sdrangel.channel.localsink", "LocalSinkSettings"}, // remap {"sdrangel.channel.localsource", "LocalSourceSettings"}, - {"sdrangel.channel.lorademod", "LoRaDemodSettings"}, {"sdrangel.channel.modlora", "LoRaModSettings"}, {"sdrangel.demod.remotesink", "RemoteSinkSettings"}, {"sdrangel.channeltx.remotesource", "RemoteSourceSettings"}, @@ -138,6 +138,7 @@ const QMap WebAPIRequestMapper::m_channelTypeToSettingsKey = { {"ATVMod", "ATVModSettings"}, {"BFMDemod", "BFMDemodSettings"}, {"ChannelAnalyzer", "ChannelAnalyzerSettings"}, + {"ChirpChatDemod", "ChirpChatDemodSettings"}, {"DATVDemod", "DATVDemodSettings"}, {"DSDDemod", "DSDDemodSettings"}, {"FileSource", "FileSourceSettings"}, @@ -148,7 +149,6 @@ const QMap WebAPIRequestMapper::m_channelTypeToSettingsKey = { {"NFMMod", "NFMModSettings"}, {"LocalSink", "LocalSinkSettings"}, {"LocalSource", "LocalSourceSettings"}, - {"LoRaDemod", "LoRaDemodSettings"}, {"LoRaMod", "LoRaModSettings"}, {"RemoteSink", "RemoteSinkSettings"}, {"RemoteSource", "RemoteSourceSettings"}, @@ -2915,10 +2915,10 @@ bool WebAPIRequestMapper::getChannel( channelSettings->setLocalSourceSettings(new SWGSDRangel::SWGLocalSourceSettings()); channelSettings->getLocalSourceSettings()->fromJsonObject(settingsJsonObject); } - else if (channelSettingsKey == "LoRaDemodSettings") + else if (channelSettingsKey == "ChirpChatDemodSettings") { - channelSettings->setLoRaDemodSettings(new SWGSDRangel::SWGLoRaDemodSettings()); - channelSettings->getLoRaDemodSettings()->fromJsonObject(settingsJsonObject); + channelSettings->setChirpChatDemodSettings(new SWGSDRangel::SWGChirpChatDemodSettings()); + channelSettings->getChirpChatDemodSettings()->fromJsonObject(settingsJsonObject); } else if (channelSettingsKey == "LoRaModSettings") { diff --git a/swagger/sdrangel/api/swagger/include/ChannelSettings.yaml b/swagger/sdrangel/api/swagger/include/ChannelSettings.yaml index c983aa1b6..a5ba9d963 100644 --- a/swagger/sdrangel/api/swagger/include/ChannelSettings.yaml +++ b/swagger/sdrangel/api/swagger/include/ChannelSettings.yaml @@ -31,6 +31,8 @@ ChannelSettings: $ref: "http://localhost:8081/api/swagger/include/BFMDemod.yaml#/BFMDemodSettings" ChannelAnalyzerSettings: $ref: "http://localhost:8081/api/swagger/include/ChannelAnalyzer.yaml#/ChannelAnalyzerSettings" + ChirpChatDemodSettings: + $ref: "http://localhost:8081/api/swagger/include/ChirpChatDemod.yaml#/ChirpChatDemodSettings" DATVDemodSettings: $ref: "http://localhost:8081/api/swagger/include/DATVDemod.yaml#/DATVDemodSettings" DSDDemodSettings: @@ -45,8 +47,6 @@ ChannelSettings: $ref: "http://localhost:8081/api/swagger/include/FreqTracker.yaml#/FreqTrackerSettings" InterferometerSettings: $ref: "http://localhost:8081/api/swagger/include/Interferometer.yaml#/InterferometerSettings" - LoRaDemodSettings: - $ref: "http://localhost:8081/api/swagger/include/LoRaDemod.yaml#/LoRaDemodSettings" LoRaModSettings: $ref: "http://localhost:8081/api/swagger/include/LoRaMod.yaml#/LoRaModSettings" NFMDemodSettings: diff --git a/swagger/sdrangel/api/swagger/include/ChirpChatDemod.yaml b/swagger/sdrangel/api/swagger/include/ChirpChatDemod.yaml new file mode 100644 index 000000000..7194cf866 --- /dev/null +++ b/swagger/sdrangel/api/swagger/include/ChirpChatDemod.yaml @@ -0,0 +1,173 @@ +ChirpChatDemodSettings: + description: ChirpChatDemod + properties: + inputFrequencyOffset: + type: integer + format: int64 + bandwidthIndex: + type: integer + description: > + standard bandwidths index: + * 0 - 2604 Hz (333333 / 128) + * 1 - 3125 Hz (400000 / 128) + * 2 - 3906 Hz (500000 / 128) + * 3 - 5208 Hz (333333 / 64) + * 4 - 6250 Hz (400000 / 64) + * 5 - 7813 Hz (500000 / 64) + * 6 - 10417 Hz (333333 / 32) + * 7 - 12500 Hz (400000 / 32) + * 8 - 15625 Hz (500000 / 32) + * 9 - 20833 Hz (333333 / 16) + * 10 - 25000 Hz (400000 / 16) + * 11 - 31250 Hz (500000 / 16) + * 12 - 41667 Hz (333333 / 8) + * 13 - 50000 Hz (400000 / 8) + * 14 - 62500 Hz (500000 / 8) + * 15 - 83333 Hz (333333 / 4) + * 16 - 100000 Hz (400000 / 4) + * 17 - 125000 Hz (500000 / 4) + * 18 - 166667 Hz (333333 / 2) + * 19 - 200000 Hz (400000 / 2) + * 20 - 250000 Hz (500000 / 2) + * 21 - 333333 Hz (333333 / 1) + * 22 - 400000 Hz (400000 / 1) + * 23 - 500000 Hz (500000 / 1) + spreadFactor: + type: integer + deBits: + description: Low data rate optmize (DE) bits i.e. nb of FFT bins per effective symbol + type: integer + codingScheme: + type: integer + description: > + message encoding scheme (LoRaModSettings::CodingScheme): + * 0 - LoRa + * 1 - Plain ASCII (7 bit) + * 2 - Teletype (5 bit Baudot) a.k.a TTY + 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 + autoNbSymbolsMax: + description: adjust maximum number of symbols in a payload to the value just received (LoRa) + 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 + hasCRC: + description: Payload has CRC (LoRa) + type: integer + hasHeader: + description: Header present before actual payload (LoRa) + type: integer + sendViaUDP: + description: boolean 1 to send decoded message via UDP else 0 + type: integer + udpAddress: + description: UDP destination udpAddress + type: string + udpPort: + description: UDP destination properties + type: integer + 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 + +ChirpChatDemodReport: + description: ChirpChatDemod + 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 + hasCRC: + description: boolean 1 if payload CRC is present else 0 (LoRa) + 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 + messageBytes: + description: bytes of the last decoded message as an array of hex string represented bytes (00..FF) + type: array + items: + type: string diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index e0743ca66..eeabb05da 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -2262,6 +2262,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/ATVMod.yaml#/ATVModReport" BFMDemodReport: $ref: "http://localhost:8081/api/swagger/include/BFMDemod.yaml#/BFMDemodReport" + ChirpChatDemodReport: + $ref: "http://localhost:8081/api/swagger/include/ChirpChatDemod.yaml#/ChirpChatDemodReport" DSDDemodReport: $ref: "http://localhost:8081/api/swagger/include/DSDDemod.yaml#/DSDDemodReport" FileSourceReport: @@ -2272,8 +2274,6 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/FreeDVMod.yaml#/FreeDVModReport" FreqTrackerReport: $ref: "http://localhost:8081/api/swagger/include/FreqTracker.yaml#/FreqTrackerReport" - LoRaDemodReport: - $ref: "http://localhost:8081/api/swagger/include/LoRaDemod.yaml#/LoRaDemodReport" LoRaModReport: $ref: "http://localhost:8081/api/swagger/include/LoRaMod.yaml#/LoRaModReport" NFMDemodReport: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 47d5086ff..512727d6f 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -2169,6 +2169,9 @@ margin-bottom: 20px; "BFMDemodReport" : { "$ref" : "#/definitions/BFMDemodReport" }, + "ChirpChatDemodReport" : { + "$ref" : "#/definitions/ChirpChatDemodReport" + }, "DSDDemodReport" : { "$ref" : "#/definitions/DSDDemodReport" }, @@ -2184,9 +2187,6 @@ margin-bottom: 20px; "FreqTrackerReport" : { "$ref" : "#/definitions/FreqTrackerReport" }, - "LoRaDemodReport" : { - "$ref" : "#/definitions/LoRaDemodReport" - }, "LoRaModReport" : { "$ref" : "#/definitions/LoRaModReport" }, @@ -2261,6 +2261,9 @@ margin-bottom: 20px; "ChannelAnalyzerSettings" : { "$ref" : "#/definitions/ChannelAnalyzerSettings" }, + "ChirpChatDemodSettings" : { + "$ref" : "#/definitions/ChirpChatDemodSettings" + }, "DATVDemodSettings" : { "$ref" : "#/definitions/DATVDemodSettings" }, @@ -2282,9 +2285,6 @@ margin-bottom: 20px; "InterferometerSettings" : { "$ref" : "#/definitions/InterferometerSettings" }, - "LoRaDemodSettings" : { - "$ref" : "#/definitions/LoRaDemodSettings" - }, "LoRaModSettings" : { "$ref" : "#/definitions/LoRaModSettings" }, @@ -2343,6 +2343,187 @@ margin-bottom: 20px; } }, "description" : "All channels detailed information" +}; + defs.ChirpChatDemodReport = { + "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)" + }, + "hasCRC" : { + "type" : "integer", + "description" : "boolean 1 if payload CRC is present else 0 (LoRa)" + }, + "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" + }, + "messageBytes" : { + "type" : "array", + "description" : "bytes of the last decoded message as an array of hex string represented bytes (00..FF)", + "items" : { + "type" : "string" + } + } + }, + "description" : "ChirpChatDemod" +}; + defs.ChirpChatDemodSettings = { + "properties" : { + "inputFrequencyOffset" : { + "type" : "integer", + "format" : "int64" + }, + "bandwidthIndex" : { + "type" : "integer", + "description" : "standard bandwidths index:\n * 0 - 2604 Hz (333333 / 128)\n * 1 - 3125 Hz (400000 / 128)\n * 2 - 3906 Hz (500000 / 128)\n * 3 - 5208 Hz (333333 / 64)\n * 4 - 6250 Hz (400000 / 64)\n * 5 - 7813 Hz (500000 / 64)\n * 6 - 10417 Hz (333333 / 32)\n * 7 - 12500 Hz (400000 / 32)\n * 8 - 15625 Hz (500000 / 32)\n * 9 - 20833 Hz (333333 / 16)\n * 10 - 25000 Hz (400000 / 16)\n * 11 - 31250 Hz (500000 / 16)\n * 12 - 41667 Hz (333333 / 8)\n * 13 - 50000 Hz (400000 / 8)\n * 14 - 62500 Hz (500000 / 8)\n * 15 - 83333 Hz (333333 / 4)\n * 16 - 100000 Hz (400000 / 4)\n * 17 - 125000 Hz (500000 / 4)\n * 18 - 166667 Hz (333333 / 2)\n * 19 - 200000 Hz (400000 / 2)\n * 20 - 250000 Hz (500000 / 2)\n * 21 - 333333 Hz (333333 / 1)\n * 22 - 400000 Hz (400000 / 1)\n * 23 - 500000 Hz (500000 / 1)\n" + }, + "spreadFactor" : { + "type" : "integer" + }, + "deBits" : { + "type" : "integer", + "description" : "Low data rate optmize (DE) bits i.e. nb of FFT bins per effective symbol" + }, + "codingScheme" : { + "type" : "integer", + "description" : "message encoding scheme (LoRaModSettings::CodingScheme):\n * 0 - LoRa\n * 1 - Plain ASCII (7 bit)\n * 2 - Teletype (5 bit Baudot) a.k.a TTY\n" + }, + "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" + }, + "autoNbSymbolsMax" : { + "type" : "integer", + "description" : "adjust maximum number of symbols in a payload to the value just received (LoRa)" + }, + "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)" + }, + "hasCRC" : { + "type" : "integer", + "description" : "Payload has CRC (LoRa)" + }, + "hasHeader" : { + "type" : "integer", + "description" : "Header present before actual payload (LoRa)" + }, + "sendViaUDP" : { + "type" : "integer", + "description" : "boolean 1 to send decoded message via UDP else 0" + }, + "udpAddress" : { + "type" : "string", + "description" : "UDP destination udpAddress" + }, + "udpPort" : { + "type" : "integer", + "description" : "UDP destination properties" + }, + "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" + } + }, + "description" : "ChirpChatDemod" }; defs.Command = { "properties" : { @@ -4385,187 +4566,6 @@ margin-bottom: 20px; } }, "description" : "LimeSDR" -}; - defs.LoRaDemodReport = { - "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)" - }, - "hasCRC" : { - "type" : "integer", - "description" : "boolean 1 if payload CRC is present else 0 (LoRa)" - }, - "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" - }, - "messageBytes" : { - "type" : "array", - "description" : "bytes of the last decoded message as an array of hex string represented bytes (00..FF)", - "items" : { - "type" : "string" - } - } - }, - "description" : "LoRaDemod" -}; - defs.LoRaDemodSettings = { - "properties" : { - "inputFrequencyOffset" : { - "type" : "integer", - "format" : "int64" - }, - "bandwidthIndex" : { - "type" : "integer", - "description" : "standard bandwidths index:\n * 0 - 2604 Hz (333333 / 128)\n * 1 - 3125 Hz (400000 / 128)\n * 2 - 3906 Hz (500000 / 128)\n * 3 - 5208 Hz (333333 / 64)\n * 4 - 6250 Hz (400000 / 64)\n * 5 - 7813 Hz (500000 / 64)\n * 6 - 10417 Hz (333333 / 32)\n * 7 - 12500 Hz (400000 / 32)\n * 8 - 15625 Hz (500000 / 32)\n * 9 - 20833 Hz (333333 / 16)\n * 10 - 25000 Hz (400000 / 16)\n * 11 - 31250 Hz (500000 / 16)\n * 12 - 41667 Hz (333333 / 8)\n * 13 - 50000 Hz (400000 / 8)\n * 14 - 62500 Hz (500000 / 8)\n * 15 - 83333 Hz (333333 / 4)\n * 16 - 100000 Hz (400000 / 4)\n * 17 - 125000 Hz (500000 / 4)\n * 18 - 166667 Hz (333333 / 2)\n * 19 - 200000 Hz (400000 / 2)\n * 20 - 250000 Hz (500000 / 2)\n * 21 - 333333 Hz (333333 / 1)\n * 22 - 400000 Hz (400000 / 1)\n * 23 - 500000 Hz (500000 / 1)\n" - }, - "spreadFactor" : { - "type" : "integer" - }, - "deBits" : { - "type" : "integer", - "description" : "Low data rate optmize (DE) bits i.e. nb of FFT bins per effective symbol" - }, - "codingScheme" : { - "type" : "integer", - "description" : "message encoding scheme (LoRaModSettings::CodingScheme):\n * 0 - LoRa\n * 1 - Plain ASCII (7 bit)\n * 2 - Teletype (5 bit Baudot) a.k.a TTY\n" - }, - "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" - }, - "autoNbSymbolsMax" : { - "type" : "integer", - "description" : "adjust maximum number of symbols in a payload to the value just received (LoRa)" - }, - "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)" - }, - "hasCRC" : { - "type" : "integer", - "description" : "Payload has CRC (LoRa)" - }, - "hasHeader" : { - "type" : "integer", - "description" : "Header present before actual payload (LoRa)" - }, - "sendViaUDP" : { - "type" : "integer", - "description" : "boolean 1 to send decoded message via UDP else 0" - }, - "udpAddress" : { - "type" : "string", - "description" : "UDP destination udpAddress" - }, - "udpPort" : { - "type" : "integer", - "description" : "UDP destination properties" - }, - "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" - } - }, - "description" : "LoRaDemod" }; defs.LoRaModReport = { "properties" : { @@ -32618,7 +32618,7 @@ except ApiException as e:
- Generated 2020-02-25T14:33:44.826+01:00 + Generated 2020-03-03T20:19:50.511+01:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp index ced31d4dd..f3f20c34c 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp @@ -40,6 +40,8 @@ SWGChannelReport::SWGChannelReport() { m_atv_mod_report_isSet = false; bfm_demod_report = nullptr; m_bfm_demod_report_isSet = false; + chirp_chat_demod_report = nullptr; + m_chirp_chat_demod_report_isSet = false; dsd_demod_report = nullptr; m_dsd_demod_report_isSet = false; file_source_report = nullptr; @@ -50,8 +52,6 @@ SWGChannelReport::SWGChannelReport() { m_free_dv_mod_report_isSet = false; freq_tracker_report = nullptr; m_freq_tracker_report_isSet = false; - lo_ra_demod_report = nullptr; - m_lo_ra_demod_report_isSet = false; lo_ra_mod_report = nullptr; m_lo_ra_mod_report_isSet = false; nfm_demod_report = nullptr; @@ -92,6 +92,8 @@ SWGChannelReport::init() { m_atv_mod_report_isSet = false; bfm_demod_report = new SWGBFMDemodReport(); m_bfm_demod_report_isSet = false; + chirp_chat_demod_report = new SWGChirpChatDemodReport(); + m_chirp_chat_demod_report_isSet = false; dsd_demod_report = new SWGDSDDemodReport(); m_dsd_demod_report_isSet = false; file_source_report = new SWGFileSourceReport(); @@ -102,8 +104,6 @@ SWGChannelReport::init() { m_free_dv_mod_report_isSet = false; freq_tracker_report = new SWGFreqTrackerReport(); m_freq_tracker_report_isSet = false; - lo_ra_demod_report = new SWGLoRaDemodReport(); - m_lo_ra_demod_report_isSet = false; lo_ra_mod_report = new SWGLoRaModReport(); m_lo_ra_mod_report_isSet = false; nfm_demod_report = new SWGNFMDemodReport(); @@ -144,6 +144,9 @@ SWGChannelReport::cleanup() { if(bfm_demod_report != nullptr) { delete bfm_demod_report; } + if(chirp_chat_demod_report != nullptr) { + delete chirp_chat_demod_report; + } if(dsd_demod_report != nullptr) { delete dsd_demod_report; } @@ -159,9 +162,6 @@ SWGChannelReport::cleanup() { if(freq_tracker_report != nullptr) { delete freq_tracker_report; } - if(lo_ra_demod_report != nullptr) { - delete lo_ra_demod_report; - } if(lo_ra_mod_report != nullptr) { delete lo_ra_mod_report; } @@ -217,6 +217,8 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&bfm_demod_report, pJson["BFMDemodReport"], "SWGBFMDemodReport", "SWGBFMDemodReport"); + ::SWGSDRangel::setValue(&chirp_chat_demod_report, pJson["ChirpChatDemodReport"], "SWGChirpChatDemodReport", "SWGChirpChatDemodReport"); + ::SWGSDRangel::setValue(&dsd_demod_report, pJson["DSDDemodReport"], "SWGDSDDemodReport", "SWGDSDDemodReport"); ::SWGSDRangel::setValue(&file_source_report, pJson["FileSourceReport"], "SWGFileSourceReport", "SWGFileSourceReport"); @@ -227,8 +229,6 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&freq_tracker_report, pJson["FreqTrackerReport"], "SWGFreqTrackerReport", "SWGFreqTrackerReport"); - ::SWGSDRangel::setValue(&lo_ra_demod_report, pJson["LoRaDemodReport"], "SWGLoRaDemodReport", "SWGLoRaDemodReport"); - ::SWGSDRangel::setValue(&lo_ra_mod_report, pJson["LoRaModReport"], "SWGLoRaModReport", "SWGLoRaModReport"); ::SWGSDRangel::setValue(&nfm_demod_report, pJson["NFMDemodReport"], "SWGNFMDemodReport", "SWGNFMDemodReport"); @@ -283,6 +283,9 @@ SWGChannelReport::asJsonObject() { if((bfm_demod_report != nullptr) && (bfm_demod_report->isSet())){ toJsonValue(QString("BFMDemodReport"), bfm_demod_report, obj, QString("SWGBFMDemodReport")); } + if((chirp_chat_demod_report != nullptr) && (chirp_chat_demod_report->isSet())){ + toJsonValue(QString("ChirpChatDemodReport"), chirp_chat_demod_report, obj, QString("SWGChirpChatDemodReport")); + } if((dsd_demod_report != nullptr) && (dsd_demod_report->isSet())){ toJsonValue(QString("DSDDemodReport"), dsd_demod_report, obj, QString("SWGDSDDemodReport")); } @@ -298,9 +301,6 @@ SWGChannelReport::asJsonObject() { if((freq_tracker_report != nullptr) && (freq_tracker_report->isSet())){ toJsonValue(QString("FreqTrackerReport"), freq_tracker_report, obj, QString("SWGFreqTrackerReport")); } - if((lo_ra_demod_report != nullptr) && (lo_ra_demod_report->isSet())){ - toJsonValue(QString("LoRaDemodReport"), lo_ra_demod_report, obj, QString("SWGLoRaDemodReport")); - } if((lo_ra_mod_report != nullptr) && (lo_ra_mod_report->isSet())){ toJsonValue(QString("LoRaModReport"), lo_ra_mod_report, obj, QString("SWGLoRaModReport")); } @@ -395,6 +395,16 @@ SWGChannelReport::setBfmDemodReport(SWGBFMDemodReport* bfm_demod_report) { this->m_bfm_demod_report_isSet = true; } +SWGChirpChatDemodReport* +SWGChannelReport::getChirpChatDemodReport() { + return chirp_chat_demod_report; +} +void +SWGChannelReport::setChirpChatDemodReport(SWGChirpChatDemodReport* chirp_chat_demod_report) { + this->chirp_chat_demod_report = chirp_chat_demod_report; + this->m_chirp_chat_demod_report_isSet = true; +} + SWGDSDDemodReport* SWGChannelReport::getDsdDemodReport() { return dsd_demod_report; @@ -445,16 +455,6 @@ SWGChannelReport::setFreqTrackerReport(SWGFreqTrackerReport* freq_tracker_report this->m_freq_tracker_report_isSet = true; } -SWGLoRaDemodReport* -SWGChannelReport::getLoRaDemodReport() { - return lo_ra_demod_report; -} -void -SWGChannelReport::setLoRaDemodReport(SWGLoRaDemodReport* lo_ra_demod_report) { - this->lo_ra_demod_report = lo_ra_demod_report; - this->m_lo_ra_demod_report_isSet = true; -} - SWGLoRaModReport* SWGChannelReport::getLoRaModReport() { return lo_ra_mod_report; @@ -578,6 +578,9 @@ SWGChannelReport::isSet(){ if(bfm_demod_report && bfm_demod_report->isSet()){ isObjectUpdated = true; break; } + if(chirp_chat_demod_report && chirp_chat_demod_report->isSet()){ + isObjectUpdated = true; break; + } if(dsd_demod_report && dsd_demod_report->isSet()){ isObjectUpdated = true; break; } @@ -593,9 +596,6 @@ SWGChannelReport::isSet(){ if(freq_tracker_report && freq_tracker_report->isSet()){ isObjectUpdated = true; break; } - if(lo_ra_demod_report && lo_ra_demod_report->isSet()){ - isObjectUpdated = true; break; - } if(lo_ra_mod_report && lo_ra_mod_report->isSet()){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h index c1407a65f..5757bd601 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h @@ -26,12 +26,12 @@ #include "SWGAMModReport.h" #include "SWGATVModReport.h" #include "SWGBFMDemodReport.h" +#include "SWGChirpChatDemodReport.h" #include "SWGDSDDemodReport.h" #include "SWGFileSourceReport.h" #include "SWGFreeDVDemodReport.h" #include "SWGFreeDVModReport.h" #include "SWGFreqTrackerReport.h" -#include "SWGLoRaDemodReport.h" #include "SWGLoRaModReport.h" #include "SWGNFMDemodReport.h" #include "SWGNFMModReport.h" @@ -80,6 +80,9 @@ public: SWGBFMDemodReport* getBfmDemodReport(); void setBfmDemodReport(SWGBFMDemodReport* bfm_demod_report); + SWGChirpChatDemodReport* getChirpChatDemodReport(); + void setChirpChatDemodReport(SWGChirpChatDemodReport* chirp_chat_demod_report); + SWGDSDDemodReport* getDsdDemodReport(); void setDsdDemodReport(SWGDSDDemodReport* dsd_demod_report); @@ -95,9 +98,6 @@ public: SWGFreqTrackerReport* getFreqTrackerReport(); void setFreqTrackerReport(SWGFreqTrackerReport* freq_tracker_report); - SWGLoRaDemodReport* getLoRaDemodReport(); - void setLoRaDemodReport(SWGLoRaDemodReport* lo_ra_demod_report); - SWGLoRaModReport* getLoRaModReport(); void setLoRaModReport(SWGLoRaModReport* lo_ra_mod_report); @@ -150,6 +150,9 @@ private: SWGBFMDemodReport* bfm_demod_report; bool m_bfm_demod_report_isSet; + SWGChirpChatDemodReport* chirp_chat_demod_report; + bool m_chirp_chat_demod_report_isSet; + SWGDSDDemodReport* dsd_demod_report; bool m_dsd_demod_report_isSet; @@ -165,9 +168,6 @@ private: SWGFreqTrackerReport* freq_tracker_report; bool m_freq_tracker_report_isSet; - SWGLoRaDemodReport* lo_ra_demod_report; - bool m_lo_ra_demod_report_isSet; - SWGLoRaModReport* lo_ra_mod_report; bool m_lo_ra_mod_report_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp index fc1443d9f..0c21c1132 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp @@ -50,6 +50,8 @@ SWGChannelSettings::SWGChannelSettings() { m_bfm_demod_settings_isSet = false; channel_analyzer_settings = nullptr; m_channel_analyzer_settings_isSet = false; + chirp_chat_demod_settings = nullptr; + m_chirp_chat_demod_settings_isSet = false; datv_demod_settings = nullptr; m_datv_demod_settings_isSet = false; dsd_demod_settings = nullptr; @@ -64,8 +66,6 @@ SWGChannelSettings::SWGChannelSettings() { m_freq_tracker_settings_isSet = false; interferometer_settings = nullptr; m_interferometer_settings_isSet = false; - lo_ra_demod_settings = nullptr; - m_lo_ra_demod_settings_isSet = false; lo_ra_mod_settings = nullptr; m_lo_ra_mod_settings_isSet = false; nfm_demod_settings = nullptr; @@ -122,6 +122,8 @@ SWGChannelSettings::init() { m_bfm_demod_settings_isSet = false; channel_analyzer_settings = new SWGChannelAnalyzerSettings(); m_channel_analyzer_settings_isSet = false; + chirp_chat_demod_settings = new SWGChirpChatDemodSettings(); + m_chirp_chat_demod_settings_isSet = false; datv_demod_settings = new SWGDATVDemodSettings(); m_datv_demod_settings_isSet = false; dsd_demod_settings = new SWGDSDDemodSettings(); @@ -136,8 +138,6 @@ SWGChannelSettings::init() { m_freq_tracker_settings_isSet = false; interferometer_settings = new SWGInterferometerSettings(); m_interferometer_settings_isSet = false; - lo_ra_demod_settings = new SWGLoRaDemodSettings(); - m_lo_ra_demod_settings_isSet = false; lo_ra_mod_settings = new SWGLoRaModSettings(); m_lo_ra_mod_settings_isSet = false; nfm_demod_settings = new SWGNFMDemodSettings(); @@ -195,6 +195,9 @@ SWGChannelSettings::cleanup() { if(channel_analyzer_settings != nullptr) { delete channel_analyzer_settings; } + if(chirp_chat_demod_settings != nullptr) { + delete chirp_chat_demod_settings; + } if(datv_demod_settings != nullptr) { delete datv_demod_settings; } @@ -216,9 +219,6 @@ SWGChannelSettings::cleanup() { if(interferometer_settings != nullptr) { delete interferometer_settings; } - if(lo_ra_demod_settings != nullptr) { - delete lo_ra_demod_settings; - } if(lo_ra_mod_settings != nullptr) { delete lo_ra_mod_settings; } @@ -293,6 +293,8 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&channel_analyzer_settings, pJson["ChannelAnalyzerSettings"], "SWGChannelAnalyzerSettings", "SWGChannelAnalyzerSettings"); + ::SWGSDRangel::setValue(&chirp_chat_demod_settings, pJson["ChirpChatDemodSettings"], "SWGChirpChatDemodSettings", "SWGChirpChatDemodSettings"); + ::SWGSDRangel::setValue(&datv_demod_settings, pJson["DATVDemodSettings"], "SWGDATVDemodSettings", "SWGDATVDemodSettings"); ::SWGSDRangel::setValue(&dsd_demod_settings, pJson["DSDDemodSettings"], "SWGDSDDemodSettings", "SWGDSDDemodSettings"); @@ -307,8 +309,6 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&interferometer_settings, pJson["InterferometerSettings"], "SWGInterferometerSettings", "SWGInterferometerSettings"); - ::SWGSDRangel::setValue(&lo_ra_demod_settings, pJson["LoRaDemodSettings"], "SWGLoRaDemodSettings", "SWGLoRaDemodSettings"); - ::SWGSDRangel::setValue(&lo_ra_mod_settings, pJson["LoRaModSettings"], "SWGLoRaModSettings", "SWGLoRaModSettings"); ::SWGSDRangel::setValue(&nfm_demod_settings, pJson["NFMDemodSettings"], "SWGNFMDemodSettings", "SWGNFMDemodSettings"); @@ -384,6 +384,9 @@ SWGChannelSettings::asJsonObject() { if((channel_analyzer_settings != nullptr) && (channel_analyzer_settings->isSet())){ toJsonValue(QString("ChannelAnalyzerSettings"), channel_analyzer_settings, obj, QString("SWGChannelAnalyzerSettings")); } + if((chirp_chat_demod_settings != nullptr) && (chirp_chat_demod_settings->isSet())){ + toJsonValue(QString("ChirpChatDemodSettings"), chirp_chat_demod_settings, obj, QString("SWGChirpChatDemodSettings")); + } if((datv_demod_settings != nullptr) && (datv_demod_settings->isSet())){ toJsonValue(QString("DATVDemodSettings"), datv_demod_settings, obj, QString("SWGDATVDemodSettings")); } @@ -405,9 +408,6 @@ SWGChannelSettings::asJsonObject() { if((interferometer_settings != nullptr) && (interferometer_settings->isSet())){ toJsonValue(QString("InterferometerSettings"), interferometer_settings, obj, QString("SWGInterferometerSettings")); } - if((lo_ra_demod_settings != nullptr) && (lo_ra_demod_settings->isSet())){ - toJsonValue(QString("LoRaDemodSettings"), lo_ra_demod_settings, obj, QString("SWGLoRaDemodSettings")); - } if((lo_ra_mod_settings != nullptr) && (lo_ra_mod_settings->isSet())){ toJsonValue(QString("LoRaModSettings"), lo_ra_mod_settings, obj, QString("SWGLoRaModSettings")); } @@ -561,6 +561,16 @@ SWGChannelSettings::setChannelAnalyzerSettings(SWGChannelAnalyzerSettings* chann this->m_channel_analyzer_settings_isSet = true; } +SWGChirpChatDemodSettings* +SWGChannelSettings::getChirpChatDemodSettings() { + return chirp_chat_demod_settings; +} +void +SWGChannelSettings::setChirpChatDemodSettings(SWGChirpChatDemodSettings* chirp_chat_demod_settings) { + this->chirp_chat_demod_settings = chirp_chat_demod_settings; + this->m_chirp_chat_demod_settings_isSet = true; +} + SWGDATVDemodSettings* SWGChannelSettings::getDatvDemodSettings() { return datv_demod_settings; @@ -631,16 +641,6 @@ SWGChannelSettings::setInterferometerSettings(SWGInterferometerSettings* interfe this->m_interferometer_settings_isSet = true; } -SWGLoRaDemodSettings* -SWGChannelSettings::getLoRaDemodSettings() { - return lo_ra_demod_settings; -} -void -SWGChannelSettings::setLoRaDemodSettings(SWGLoRaDemodSettings* lo_ra_demod_settings) { - this->lo_ra_demod_settings = lo_ra_demod_settings; - this->m_lo_ra_demod_settings_isSet = true; -} - SWGLoRaModSettings* SWGChannelSettings::getLoRaModSettings() { return lo_ra_mod_settings; @@ -809,6 +809,9 @@ SWGChannelSettings::isSet(){ if(channel_analyzer_settings && channel_analyzer_settings->isSet()){ isObjectUpdated = true; break; } + if(chirp_chat_demod_settings && chirp_chat_demod_settings->isSet()){ + isObjectUpdated = true; break; + } if(datv_demod_settings && datv_demod_settings->isSet()){ isObjectUpdated = true; break; } @@ -830,9 +833,6 @@ SWGChannelSettings::isSet(){ if(interferometer_settings && interferometer_settings->isSet()){ isObjectUpdated = true; break; } - if(lo_ra_demod_settings && lo_ra_demod_settings->isSet()){ - isObjectUpdated = true; break; - } if(lo_ra_mod_settings && lo_ra_mod_settings->isSet()){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h index 1ee6a096e..630f99bef 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h @@ -29,6 +29,7 @@ #include "SWGBFMDemodSettings.h" #include "SWGBeamSteeringCWModSettings.h" #include "SWGChannelAnalyzerSettings.h" +#include "SWGChirpChatDemodSettings.h" #include "SWGDATVDemodSettings.h" #include "SWGDSDDemodSettings.h" #include "SWGFileSourceSettings.h" @@ -36,7 +37,6 @@ #include "SWGFreeDVModSettings.h" #include "SWGFreqTrackerSettings.h" #include "SWGInterferometerSettings.h" -#include "SWGLoRaDemodSettings.h" #include "SWGLoRaModSettings.h" #include "SWGLocalSinkSettings.h" #include "SWGLocalSourceSettings.h" @@ -103,6 +103,9 @@ public: SWGChannelAnalyzerSettings* getChannelAnalyzerSettings(); void setChannelAnalyzerSettings(SWGChannelAnalyzerSettings* channel_analyzer_settings); + SWGChirpChatDemodSettings* getChirpChatDemodSettings(); + void setChirpChatDemodSettings(SWGChirpChatDemodSettings* chirp_chat_demod_settings); + SWGDATVDemodSettings* getDatvDemodSettings(); void setDatvDemodSettings(SWGDATVDemodSettings* datv_demod_settings); @@ -124,9 +127,6 @@ public: SWGInterferometerSettings* getInterferometerSettings(); void setInterferometerSettings(SWGInterferometerSettings* interferometer_settings); - SWGLoRaDemodSettings* getLoRaDemodSettings(); - void setLoRaDemodSettings(SWGLoRaDemodSettings* lo_ra_demod_settings); - SWGLoRaModSettings* getLoRaModSettings(); void setLoRaModSettings(SWGLoRaModSettings* lo_ra_mod_settings); @@ -203,6 +203,9 @@ private: SWGChannelAnalyzerSettings* channel_analyzer_settings; bool m_channel_analyzer_settings_isSet; + SWGChirpChatDemodSettings* chirp_chat_demod_settings; + bool m_chirp_chat_demod_settings_isSet; + SWGDATVDemodSettings* datv_demod_settings; bool m_datv_demod_settings_isSet; @@ -224,9 +227,6 @@ private: SWGInterferometerSettings* interferometer_settings; bool m_interferometer_settings_isSet; - SWGLoRaDemodSettings* lo_ra_demod_settings; - bool m_lo_ra_demod_settings_isSet; - SWGLoRaModSettings* lo_ra_mod_settings; bool m_lo_ra_mod_settings_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGLoRaDemodReport.cpp b/swagger/sdrangel/code/qt5/client/SWGChirpChatDemodReport.cpp similarity index 83% rename from swagger/sdrangel/code/qt5/client/SWGLoRaDemodReport.cpp rename to swagger/sdrangel/code/qt5/client/SWGChirpChatDemodReport.cpp index d0d1a3750..23fd8b490 100644 --- a/swagger/sdrangel/code/qt5/client/SWGLoRaDemodReport.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChirpChatDemodReport.cpp @@ -11,7 +11,7 @@ */ -#include "SWGLoRaDemodReport.h" +#include "SWGChirpChatDemodReport.h" #include "SWGHelpers.h" @@ -22,12 +22,12 @@ namespace SWGSDRangel { -SWGLoRaDemodReport::SWGLoRaDemodReport(QString* json) { +SWGChirpChatDemodReport::SWGChirpChatDemodReport(QString* json) { init(); this->fromJson(*json); } -SWGLoRaDemodReport::SWGLoRaDemodReport() { +SWGChirpChatDemodReport::SWGChirpChatDemodReport() { channel_power_db = 0.0f; m_channel_power_db_isSet = false; noise_power_db = 0.0f; @@ -66,12 +66,12 @@ SWGLoRaDemodReport::SWGLoRaDemodReport() { m_message_bytes_isSet = false; } -SWGLoRaDemodReport::~SWGLoRaDemodReport() { +SWGChirpChatDemodReport::~SWGChirpChatDemodReport() { this->cleanup(); } void -SWGLoRaDemodReport::init() { +SWGChirpChatDemodReport::init() { channel_power_db = 0.0f; m_channel_power_db_isSet = false; noise_power_db = 0.0f; @@ -111,7 +111,7 @@ SWGLoRaDemodReport::init() { } void -SWGLoRaDemodReport::cleanup() { +SWGChirpChatDemodReport::cleanup() { @@ -142,8 +142,8 @@ SWGLoRaDemodReport::cleanup() { } } -SWGLoRaDemodReport* -SWGLoRaDemodReport::fromJson(QString &json) { +SWGChirpChatDemodReport* +SWGChirpChatDemodReport::fromJson(QString &json) { QByteArray array (json.toStdString().c_str()); QJsonDocument doc = QJsonDocument::fromJson(array); QJsonObject jsonObject = doc.object(); @@ -152,7 +152,7 @@ SWGLoRaDemodReport::fromJson(QString &json) { } void -SWGLoRaDemodReport::fromJsonObject(QJsonObject &pJson) { +SWGChirpChatDemodReport::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", ""); ::SWGSDRangel::setValue(&noise_power_db, pJson["noisePowerDB"], "float", ""); @@ -192,7 +192,7 @@ SWGLoRaDemodReport::fromJsonObject(QJsonObject &pJson) { } QString -SWGLoRaDemodReport::asJson () +SWGChirpChatDemodReport::asJson () { QJsonObject* obj = this->asJsonObject(); @@ -203,7 +203,7 @@ SWGLoRaDemodReport::asJson () } QJsonObject* -SWGLoRaDemodReport::asJsonObject() { +SWGChirpChatDemodReport::asJsonObject() { QJsonObject* obj = new QJsonObject(); if(m_channel_power_db_isSet){ obj->insert("channelPowerDB", QJsonValue(channel_power_db)); @@ -264,188 +264,188 @@ SWGLoRaDemodReport::asJsonObject() { } float -SWGLoRaDemodReport::getChannelPowerDb() { +SWGChirpChatDemodReport::getChannelPowerDb() { return channel_power_db; } void -SWGLoRaDemodReport::setChannelPowerDb(float channel_power_db) { +SWGChirpChatDemodReport::setChannelPowerDb(float channel_power_db) { this->channel_power_db = channel_power_db; this->m_channel_power_db_isSet = true; } float -SWGLoRaDemodReport::getNoisePowerDb() { +SWGChirpChatDemodReport::getNoisePowerDb() { return noise_power_db; } void -SWGLoRaDemodReport::setNoisePowerDb(float noise_power_db) { +SWGChirpChatDemodReport::setNoisePowerDb(float noise_power_db) { this->noise_power_db = noise_power_db; this->m_noise_power_db_isSet = true; } float -SWGLoRaDemodReport::getSignalPowerDb() { +SWGChirpChatDemodReport::getSignalPowerDb() { return signal_power_db; } void -SWGLoRaDemodReport::setSignalPowerDb(float signal_power_db) { +SWGChirpChatDemodReport::setSignalPowerDb(float signal_power_db) { this->signal_power_db = signal_power_db; this->m_signal_power_db_isSet = true; } float -SWGLoRaDemodReport::getSnrPowerDb() { +SWGChirpChatDemodReport::getSnrPowerDb() { return snr_power_db; } void -SWGLoRaDemodReport::setSnrPowerDb(float snr_power_db) { +SWGChirpChatDemodReport::setSnrPowerDb(float snr_power_db) { this->snr_power_db = snr_power_db; this->m_snr_power_db_isSet = true; } qint32 -SWGLoRaDemodReport::getChannelSampleRate() { +SWGChirpChatDemodReport::getChannelSampleRate() { return channel_sample_rate; } void -SWGLoRaDemodReport::setChannelSampleRate(qint32 channel_sample_rate) { +SWGChirpChatDemodReport::setChannelSampleRate(qint32 channel_sample_rate) { this->channel_sample_rate = channel_sample_rate; this->m_channel_sample_rate_isSet = true; } qint32 -SWGLoRaDemodReport::getSyncWord() { +SWGChirpChatDemodReport::getSyncWord() { return sync_word; } void -SWGLoRaDemodReport::setSyncWord(qint32 sync_word) { +SWGChirpChatDemodReport::setSyncWord(qint32 sync_word) { this->sync_word = sync_word; this->m_sync_word_isSet = true; } qint32 -SWGLoRaDemodReport::getHasCrc() { +SWGChirpChatDemodReport::getHasCrc() { return has_crc; } void -SWGLoRaDemodReport::setHasCrc(qint32 has_crc) { +SWGChirpChatDemodReport::setHasCrc(qint32 has_crc) { this->has_crc = has_crc; this->m_has_crc_isSet = true; } qint32 -SWGLoRaDemodReport::getNbParityBits() { +SWGChirpChatDemodReport::getNbParityBits() { return nb_parity_bits; } void -SWGLoRaDemodReport::setNbParityBits(qint32 nb_parity_bits) { +SWGChirpChatDemodReport::setNbParityBits(qint32 nb_parity_bits) { this->nb_parity_bits = nb_parity_bits; this->m_nb_parity_bits_isSet = true; } qint32 -SWGLoRaDemodReport::getPacketLength() { +SWGChirpChatDemodReport::getPacketLength() { return packet_length; } void -SWGLoRaDemodReport::setPacketLength(qint32 packet_length) { +SWGChirpChatDemodReport::setPacketLength(qint32 packet_length) { this->packet_length = packet_length; this->m_packet_length_isSet = true; } qint32 -SWGLoRaDemodReport::getNbSymbols() { +SWGChirpChatDemodReport::getNbSymbols() { return nb_symbols; } void -SWGLoRaDemodReport::setNbSymbols(qint32 nb_symbols) { +SWGChirpChatDemodReport::setNbSymbols(qint32 nb_symbols) { this->nb_symbols = nb_symbols; this->m_nb_symbols_isSet = true; } qint32 -SWGLoRaDemodReport::getNbCodewords() { +SWGChirpChatDemodReport::getNbCodewords() { return nb_codewords; } void -SWGLoRaDemodReport::setNbCodewords(qint32 nb_codewords) { +SWGChirpChatDemodReport::setNbCodewords(qint32 nb_codewords) { this->nb_codewords = nb_codewords; this->m_nb_codewords_isSet = true; } qint32 -SWGLoRaDemodReport::getHeaderParityStatus() { +SWGChirpChatDemodReport::getHeaderParityStatus() { return header_parity_status; } void -SWGLoRaDemodReport::setHeaderParityStatus(qint32 header_parity_status) { +SWGChirpChatDemodReport::setHeaderParityStatus(qint32 header_parity_status) { this->header_parity_status = header_parity_status; this->m_header_parity_status_isSet = true; } qint32 -SWGLoRaDemodReport::getHeaderCrcStatus() { +SWGChirpChatDemodReport::getHeaderCrcStatus() { return header_crc_status; } void -SWGLoRaDemodReport::setHeaderCrcStatus(qint32 header_crc_status) { +SWGChirpChatDemodReport::setHeaderCrcStatus(qint32 header_crc_status) { this->header_crc_status = header_crc_status; this->m_header_crc_status_isSet = true; } qint32 -SWGLoRaDemodReport::getPayloadParityStatus() { +SWGChirpChatDemodReport::getPayloadParityStatus() { return payload_parity_status; } void -SWGLoRaDemodReport::setPayloadParityStatus(qint32 payload_parity_status) { +SWGChirpChatDemodReport::setPayloadParityStatus(qint32 payload_parity_status) { this->payload_parity_status = payload_parity_status; this->m_payload_parity_status_isSet = true; } qint32 -SWGLoRaDemodReport::getPayloadCrcStatus() { +SWGChirpChatDemodReport::getPayloadCrcStatus() { return payload_crc_status; } void -SWGLoRaDemodReport::setPayloadCrcStatus(qint32 payload_crc_status) { +SWGChirpChatDemodReport::setPayloadCrcStatus(qint32 payload_crc_status) { this->payload_crc_status = payload_crc_status; this->m_payload_crc_status_isSet = true; } QString* -SWGLoRaDemodReport::getMessageTimestamp() { +SWGChirpChatDemodReport::getMessageTimestamp() { return message_timestamp; } void -SWGLoRaDemodReport::setMessageTimestamp(QString* message_timestamp) { +SWGChirpChatDemodReport::setMessageTimestamp(QString* message_timestamp) { this->message_timestamp = message_timestamp; this->m_message_timestamp_isSet = true; } QString* -SWGLoRaDemodReport::getMessageString() { +SWGChirpChatDemodReport::getMessageString() { return message_string; } void -SWGLoRaDemodReport::setMessageString(QString* message_string) { +SWGChirpChatDemodReport::setMessageString(QString* message_string) { this->message_string = message_string; this->m_message_string_isSet = true; } QList* -SWGLoRaDemodReport::getMessageBytes() { +SWGChirpChatDemodReport::getMessageBytes() { return message_bytes; } void -SWGLoRaDemodReport::setMessageBytes(QList* message_bytes) { +SWGChirpChatDemodReport::setMessageBytes(QList* message_bytes) { this->message_bytes = message_bytes; this->m_message_bytes_isSet = true; } bool -SWGLoRaDemodReport::isSet(){ +SWGChirpChatDemodReport::isSet(){ bool isObjectUpdated = false; do{ if(m_channel_power_db_isSet){ diff --git a/swagger/sdrangel/code/qt5/client/SWGLoRaDemodReport.h b/swagger/sdrangel/code/qt5/client/SWGChirpChatDemodReport.h similarity index 91% rename from swagger/sdrangel/code/qt5/client/SWGLoRaDemodReport.h rename to swagger/sdrangel/code/qt5/client/SWGChirpChatDemodReport.h index e722c16f6..80aca73b6 100644 --- a/swagger/sdrangel/code/qt5/client/SWGLoRaDemodReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGChirpChatDemodReport.h @@ -11,13 +11,13 @@ */ /* - * SWGLoRaDemodReport.h + * SWGChirpChatDemodReport.h * - * LoRaDemod + * ChirpChatDemod */ -#ifndef SWGLoRaDemodReport_H_ -#define SWGLoRaDemodReport_H_ +#ifndef SWGChirpChatDemodReport_H_ +#define SWGChirpChatDemodReport_H_ #include @@ -30,18 +30,18 @@ namespace SWGSDRangel { -class SWG_API SWGLoRaDemodReport: public SWGObject { +class SWG_API SWGChirpChatDemodReport: public SWGObject { public: - SWGLoRaDemodReport(); - SWGLoRaDemodReport(QString* json); - virtual ~SWGLoRaDemodReport(); + SWGChirpChatDemodReport(); + SWGChirpChatDemodReport(QString* json); + virtual ~SWGChirpChatDemodReport(); void init(); void cleanup(); virtual QString asJson () override; virtual QJsonObject* asJsonObject() override; virtual void fromJsonObject(QJsonObject &json) override; - virtual SWGLoRaDemodReport* fromJson(QString &jsonString) override; + virtual SWGChirpChatDemodReport* fromJson(QString &jsonString) override; float getChannelPowerDb(); void setChannelPowerDb(float channel_power_db); @@ -159,4 +159,4 @@ private: } -#endif /* SWGLoRaDemodReport_H_ */ +#endif /* SWGChirpChatDemodReport_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGLoRaDemodSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGChirpChatDemodSettings.cpp similarity index 82% rename from swagger/sdrangel/code/qt5/client/SWGLoRaDemodSettings.cpp rename to swagger/sdrangel/code/qt5/client/SWGChirpChatDemodSettings.cpp index 419390cfa..8e83be20b 100644 --- a/swagger/sdrangel/code/qt5/client/SWGLoRaDemodSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChirpChatDemodSettings.cpp @@ -11,7 +11,7 @@ */ -#include "SWGLoRaDemodSettings.h" +#include "SWGChirpChatDemodSettings.h" #include "SWGHelpers.h" @@ -22,12 +22,12 @@ namespace SWGSDRangel { -SWGLoRaDemodSettings::SWGLoRaDemodSettings(QString* json) { +SWGChirpChatDemodSettings::SWGChirpChatDemodSettings(QString* json) { init(); this->fromJson(*json); } -SWGLoRaDemodSettings::SWGLoRaDemodSettings() { +SWGChirpChatDemodSettings::SWGChirpChatDemodSettings() { input_frequency_offset = 0L; m_input_frequency_offset_isSet = false; bandwidth_index = 0; @@ -80,12 +80,12 @@ SWGLoRaDemodSettings::SWGLoRaDemodSettings() { m_reverse_api_channel_index_isSet = false; } -SWGLoRaDemodSettings::~SWGLoRaDemodSettings() { +SWGChirpChatDemodSettings::~SWGChirpChatDemodSettings() { this->cleanup(); } void -SWGLoRaDemodSettings::init() { +SWGChirpChatDemodSettings::init() { input_frequency_offset = 0L; m_input_frequency_offset_isSet = false; bandwidth_index = 0; @@ -139,7 +139,7 @@ SWGLoRaDemodSettings::init() { } void -SWGLoRaDemodSettings::cleanup() { +SWGChirpChatDemodSettings::cleanup() { @@ -173,8 +173,8 @@ SWGLoRaDemodSettings::cleanup() { } -SWGLoRaDemodSettings* -SWGLoRaDemodSettings::fromJson(QString &json) { +SWGChirpChatDemodSettings* +SWGChirpChatDemodSettings::fromJson(QString &json) { QByteArray array (json.toStdString().c_str()); QJsonDocument doc = QJsonDocument::fromJson(array); QJsonObject jsonObject = doc.object(); @@ -183,7 +183,7 @@ SWGLoRaDemodSettings::fromJson(QString &json) { } void -SWGLoRaDemodSettings::fromJsonObject(QJsonObject &pJson) { +SWGChirpChatDemodSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", ""); ::SWGSDRangel::setValue(&bandwidth_index, pJson["bandwidthIndex"], "qint32", ""); @@ -237,7 +237,7 @@ SWGLoRaDemodSettings::fromJsonObject(QJsonObject &pJson) { } QString -SWGLoRaDemodSettings::asJson () +SWGChirpChatDemodSettings::asJson () { QJsonObject* obj = this->asJsonObject(); @@ -248,7 +248,7 @@ SWGLoRaDemodSettings::asJson () } QJsonObject* -SWGLoRaDemodSettings::asJsonObject() { +SWGChirpChatDemodSettings::asJsonObject() { QJsonObject* obj = new QJsonObject(); if(m_input_frequency_offset_isSet){ obj->insert("inputFrequencyOffset", QJsonValue(input_frequency_offset)); @@ -330,258 +330,258 @@ SWGLoRaDemodSettings::asJsonObject() { } qint64 -SWGLoRaDemodSettings::getInputFrequencyOffset() { +SWGChirpChatDemodSettings::getInputFrequencyOffset() { return input_frequency_offset; } void -SWGLoRaDemodSettings::setInputFrequencyOffset(qint64 input_frequency_offset) { +SWGChirpChatDemodSettings::setInputFrequencyOffset(qint64 input_frequency_offset) { this->input_frequency_offset = input_frequency_offset; this->m_input_frequency_offset_isSet = true; } qint32 -SWGLoRaDemodSettings::getBandwidthIndex() { +SWGChirpChatDemodSettings::getBandwidthIndex() { return bandwidth_index; } void -SWGLoRaDemodSettings::setBandwidthIndex(qint32 bandwidth_index) { +SWGChirpChatDemodSettings::setBandwidthIndex(qint32 bandwidth_index) { this->bandwidth_index = bandwidth_index; this->m_bandwidth_index_isSet = true; } qint32 -SWGLoRaDemodSettings::getSpreadFactor() { +SWGChirpChatDemodSettings::getSpreadFactor() { return spread_factor; } void -SWGLoRaDemodSettings::setSpreadFactor(qint32 spread_factor) { +SWGChirpChatDemodSettings::setSpreadFactor(qint32 spread_factor) { this->spread_factor = spread_factor; this->m_spread_factor_isSet = true; } qint32 -SWGLoRaDemodSettings::getDeBits() { +SWGChirpChatDemodSettings::getDeBits() { return de_bits; } void -SWGLoRaDemodSettings::setDeBits(qint32 de_bits) { +SWGChirpChatDemodSettings::setDeBits(qint32 de_bits) { this->de_bits = de_bits; this->m_de_bits_isSet = true; } qint32 -SWGLoRaDemodSettings::getCodingScheme() { +SWGChirpChatDemodSettings::getCodingScheme() { return coding_scheme; } void -SWGLoRaDemodSettings::setCodingScheme(qint32 coding_scheme) { +SWGChirpChatDemodSettings::setCodingScheme(qint32 coding_scheme) { this->coding_scheme = coding_scheme; this->m_coding_scheme_isSet = true; } qint32 -SWGLoRaDemodSettings::getDecodeActive() { +SWGChirpChatDemodSettings::getDecodeActive() { return decode_active; } void -SWGLoRaDemodSettings::setDecodeActive(qint32 decode_active) { +SWGChirpChatDemodSettings::setDecodeActive(qint32 decode_active) { this->decode_active = decode_active; this->m_decode_active_isSet = true; } qint32 -SWGLoRaDemodSettings::getEomSquelchTenths() { +SWGChirpChatDemodSettings::getEomSquelchTenths() { return eom_squelch_tenths; } void -SWGLoRaDemodSettings::setEomSquelchTenths(qint32 eom_squelch_tenths) { +SWGChirpChatDemodSettings::setEomSquelchTenths(qint32 eom_squelch_tenths) { this->eom_squelch_tenths = eom_squelch_tenths; this->m_eom_squelch_tenths_isSet = true; } qint32 -SWGLoRaDemodSettings::getNbSymbolsMax() { +SWGChirpChatDemodSettings::getNbSymbolsMax() { return nb_symbols_max; } void -SWGLoRaDemodSettings::setNbSymbolsMax(qint32 nb_symbols_max) { +SWGChirpChatDemodSettings::setNbSymbolsMax(qint32 nb_symbols_max) { this->nb_symbols_max = nb_symbols_max; this->m_nb_symbols_max_isSet = true; } qint32 -SWGLoRaDemodSettings::getAutoNbSymbolsMax() { +SWGChirpChatDemodSettings::getAutoNbSymbolsMax() { return auto_nb_symbols_max; } void -SWGLoRaDemodSettings::setAutoNbSymbolsMax(qint32 auto_nb_symbols_max) { +SWGChirpChatDemodSettings::setAutoNbSymbolsMax(qint32 auto_nb_symbols_max) { this->auto_nb_symbols_max = auto_nb_symbols_max; this->m_auto_nb_symbols_max_isSet = true; } qint32 -SWGLoRaDemodSettings::getPreambleChirps() { +SWGChirpChatDemodSettings::getPreambleChirps() { return preamble_chirps; } void -SWGLoRaDemodSettings::setPreambleChirps(qint32 preamble_chirps) { +SWGChirpChatDemodSettings::setPreambleChirps(qint32 preamble_chirps) { this->preamble_chirps = preamble_chirps; this->m_preamble_chirps_isSet = true; } qint32 -SWGLoRaDemodSettings::getNbParityBits() { +SWGChirpChatDemodSettings::getNbParityBits() { return nb_parity_bits; } void -SWGLoRaDemodSettings::setNbParityBits(qint32 nb_parity_bits) { +SWGChirpChatDemodSettings::setNbParityBits(qint32 nb_parity_bits) { this->nb_parity_bits = nb_parity_bits; this->m_nb_parity_bits_isSet = true; } qint32 -SWGLoRaDemodSettings::getPacketLength() { +SWGChirpChatDemodSettings::getPacketLength() { return packet_length; } void -SWGLoRaDemodSettings::setPacketLength(qint32 packet_length) { +SWGChirpChatDemodSettings::setPacketLength(qint32 packet_length) { this->packet_length = packet_length; this->m_packet_length_isSet = true; } qint32 -SWGLoRaDemodSettings::getHasCrc() { +SWGChirpChatDemodSettings::getHasCrc() { return has_crc; } void -SWGLoRaDemodSettings::setHasCrc(qint32 has_crc) { +SWGChirpChatDemodSettings::setHasCrc(qint32 has_crc) { this->has_crc = has_crc; this->m_has_crc_isSet = true; } qint32 -SWGLoRaDemodSettings::getHasHeader() { +SWGChirpChatDemodSettings::getHasHeader() { return has_header; } void -SWGLoRaDemodSettings::setHasHeader(qint32 has_header) { +SWGChirpChatDemodSettings::setHasHeader(qint32 has_header) { this->has_header = has_header; this->m_has_header_isSet = true; } qint32 -SWGLoRaDemodSettings::getSendViaUdp() { +SWGChirpChatDemodSettings::getSendViaUdp() { return send_via_udp; } void -SWGLoRaDemodSettings::setSendViaUdp(qint32 send_via_udp) { +SWGChirpChatDemodSettings::setSendViaUdp(qint32 send_via_udp) { this->send_via_udp = send_via_udp; this->m_send_via_udp_isSet = true; } QString* -SWGLoRaDemodSettings::getUdpAddress() { +SWGChirpChatDemodSettings::getUdpAddress() { return udp_address; } void -SWGLoRaDemodSettings::setUdpAddress(QString* udp_address) { +SWGChirpChatDemodSettings::setUdpAddress(QString* udp_address) { this->udp_address = udp_address; this->m_udp_address_isSet = true; } qint32 -SWGLoRaDemodSettings::getUdpPort() { +SWGChirpChatDemodSettings::getUdpPort() { return udp_port; } void -SWGLoRaDemodSettings::setUdpPort(qint32 udp_port) { +SWGChirpChatDemodSettings::setUdpPort(qint32 udp_port) { this->udp_port = udp_port; this->m_udp_port_isSet = true; } qint32 -SWGLoRaDemodSettings::getRgbColor() { +SWGChirpChatDemodSettings::getRgbColor() { return rgb_color; } void -SWGLoRaDemodSettings::setRgbColor(qint32 rgb_color) { +SWGChirpChatDemodSettings::setRgbColor(qint32 rgb_color) { this->rgb_color = rgb_color; this->m_rgb_color_isSet = true; } QString* -SWGLoRaDemodSettings::getTitle() { +SWGChirpChatDemodSettings::getTitle() { return title; } void -SWGLoRaDemodSettings::setTitle(QString* title) { +SWGChirpChatDemodSettings::setTitle(QString* title) { this->title = title; this->m_title_isSet = true; } qint32 -SWGLoRaDemodSettings::getStreamIndex() { +SWGChirpChatDemodSettings::getStreamIndex() { return stream_index; } void -SWGLoRaDemodSettings::setStreamIndex(qint32 stream_index) { +SWGChirpChatDemodSettings::setStreamIndex(qint32 stream_index) { this->stream_index = stream_index; this->m_stream_index_isSet = true; } qint32 -SWGLoRaDemodSettings::getUseReverseApi() { +SWGChirpChatDemodSettings::getUseReverseApi() { return use_reverse_api; } void -SWGLoRaDemodSettings::setUseReverseApi(qint32 use_reverse_api) { +SWGChirpChatDemodSettings::setUseReverseApi(qint32 use_reverse_api) { this->use_reverse_api = use_reverse_api; this->m_use_reverse_api_isSet = true; } QString* -SWGLoRaDemodSettings::getReverseApiAddress() { +SWGChirpChatDemodSettings::getReverseApiAddress() { return reverse_api_address; } void -SWGLoRaDemodSettings::setReverseApiAddress(QString* reverse_api_address) { +SWGChirpChatDemodSettings::setReverseApiAddress(QString* reverse_api_address) { this->reverse_api_address = reverse_api_address; this->m_reverse_api_address_isSet = true; } qint32 -SWGLoRaDemodSettings::getReverseApiPort() { +SWGChirpChatDemodSettings::getReverseApiPort() { return reverse_api_port; } void -SWGLoRaDemodSettings::setReverseApiPort(qint32 reverse_api_port) { +SWGChirpChatDemodSettings::setReverseApiPort(qint32 reverse_api_port) { this->reverse_api_port = reverse_api_port; this->m_reverse_api_port_isSet = true; } qint32 -SWGLoRaDemodSettings::getReverseApiDeviceIndex() { +SWGChirpChatDemodSettings::getReverseApiDeviceIndex() { return reverse_api_device_index; } void -SWGLoRaDemodSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) { +SWGChirpChatDemodSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) { this->reverse_api_device_index = reverse_api_device_index; this->m_reverse_api_device_index_isSet = true; } qint32 -SWGLoRaDemodSettings::getReverseApiChannelIndex() { +SWGChirpChatDemodSettings::getReverseApiChannelIndex() { return reverse_api_channel_index; } void -SWGLoRaDemodSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) { +SWGChirpChatDemodSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) { this->reverse_api_channel_index = reverse_api_channel_index; this->m_reverse_api_channel_index_isSet = true; } bool -SWGLoRaDemodSettings::isSet(){ +SWGChirpChatDemodSettings::isSet(){ bool isObjectUpdated = false; do{ if(m_input_frequency_offset_isSet){ diff --git a/swagger/sdrangel/code/qt5/client/SWGLoRaDemodSettings.h b/swagger/sdrangel/code/qt5/client/SWGChirpChatDemodSettings.h similarity index 92% rename from swagger/sdrangel/code/qt5/client/SWGLoRaDemodSettings.h rename to swagger/sdrangel/code/qt5/client/SWGChirpChatDemodSettings.h index fb3a36e28..8fc74cb27 100644 --- a/swagger/sdrangel/code/qt5/client/SWGLoRaDemodSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGChirpChatDemodSettings.h @@ -11,13 +11,13 @@ */ /* - * SWGLoRaDemodSettings.h + * SWGChirpChatDemodSettings.h * - * LoRaDemod + * ChirpChatDemod */ -#ifndef SWGLoRaDemodSettings_H_ -#define SWGLoRaDemodSettings_H_ +#ifndef SWGChirpChatDemodSettings_H_ +#define SWGChirpChatDemodSettings_H_ #include @@ -29,18 +29,18 @@ namespace SWGSDRangel { -class SWG_API SWGLoRaDemodSettings: public SWGObject { +class SWG_API SWGChirpChatDemodSettings: public SWGObject { public: - SWGLoRaDemodSettings(); - SWGLoRaDemodSettings(QString* json); - virtual ~SWGLoRaDemodSettings(); + SWGChirpChatDemodSettings(); + SWGChirpChatDemodSettings(QString* json); + virtual ~SWGChirpChatDemodSettings(); void init(); void cleanup(); virtual QString asJson () override; virtual QJsonObject* asJsonObject() override; virtual void fromJsonObject(QJsonObject &json) override; - virtual SWGLoRaDemodSettings* fromJson(QString &jsonString) override; + virtual SWGChirpChatDemodSettings* fromJson(QString &jsonString) override; qint64 getInputFrequencyOffset(); void setInputFrequencyOffset(qint64 input_frequency_offset); @@ -200,4 +200,4 @@ private: } -#endif /* SWGLoRaDemodSettings_H_ */ +#endif /* SWGChirpChatDemodSettings_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index f6cc4b579..abf2db718 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -51,6 +51,8 @@ #include "SWGChannelReport.h" #include "SWGChannelSettings.h" #include "SWGChannelsDetail.h" +#include "SWGChirpChatDemodReport.h" +#include "SWGChirpChatDemodSettings.h" #include "SWGCommand.h" #include "SWGComplex.h" #include "SWGDATVDemodSettings.h" @@ -101,8 +103,6 @@ #include "SWGLimeSdrInputSettings.h" #include "SWGLimeSdrOutputReport.h" #include "SWGLimeSdrOutputSettings.h" -#include "SWGLoRaDemodReport.h" -#include "SWGLoRaDemodSettings.h" #include "SWGLoRaModReport.h" #include "SWGLoRaModSettings.h" #include "SWGLocalInputReport.h" @@ -293,6 +293,12 @@ namespace SWGSDRangel { if(QString("SWGChannelsDetail").compare(type) == 0) { return new SWGChannelsDetail(); } + if(QString("SWGChirpChatDemodReport").compare(type) == 0) { + return new SWGChirpChatDemodReport(); + } + if(QString("SWGChirpChatDemodSettings").compare(type) == 0) { + return new SWGChirpChatDemodSettings(); + } if(QString("SWGCommand").compare(type) == 0) { return new SWGCommand(); } @@ -443,12 +449,6 @@ namespace SWGSDRangel { if(QString("SWGLimeSdrOutputSettings").compare(type) == 0) { return new SWGLimeSdrOutputSettings(); } - if(QString("SWGLoRaDemodReport").compare(type) == 0) { - return new SWGLoRaDemodReport(); - } - if(QString("SWGLoRaDemodSettings").compare(type) == 0) { - return new SWGLoRaDemodSettings(); - } if(QString("SWGLoRaModReport").compare(type) == 0) { return new SWGLoRaModReport(); }