From ee0e5fc777f248e82c0020ad38351c92717cc542 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 13 Dec 2020 13:04:36 +0100 Subject: [PATCH] AFC: implemented message pipes for sending back channel settings. Implemented in all relevant channel plugins. Removed obsolete methods --- .../beamsteeringcwmod/beamsteeringcwmod.cpp | 44 +++++------ .../beamsteeringcwmod/beamsteeringcwmod.h | 7 +- .../interferometer/interferometer.cpp | 44 +++++------ .../interferometer/interferometer.h | 7 +- plugins/channelrx/demodam/amdemod.cpp | 44 +++++------ plugins/channelrx/demodam/amdemod.h | 7 +- plugins/channelrx/demodam/amdemodplugin.cpp | 2 +- plugins/channelrx/demodbfm/bfmdemod.cpp | 44 +++++------ plugins/channelrx/demodbfm/bfmdemod.h | 7 +- plugins/channelrx/demodbfm/bfmplugin.cpp | 2 +- .../demodchirpchat/chirpchatdemod.cpp | 44 +++++------ .../channelrx/demodchirpchat/chirpchatdemod.h | 7 +- .../demodchirpchat/chirpchatplugin.cpp | 2 +- plugins/channelrx/demoddsd/dsddemod.cpp | 44 +++++------ plugins/channelrx/demoddsd/dsddemod.h | 7 +- plugins/channelrx/demoddsd/dsddemodplugin.cpp | 2 +- plugins/channelrx/demodfreedv/freedvdemod.cpp | 44 +++++------ plugins/channelrx/demodfreedv/freedvdemod.h | 7 +- .../channelrx/demodfreedv/freedvplugin.cpp | 2 +- plugins/channelrx/demodnfm/nfmdemod.cpp | 44 +++++------ plugins/channelrx/demodnfm/nfmdemod.h | 7 +- plugins/channelrx/demodnfm/nfmplugin.cpp | 2 +- plugins/channelrx/demodssb/ssbdemod.cpp | 44 +++++------ plugins/channelrx/demodssb/ssbdemod.h | 7 +- plugins/channelrx/demodssb/ssbplugin.cpp | 2 +- plugins/channelrx/demodvor/vordemod.cpp | 44 +++++------ plugins/channelrx/demodvor/vordemod.h | 7 +- plugins/channelrx/demodvor/vordemodplugin.cpp | 2 +- plugins/channelrx/demodvorsc/vordemodsc.cpp | 44 +++++------ plugins/channelrx/demodvorsc/vordemodsc.h | 7 +- .../channelrx/demodvorsc/vordemodscplugin.cpp | 2 +- plugins/channelrx/demodwfm/wfmdemod.cpp | 44 +++++------ plugins/channelrx/demodwfm/wfmdemod.h | 7 +- plugins/channelrx/demodwfm/wfmplugin.cpp | 2 +- plugins/channelrx/filesink/filesink.cpp | 44 +++++------ plugins/channelrx/filesink/filesink.h | 7 +- plugins/channelrx/filesink/filesinkplugin.cpp | 2 +- plugins/channelrx/freqtracker/freqtracker.cpp | 49 +++++------- plugins/channelrx/freqtracker/freqtracker.h | 7 +- .../freqtracker/freqtrackerplugin.cpp | 2 +- plugins/channelrx/localsink/localsink.cpp | 44 +++++------ plugins/channelrx/localsink/localsink.h | 7 +- .../channelrx/localsink/localsinkplugin.cpp | 2 +- plugins/channelrx/remotesink/remotesink.cpp | 44 +++++------ plugins/channelrx/remotesink/remotesink.h | 7 +- .../channelrx/remotesink/remotesinkplugin.cpp | 2 +- .../channelrx/sigmffilesink/sigmffilesink.cpp | 44 +++++------ .../channelrx/sigmffilesink/sigmffilesink.h | 7 +- .../sigmffilesink/sigmffilesinkplugin.cpp | 2 +- plugins/channelrx/udpsink/udpsink.cpp | 44 +++++------ plugins/channelrx/udpsink/udpsink.h | 7 +- plugins/channelrx/udpsink/udpsinkplugin.cpp | 2 +- plugins/channeltx/filesource/filesource.cpp | 44 +++++------ plugins/channeltx/filesource/filesource.h | 7 +- .../channeltx/filesource/filesourceplugin.cpp | 2 +- plugins/channeltx/localsource/localsource.cpp | 44 +++++------ plugins/channeltx/localsource/localsource.h | 7 +- .../localsource/localsourceplugin.cpp | 2 +- .../mod802.15.4/ieee_802_15_4_mod.cpp | 44 +++++------ .../channeltx/mod802.15.4/ieee_802_15_4_mod.h | 7 +- .../mod802.15.4/ieee_802_15_4_modplugin.cpp | 2 +- plugins/channeltx/modam/ammod.cpp | 44 +++++------ plugins/channeltx/modam/ammod.h | 7 +- plugins/channeltx/modam/ammodplugin.cpp | 2 +- plugins/channeltx/modatv/atvmod.cpp | 44 +++++------ plugins/channeltx/modatv/atvmod.h | 7 +- plugins/channeltx/modatv/atvmodplugin.cpp | 2 +- .../channeltx/modchirpchat/chirpchatmod.cpp | 44 +++++------ plugins/channeltx/modchirpchat/chirpchatmod.h | 7 +- .../modchirpchat/chirpchatmodplugin.cpp | 2 +- plugins/channeltx/modfreedv/freedvmod.cpp | 44 +++++------ plugins/channeltx/modfreedv/freedvmod.h | 7 +- .../channeltx/modfreedv/freedvmodplugin.cpp | 2 +- plugins/channeltx/modnfm/nfmmod.cpp | 44 +++++------ plugins/channeltx/modnfm/nfmmod.h | 7 +- plugins/channeltx/modnfm/nfmmodplugin.cpp | 2 +- plugins/channeltx/modpacket/packetmod.cpp | 44 +++++------ plugins/channeltx/modpacket/packetmod.h | 7 +- .../channeltx/modpacket/packetmodplugin.cpp | 2 +- plugins/channeltx/modssb/ssbmod.cpp | 44 +++++------ plugins/channeltx/modssb/ssbmod.h | 7 +- plugins/channeltx/modssb/ssbmodplugin.cpp | 2 +- plugins/channeltx/modwfm/wfmmod.cpp | 44 +++++------ plugins/channeltx/modwfm/wfmmod.h | 7 +- plugins/channeltx/modwfm/wfmmodplugin.cpp | 2 +- .../channeltx/remotesource/remotesource.cpp | 44 +++++------ plugins/channeltx/remotesource/remotesource.h | 7 +- .../remotesource/remotesourceplugin.cpp | 2 +- plugins/channeltx/udpsource/udpsource.cpp | 44 +++++------ plugins/channeltx/udpsource/udpsource.h | 7 +- .../channeltx/udpsource/udpsourceplugin.cpp | 2 +- plugins/feature/afc/afc.cpp | 50 ++++++++++-- plugins/feature/afc/afc.h | 1 + plugins/feature/afc/afcplugin.cpp | 2 +- plugins/feature/afc/afcworker.cpp | 7 +- sdrbase/channel/channelapi.cpp | 12 --- sdrbase/channel/channelapi.h | 9 --- sdrbase/feature/feature.cpp | 2 - sdrbase/feature/feature.h | 40 +--------- sdrbase/maincore.cpp | 1 + sdrbase/maincore.h | 39 ++++++++++ sdrbase/pipes/messagepipesgcworker.cpp | 77 +++++++++++-------- sdrbase/pipes/messagepipesgcworker.h | 3 +- 103 files changed, 971 insertions(+), 916 deletions(-) diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp index bd9e83cd2..bdfca7bd7 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp @@ -139,8 +139,10 @@ void BeamSteeringCWMod::applySettings(const BeamSteeringCWModSettings& settings, BeamSteeringCWModBaseband::MsgConfigureBeamSteeringCWModBaseband *msg = BeamSteeringCWModBaseband::MsgConfigureBeamSteeringCWModBaseband::create(settings, force); m_basebandSource->getInputMessageQueue()->push(msg); - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -374,31 +376,25 @@ void BeamSteeringCWMod::webapiReverseSendSettings(QList& channelSetting delete swgChannelSettings; } -void BeamSteeringCWMod::featuresSendSettings(QList& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force) +void BeamSteeringCWMod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const BeamSteeringCWModSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h index 1b67daf1d..dfde34d64 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h @@ -163,7 +163,12 @@ private: static void validateFilterChainHash(BeamSteeringCWModSettings& settings); void calculateFrequencyOffset(); void webapiReverseSendSettings(QList& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const BeamSteeringCWModSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelmimo/interferometer/interferometer.cpp b/plugins/channelmimo/interferometer/interferometer.cpp index 75fb7c9d7..6add08d3b 100644 --- a/plugins/channelmimo/interferometer/interferometer.cpp +++ b/plugins/channelmimo/interferometer/interferometer.cpp @@ -162,8 +162,10 @@ void Interferometer::applySettings(const InterferometerSettings& settings, bool m_basebandSink->setPhase(settings.m_phase); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -399,31 +401,25 @@ void Interferometer::webapiReverseSendSettings(QList& channelSettingsKe delete swgChannelSettings; } -void Interferometer::featuresSendSettings(QList& channelSettingsKeys, const InterferometerSettings& settings, bool force) +void Interferometer::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const InterferometerSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelmimo/interferometer/interferometer.h b/plugins/channelmimo/interferometer/interferometer.h index d92d4b8b7..62f41e105 100644 --- a/plugins/channelmimo/interferometer/interferometer.h +++ b/plugins/channelmimo/interferometer/interferometer.h @@ -168,7 +168,12 @@ private: static void validateFilterChainHash(InterferometerSettings& settings); void calculateFrequencyOffset(); void webapiReverseSendSettings(QList& channelSettingsKeys, const InterferometerSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const InterferometerSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const InterferometerSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/demodam/amdemod.cpp b/plugins/channelrx/demodam/amdemod.cpp index 9c0c87df6..593086664 100644 --- a/plugins/channelrx/demodam/amdemod.cpp +++ b/plugins/channelrx/demodam/amdemod.cpp @@ -226,8 +226,10 @@ void AMDemod::applySettings(const AMDemodSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -441,31 +443,25 @@ void AMDemod::webapiReverseSendSettings(QList& channelSettingsKeys, con delete swgChannelSettings; } -void AMDemod::featuresSendSettings(QList& channelSettingsKeys, const AMDemodSettings& settings, bool force) +void AMDemod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const AMDemodSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/demodam/amdemod.h b/plugins/channelrx/demodam/amdemod.h index 2b6056052..55cf713f1 100644 --- a/plugins/channelrx/demodam/amdemod.h +++ b/plugins/channelrx/demodam/amdemod.h @@ -142,7 +142,12 @@ private: void applySettings(const AMDemodSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const AMDemodSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const AMDemodSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const AMDemodSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/demodam/amdemodplugin.cpp b/plugins/channelrx/demodam/amdemodplugin.cpp index 3de733488..6ff23d8db 100644 --- a/plugins/channelrx/demodam/amdemodplugin.cpp +++ b/plugins/channelrx/demodam/amdemodplugin.cpp @@ -11,7 +11,7 @@ const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = { AMDemod::m_channelId, QStringLiteral("AM Demodulator"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/demodbfm/bfmdemod.cpp b/plugins/channelrx/demodbfm/bfmdemod.cpp index 7ade1ceae..2b722bb26 100644 --- a/plugins/channelrx/demodbfm/bfmdemod.cpp +++ b/plugins/channelrx/demodbfm/bfmdemod.cpp @@ -219,8 +219,10 @@ void BFMDemod::applySettings(const BFMDemodSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -472,31 +474,25 @@ void BFMDemod::webapiReverseSendSettings(QList& channelSettingsKeys, co delete swgChannelSettings; } -void BFMDemod::featuresSendSettings(QList& channelSettingsKeys, const BFMDemodSettings& settings, bool force) +void BFMDemod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const BFMDemodSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/demodbfm/bfmdemod.h b/plugins/channelrx/demodbfm/bfmdemod.h index 070653ddf..faf3c4e3d 100644 --- a/plugins/channelrx/demodbfm/bfmdemod.h +++ b/plugins/channelrx/demodbfm/bfmdemod.h @@ -158,7 +158,12 @@ private: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiFormatRDSReport(SWGSDRangel::SWGRDSReport *report); void webapiReverseSendSettings(QList& channelSettingsKeys, const BFMDemodSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const BFMDemodSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const BFMDemodSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/demodbfm/bfmplugin.cpp b/plugins/channelrx/demodbfm/bfmplugin.cpp index 6ce695e3c..89f5c5ba4 100644 --- a/plugins/channelrx/demodbfm/bfmplugin.cpp +++ b/plugins/channelrx/demodbfm/bfmplugin.cpp @@ -31,7 +31,7 @@ const PluginDescriptor BFMPlugin::m_pluginDescriptor = { BFMDemod::m_channelId, QStringLiteral("Broadcast FM Demodulator"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp index 34341cf69..51765c4e6 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp @@ -415,8 +415,10 @@ void ChirpChatDemod::applySettings(const ChirpChatDemodSettings& settings, bool webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -656,31 +658,25 @@ void ChirpChatDemod::webapiReverseSendSettings(QList& channelSettingsKe delete swgChannelSettings; } -void ChirpChatDemod::featuresSendSettings(QList& channelSettingsKeys, const ChirpChatDemodSettings& settings, bool force) +void ChirpChatDemod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const ChirpChatDemodSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemod.h b/plugins/channelrx/demodchirpchat/chirpchatdemod.h index 30e27786a..587ce69e9 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemod.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.h @@ -290,7 +290,12 @@ private: void applySettings(const ChirpChatDemodSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const ChirpChatDemodSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const ChirpChatDemodSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const ChirpChatDemodSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/demodchirpchat/chirpchatplugin.cpp b/plugins/channelrx/demodchirpchat/chirpchatplugin.cpp index d2bdef9ba..9f78ac0e5 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatplugin.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatplugin.cpp @@ -27,7 +27,7 @@ const PluginDescriptor ChirpChatPlugin::m_pluginDescriptor = { ChirpChatDemod::m_channelId, QStringLiteral("ChirpChat Demodulator"), - QStringLiteral("6.0.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/demoddsd/dsddemod.cpp b/plugins/channelrx/demoddsd/dsddemod.cpp index 045379e6f..955bc61ad 100644 --- a/plugins/channelrx/demoddsd/dsddemod.cpp +++ b/plugins/channelrx/demoddsd/dsddemod.cpp @@ -252,8 +252,10 @@ void DSDDemod::applySettings(const DSDDemodSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -515,31 +517,25 @@ void DSDDemod::webapiReverseSendSettings(QList& channelSettingsKeys, co delete swgChannelSettings; } -void DSDDemod::featuresSendSettings(QList& channelSettingsKeys, const DSDDemodSettings& settings, bool force) +void DSDDemod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const DSDDemodSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/demoddsd/dsddemod.h b/plugins/channelrx/demoddsd/dsddemod.h index 423e3e783..daaf0482b 100644 --- a/plugins/channelrx/demoddsd/dsddemod.h +++ b/plugins/channelrx/demoddsd/dsddemod.h @@ -140,7 +140,12 @@ private: void applySettings(const DSDDemodSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const DSDDemodSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const DSDDemodSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const DSDDemodSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.cpp b/plugins/channelrx/demoddsd/dsddemodplugin.cpp index 61f2c93b2..4f10b0a35 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.cpp +++ b/plugins/channelrx/demoddsd/dsddemodplugin.cpp @@ -30,7 +30,7 @@ const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = { DSDDemod::m_channelId, QStringLiteral("DSD Demodulator"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/demodfreedv/freedvdemod.cpp b/plugins/channelrx/demodfreedv/freedvdemod.cpp index b0c7493e5..9940ff4f0 100644 --- a/plugins/channelrx/demodfreedv/freedvdemod.cpp +++ b/plugins/channelrx/demodfreedv/freedvdemod.cpp @@ -222,8 +222,10 @@ void FreeDVDemod::applySettings(const FreeDVDemodSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -428,31 +430,25 @@ void FreeDVDemod::webapiReverseSendSettings(QList& channelSettingsKeys, delete swgChannelSettings; } -void FreeDVDemod::featuresSendSettings(QList& channelSettingsKeys, const FreeDVDemodSettings& settings, bool force) +void FreeDVDemod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const FreeDVDemodSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/demodfreedv/freedvdemod.h b/plugins/channelrx/demodfreedv/freedvdemod.h index 65c4ab7ca..f3bbcf37f 100644 --- a/plugins/channelrx/demodfreedv/freedvdemod.h +++ b/plugins/channelrx/demodfreedv/freedvdemod.h @@ -159,7 +159,12 @@ private: void applySettings(const FreeDVDemodSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const FreeDVDemodSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const FreeDVDemodSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const FreeDVDemodSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/demodfreedv/freedvplugin.cpp b/plugins/channelrx/demodfreedv/freedvplugin.cpp index 6a3bfe4c7..32818f3de 100644 --- a/plugins/channelrx/demodfreedv/freedvplugin.cpp +++ b/plugins/channelrx/demodfreedv/freedvplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor FreeDVPlugin::m_pluginDescriptor = { FreeDVDemod::m_channelId, QStringLiteral("FreeDV Demodulator"), - QStringLiteral("6.3.1"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/demodnfm/nfmdemod.cpp b/plugins/channelrx/demodnfm/nfmdemod.cpp index 6942fa40c..5dea77375 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.cpp +++ b/plugins/channelrx/demodnfm/nfmdemod.cpp @@ -235,6 +235,12 @@ void NFMDemod::applySettings(const NFMDemodSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); + } + m_settings = settings; } @@ -465,31 +471,25 @@ void NFMDemod::webapiReverseSendSettings(QList& channelSettingsKeys, co delete swgChannelSettings; } -void NFMDemod::featuresSendSettings(QList& channelSettingsKeys, const NFMDemodSettings& settings, bool force) +void NFMDemod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const NFMDemodSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/demodnfm/nfmdemod.h b/plugins/channelrx/demodnfm/nfmdemod.h index 3fed38d92..8709dbc3f 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.h +++ b/plugins/channelrx/demodnfm/nfmdemod.h @@ -141,7 +141,12 @@ private: void applySettings(const NFMDemodSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const NFMDemodSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const NFMDemodSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const NFMDemodSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/demodnfm/nfmplugin.cpp b/plugins/channelrx/demodnfm/nfmplugin.cpp index 4f01b2575..e357d7d47 100644 --- a/plugins/channelrx/demodnfm/nfmplugin.cpp +++ b/plugins/channelrx/demodnfm/nfmplugin.cpp @@ -12,7 +12,7 @@ const PluginDescriptor NFMPlugin::m_pluginDescriptor = { NFMDemod::m_channelId, QStringLiteral("NFM Demodulator"), - QStringLiteral("6.0.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/demodssb/ssbdemod.cpp b/plugins/channelrx/demodssb/ssbdemod.cpp index 55bb8f3b5..7bf61f081 100644 --- a/plugins/channelrx/demodssb/ssbdemod.cpp +++ b/plugins/channelrx/demodssb/ssbdemod.cpp @@ -248,8 +248,10 @@ void SSBDemod::applySettings(const SSBDemodSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -482,31 +484,25 @@ void SSBDemod::webapiReverseSendSettings(QList& channelSettingsKeys, co delete swgChannelSettings; } -void SSBDemod::featuresSendSettings(QList& channelSettingsKeys, const SSBDemodSettings& settings, bool force) +void SSBDemod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const SSBDemodSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/demodssb/ssbdemod.h b/plugins/channelrx/demodssb/ssbdemod.h index 185c6a68d..1280318da 100644 --- a/plugins/channelrx/demodssb/ssbdemod.h +++ b/plugins/channelrx/demodssb/ssbdemod.h @@ -144,7 +144,12 @@ private: void applySettings(const SSBDemodSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const SSBDemodSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const SSBDemodSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const SSBDemodSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/demodssb/ssbplugin.cpp b/plugins/channelrx/demodssb/ssbplugin.cpp index f9f460ea7..22e288c37 100644 --- a/plugins/channelrx/demodssb/ssbplugin.cpp +++ b/plugins/channelrx/demodssb/ssbplugin.cpp @@ -12,7 +12,7 @@ const PluginDescriptor SSBPlugin::m_pluginDescriptor = { SSBDemod::m_channelId, QStringLiteral("SSB Demodulator"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/demodvor/vordemod.cpp b/plugins/channelrx/demodvor/vordemod.cpp index 17f5d680a..d6dc16ce7 100644 --- a/plugins/channelrx/demodvor/vordemod.cpp +++ b/plugins/channelrx/demodvor/vordemod.cpp @@ -213,8 +213,10 @@ void VORDemod::applySettings(const VORDemodSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -411,31 +413,25 @@ void VORDemod::webapiReverseSendSettings(QList& channelSettingsKeys, co delete swgChannelSettings; } -void VORDemod::featuresSendSettings(QList& channelSettingsKeys, const VORDemodSettings& settings, bool force) +void VORDemod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const VORDemodSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/demodvor/vordemod.h b/plugins/channelrx/demodvor/vordemod.h index 0246296a5..97c2d1fa5 100644 --- a/plugins/channelrx/demodvor/vordemod.h +++ b/plugins/channelrx/demodvor/vordemod.h @@ -144,7 +144,12 @@ private: void applySettings(const VORDemodSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const VORDemodSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const VORDemodSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const VORDemodSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/demodvor/vordemodplugin.cpp b/plugins/channelrx/demodvor/vordemodplugin.cpp index 955eaed7a..f8a39eaf7 100644 --- a/plugins/channelrx/demodvor/vordemodplugin.cpp +++ b/plugins/channelrx/demodvor/vordemodplugin.cpp @@ -29,7 +29,7 @@ const PluginDescriptor VORDemodPlugin::m_pluginDescriptor = { VORDemod::m_channelId, QStringLiteral("VOR Demodulator"), - QStringLiteral("6.2.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Jon Beniston, M7RCE"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/demodvorsc/vordemodsc.cpp b/plugins/channelrx/demodvorsc/vordemodsc.cpp index 1b2d240b9..0b5856f57 100644 --- a/plugins/channelrx/demodvorsc/vordemodsc.cpp +++ b/plugins/channelrx/demodvorsc/vordemodsc.cpp @@ -261,8 +261,10 @@ void VORDemodSC::applySettings(const VORDemodSCSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -480,31 +482,25 @@ void VORDemodSC::webapiReverseSendSettings(QList& channelSettingsKeys, delete swgChannelSettings; } -void VORDemodSC::featuresSendSettings(QList& channelSettingsKeys, const VORDemodSCSettings& settings, bool force) +void VORDemodSC::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const VORDemodSCSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/demodvorsc/vordemodsc.h b/plugins/channelrx/demodvorsc/vordemodsc.h index 016642f0d..59cc90eac 100644 --- a/plugins/channelrx/demodvorsc/vordemodsc.h +++ b/plugins/channelrx/demodvorsc/vordemodsc.h @@ -145,7 +145,12 @@ private: void applySettings(const VORDemodSCSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const VORDemodSCSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const VORDemodSCSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const VORDemodSCSettings& settings, + bool force + ); void sendChannelReport(QList *messageQueues); void webapiFormatChannelSettings( QList& channelSettingsKeys, diff --git a/plugins/channelrx/demodvorsc/vordemodscplugin.cpp b/plugins/channelrx/demodvorsc/vordemodscplugin.cpp index 3cb0fb901..21267cf98 100644 --- a/plugins/channelrx/demodvorsc/vordemodscplugin.cpp +++ b/plugins/channelrx/demodvorsc/vordemodscplugin.cpp @@ -29,7 +29,7 @@ const PluginDescriptor VORDemodSCPlugin::m_pluginDescriptor = { VORDemodSC::m_channelId, QStringLiteral("VOR Single Channel Demodulator"), - QStringLiteral("6.3.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Jon Beniston, M7RCE"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/demodwfm/wfmdemod.cpp b/plugins/channelrx/demodwfm/wfmdemod.cpp index ffd21135c..630e94863 100644 --- a/plugins/channelrx/demodwfm/wfmdemod.cpp +++ b/plugins/channelrx/demodwfm/wfmdemod.cpp @@ -213,8 +213,10 @@ void WFMDemod::applySettings(const WFMDemodSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -414,31 +416,25 @@ void WFMDemod::webapiReverseSendSettings(QList& channelSettingsKeys, co delete swgChannelSettings; } -void WFMDemod::featuresSendSettings(QList& channelSettingsKeys, const WFMDemodSettings& settings, bool force) +void WFMDemod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const WFMDemodSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/demodwfm/wfmdemod.h b/plugins/channelrx/demodwfm/wfmdemod.h index 4691bafa7..8f3d48f3f 100644 --- a/plugins/channelrx/demodwfm/wfmdemod.h +++ b/plugins/channelrx/demodwfm/wfmdemod.h @@ -137,7 +137,12 @@ private: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const WFMDemodSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const WFMDemodSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const WFMDemodSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/demodwfm/wfmplugin.cpp b/plugins/channelrx/demodwfm/wfmplugin.cpp index a9575d3ff..a45d4f67f 100644 --- a/plugins/channelrx/demodwfm/wfmplugin.cpp +++ b/plugins/channelrx/demodwfm/wfmplugin.cpp @@ -13,7 +13,7 @@ const PluginDescriptor WFMPlugin::m_pluginDescriptor = { WFMDemod::m_channelId, QStringLiteral("WFM Demodulator"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/filesink/filesink.cpp b/plugins/channelrx/filesink/filesink.cpp index 718e8814a..48d669e72 100644 --- a/plugins/channelrx/filesink/filesink.cpp +++ b/plugins/channelrx/filesink/filesink.cpp @@ -295,8 +295,10 @@ void FileSink::applySettings(const FileSinkSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -550,31 +552,25 @@ void FileSink::webapiReverseSendSettings(QList& channelSettingsKeys, co delete swgChannelSettings; } -void FileSink::featuresSendSettings(QList& channelSettingsKeys, const FileSinkSettings& settings, bool force) +void FileSink::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const FileSinkSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/filesink/filesink.h b/plugins/channelrx/filesink/filesink.h index 617963244..f0a670be1 100644 --- a/plugins/channelrx/filesink/filesink.h +++ b/plugins/channelrx/filesink/filesink.h @@ -148,7 +148,12 @@ private: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const FileSinkSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const FileSinkSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const FileSinkSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/filesink/filesinkplugin.cpp b/plugins/channelrx/filesink/filesinkplugin.cpp index ebe09f0a8..e3c76a2a4 100644 --- a/plugins/channelrx/filesink/filesinkplugin.cpp +++ b/plugins/channelrx/filesink/filesinkplugin.cpp @@ -29,7 +29,7 @@ const PluginDescriptor FileSinkPlugin::m_pluginDescriptor = { FileSink::m_channelId, QStringLiteral("File Sink"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/freqtracker/freqtracker.cpp b/plugins/channelrx/freqtracker/freqtracker.cpp index 6b4952b9b..74369684f 100644 --- a/plugins/channelrx/freqtracker/freqtracker.cpp +++ b/plugins/channelrx/freqtracker/freqtracker.cpp @@ -261,13 +261,10 @@ void FreqTracker::applySettings(const FreqTrackerSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) - { - if (m_featuresSettingsFeedbackBlockCount == 0) { - featuresSendSettings(reverseAPIKeys, settings, force); - } else { - m_featuresSettingsFeedbackBlockCount--; - } + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -489,31 +486,25 @@ void FreqTracker::webapiReverseSendSettings(QList& channelSettingsKeys, delete swgChannelSettings; } -void FreqTracker::featuresSendSettings(QList& channelSettingsKeys, const FreqTrackerSettings& settings, bool force) +void FreqTracker::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const FreqTrackerSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/freqtracker/freqtracker.h b/plugins/channelrx/freqtracker/freqtracker.h index be120455a..fdedbe0e7 100644 --- a/plugins/channelrx/freqtracker/freqtracker.h +++ b/plugins/channelrx/freqtracker/freqtracker.h @@ -142,7 +142,12 @@ private: void applySettings(const FreqTrackerSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const FreqTrackerSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const FreqTrackerSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const FreqTrackerSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/freqtracker/freqtrackerplugin.cpp b/plugins/channelrx/freqtracker/freqtrackerplugin.cpp index bf79856d1..2fc88c4b7 100644 --- a/plugins/channelrx/freqtracker/freqtrackerplugin.cpp +++ b/plugins/channelrx/freqtracker/freqtrackerplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor FreqTrackerPlugin::m_pluginDescriptor = { FreqTracker::m_channelId, QStringLiteral("Frequency Tracker"), - QStringLiteral("4.21.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/localsink/localsink.cpp b/plugins/channelrx/localsink/localsink.cpp index 5f78e7f72..ba2a453c1 100644 --- a/plugins/channelrx/localsink/localsink.cpp +++ b/plugins/channelrx/localsink/localsink.cpp @@ -304,8 +304,10 @@ void LocalSink::applySettings(const LocalSinkSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -464,31 +466,25 @@ void LocalSink::webapiReverseSendSettings(QList& channelSettingsKeys, c delete swgChannelSettings; } -void LocalSink::featuresSendSettings(QList& channelSettingsKeys, const LocalSinkSettings& settings, bool force) +void LocalSink::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const LocalSinkSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/localsink/localsink.h b/plugins/channelrx/localsink/localsink.h index 82b2d6615..64280241f 100644 --- a/plugins/channelrx/localsink/localsink.h +++ b/plugins/channelrx/localsink/localsink.h @@ -154,7 +154,12 @@ private: DeviceSampleSource *getLocalDevice(uint32_t index); void webapiReverseSendSettings(QList& channelSettingsKeys, const LocalSinkSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const LocalSinkSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const LocalSinkSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/localsink/localsinkplugin.cpp b/plugins/channelrx/localsink/localsinkplugin.cpp index a57d4324d..ee42bf297 100644 --- a/plugins/channelrx/localsink/localsinkplugin.cpp +++ b/plugins/channelrx/localsink/localsinkplugin.cpp @@ -30,7 +30,7 @@ const PluginDescriptor LocalSinkPlugin::m_pluginDescriptor = { LocalSink::m_channelId, QStringLiteral("Local channel sink"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/remotesink/remotesink.cpp b/plugins/channelrx/remotesink/remotesink.cpp index 53d4cc6d4..46c6e6886 100644 --- a/plugins/channelrx/remotesink/remotesink.cpp +++ b/plugins/channelrx/remotesink/remotesink.cpp @@ -238,8 +238,10 @@ void RemoteSink::applySettings(const RemoteSinkSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -443,31 +445,25 @@ void RemoteSink::webapiReverseSendSettings(QList& channelSettingsKeys, delete swgChannelSettings; } -void RemoteSink::featuresSendSettings(QList& channelSettingsKeys, const RemoteSinkSettings& settings, bool force) +void RemoteSink::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const RemoteSinkSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/remotesink/remotesink.h b/plugins/channelrx/remotesink/remotesink.h index 76fc79e86..605a3f4f1 100644 --- a/plugins/channelrx/remotesink/remotesink.h +++ b/plugins/channelrx/remotesink/remotesink.h @@ -133,7 +133,12 @@ private: static void validateFilterChainHash(RemoteSinkSettings& settings); void calculateFrequencyOffset(); void webapiReverseSendSettings(QList& channelSettingsKeys, const RemoteSinkSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const RemoteSinkSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const RemoteSinkSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/remotesink/remotesinkplugin.cpp b/plugins/channelrx/remotesink/remotesinkplugin.cpp index 2ac6f909d..6216f7583 100644 --- a/plugins/channelrx/remotesink/remotesinkplugin.cpp +++ b/plugins/channelrx/remotesink/remotesinkplugin.cpp @@ -30,7 +30,7 @@ const PluginDescriptor RemoteSinkPlugin::m_pluginDescriptor = { RemoteSink::m_channelId, QStringLiteral("Remote channel sink"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/sigmffilesink/sigmffilesink.cpp b/plugins/channelrx/sigmffilesink/sigmffilesink.cpp index d520cbc1c..8750396ee 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesink.cpp +++ b/plugins/channelrx/sigmffilesink/sigmffilesink.cpp @@ -295,8 +295,10 @@ void SigMFFileSink::applySettings(const SigMFFileSinkSettings& settings, bool fo webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -550,31 +552,25 @@ void SigMFFileSink::webapiReverseSendSettings(QList& channelSettingsKey delete swgChannelSettings; } -void SigMFFileSink::featuresSendSettings(QList& channelSettingsKeys, const SigMFFileSinkSettings& settings, bool force) +void SigMFFileSink::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const SigMFFileSinkSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/sigmffilesink/sigmffilesink.h b/plugins/channelrx/sigmffilesink/sigmffilesink.h index 8adb3d07c..03ace0c62 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesink.h +++ b/plugins/channelrx/sigmffilesink/sigmffilesink.h @@ -148,7 +148,12 @@ private: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const SigMFFileSinkSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const SigMFFileSinkSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const SigMFFileSinkSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.cpp b/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.cpp index 9966807be..987760be4 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.cpp +++ b/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.cpp @@ -29,7 +29,7 @@ const PluginDescriptor SigMFFileSinkPlugin::m_pluginDescriptor = { SigMFFileSink::m_channelId, QStringLiteral("SigMF File Sink"), - QStringLiteral("6.0.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/udpsink/udpsink.cpp b/plugins/channelrx/udpsink/udpsink.cpp index 5b6b67c54..caacc016e 100644 --- a/plugins/channelrx/udpsink/udpsink.cpp +++ b/plugins/channelrx/udpsink/udpsink.cpp @@ -238,8 +238,10 @@ void UDPSink::applySettings(const UDPSinkSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -476,31 +478,25 @@ void UDPSink::webapiReverseSendSettings(QList& channelSettingsKeys, con delete swgChannelSettings; } -void UDPSink::featuresSendSettings(QList& channelSettingsKeys, const UDPSinkSettings& settings, bool force) +void UDPSink::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const UDPSinkSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channelrx/udpsink/udpsink.h b/plugins/channelrx/udpsink/udpsink.h index 757440cf7..bd1f7a35f 100644 --- a/plugins/channelrx/udpsink/udpsink.h +++ b/plugins/channelrx/udpsink/udpsink.h @@ -145,7 +145,12 @@ protected: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const UDPSinkSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const UDPSinkSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const UDPSinkSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channelrx/udpsink/udpsinkplugin.cpp b/plugins/channelrx/udpsink/udpsinkplugin.cpp index c8d2309ea..38776d940 100644 --- a/plugins/channelrx/udpsink/udpsinkplugin.cpp +++ b/plugins/channelrx/udpsink/udpsinkplugin.cpp @@ -29,7 +29,7 @@ const PluginDescriptor UDPSinkPlugin::m_pluginDescriptor = { UDPSink::m_channelId, QStringLiteral("UDP Channel Sink"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/filesource/filesource.cpp b/plugins/channeltx/filesource/filesource.cpp index 9dba3ab9f..dc2264ad9 100644 --- a/plugins/channeltx/filesource/filesource.cpp +++ b/plugins/channeltx/filesource/filesource.cpp @@ -263,8 +263,10 @@ void FileSource::applySettings(const FileSourceSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -526,31 +528,25 @@ void FileSource::webapiReverseSendSettings(QList& channelSettingsKeys, delete swgChannelSettings; } -void FileSource::featuresSendSettings(QList& channelSettingsKeys, const FileSourceSettings& settings, bool force) +void FileSource::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const FileSourceSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/filesource/filesource.h b/plugins/channeltx/filesource/filesource.h index 147c38c76..01d3ce7f3 100644 --- a/plugins/channeltx/filesource/filesource.h +++ b/plugins/channeltx/filesource/filesource.h @@ -253,7 +253,12 @@ private: void calculateFrequencyOffset(); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const FileSourceSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const FileSourceSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const FileSourceSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/filesource/filesourceplugin.cpp b/plugins/channeltx/filesource/filesourceplugin.cpp index f6cfb1d32..45816eb4b 100644 --- a/plugins/channeltx/filesource/filesourceplugin.cpp +++ b/plugins/channeltx/filesource/filesourceplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor FileSourcePlugin::m_pluginDescriptor = { FileSource::m_channelId, QStringLiteral("File channel source"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/localsource/localsource.cpp b/plugins/channeltx/localsource/localsource.cpp index 2387570c7..cebf07dad 100644 --- a/plugins/channeltx/localsource/localsource.cpp +++ b/plugins/channeltx/localsource/localsource.cpp @@ -307,8 +307,10 @@ void LocalSource::applySettings(const LocalSourceSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -466,31 +468,25 @@ void LocalSource::webapiReverseSendSettings(QList& channelSettingsKeys, delete swgChannelSettings; } -void LocalSource::featuresSendSettings(QList& channelSettingsKeys, const LocalSourceSettings& settings, bool force) +void LocalSource::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const LocalSourceSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/localsource/localsource.h b/plugins/channeltx/localsource/localsource.h index 0c4c4a142..ccecbff73 100644 --- a/plugins/channeltx/localsource/localsource.h +++ b/plugins/channeltx/localsource/localsource.h @@ -151,7 +151,12 @@ private: DeviceSampleSink *getLocalDevice(uint32_t index); void webapiReverseSendSettings(QList& channelSettingsKeys, const LocalSourceSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const LocalSourceSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const LocalSourceSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/localsource/localsourceplugin.cpp b/plugins/channeltx/localsource/localsourceplugin.cpp index bfa8dff08..edcc12254 100644 --- a/plugins/channeltx/localsource/localsourceplugin.cpp +++ b/plugins/channeltx/localsource/localsourceplugin.cpp @@ -30,7 +30,7 @@ const PluginDescriptor LocalSourcePlugin::m_pluginDescriptor = { LocalSource::m_channelId, QStringLiteral("Local channel source"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp index bfe06007f..fef87319c 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp @@ -219,8 +219,10 @@ void IEEE_802_15_4_Mod::applySettings(const IEEE_802_15_4_ModSettings& settings, webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -451,31 +453,25 @@ void IEEE_802_15_4_Mod::webapiReverseSendSettings(QList& channelSetting delete swgChannelSettings; } -void IEEE_802_15_4_Mod::featuresSendSettings(QList& channelSettingsKeys, const IEEE_802_15_4_ModSettings& settings, bool force) +void IEEE_802_15_4_Mod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const IEEE_802_15_4_ModSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h index 6a1c6079a..0a57f783d 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h @@ -167,7 +167,12 @@ private: void applySettings(const IEEE_802_15_4_ModSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const IEEE_802_15_4_ModSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const IEEE_802_15_4_ModSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const IEEE_802_15_4_ModSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modplugin.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modplugin.cpp index 763d26b90..515498323 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modplugin.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modplugin.cpp @@ -29,7 +29,7 @@ const PluginDescriptor IEEE_802_15_4_ModPlugin::m_pluginDescriptor = { IEEE_802_15_4_Mod::m_channelId, QStringLiteral("802.15.4 Modulator"), - QStringLiteral("4.20.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Jon Beniston, M7RCE"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index bfd4e4531..219673bd7 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -302,8 +302,10 @@ void AMMod::applySettings(const AMModSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -562,31 +564,25 @@ void AMMod::webapiReverseSendCWSettings(const CWKeyerSettings& cwKeyerSettings) delete swgChannelSettings; } -void AMMod::featuresSendSettings(QList& channelSettingsKeys, const AMModSettings& settings, bool force) +void AMMod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const AMModSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/modam/ammod.h b/plugins/channeltx/modam/ammod.h index 73fd12d36..f66b91715 100644 --- a/plugins/channeltx/modam/ammod.h +++ b/plugins/channeltx/modam/ammod.h @@ -260,7 +260,12 @@ private: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const AMModSettings& settings, bool force); void webapiReverseSendCWSettings(const CWKeyerSettings& settings); - void featuresSendSettings(QList& channelSettingsKeys, const AMModSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const AMModSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/modam/ammodplugin.cpp b/plugins/channeltx/modam/ammodplugin.cpp index c3cff4cb4..f8f2361db 100644 --- a/plugins/channeltx/modam/ammodplugin.cpp +++ b/plugins/channeltx/modam/ammodplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor AMModPlugin::m_pluginDescriptor = { AMMod::m_channelId, QStringLiteral("AM Modulator"), - QStringLiteral("6.1.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index 0bec0911e..653771816 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -323,8 +323,10 @@ void ATVMod::applySettings(const ATVModSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -612,31 +614,25 @@ void ATVMod::webapiReverseSendSettings(QList& channelSettingsKeys, cons delete swgChannelSettings; } -void ATVMod::featuresSendSettings(QList& channelSettingsKeys, const ATVModSettings& settings, bool force) +void ATVMod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const ATVModSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index 64a302279..239642d87 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -316,7 +316,12 @@ private: void applySettings(const ATVModSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const ATVModSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const ATVModSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const ATVModSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/modatv/atvmodplugin.cpp b/plugins/channeltx/modatv/atvmodplugin.cpp index b5bc23dc5..21ac6203d 100644 --- a/plugins/channeltx/modatv/atvmodplugin.cpp +++ b/plugins/channeltx/modatv/atvmodplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor ATVModPlugin::m_pluginDescriptor = { ATVMod::m_channelId, QStringLiteral("ATV Modulator"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/modchirpchat/chirpchatmod.cpp b/plugins/channeltx/modchirpchat/chirpchatmod.cpp index 5d0b182e7..c5d19a572 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmod.cpp +++ b/plugins/channeltx/modchirpchat/chirpchatmod.cpp @@ -354,8 +354,10 @@ void ChirpChatMod::applySettings(const ChirpChatModSettings& settings, bool forc webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -720,31 +722,25 @@ void ChirpChatMod::webapiReverseSendSettings(QList& channelSettingsKeys delete swgChannelSettings; } -void ChirpChatMod::featuresSendSettings(QList& channelSettingsKeys, const ChirpChatModSettings& settings, bool force) +void ChirpChatMod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const ChirpChatModSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/modchirpchat/chirpchatmod.h b/plugins/channeltx/modchirpchat/chirpchatmod.h index ab92bb87b..5731d313a 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmod.h +++ b/plugins/channeltx/modchirpchat/chirpchatmod.h @@ -163,7 +163,12 @@ private: void applySettings(const ChirpChatModSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const ChirpChatModSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const ChirpChatModSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const ChirpChatModSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/modchirpchat/chirpchatmodplugin.cpp b/plugins/channeltx/modchirpchat/chirpchatmodplugin.cpp index 0648ec446..64607cc99 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmodplugin.cpp +++ b/plugins/channeltx/modchirpchat/chirpchatmodplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor ChirpChatModPlugin::m_pluginDescriptor = { ChirpChatMod::m_channelId, QStringLiteral("ChirpChat Modulator"), - QStringLiteral("6.0.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/modfreedv/freedvmod.cpp b/plugins/channeltx/modfreedv/freedvmod.cpp index d079082e9..9147da7d6 100644 --- a/plugins/channeltx/modfreedv/freedvmod.cpp +++ b/plugins/channeltx/modfreedv/freedvmod.cpp @@ -304,8 +304,10 @@ void FreeDVMod::applySettings(const FreeDVModSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -568,31 +570,25 @@ void FreeDVMod::webapiReverseSendCWSettings(const CWKeyerSettings& cwKeyerSettin delete swgChannelSettings; } -void FreeDVMod::featuresSendSettings(QList& channelSettingsKeys, const FreeDVModSettings& settings, bool force) +void FreeDVMod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const FreeDVModSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/modfreedv/freedvmod.h b/plugins/channeltx/modfreedv/freedvmod.h index 7a3ac9ff8..a52428794 100644 --- a/plugins/channeltx/modfreedv/freedvmod.h +++ b/plugins/channeltx/modfreedv/freedvmod.h @@ -268,7 +268,12 @@ private: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const FreeDVModSettings& settings, bool force); void webapiReverseSendCWSettings(const CWKeyerSettings& settings); - void featuresSendSettings(QList& channelSettingsKeys, const FreeDVModSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const FreeDVModSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/modfreedv/freedvmodplugin.cpp b/plugins/channeltx/modfreedv/freedvmodplugin.cpp index 9a3e0cf1f..fb2b6eeac 100644 --- a/plugins/channeltx/modfreedv/freedvmodplugin.cpp +++ b/plugins/channeltx/modfreedv/freedvmodplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor FreeDVModPlugin::m_pluginDescriptor = { FreeDVMod::m_channelId, QStringLiteral("FreeDV Modulator"), - QStringLiteral("6.3.1"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index ec0e34ae3..1d6b9210d 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -348,8 +348,10 @@ void NFMMod::applySettings(const NFMModSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -616,31 +618,25 @@ void NFMMod::webapiReverseSendCWSettings(const CWKeyerSettings& cwKeyerSettings) delete swgChannelSettings; } -void NFMMod::featuresSendSettings(QList& channelSettingsKeys, const NFMModSettings& settings, bool force) +void NFMMod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const NFMModSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/modnfm/nfmmod.h b/plugins/channeltx/modnfm/nfmmod.h index 735aa981b..8ef28fac4 100644 --- a/plugins/channeltx/modnfm/nfmmod.h +++ b/plugins/channeltx/modnfm/nfmmod.h @@ -260,7 +260,12 @@ private: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const NFMModSettings& settings, bool force); void webapiReverseSendCWSettings(const CWKeyerSettings& settings); - void featuresSendSettings(QList& channelSettingsKeys, const NFMModSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const NFMModSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/modnfm/nfmmodplugin.cpp b/plugins/channeltx/modnfm/nfmmodplugin.cpp index 0c5bb4c82..5c908c06a 100644 --- a/plugins/channeltx/modnfm/nfmmodplugin.cpp +++ b/plugins/channeltx/modnfm/nfmmodplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor NFMModPlugin::m_pluginDescriptor = { NFMMod::m_channelId, QStringLiteral("NFM Modulator"), - QStringLiteral("6.1.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/modpacket/packetmod.cpp b/plugins/channeltx/modpacket/packetmod.cpp index 4cbc734a7..57db1e210 100644 --- a/plugins/channeltx/modpacket/packetmod.cpp +++ b/plugins/channeltx/modpacket/packetmod.cpp @@ -346,8 +346,10 @@ void PacketMod::applySettings(const PacketModSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -731,31 +733,25 @@ void PacketMod::webapiReverseSendSettings(QList& channelSettingsKeys, c delete swgChannelSettings; } -void PacketMod::featuresSendSettings(QList& channelSettingsKeys, const PacketModSettings& settings, bool force) +void PacketMod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const PacketModSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/modpacket/packetmod.h b/plugins/channeltx/modpacket/packetmod.h index 42a804381..ec6cd764b 100644 --- a/plugins/channeltx/modpacket/packetmod.h +++ b/plugins/channeltx/modpacket/packetmod.h @@ -178,7 +178,12 @@ private: void applySettings(const PacketModSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const PacketModSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const PacketModSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const PacketModSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/modpacket/packetmodplugin.cpp b/plugins/channeltx/modpacket/packetmodplugin.cpp index 6b5810aa1..c29240a33 100644 --- a/plugins/channeltx/modpacket/packetmodplugin.cpp +++ b/plugins/channeltx/modpacket/packetmodplugin.cpp @@ -29,7 +29,7 @@ const PluginDescriptor PacketModPlugin::m_pluginDescriptor = { PacketMod::m_channelId, QStringLiteral("Packet Modulator"), - QStringLiteral("4.20.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Jon Beniston, M7RCE"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index dfba4b8d9..34e929ff3 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -323,8 +323,10 @@ void SSBMod::applySettings(const SSBModSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -618,31 +620,25 @@ void SSBMod::webapiReverseSendCWSettings(const CWKeyerSettings& cwKeyerSettings) delete swgChannelSettings; } -void SSBMod::featuresSendSettings(QList& channelSettingsKeys, const SSBModSettings& settings, bool force) +void SSBMod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const SSBModSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/modssb/ssbmod.h b/plugins/channeltx/modssb/ssbmod.h index 3a640b2f9..bb5e2806b 100644 --- a/plugins/channeltx/modssb/ssbmod.h +++ b/plugins/channeltx/modssb/ssbmod.h @@ -264,7 +264,12 @@ private: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const SSBModSettings& settings, bool force); void webapiReverseSendCWSettings(const CWKeyerSettings& settings); - void featuresSendSettings(QList& channelSettingsKeys, const SSBModSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const SSBModSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/modssb/ssbmodplugin.cpp b/plugins/channeltx/modssb/ssbmodplugin.cpp index f57f60d45..021cab62f 100644 --- a/plugins/channeltx/modssb/ssbmodplugin.cpp +++ b/plugins/channeltx/modssb/ssbmodplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor SSBModPlugin::m_pluginDescriptor = { SSBMod::m_channelId, QStringLiteral("SSB Modulator"), - QStringLiteral("6.2.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index 038d6a2dc..2efed5c8a 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -288,8 +288,10 @@ void WFMMod::applySettings(const WFMModSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -549,31 +551,25 @@ void WFMMod::webapiReverseSendCWSettings(const CWKeyerSettings& cwKeyerSettings) delete swgChannelSettings; } -void WFMMod::featuresSendSettings(QList& channelSettingsKeys, const WFMModSettings& settings, bool force) +void WFMMod::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const WFMModSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/modwfm/wfmmod.h b/plugins/channeltx/modwfm/wfmmod.h index 8e0cda3bc..9f4a01c29 100644 --- a/plugins/channeltx/modwfm/wfmmod.h +++ b/plugins/channeltx/modwfm/wfmmod.h @@ -272,7 +272,12 @@ private: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const WFMModSettings& settings, bool force); void webapiReverseSendCWSettings(const CWKeyerSettings& settings); - void featuresSendSettings(QList& channelSettingsKeys, const WFMModSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const WFMModSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/modwfm/wfmmodplugin.cpp b/plugins/channeltx/modwfm/wfmmodplugin.cpp index 509497362..f5729778d 100644 --- a/plugins/channeltx/modwfm/wfmmodplugin.cpp +++ b/plugins/channeltx/modwfm/wfmmodplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor WFMModPlugin::m_pluginDescriptor = { WFMMod::m_channelId, QStringLiteral("WFM Modulator"), - QStringLiteral("6.1.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/remotesource/remotesource.cpp b/plugins/channeltx/remotesource/remotesource.cpp index 5aaedc71a..5e7b93774 100644 --- a/plugins/channeltx/remotesource/remotesource.cpp +++ b/plugins/channeltx/remotesource/remotesource.cpp @@ -204,8 +204,10 @@ void RemoteSource::applySettings(const RemoteSourceSettings& settings, bool forc webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -378,31 +380,25 @@ void RemoteSource::webapiReverseSendSettings(QList& channelSettingsKeys delete swgChannelSettings; } -void RemoteSource::featuresSendSettings(QList& channelSettingsKeys, const RemoteSourceSettings& settings, bool force) +void RemoteSource::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const RemoteSourceSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/remotesource/remotesource.h b/plugins/channeltx/remotesource/remotesource.h index c74bc5a83..3f478a8a0 100644 --- a/plugins/channeltx/remotesource/remotesource.h +++ b/plugins/channeltx/remotesource/remotesource.h @@ -221,7 +221,12 @@ private: void applySettings(const RemoteSourceSettings& settings, bool force = false); void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const RemoteSourceSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const RemoteSourceSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const RemoteSourceSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/remotesource/remotesourceplugin.cpp b/plugins/channeltx/remotesource/remotesourceplugin.cpp index 919f4b5f8..ac9abc2a6 100644 --- a/plugins/channeltx/remotesource/remotesourceplugin.cpp +++ b/plugins/channeltx/remotesource/remotesourceplugin.cpp @@ -28,7 +28,7 @@ const PluginDescriptor RemoteSourcePlugin::m_pluginDescriptor = { RemoteSource::m_channelId, QStringLiteral("Remote channel source"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/udpsource/udpsource.cpp b/plugins/channeltx/udpsource/udpsource.cpp index 05573c4f3..ff20c0596 100644 --- a/plugins/channeltx/udpsource/udpsource.cpp +++ b/plugins/channeltx/udpsource/udpsource.cpp @@ -258,8 +258,10 @@ void UDPSource::applySettings(const UDPSourceSettings& settings, bool force) webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force); } - if (m_featuresSettingsFeedback.size() > 0) { - featuresSendSettings(reverseAPIKeys, settings, force); + QList *messageQueues = MainCore::instance()->getMessagePipes().getMessageQueues(this, "settings"); + + if (messageQueues) { + sendChannelSettings(messageQueues, reverseAPIKeys, settings, force); } m_settings = settings; @@ -517,31 +519,25 @@ void UDPSource::webapiReverseSendSettings(QList& channelSettingsKeys, c delete swgChannelSettings; } -void UDPSource::featuresSendSettings(QList& channelSettingsKeys, const UDPSourceSettings& settings, bool force) +void UDPSource::sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const UDPSourceSettings& settings, + bool force) { - QList::iterator it = m_featuresSettingsFeedback.begin(); - MainCore *mainCore = MainCore::instance(); + QList::iterator it = messageQueues->begin(); - for (; it != m_featuresSettingsFeedback.end(); ++it) + for (; it != messageQueues->end(); ++it) { - if (mainCore->existsFeature(*it)) - { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); - webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); - - Feature::MsgChannelSettings *msg = Feature::MsgChannelSettings::create( - this, - channelSettingsKeys, - swgChannelSettings, - force - ); - - (*it)->getInputMessageQueue()->push(msg); - } - else - { - m_featuresSettingsFeedback.removeOne(*it); - } + SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); + MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( + this, + channelSettingsKeys, + swgChannelSettings, + force + ); + (*it)->push(msg); } } diff --git a/plugins/channeltx/udpsource/udpsource.h b/plugins/channeltx/udpsource/udpsource.h index b18bb2097..0f61567a1 100644 --- a/plugins/channeltx/udpsource/udpsource.h +++ b/plugins/channeltx/udpsource/udpsource.h @@ -175,7 +175,12 @@ private: void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); void webapiReverseSendSettings(QList& channelSettingsKeys, const UDPSourceSettings& settings, bool force); - void featuresSendSettings(QList& channelSettingsKeys, const UDPSourceSettings& settings, bool force); + void sendChannelSettings( + QList *messageQueues, + QList& channelSettingsKeys, + const UDPSourceSettings& settings, + bool force + ); void webapiFormatChannelSettings( QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, diff --git a/plugins/channeltx/udpsource/udpsourceplugin.cpp b/plugins/channeltx/udpsource/udpsourceplugin.cpp index 8d4200bdd..2382885ea 100644 --- a/plugins/channeltx/udpsource/udpsourceplugin.cpp +++ b/plugins/channeltx/udpsource/udpsourceplugin.cpp @@ -31,7 +31,7 @@ const PluginDescriptor UDPSourcePlugin::m_pluginDescriptor = { UDPSource::m_channelId, QStringLiteral("UDP Channel Source"), - QStringLiteral("4.19.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/feature/afc/afc.cpp b/plugins/feature/afc/afc.cpp index 0ccaf5d85..395549167 100644 --- a/plugins/feature/afc/afc.cpp +++ b/plugins/feature/afc/afc.cpp @@ -113,12 +113,12 @@ bool AFC::handleMessage(const Message& cmd) return true; } - else if (Feature::MsgChannelSettings::match(cmd)) + else if (MainCore::MsgChannelSettings::match(cmd)) { - Feature::MsgChannelSettings& cfg = (Feature::MsgChannelSettings&) cmd; + MainCore::MsgChannelSettings& cfg = (MainCore::MsgChannelSettings&) cmd; SWGSDRangel::SWGChannelSettings *swgChannelSettings = cfg.getSWGSettings(); QString *channelType = swgChannelSettings->getChannelType(); - qDebug() << "AFC::handleMessage: Feature::MsgChannelSettings: " << *channelType; + qDebug() << "AFC::handleMessage: MainCore::MsgChannelSettings: " << *channelType; if (m_worker->isRunning()) { @@ -130,6 +130,16 @@ bool AFC::handleMessage(const Message& cmd) return true; } } + else if (MessagePipesCommon::MsgReportChannelDeleted::match(cmd)) + { + qDebug() << "AFC::handleMessage: MessagePipesCommon::MsgReportChannelDeleted"; + MessagePipesCommon::MsgReportChannelDeleted& report = (MessagePipesCommon::MsgReportChannelDeleted&) cmd; + const MessagePipesCommon::ChannelRegistrationKey& channelKey = report.getChannelRegistrationKey(); + const ChannelAPI *channel = channelKey.m_channel; + MainCore::instance()->getMessagePipes().unregisterChannelToFeature(channel, this, "settings"); + + return true; + } else if (MsgDeviceTrack::match(cmd)) { if (m_worker->isRunning()) @@ -532,7 +542,14 @@ void AFC::trackerDeviceChange(int deviceIndex) if (channel->getURI() == "sdrangel.channel.freqtracker") { - channel->addFeatureSettingsFeedback(this); + MessageQueue *messageQueue = mainCore->getMessagePipes().registerChannelToFeature(channel, this, "settings"); + QObject::connect( + messageQueue, + &MessageQueue::messageEnqueued, + this, + [=](){ this->handleChannelMessageQueue(messageQueue); }, + Qt::QueuedConnection + ); m_trackerChannelAPI = channel; break; } @@ -550,7 +567,14 @@ void AFC::trackedDeviceChange(int deviceIndex) if (channel->getURI() != "sdrangel.channel.freqtracker") { - channel->addFeatureSettingsFeedback(this); + MessageQueue *messageQueue = mainCore->getMessagePipes().registerChannelToFeature(channel, this, "settings"); + QObject::connect( + messageQueue, + &MessageQueue::messageEnqueued, + this, + [=](){ this->handleChannelMessageQueue(messageQueue); }, + Qt::QueuedConnection + ); m_trackerIndexInDeviceSet = i; } } @@ -561,7 +585,7 @@ void AFC::removeTrackerFeatureReference() if (m_trackerChannelAPI) { if (MainCore::instance()->existsChannel(m_trackerChannelAPI)) { - m_trackerChannelAPI->removeFeatureSettingsFeedback(this); + MainCore::instance()->getMessagePipes().unregisterChannelToFeature(m_trackerChannelAPI, this, "settings"); } } } @@ -573,9 +597,21 @@ void AFC::removeTrackedFeatureReferences() ChannelAPI *channel = *it; if (MainCore::instance()->existsChannel(channel)) { - channel->removeFeatureSettingsFeedback(this); + MainCore::instance()->getMessagePipes().unregisterChannelToFeature(channel, this, "settings"); } } m_trackedChannelAPIs.clear(); } + +void AFC::handleChannelMessageQueue(MessageQueue* messageQueue) +{ + Message* message; + + while ((message = messageQueue->pop()) != nullptr) + { + if (handleMessage(*message)) { + delete message; + } + } +} diff --git a/plugins/feature/afc/afc.h b/plugins/feature/afc/afc.h index cc07887a3..1b208172d 100644 --- a/plugins/feature/afc/afc.h +++ b/plugins/feature/afc/afc.h @@ -178,6 +178,7 @@ private: private slots: void networkManagerFinished(QNetworkReply *reply); + void handleChannelMessageQueue(MessageQueue* messageQueue); }; #endif // INCLUDE_FEATURE_AFC_H_ diff --git a/plugins/feature/afc/afcplugin.cpp b/plugins/feature/afc/afcplugin.cpp index 7dce1e20e..ee1d1f402 100644 --- a/plugins/feature/afc/afcplugin.cpp +++ b/plugins/feature/afc/afcplugin.cpp @@ -29,7 +29,7 @@ const PluginDescriptor AFCPlugin::m_pluginDescriptor = { AFC::m_featureId, QStringLiteral("AFC"), - QStringLiteral("4.21.0"), + QStringLiteral("6.3.3"), QStringLiteral("(c) Edouard Griffiths, F4EXB"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/feature/afc/afcworker.cpp b/plugins/feature/afc/afcworker.cpp index 7470c9c3f..3b9de9e13 100644 --- a/plugins/feature/afc/afcworker.cpp +++ b/plugins/feature/afc/afcworker.cpp @@ -106,12 +106,12 @@ bool AFCWorker::handleMessage(const Message& cmd) return true; } - else if (Feature::MsgChannelSettings::match(cmd)) + else if (MainCore::MsgChannelSettings::match(cmd)) { QMutexLocker mutexLocker(&m_mutex); - Feature::MsgChannelSettings& cfg = (Feature::MsgChannelSettings&) cmd; + MainCore::MsgChannelSettings& cfg = (MainCore::MsgChannelSettings&) cmd; SWGSDRangel::SWGChannelSettings *swgChannelSettings = cfg.getSWGSettings(); - qDebug() << "AFCWorker::handleMessage: Feature::MsgChannelSettings:" << *swgChannelSettings->getChannelType(); + qDebug() << "AFCWorker::handleMessage: MainCore::MsgChannelSettings:" << *swgChannelSettings->getChannelType(); processChannelSettings(cfg.getChannelAPI(), swgChannelSettings); delete swgChannelSettings; @@ -341,7 +341,6 @@ bool AFCWorker::updateChannelOffset(ChannelAPI *channelAPI, int direction, int o .arg(jsonSettingsStr); swgChannelSettings.fromJson(jsonStr); - channelAPI->setFeatureSettingsFeedbackBlockCount(1); int httpRC = m_webAPIAdapterInterface->devicesetChannelSettingsPutPatch( m_trackedDeviceSet->getIndex(), channelAPI->getIndexInDeviceSet(), diff --git a/sdrbase/channel/channelapi.cpp b/sdrbase/channel/channelapi.cpp index e349e3995..92fcccd1e 100644 --- a/sdrbase/channel/channelapi.cpp +++ b/sdrbase/channel/channelapi.cpp @@ -21,7 +21,6 @@ #include "channelapi.h" ChannelAPI::ChannelAPI(const QString& uri, StreamType streamType) : - m_featuresSettingsFeedbackBlockCount(0), m_streamType(streamType), m_name(uri), m_uri(uri), @@ -30,14 +29,3 @@ ChannelAPI::ChannelAPI(const QString& uri, StreamType streamType) : m_deviceAPI(0), m_uid(UidCalculator::getNewObjectId()) { } - -void ChannelAPI::addFeatureSettingsFeedback(Feature *feature) -{ - m_featuresSettingsFeedback.removeOne(feature); - m_featuresSettingsFeedback.append(feature); -} - -void ChannelAPI::removeFeatureSettingsFeedback(Feature *feature) -{ - m_featuresSettingsFeedback.removeOne(feature); -} diff --git a/sdrbase/channel/channelapi.h b/sdrbase/channel/channelapi.h index ce17445ed..c9bcf4862 100644 --- a/sdrbase/channel/channelapi.h +++ b/sdrbase/channel/channelapi.h @@ -119,21 +119,12 @@ public: void setDeviceAPI(DeviceAPI *deviceAPI) { m_deviceAPI = deviceAPI; } uint64_t getUID() const { return m_uid; } - // Features support - void addFeatureSettingsFeedback(Feature *feature); - void removeFeatureSettingsFeedback(Feature *feature); - void setFeatureSettingsFeedbackBlockCount(unsigned int count) { m_featuresSettingsFeedbackBlockCount = count; } - // MIMO support StreamType getStreamType() const { return m_streamType; } virtual int getNbSinkStreams() const = 0; virtual int getNbSourceStreams() const = 0; virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const = 0; -protected: - QList m_featuresSettingsFeedback; //!< list of features to report back settings changes in swagger API format - unsigned int m_featuresSettingsFeedbackBlockCount; //!< actually send feedback if 0. Decremented at each potential feedback - private: StreamType m_streamType; /** Unique identifier in a device set used for sorting. Used when there is no GUI. diff --git a/sdrbase/feature/feature.cpp b/sdrbase/feature/feature.cpp index 80cc689ac..1e4940c32 100644 --- a/sdrbase/feature/feature.cpp +++ b/sdrbase/feature/feature.cpp @@ -24,8 +24,6 @@ #include "feature.h" -MESSAGE_CLASS_DEFINITION(Feature::MsgChannelSettings, Message) - Feature::Feature(const QString& uri, WebAPIAdapterInterface *webAPIAdapterInterface) : m_webAPIAdapterInterface(webAPIAdapterInterface), m_name(uri), diff --git a/sdrbase/feature/feature.h b/sdrbase/feature/feature.h index abbe56c47..372419e21 100644 --- a/sdrbase/feature/feature.h +++ b/sdrbase/feature/feature.h @@ -25,11 +25,11 @@ #include #include "export.h" -#include "util/message.h" #include "util/messagequeue.h" class WebAPIAdapterInterface; class ChannelAPI; +class Message; namespace SWGSDRangel { @@ -43,44 +43,6 @@ namespace SWGSDRangel class SDRBASE_API Feature : public QObject { Q_OBJECT public: - class SDRBASE_API MsgChannelSettings : public Message { - MESSAGE_CLASS_DECLARATION - - public: - const ChannelAPI *getChannelAPI() const { return m_channelAPI; } - const QList& getChannelSettingsKeys() const { return m_channelSettingsKeys; } - SWGSDRangel::SWGChannelSettings *getSWGSettings() const { return m_swgSettings; } - bool getForce() const { return m_force; } - - static MsgChannelSettings* create( - const ChannelAPI *channelAPI, - const QList& channelSettingsKey, - SWGSDRangel::SWGChannelSettings *swgSettings, - bool force) - { - return new MsgChannelSettings(channelAPI, channelSettingsKey, swgSettings, force); - } - - private: - const ChannelAPI *m_channelAPI; - QList m_channelSettingsKeys; - SWGSDRangel::SWGChannelSettings *m_swgSettings; - bool m_force; - - MsgChannelSettings( - const ChannelAPI *channelAPI, - const QList& channelSettingsKeys, - SWGSDRangel::SWGChannelSettings *swgSettings, - bool force - ) : - Message(), - m_channelAPI(channelAPI), - m_channelSettingsKeys(channelSettingsKeys), - m_swgSettings(swgSettings), - m_force(force) - { } - }; - enum FeatureState { StNotStarted, //!< feature is before initialization StIdle, //!< feature is idle diff --git a/sdrbase/maincore.cpp b/sdrbase/maincore.cpp index 1219d4e8f..e8eecc955 100644 --- a/sdrbase/maincore.cpp +++ b/sdrbase/maincore.cpp @@ -46,6 +46,7 @@ MESSAGE_CLASS_DEFINITION(MainCore::MsgApplySettings, Message) MESSAGE_CLASS_DEFINITION(MainCore::MsgAddFeature, Message) MESSAGE_CLASS_DEFINITION(MainCore::MsgDeleteFeature, Message) MESSAGE_CLASS_DEFINITION(MainCore::MsgChannelReport, Message) +MESSAGE_CLASS_DEFINITION(MainCore::MsgChannelSettings, Message) MainCore::MainCore() { diff --git a/sdrbase/maincore.h b/sdrbase/maincore.h index a121ead23..cf34f48ad 100644 --- a/sdrbase/maincore.h +++ b/sdrbase/maincore.h @@ -42,6 +42,7 @@ namespace qtwebapp { namespace SWGSDRangel { class SWGChannelReport; + class SWGChannelSettings; } class SDRBASE_API MainCore @@ -436,6 +437,44 @@ public: { } }; + class SDRBASE_API MsgChannelSettings : public Message { + MESSAGE_CLASS_DECLARATION + + public: + const ChannelAPI *getChannelAPI() const { return m_channelAPI; } + const QList& getChannelSettingsKeys() const { return m_channelSettingsKeys; } + SWGSDRangel::SWGChannelSettings *getSWGSettings() const { return m_swgSettings; } + bool getForce() const { return m_force; } + + static MsgChannelSettings* create( + const ChannelAPI *channelAPI, + const QList& channelSettingsKey, + SWGSDRangel::SWGChannelSettings *swgSettings, + bool force) + { + return new MsgChannelSettings(channelAPI, channelSettingsKey, swgSettings, force); + } + + private: + const ChannelAPI *m_channelAPI; + QList m_channelSettingsKeys; + SWGSDRangel::SWGChannelSettings *m_swgSettings; + bool m_force; + + MsgChannelSettings( + const ChannelAPI *channelAPI, + const QList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings *swgSettings, + bool force + ) : + Message(), + m_channelAPI(channelAPI), + m_channelSettingsKeys(channelSettingsKeys), + m_swgSettings(swgSettings), + m_force(force) + { } + }; + MainCore(); ~MainCore(); static MainCore *instance(); diff --git a/sdrbase/pipes/messagepipesgcworker.cpp b/sdrbase/pipes/messagepipesgcworker.cpp index 1ca839232..05147eb1c 100644 --- a/sdrbase/pipes/messagepipesgcworker.cpp +++ b/sdrbase/pipes/messagepipesgcworker.cpp @@ -52,42 +52,13 @@ void MessagePipesGCWorker::processGC() QMutexLocker mlock(m_c2fMutex); QMap>::iterator fIt = m_c2fFeatures->begin(); - // check deleted channels and features - for (;fIt != m_c2fFeatures->end(); ++fIt) - { - MessagePipesCommon::ChannelRegistrationKey channelKey = fIt.key(); - const ChannelAPI *channel = channelKey.m_channel; - - if (MainCore::instance()->existsChannel(channel)) // look for deleted features - { - QList& features = fIt.value(); - int i = 0; - - while (i < features.size()) - { - if (MainCore::instance()->existsFeature(features[i])) { - i++; - } - else - { - features.removeAt(i); - m_c2fQueues->operator[](channelKey).removeAt(i); - } - } - } - else // channel was destroyed - { - QList& features = fIt.value(); - - for (int i = 0; i < features.size(); i++) - { - MessagePipesCommon::MsgReportChannelDeleted *msg = MessagePipesCommon::MsgReportChannelDeleted::create( - m_c2fQueues->operator[](channelKey)[i], channelKey); - features[i]->getInputMessageQueue()->push(msg); - } - } + // remove queues to be deleted from last run + for (QList::iterator dqIt = m_c2fQueuesToDelete.begin(); dqIt != m_c2fQueuesToDelete.end(); ++dqIt) { + delete *dqIt; } + m_c2fQueuesToDelete.clear(); + // remove keys with empty features fIt = m_c2fFeatures->begin(); @@ -111,5 +82,43 @@ void MessagePipesGCWorker::processGC() ++qIt; } } + + // check deleted channels and features + for (;fIt != m_c2fFeatures->end(); ++fIt) + { + MessagePipesCommon::ChannelRegistrationKey channelKey = fIt.key(); + const ChannelAPI *channel = channelKey.m_channel; + + if (MainCore::instance()->existsChannel(channel)) // look for deleted features + { + QList& features = fIt.value(); + int i = 0; + + while (i < features.size()) + { + if (MainCore::instance()->existsFeature(features[i])) { + i++; + } + else + { + features.removeAt(i); + MessageQueue *messageQueue = m_c2fQueues->operator[](channelKey)[i]; + m_c2fQueuesToDelete.append(messageQueue); + m_c2fQueues->operator[](channelKey).removeAt(i); + } + } + } + else // channel was destroyed + { + QList& features = fIt.value(); + + for (int i = 0; i < features.size(); i++) + { + MessagePipesCommon::MsgReportChannelDeleted *msg = MessagePipesCommon::MsgReportChannelDeleted::create( + m_c2fQueues->operator[](channelKey)[i], channelKey); + features[i]->getInputMessageQueue()->push(msg); + } + } + } } } diff --git a/sdrbase/pipes/messagepipesgcworker.h b/sdrbase/pipes/messagepipesgcworker.h index 2f2c198cc..a57dc6f3e 100644 --- a/sdrbase/pipes/messagepipesgcworker.h +++ b/sdrbase/pipes/messagepipesgcworker.h @@ -52,8 +52,9 @@ public: private: bool m_running; QMutex *m_c2fMutex; - QMap> *m_c2fQueues ; + QMap> *m_c2fQueues; QMap> *m_c2fFeatures; + QList m_c2fQueuesToDelete; QTimer m_gcTimer; private slots: