1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 23:55:13 -05:00

AFC: implemented message pipes for sending back channel settings. Implemented in all relevant channel plugins. Removed obsolete methods

This commit is contained in:
f4exb 2020-12-13 13:04:36 +01:00
parent b64f539f8c
commit ee0e5fc777
103 changed files with 971 additions and 916 deletions

View File

@ -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<MessageQueue*> *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<QString>& channelSetting
delete swgChannelSettings;
}
void BeamSteeringCWMod::featuresSendSettings(QList<QString>& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force)
void BeamSteeringCWMod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const BeamSteeringCWModSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -163,7 +163,12 @@ private:
static void validateFilterChainHash(BeamSteeringCWModSettings& settings);
void calculateFrequencyOffset();
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const BeamSteeringCWModSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKe
delete swgChannelSettings;
}
void Interferometer::featuresSendSettings(QList<QString>& channelSettingsKeys, const InterferometerSettings& settings, bool force)
void Interferometer::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const InterferometerSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -168,7 +168,12 @@ private:
static void validateFilterChainHash(InterferometerSettings& settings);
void calculateFrequencyOffset();
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const InterferometerSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const InterferometerSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const InterferometerSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, con
delete swgChannelSettings;
}
void AMDemod::featuresSendSettings(QList<QString>& channelSettingsKeys, const AMDemodSettings& settings, bool force)
void AMDemod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const AMDemodSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -142,7 +142,12 @@ private:
void applySettings(const AMDemodSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const AMDemodSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const AMDemodSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const AMDemodSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, co
delete swgChannelSettings;
}
void BFMDemod::featuresSendSettings(QList<QString>& channelSettingsKeys, const BFMDemodSettings& settings, bool force)
void BFMDemod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const BFMDemodSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -158,7 +158,12 @@ private:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiFormatRDSReport(SWGSDRangel::SWGRDSReport *report);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const BFMDemodSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const BFMDemodSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const BFMDemodSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKe
delete swgChannelSettings;
}
void ChirpChatDemod::featuresSendSettings(QList<QString>& channelSettingsKeys, const ChirpChatDemodSettings& settings, bool force)
void ChirpChatDemod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const ChirpChatDemodSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -290,7 +290,12 @@ private:
void applySettings(const ChirpChatDemodSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const ChirpChatDemodSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const ChirpChatDemodSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const ChirpChatDemodSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, co
delete swgChannelSettings;
}
void DSDDemod::featuresSendSettings(QList<QString>& channelSettingsKeys, const DSDDemodSettings& settings, bool force)
void DSDDemod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const DSDDemodSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -140,7 +140,12 @@ private:
void applySettings(const DSDDemodSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DSDDemodSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const DSDDemodSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const DSDDemodSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys,
delete swgChannelSettings;
}
void FreeDVDemod::featuresSendSettings(QList<QString>& channelSettingsKeys, const FreeDVDemodSettings& settings, bool force)
void FreeDVDemod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const FreeDVDemodSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -159,7 +159,12 @@ private:
void applySettings(const FreeDVDemodSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const FreeDVDemodSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const FreeDVDemodSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const FreeDVDemodSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -235,6 +235,12 @@ void NFMDemod::applySettings(const NFMDemodSettings& settings, bool force)
webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force);
}
QList<MessageQueue*> *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<QString>& channelSettingsKeys, co
delete swgChannelSettings;
}
void NFMDemod::featuresSendSettings(QList<QString>& channelSettingsKeys, const NFMDemodSettings& settings, bool force)
void NFMDemod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const NFMDemodSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -141,7 +141,12 @@ private:
void applySettings(const NFMDemodSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const NFMDemodSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const NFMDemodSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const NFMDemodSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, co
delete swgChannelSettings;
}
void SSBDemod::featuresSendSettings(QList<QString>& channelSettingsKeys, const SSBDemodSettings& settings, bool force)
void SSBDemod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const SSBDemodSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -144,7 +144,12 @@ private:
void applySettings(const SSBDemodSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const SSBDemodSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const SSBDemodSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const SSBDemodSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, co
delete swgChannelSettings;
}
void VORDemod::featuresSendSettings(QList<QString>& channelSettingsKeys, const VORDemodSettings& settings, bool force)
void VORDemod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const VORDemodSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -144,7 +144,12 @@ private:
void applySettings(const VORDemodSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const VORDemodSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const VORDemodSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const VORDemodSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys,
delete swgChannelSettings;
}
void VORDemodSC::featuresSendSettings(QList<QString>& channelSettingsKeys, const VORDemodSCSettings& settings, bool force)
void VORDemodSC::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const VORDemodSCSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -145,7 +145,12 @@ private:
void applySettings(const VORDemodSCSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const VORDemodSCSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const VORDemodSCSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const VORDemodSCSettings& settings,
bool force
);
void sendChannelReport(QList<MessageQueue*> *messageQueues);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, co
delete swgChannelSettings;
}
void WFMDemod::featuresSendSettings(QList<QString>& channelSettingsKeys, const WFMDemodSettings& settings, bool force)
void WFMDemod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const WFMDemodSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -137,7 +137,12 @@ private:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const WFMDemodSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const WFMDemodSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const WFMDemodSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, co
delete swgChannelSettings;
}
void FileSink::featuresSendSettings(QList<QString>& channelSettingsKeys, const FileSinkSettings& settings, bool force)
void FileSink::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const FileSinkSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -148,7 +148,12 @@ private:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const FileSinkSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const FileSinkSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const FileSinkSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys,
delete swgChannelSettings;
}
void FreqTracker::featuresSendSettings(QList<QString>& channelSettingsKeys, const FreqTrackerSettings& settings, bool force)
void FreqTracker::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const FreqTrackerSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -142,7 +142,12 @@ private:
void applySettings(const FreqTrackerSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const FreqTrackerSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const FreqTrackerSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const FreqTrackerSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, c
delete swgChannelSettings;
}
void LocalSink::featuresSendSettings(QList<QString>& channelSettingsKeys, const LocalSinkSettings& settings, bool force)
void LocalSink::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const LocalSinkSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -154,7 +154,12 @@ private:
DeviceSampleSource *getLocalDevice(uint32_t index);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const LocalSinkSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const LocalSinkSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const LocalSinkSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys,
delete swgChannelSettings;
}
void RemoteSink::featuresSendSettings(QList<QString>& channelSettingsKeys, const RemoteSinkSettings& settings, bool force)
void RemoteSink::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const RemoteSinkSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -133,7 +133,12 @@ private:
static void validateFilterChainHash(RemoteSinkSettings& settings);
void calculateFrequencyOffset();
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const RemoteSinkSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const RemoteSinkSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const RemoteSinkSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKey
delete swgChannelSettings;
}
void SigMFFileSink::featuresSendSettings(QList<QString>& channelSettingsKeys, const SigMFFileSinkSettings& settings, bool force)
void SigMFFileSink::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const SigMFFileSinkSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -148,7 +148,12 @@ private:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const SigMFFileSinkSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const SigMFFileSinkSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const SigMFFileSinkSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, con
delete swgChannelSettings;
}
void UDPSink::featuresSendSettings(QList<QString>& channelSettingsKeys, const UDPSinkSettings& settings, bool force)
void UDPSink::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const UDPSinkSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -145,7 +145,12 @@ protected:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const UDPSinkSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const UDPSinkSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const UDPSinkSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys,
delete swgChannelSettings;
}
void FileSource::featuresSendSettings(QList<QString>& channelSettingsKeys, const FileSourceSettings& settings, bool force)
void FileSource::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const FileSourceSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -253,7 +253,12 @@ private:
void calculateFrequencyOffset();
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const FileSourceSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const FileSourceSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const FileSourceSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys,
delete swgChannelSettings;
}
void LocalSource::featuresSendSettings(QList<QString>& channelSettingsKeys, const LocalSourceSettings& settings, bool force)
void LocalSource::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const LocalSourceSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -151,7 +151,12 @@ private:
DeviceSampleSink *getLocalDevice(uint32_t index);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const LocalSourceSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const LocalSourceSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const LocalSourceSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSetting
delete swgChannelSettings;
}
void IEEE_802_15_4_Mod::featuresSendSettings(QList<QString>& channelSettingsKeys, const IEEE_802_15_4_ModSettings& settings, bool force)
void IEEE_802_15_4_Mod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const IEEE_802_15_4_ModSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -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<QString>& channelSettingsKeys, const IEEE_802_15_4_ModSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const IEEE_802_15_4_ModSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const IEEE_802_15_4_ModSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, const AMModSettings& settings, bool force)
void AMMod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const AMModSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -260,7 +260,12 @@ private:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const AMModSettings& settings, bool force);
void webapiReverseSendCWSettings(const CWKeyerSettings& settings);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const AMModSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const AMModSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, cons
delete swgChannelSettings;
}
void ATVMod::featuresSendSettings(QList<QString>& channelSettingsKeys, const ATVModSettings& settings, bool force)
void ATVMod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const ATVModSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -316,7 +316,12 @@ private:
void applySettings(const ATVModSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const ATVModSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const ATVModSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const ATVModSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys
delete swgChannelSettings;
}
void ChirpChatMod::featuresSendSettings(QList<QString>& channelSettingsKeys, const ChirpChatModSettings& settings, bool force)
void ChirpChatMod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const ChirpChatModSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -163,7 +163,12 @@ private:
void applySettings(const ChirpChatModSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const ChirpChatModSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const ChirpChatModSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const ChirpChatModSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, const FreeDVModSettings& settings, bool force)
void FreeDVMod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const FreeDVModSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -268,7 +268,12 @@ private:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const FreeDVModSettings& settings, bool force);
void webapiReverseSendCWSettings(const CWKeyerSettings& settings);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const FreeDVModSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const FreeDVModSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, const NFMModSettings& settings, bool force)
void NFMMod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const NFMModSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -260,7 +260,12 @@ private:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const NFMModSettings& settings, bool force);
void webapiReverseSendCWSettings(const CWKeyerSettings& settings);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const NFMModSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const NFMModSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, c
delete swgChannelSettings;
}
void PacketMod::featuresSendSettings(QList<QString>& channelSettingsKeys, const PacketModSettings& settings, bool force)
void PacketMod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const PacketModSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -178,7 +178,12 @@ private:
void applySettings(const PacketModSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const PacketModSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const PacketModSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const PacketModSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, const SSBModSettings& settings, bool force)
void SSBMod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const SSBModSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -264,7 +264,12 @@ private:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const SSBModSettings& settings, bool force);
void webapiReverseSendCWSettings(const CWKeyerSettings& settings);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const SSBModSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const SSBModSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, const WFMModSettings& settings, bool force)
void WFMMod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const WFMModSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -272,7 +272,12 @@ private:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const WFMModSettings& settings, bool force);
void webapiReverseSendCWSettings(const CWKeyerSettings& settings);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const WFMModSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const WFMModSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys
delete swgChannelSettings;
}
void RemoteSource::featuresSendSettings(QList<QString>& channelSettingsKeys, const RemoteSourceSettings& settings, bool force)
void RemoteSource::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const RemoteSourceSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -221,7 +221,12 @@ private:
void applySettings(const RemoteSourceSettings& settings, bool force = false);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const RemoteSourceSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const RemoteSourceSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const RemoteSourceSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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<MessageQueue*> *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<QString>& channelSettingsKeys, c
delete swgChannelSettings;
}
void UDPSource::featuresSendSettings(QList<QString>& channelSettingsKeys, const UDPSourceSettings& settings, bool force)
void UDPSource::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const UDPSourceSettings& settings,
bool force)
{
QList<Feature*>::iterator it = m_featuresSettingsFeedback.begin();
MainCore *mainCore = MainCore::instance();
QList<MessageQueue*>::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);
}
}

View File

@ -175,7 +175,12 @@ private:
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const UDPSourceSettings& settings, bool force);
void featuresSendSettings(QList<QString>& channelSettingsKeys, const UDPSourceSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const UDPSourceSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,

View File

@ -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,

View File

@ -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;
}
}
}

View File

@ -178,6 +178,7 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessageQueue(MessageQueue* messageQueue);
};
#endif // INCLUDE_FEATURE_AFC_H_

View File

@ -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,

View File

@ -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(),

View File

@ -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);
}

View File

@ -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<Feature*> 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.

View File

@ -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),

View File

@ -25,11 +25,11 @@
#include <QByteArray>
#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<QString>& 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<QString>& channelSettingsKey,
SWGSDRangel::SWGChannelSettings *swgSettings,
bool force)
{
return new MsgChannelSettings(channelAPI, channelSettingsKey, swgSettings, force);
}
private:
const ChannelAPI *m_channelAPI;
QList<QString> m_channelSettingsKeys;
SWGSDRangel::SWGChannelSettings *m_swgSettings;
bool m_force;
MsgChannelSettings(
const ChannelAPI *channelAPI,
const QList<QString>& 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

View File

@ -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()
{

Some files were not shown because too many files have changed in this diff Show More