diff --git a/plugins/channelrx/chanalyzer/chanalyzer.cpp b/plugins/channelrx/chanalyzer/chanalyzer.cpp index 985a909be..6e73f632f 100644 --- a/plugins/channelrx/chanalyzer/chanalyzer.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzer.cpp @@ -29,14 +29,15 @@ MESSAGE_CLASS_DEFINITION(ChannelAnalyzer::MsgConfigureChannelAnalyzer, Message) MESSAGE_CLASS_DEFINITION(ChannelAnalyzer::MsgConfigureChannelizer, Message) MESSAGE_CLASS_DEFINITION(ChannelAnalyzer::MsgReportChannelSampleRateChanged, Message) -const QString ChannelAnalyzer::m_channelID = "org.f4exb.sdrangelove.channel.chanalyzer"; +const QString ChannelAnalyzer::m_channelIdURI = "org.f4exb.sdrangelove.channel.chanalyzer"; +const QString ChannelAnalyzer::m_channelId = "ChannelAnalyzer"; ChannelAnalyzer::ChannelAnalyzer(DeviceSourceAPI *deviceAPI) : m_deviceAPI(deviceAPI), m_sampleSink(0), m_settingsMutex(QMutex::Recursive) { - setObjectName("ChannelAnalyzer"); + setObjectName(m_channelId); m_Bandwidth = 5000; m_LowCutoff = 300; diff --git a/plugins/channelrx/chanalyzer/chanalyzer.h b/plugins/channelrx/chanalyzer/chanalyzer.h index c9367c902..a6009c354 100644 --- a/plugins/channelrx/chanalyzer/chanalyzer.h +++ b/plugins/channelrx/chanalyzer/chanalyzer.h @@ -129,7 +129,8 @@ public: virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getTitle(QString& title) { title = objectName(); } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; private slots: void channelSampleRateChanged(); diff --git a/plugins/channelrx/chanalyzer/chanalyzergui.cpp b/plugins/channelrx/chanalyzer/chanalyzergui.cpp index b3cdc4cd1..d68e7b01e 100644 --- a/plugins/channelrx/chanalyzer/chanalyzergui.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzergui.cpp @@ -367,7 +367,7 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *device m_channelMarker.setVisible(true); // activate signal on the last setting only setTitleColor(m_channelMarker.getColor()); - m_deviceUISet->registerRxChannelInstance(ChannelAnalyzer::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(ChannelAnalyzer::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp b/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp index b650a629f..cd391a3b3 100644 --- a/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp @@ -8,7 +8,7 @@ const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = { QString("Channel Analyzer"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -31,12 +31,12 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register demodulator - m_pluginAPI->registerRxChannel(ChannelAnalyzer::m_channelID, this); + m_pluginAPI->registerRxChannel(ChannelAnalyzer::m_channelIdURI, ChannelAnalyzer::m_channelId, this); } PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == ChannelAnalyzer::m_channelID) + if(channelName == ChannelAnalyzer::m_channelIdURI) { ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet, rxChannel); return gui; @@ -48,7 +48,7 @@ PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(const QString& chan BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == ChannelAnalyzer::m_channelID) + if(channelName == ChannelAnalyzer::m_channelIdURI) { ChannelAnalyzer* sink = new ChannelAnalyzer(deviceAPI); return sink; diff --git a/plugins/channelrx/chanalyzerng/chanalyzerng.cpp b/plugins/channelrx/chanalyzerng/chanalyzerng.cpp index e3d519f2f..997485dfd 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzerng.cpp +++ b/plugins/channelrx/chanalyzerng/chanalyzerng.cpp @@ -29,14 +29,15 @@ MESSAGE_CLASS_DEFINITION(ChannelAnalyzerNG::MsgConfigureChannelAnalyzer, Message MESSAGE_CLASS_DEFINITION(ChannelAnalyzerNG::MsgConfigureChannelizer, Message) MESSAGE_CLASS_DEFINITION(ChannelAnalyzerNG::MsgReportChannelSampleRateChanged, Message) -const QString ChannelAnalyzerNG::m_channelID = "sdrangel.channel.chanalyzerng"; +const QString ChannelAnalyzerNG::m_channelIdURI = "sdrangel.channel.chanalyzerng"; +const QString ChannelAnalyzerNG::m_channelId = "ChannelAnalyzerNG"; ChannelAnalyzerNG::ChannelAnalyzerNG(DeviceSourceAPI *deviceAPI) : m_deviceAPI(deviceAPI), m_sampleSink(0), m_settingsMutex(QMutex::Recursive) { - setObjectName("ChannelAnalyzerNG"); + setObjectName(m_channelId); m_undersampleCount = 0; m_sum = 0; diff --git a/plugins/channelrx/chanalyzerng/chanalyzerng.h b/plugins/channelrx/chanalyzerng/chanalyzerng.h index cb6f17bb6..79b2036ae 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzerng.h +++ b/plugins/channelrx/chanalyzerng/chanalyzerng.h @@ -148,7 +148,8 @@ public: virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getTitle(QString& title) { title = objectName(); } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; private: diff --git a/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp b/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp index 5ddacb911..6bc2a3561 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp +++ b/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp @@ -430,7 +430,7 @@ ChannelAnalyzerNGGUI::ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceUISet *de m_channelMarker.setVisible(true); // activate signal on the last setting only setTitleColor(m_channelMarker.getColor()); - m_deviceUISet->registerRxChannelInstance(ChannelAnalyzerNG::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(ChannelAnalyzerNG::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp b/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp index 5d45339de..66e3a80de 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp +++ b/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp @@ -23,7 +23,7 @@ const PluginDescriptor ChannelAnalyzerNGPlugin::m_pluginDescriptor = { QString("Channel Analyzer NG"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -46,12 +46,12 @@ void ChannelAnalyzerNGPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register demodulator - m_pluginAPI->registerRxChannel(ChannelAnalyzerNG::m_channelID, this); + m_pluginAPI->registerRxChannel(ChannelAnalyzerNG::m_channelIdURI, ChannelAnalyzerNG::m_channelId, this); } PluginInstanceGUI* ChannelAnalyzerNGPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == ChannelAnalyzerNG::m_channelID) + if(channelName == ChannelAnalyzerNG::m_channelIdURI) { ChannelAnalyzerNGGUI* gui = ChannelAnalyzerNGGUI::create(m_pluginAPI, deviceUISet, rxChannel); return gui; @@ -62,7 +62,7 @@ PluginInstanceGUI* ChannelAnalyzerNGPlugin::createRxChannelGUI(const QString& ch BasebandSampleSink* ChannelAnalyzerNGPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == ChannelAnalyzerNG::m_channelID) + if(channelName == ChannelAnalyzerNG::m_channelIdURI) { ChannelAnalyzerNG* sink = new ChannelAnalyzerNG(deviceAPI); return sink; diff --git a/plugins/channelrx/demodam/amdemod.cpp b/plugins/channelrx/demodam/amdemod.cpp index e08c6a505..a0d5de31c 100644 --- a/plugins/channelrx/demodam/amdemod.cpp +++ b/plugins/channelrx/demodam/amdemod.cpp @@ -32,7 +32,8 @@ MESSAGE_CLASS_DEFINITION(AMDemod::MsgConfigureAMDemod, Message) MESSAGE_CLASS_DEFINITION(AMDemod::MsgConfigureChannelizer, Message) -const QString AMDemod::m_channelID = "de.maintech.sdrangelove.channel.am"; +const QString AMDemod::m_channelIdURI = "de.maintech.sdrangelove.channel.am"; +const QString AMDemod::m_channelId = "AMDemod"; const int AMDemod::m_udpBlockSize = 512; AMDemod::AMDemod(DeviceSourceAPI *deviceAPI) : @@ -47,7 +48,7 @@ AMDemod::AMDemod(DeviceSourceAPI *deviceAPI) : m_audioFifo(48000), m_settingsMutex(QMutex::Recursive) { - setObjectName("AMDemod"); + setObjectName(m_channelId); m_audioBuffer.resize(1<<14); m_audioBufferFill = 0; diff --git a/plugins/channelrx/demodam/amdemod.h b/plugins/channelrx/demodam/amdemod.h index b1ee1562b..3a5284a31 100644 --- a/plugins/channelrx/demodam/amdemod.h +++ b/plugins/channelrx/demodam/amdemod.h @@ -109,7 +109,8 @@ public: m_magsqCount = 0; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; private: enum RateState { diff --git a/plugins/channelrx/demodam/amdemodgui.cpp b/plugins/channelrx/demodam/amdemodgui.cpp index 94bea1cb4..6302d7a26 100644 --- a/plugins/channelrx/demodam/amdemodgui.cpp +++ b/plugins/channelrx/demodam/amdemodgui.cpp @@ -217,7 +217,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS setTitleColor(m_channelMarker.getColor()); m_settings.setChannelMarker(&m_channelMarker); - m_deviceUISet->registerRxChannelInstance(AMDemod::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(AMDemod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/demodam/amdemodplugin.cpp b/plugins/channelrx/demodam/amdemodplugin.cpp index 8a22ce4bb..3092d48dd 100644 --- a/plugins/channelrx/demodam/amdemodplugin.cpp +++ b/plugins/channelrx/demodam/amdemodplugin.cpp @@ -8,7 +8,7 @@ const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = { QString("AM Demodulator"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -31,12 +31,12 @@ void AMDemodPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register AM demodulator - m_pluginAPI->registerRxChannel(AMDemod::m_channelID, this); + m_pluginAPI->registerRxChannel(AMDemod::m_channelIdURI, AMDemod::m_channelId, this); } PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == AMDemod::m_channelID) + if(channelName == AMDemod::m_channelIdURI) { AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); return gui; @@ -47,7 +47,7 @@ PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(const QString& channelName, BasebandSampleSink* AMDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == AMDemod::m_channelID) + if(channelName == AMDemod::m_channelIdURI) { AMDemod* sink = new AMDemod(deviceAPI); return sink; diff --git a/plugins/channelrx/demodatv/atvdemod.cpp b/plugins/channelrx/demodatv/atvdemod.cpp index 45ed15b1c..6e1425211 100644 --- a/plugins/channelrx/demodatv/atvdemod.cpp +++ b/plugins/channelrx/demodatv/atvdemod.cpp @@ -35,7 +35,8 @@ MESSAGE_CLASS_DEFINITION(ATVDemod::MsgReportEffectiveSampleRate, Message) MESSAGE_CLASS_DEFINITION(ATVDemod::MsgConfigureChannelizer, Message) MESSAGE_CLASS_DEFINITION(ATVDemod::MsgReportChannelSampleRateChanged, Message) -const QString ATVDemod::m_channelID = "sdrangel.channel.demodatv"; +const QString ATVDemod::m_channelIdURI = "sdrangel.channel.demodatv"; +const QString ATVDemod::m_channelId = "ATVDemod"; const int ATVDemod::m_ssbFftLen = 1024; ATVDemod::ATVDemod(DeviceSourceAPI *deviceAPI) : @@ -68,7 +69,7 @@ ATVDemod::ATVDemod(DeviceSourceAPI *deviceAPI) : m_DSBFilterBufferIndex(0), m_objSettingsMutex(QMutex::Recursive) { - setObjectName("ATVDemod"); + setObjectName(m_channelId); //*************** ATV PARAMETERS *************** //m_intNumberSamplePerLine=0; diff --git a/plugins/channelrx/demodatv/atvdemod.h b/plugins/channelrx/demodatv/atvdemod.h index 6100a8071..f0f734966 100644 --- a/plugins/channelrx/demodatv/atvdemod.h +++ b/plugins/channelrx/demodatv/atvdemod.h @@ -233,7 +233,8 @@ public: double getMagSq() const { return m_objMagSqAverage.average(); } //!< Beware this is scaled to 2^30 bool getBFOLocked(); - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; private slots: void channelSampleRateChanged(); diff --git a/plugins/channelrx/demodatv/atvdemodgui.cpp b/plugins/channelrx/demodatv/atvdemodgui.cpp index 072a0ad7f..365ccb329 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.cpp +++ b/plugins/channelrx/demodatv/atvdemodgui.cpp @@ -304,7 +304,7 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base setTitleColor(m_channelMarker.getColor()); - m_deviceUISet->registerRxChannelInstance(ATVDemod::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(ATVDemod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/demodatv/atvdemodplugin.cpp b/plugins/channelrx/demodatv/atvdemodplugin.cpp index 4bcae7d04..ba453aa4f 100644 --- a/plugins/channelrx/demodatv/atvdemodplugin.cpp +++ b/plugins/channelrx/demodatv/atvdemodplugin.cpp @@ -27,7 +27,7 @@ const PluginDescriptor ATVDemodPlugin::m_ptrPluginDescriptor = { QString("ATV Demodulator"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) F4HKW for F4EXB / SDRAngel"), QString("https://github.com/f4exb/sdrangel"), true, @@ -51,12 +51,12 @@ void ATVDemodPlugin::initPlugin(PluginAPI* ptrPluginAPI) m_ptrPluginAPI = ptrPluginAPI; // register ATV demodulator - m_ptrPluginAPI->registerRxChannel(ATVDemod::m_channelID, this); + m_ptrPluginAPI->registerRxChannel(ATVDemod::m_channelIdURI, ATVDemod::m_channelId, this); } PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(strChannelName == ATVDemod::m_channelID) + if(strChannelName == ATVDemod::m_channelIdURI) { ATVDemodGUI* ptrGui = ATVDemodGUI::create(m_ptrPluginAPI, deviceUISet, rxChannel); return ptrGui; @@ -69,7 +69,7 @@ PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(const QString& strChannelN BasebandSampleSink* ATVDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == ATVDemod::m_channelID) + if(channelName == ATVDemod::m_channelIdURI) { ATVDemod* sink = new ATVDemod(deviceAPI); return sink; diff --git a/plugins/channelrx/demodbfm/bfmdemod.cpp b/plugins/channelrx/demodbfm/bfmdemod.cpp index 7f327b9fa..ae91ad8ee 100644 --- a/plugins/channelrx/demodbfm/bfmdemod.cpp +++ b/plugins/channelrx/demodbfm/bfmdemod.cpp @@ -34,7 +34,8 @@ MESSAGE_CLASS_DEFINITION(BFMDemod::MsgConfigureChannelizer, Message) MESSAGE_CLASS_DEFINITION(BFMDemod::MsgReportChannelSampleRateChanged, Message) MESSAGE_CLASS_DEFINITION(BFMDemod::MsgConfigureBFMDemod, Message) -const QString BFMDemod::m_channelID = "sdrangel.channel.bfm"; +const QString BFMDemod::m_channelIdURI = "sdrangel.channel.bfm"; +const QString BFMDemod::m_channelId = "BFMDemod"; const Real BFMDemod::default_deemphasis = 50.0; // 50 us const int BFMDemod::m_udpBlockSize = 512; @@ -48,7 +49,7 @@ BFMDemod::BFMDemod(DeviceSourceAPI *deviceAPI) : m_deemphasisFilterY(default_deemphasis * 48000 * 1.0e-6), m_fmExcursion(default_excursion) { - setObjectName("BFMDemod"); + setObjectName(m_channelId); m_magsq = 0.0f; m_magsqSum = 0.0f; diff --git a/plugins/channelrx/demodbfm/bfmdemod.h b/plugins/channelrx/demodbfm/bfmdemod.h index 4979dccce..c9f321508 100644 --- a/plugins/channelrx/demodbfm/bfmdemod.h +++ b/plugins/channelrx/demodbfm/bfmdemod.h @@ -150,7 +150,8 @@ public: RDSParser& getRDSParser() { return m_rdsParser; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; private: enum RateState { diff --git a/plugins/channelrx/demodbfm/bfmdemodgui.cpp b/plugins/channelrx/demodbfm/bfmdemodgui.cpp index 8071c1c3e..0a298aa90 100644 --- a/plugins/channelrx/demodbfm/bfmdemodgui.cpp +++ b/plugins/channelrx/demodbfm/bfmdemodgui.cpp @@ -372,7 +372,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban m_settings.setChannelMarker(&m_channelMarker); m_settings.setSpectrumGUI(ui->spectrumGUI); - m_deviceUISet->registerRxChannelInstance(BFMDemod::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(BFMDemod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/demodbfm/bfmplugin.cpp b/plugins/channelrx/demodbfm/bfmplugin.cpp index 2663a84b1..65a5dafaf 100644 --- a/plugins/channelrx/demodbfm/bfmplugin.cpp +++ b/plugins/channelrx/demodbfm/bfmplugin.cpp @@ -25,7 +25,7 @@ const PluginDescriptor BFMPlugin::m_pluginDescriptor = { QString("Broadcast FM Demodulator"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -48,12 +48,12 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register BFM demodulator - m_pluginAPI->registerRxChannel(BFMDemod::m_channelID, this); + m_pluginAPI->registerRxChannel(BFMDemod::m_channelIdURI, BFMDemod::m_channelId, this); } PluginInstanceGUI* BFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == BFMDemod::m_channelID) + if(channelName == BFMDemod::m_channelIdURI) { BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); return gui; @@ -65,7 +65,7 @@ PluginInstanceGUI* BFMPlugin::createRxChannelGUI(const QString& channelName, Dev BasebandSampleSink* BFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == BFMDemod::m_channelID) + if(channelName == BFMDemod::m_channelIdURI) { BFMDemod* sink = new BFMDemod(deviceAPI); return sink; diff --git a/plugins/channelrx/demoddsd/dsddemod.cpp b/plugins/channelrx/demoddsd/dsddemod.cpp index ca159baac..9e397cd0b 100644 --- a/plugins/channelrx/demoddsd/dsddemod.cpp +++ b/plugins/channelrx/demoddsd/dsddemod.cpp @@ -35,7 +35,8 @@ MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureChannelizer, Message) MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureDSDDemod, Message) MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureMyPosition, Message) -const QString DSDDemod::m_channelID = "sdrangel.channel.dsddemod"; +const QString DSDDemod::m_channelIdURI = "sdrangel.channel.dsddemod"; +const QString DSDDemod::m_channelId = "DSDDemod"; const int DSDDemod::m_udpBlockSize = 512; DSDDemod::DSDDemod(DeviceSourceAPI *deviceAPI) : @@ -57,7 +58,7 @@ DSDDemod::DSDDemod(DeviceSourceAPI *deviceAPI) : m_dsdDecoder(), m_settingsMutex(QMutex::Recursive) { - setObjectName("DSDDemod"); + setObjectName(m_channelId); m_audioBuffer.resize(1<<14); m_audioBufferFill = 0; diff --git a/plugins/channelrx/demoddsd/dsddemod.h b/plugins/channelrx/demoddsd/dsddemod.h index 62b973951..17de5e585 100644 --- a/plugins/channelrx/demoddsd/dsddemod.h +++ b/plugins/channelrx/demoddsd/dsddemod.h @@ -121,7 +121,8 @@ public: m_magsqCount = 0; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; private: class MsgConfigureMyPosition : public Message { diff --git a/plugins/channelrx/demoddsd/dsddemodgui.cpp b/plugins/channelrx/demoddsd/dsddemodgui.cpp index 858da1592..00e8a5663 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.cpp +++ b/plugins/channelrx/demoddsd/dsddemodgui.cpp @@ -292,7 +292,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban m_channelMarker.blockSignals(false); m_channelMarker.setVisible(true); // activate signal on the last setting only - m_deviceUISet->registerRxChannelInstance(DSDDemod::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(DSDDemod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.cpp b/plugins/channelrx/demoddsd/dsddemodplugin.cpp index 05e07b91f..cc1845442 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.cpp +++ b/plugins/channelrx/demoddsd/dsddemodplugin.cpp @@ -25,7 +25,7 @@ const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = { QString("DSD Demodulator"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -48,12 +48,12 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register DSD demodulator - m_pluginAPI->registerRxChannel(DSDDemod::m_channelID, this); + m_pluginAPI->registerRxChannel(DSDDemod::m_channelIdURI, DSDDemod::m_channelId, this); } PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == DSDDemod::m_channelID) + if(channelName == DSDDemod::m_channelIdURI) { DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); return gui; @@ -64,7 +64,7 @@ PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(const QString& channelName BasebandSampleSink* DSDDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == DSDDemod::m_channelID) + if(channelName == DSDDemod::m_channelIdURI) { DSDDemod* sink = new DSDDemod(deviceAPI); return sink; diff --git a/plugins/channelrx/demodlora/lorademod.cpp b/plugins/channelrx/demodlora/lorademod.cpp index 0430e2b20..31db66894 100644 --- a/plugins/channelrx/demodlora/lorademod.cpp +++ b/plugins/channelrx/demodlora/lorademod.cpp @@ -31,14 +31,15 @@ MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgConfigureLoRaDemod, Message) MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgConfigureChannelizer, Message) -const QString LoRaDemod::m_channelID = "de.maintech.sdrangelove.channel.lora"; +const QString LoRaDemod::m_channelIdURI = "de.maintech.sdrangelove.channel.lora"; +const QString LoRaDemod::m_channelId = "LoRaDemod"; LoRaDemod::LoRaDemod(DeviceSourceAPI* deviceAPI) : m_deviceAPI(deviceAPI), m_sampleSink(0), m_settingsMutex(QMutex::Recursive) { - setObjectName("LoRaDemod"); + setObjectName(m_channelId); m_Bandwidth = LoRaDemodSettings::bandwidths[0]; m_sampleRate = 96000; diff --git a/plugins/channelrx/demodlora/lorademod.h b/plugins/channelrx/demodlora/lorademod.h index 998c54efe..204b04f29 100644 --- a/plugins/channelrx/demodlora/lorademod.h +++ b/plugins/channelrx/demodlora/lorademod.h @@ -101,7 +101,8 @@ public: virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getTitle(QString& title) { title = m_settings.m_title; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; private: int detect(Complex sample, Complex angle); diff --git a/plugins/channelrx/demodlora/lorademodgui.cpp b/plugins/channelrx/demodlora/lorademodgui.cpp index 7c732eb51..82dfa464d 100644 --- a/plugins/channelrx/demodlora/lorademodgui.cpp +++ b/plugins/channelrx/demodlora/lorademodgui.cpp @@ -131,7 +131,7 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(viewChanged())); - m_deviceUISet->registerRxChannelInstance(LoRaDemod::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(LoRaDemod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/demodlora/loraplugin.cpp b/plugins/channelrx/demodlora/loraplugin.cpp index e57036aa0..3c87a9a8b 100644 --- a/plugins/channelrx/demodlora/loraplugin.cpp +++ b/plugins/channelrx/demodlora/loraplugin.cpp @@ -7,7 +7,7 @@ const PluginDescriptor LoRaPlugin::m_pluginDescriptor = { QString("LoRa Demodulator"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) 2015 John Greb"), QString("http://www.maintech.de"), true, @@ -30,12 +30,12 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register demodulator - m_pluginAPI->registerRxChannel(LoRaDemod::m_channelID, this); + m_pluginAPI->registerRxChannel(LoRaDemod::m_channelIdURI, LoRaDemod::m_channelId, this); } PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == LoRaDemod::m_channelID) + if(channelName == LoRaDemod::m_channelIdURI) { LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); return gui; @@ -46,7 +46,7 @@ PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(const QString& channelName, De BasebandSampleSink* LoRaPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == LoRaDemod::m_channelID) + if(channelName == LoRaDemod::m_channelIdURI) { LoRaDemod* sink = new LoRaDemod(deviceAPI); return sink; diff --git a/plugins/channelrx/demodnfm/nfmdemod.cpp b/plugins/channelrx/demodnfm/nfmdemod.cpp index 1f014c280..f48cd7c55 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.cpp +++ b/plugins/channelrx/demodnfm/nfmdemod.cpp @@ -35,7 +35,8 @@ MESSAGE_CLASS_DEFINITION(NFMDemod::MsgConfigureNFMDemod, Message) MESSAGE_CLASS_DEFINITION(NFMDemod::MsgConfigureChannelizer, Message) MESSAGE_CLASS_DEFINITION(NFMDemod::MsgReportCTCSSFreq, Message) -const QString NFMDemod::m_channelID = "de.maintech.sdrangelove.channel.nfm"; +const QString NFMDemod::m_channelIdURI = "de.maintech.sdrangelove.channel.nfm"; +const QString NFMDemod::m_channelId = "NFMDemod"; static const double afSqTones[2] = {1000.0, 6000.0}; // {1200.0, 8000.0}; const int NFMDemod::m_udpBlockSize = 512; @@ -61,7 +62,7 @@ NFMDemod::NFMDemod(DeviceSourceAPI *devieAPI) : m_audioFifo(48000), m_settingsMutex(QMutex::Recursive) { - setObjectName("NFMDemod"); + setObjectName(m_channelId); m_audioBuffer.resize(1<<14); m_audioBufferFill = 0; diff --git a/plugins/channelrx/demodnfm/nfmdemod.h b/plugins/channelrx/demodnfm/nfmdemod.h index a0f387cfb..1ef2bff3d 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.h +++ b/plugins/channelrx/demodnfm/nfmdemod.h @@ -144,7 +144,8 @@ public: m_magsqCount = 0; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; private: enum RateState { diff --git a/plugins/channelrx/demodnfm/nfmdemodgui.cpp b/plugins/channelrx/demodnfm/nfmdemodgui.cpp index 4a036abb3..8ba8d8e6b 100644 --- a/plugins/channelrx/demodnfm/nfmdemodgui.cpp +++ b/plugins/channelrx/demodnfm/nfmdemodgui.cpp @@ -294,7 +294,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban m_settings.setChannelMarker(&m_channelMarker); - m_deviceUISet->registerRxChannelInstance(NFMDemod::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(NFMDemod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/demodnfm/nfmplugin.cpp b/plugins/channelrx/demodnfm/nfmplugin.cpp index 95d14c2a1..d164411a4 100644 --- a/plugins/channelrx/demodnfm/nfmplugin.cpp +++ b/plugins/channelrx/demodnfm/nfmplugin.cpp @@ -7,7 +7,7 @@ const PluginDescriptor NFMPlugin::m_pluginDescriptor = { QString("NFM Demodulator"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -30,12 +30,12 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register NFM demodulator - m_pluginAPI->registerRxChannel(NFMDemod::m_channelID, this); + m_pluginAPI->registerRxChannel(NFMDemod::m_channelIdURI, NFMDemod::m_channelId, this); } PluginInstanceGUI* NFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == NFMDemod::m_channelID) { + if(channelName == NFMDemod::m_channelIdURI) { NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); return gui; } else { @@ -45,7 +45,7 @@ PluginInstanceGUI* NFMPlugin::createRxChannelGUI(const QString& channelName, Dev BasebandSampleSink* NFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == NFMDemod::m_channelID) + if(channelName == NFMDemod::m_channelIdURI) { NFMDemod* sink = new NFMDemod(deviceAPI); return sink; diff --git a/plugins/channelrx/demodssb/ssbdemod.cpp b/plugins/channelrx/demodssb/ssbdemod.cpp index f00345bbe..b13b1be82 100644 --- a/plugins/channelrx/demodssb/ssbdemod.cpp +++ b/plugins/channelrx/demodssb/ssbdemod.cpp @@ -34,7 +34,8 @@ MESSAGE_CLASS_DEFINITION(SSBDemod::MsgConfigureSSBDemod, Message) MESSAGE_CLASS_DEFINITION(SSBDemod::MsgConfigureSSBDemodPrivate, Message) MESSAGE_CLASS_DEFINITION(SSBDemod::MsgConfigureChannelizer, Message) -const QString SSBDemod::m_channelID = "de.maintech.sdrangelove.channel.ssb"; +const QString SSBDemod::m_channelIdURI = "de.maintech.sdrangelove.channel.ssb"; +const QString SSBDemod::m_channelId = "SSBDemod"; const int SSBDemod::m_udpBlockSize = 512; SSBDemod::SSBDemod(DeviceSourceAPI *deviceAPI) : @@ -54,7 +55,7 @@ SSBDemod::SSBDemod(DeviceSourceAPI *deviceAPI) : m_audioFifo(24000), m_settingsMutex(QMutex::Recursive) { - setObjectName("SSBDemod"); + setObjectName(m_channelId); m_Bandwidth = 5000; m_LowCutoff = 300; diff --git a/plugins/channelrx/demodssb/ssbdemod.h b/plugins/channelrx/demodssb/ssbdemod.h index 8c8671d6b..c1ff3e5b4 100644 --- a/plugins/channelrx/demodssb/ssbdemod.h +++ b/plugins/channelrx/demodssb/ssbdemod.h @@ -129,7 +129,8 @@ public: m_magsqCount = 0; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; private: class MsgConfigureSSBDemodPrivate : public Message { diff --git a/plugins/channelrx/demodssb/ssbdemodgui.cpp b/plugins/channelrx/demodssb/ssbdemodgui.cpp index f8b222e32..7e4076986 100644 --- a/plugins/channelrx/demodssb/ssbdemodgui.cpp +++ b/plugins/channelrx/demodssb/ssbdemodgui.cpp @@ -278,7 +278,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban m_settings.setChannelMarker(&m_channelMarker); m_settings.setSpectrumGUI(ui->spectrumGUI); - m_deviceUISet->registerRxChannelInstance(SSBDemod::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(SSBDemod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/demodssb/ssbplugin.cpp b/plugins/channelrx/demodssb/ssbplugin.cpp index cbb36c0fc..f4c8009a5 100644 --- a/plugins/channelrx/demodssb/ssbplugin.cpp +++ b/plugins/channelrx/demodssb/ssbplugin.cpp @@ -31,12 +31,12 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register demodulator - m_pluginAPI->registerRxChannel(SSBDemod::m_channelID, this); + m_pluginAPI->registerRxChannel(SSBDemod::m_channelIdURI, SSBDemod::m_channelId, this); } PluginInstanceGUI* SSBPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == SSBDemod::m_channelID) + if(channelName == SSBDemod::m_channelIdURI) { SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); return gui; @@ -47,7 +47,7 @@ PluginInstanceGUI* SSBPlugin::createRxChannelGUI(const QString& channelName, Dev BasebandSampleSink* SSBPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == SSBDemod::m_channelID) + if(channelName == SSBDemod::m_channelIdURI) { SSBDemod* sink = new SSBDemod(deviceAPI); return sink; diff --git a/plugins/channelrx/demodwfm/wfmdemod.cpp b/plugins/channelrx/demodwfm/wfmdemod.cpp index 3c2ffbbac..02f23db72 100644 --- a/plugins/channelrx/demodwfm/wfmdemod.cpp +++ b/plugins/channelrx/demodwfm/wfmdemod.cpp @@ -33,7 +33,8 @@ MESSAGE_CLASS_DEFINITION(WFMDemod::MsgConfigureWFMDemod, Message) MESSAGE_CLASS_DEFINITION(WFMDemod::MsgConfigureChannelizer, Message) -const QString WFMDemod::m_channelID = "de.maintech.sdrangelove.channel.wfm"; +const QString WFMDemod::m_channelIdURI = "de.maintech.sdrangelove.channel.wfm"; +const QString WFMDemod::m_channelId = "WFMDemod"; const int WFMDemod::m_udpBlockSize = 512; WFMDemod::WFMDemod(DeviceSourceAPI* deviceAPI) : @@ -50,7 +51,7 @@ WFMDemod::WFMDemod(DeviceSourceAPI* deviceAPI) : m_settingsMutex(QMutex::Recursive) { - setObjectName("WFMDemod"); + setObjectName(m_channelId); m_rfFilter = new fftfilt(-50000.0 / 384000.0, 50000.0 / 384000.0, rfFilterFftLength); m_phaseDiscri.setFMScaling(384000/75000); diff --git a/plugins/channelrx/demodwfm/wfmdemod.h b/plugins/channelrx/demodwfm/wfmdemod.h index 3c6249c4d..2f85aee41 100644 --- a/plugins/channelrx/demodwfm/wfmdemod.h +++ b/plugins/channelrx/demodwfm/wfmdemod.h @@ -115,7 +115,8 @@ public: m_magsqCount = 0; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; private: enum RateState { diff --git a/plugins/channelrx/demodwfm/wfmdemodgui.cpp b/plugins/channelrx/demodwfm/wfmdemodgui.cpp index 2423ac54b..37eb3e3aa 100644 --- a/plugins/channelrx/demodwfm/wfmdemodgui.cpp +++ b/plugins/channelrx/demodwfm/wfmdemodgui.cpp @@ -204,7 +204,7 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban setTitleColor(m_channelMarker.getColor()); m_settings.setChannelMarker(&m_channelMarker); - m_deviceUISet->registerRxChannelInstance(WFMDemod::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(WFMDemod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/demodwfm/wfmplugin.cpp b/plugins/channelrx/demodwfm/wfmplugin.cpp index d335ce428..e8d6e0a4b 100644 --- a/plugins/channelrx/demodwfm/wfmplugin.cpp +++ b/plugins/channelrx/demodwfm/wfmplugin.cpp @@ -31,12 +31,12 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register WFM demodulator - m_pluginAPI->registerRxChannel(WFMDemod::m_channelID, this); + m_pluginAPI->registerRxChannel(WFMDemod::m_channelIdURI, WFMDemod::m_channelId, this); } PluginInstanceGUI* WFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == WFMDemod::m_channelID) + if(channelName == WFMDemod::m_channelIdURI) { WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); return gui; @@ -47,7 +47,7 @@ PluginInstanceGUI* WFMPlugin::createRxChannelGUI(const QString& channelName, Dev BasebandSampleSink* WFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == WFMDemod::m_channelID) + if(channelName == WFMDemod::m_channelIdURI) { WFMDemod* sink = new WFMDemod(deviceAPI); return sink; diff --git a/plugins/channelrx/tcpsrc/tcpsrc.cpp b/plugins/channelrx/tcpsrc/tcpsrc.cpp index 8b0eca9e5..788469176 100644 --- a/plugins/channelrx/tcpsrc/tcpsrc.cpp +++ b/plugins/channelrx/tcpsrc/tcpsrc.cpp @@ -30,14 +30,15 @@ MESSAGE_CLASS_DEFINITION(TCPSrc::MsgConfigureChannelizer, Message) MESSAGE_CLASS_DEFINITION(TCPSrc::MsgTCPSrcConnection, Message) MESSAGE_CLASS_DEFINITION(TCPSrc::MsgTCPSrcSpectrum, Message) -const QString TCPSrc::m_channelID = "sdrangel.channel.tcpsrc"; +const QString TCPSrc::m_channelIdURI = "sdrangel.channel.tcpsrc"; +const QString TCPSrc::m_channelId = "TCPSrc"; TCPSrc::TCPSrc(DeviceSourceAPI* deviceAPI) : m_deviceAPI(deviceAPI), m_absoluteFrequencyOffset(0), m_settingsMutex(QMutex::Recursive) { - setObjectName("TCPSrc"); + setObjectName(m_channelId); m_inputSampleRate = 96000; m_sampleFormat = TCPSrcSettings::FormatSSB; diff --git a/plugins/channelrx/tcpsrc/tcpsrc.h b/plugins/channelrx/tcpsrc/tcpsrc.h index ec96fa030..f11210693 100644 --- a/plugins/channelrx/tcpsrc/tcpsrc.h +++ b/plugins/channelrx/tcpsrc/tcpsrc.h @@ -118,7 +118,8 @@ public: virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getTitle(QString& title) { title = m_settings.m_title; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; protected: class MsgTCPSrcSpectrum : public Message { diff --git a/plugins/channelrx/tcpsrc/tcpsrcgui.cpp b/plugins/channelrx/tcpsrc/tcpsrcgui.cpp index 0c69ad17f..0f2b5fad9 100644 --- a/plugins/channelrx/tcpsrc/tcpsrcgui.cpp +++ b/plugins/channelrx/tcpsrc/tcpsrcgui.cpp @@ -158,7 +158,7 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam setTitleColor(m_channelMarker.getColor()); - m_deviceUISet->registerRxChannelInstance(TCPSrc::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(TCPSrc::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp b/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp index 05b5368d6..81e8596d9 100644 --- a/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp +++ b/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp @@ -8,7 +8,7 @@ const PluginDescriptor TCPSrcPlugin::m_pluginDescriptor = { QString("TCP Channel Source"), - QString("3.8.3"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -31,12 +31,12 @@ void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register TCP Channel Source - m_pluginAPI->registerRxChannel(TCPSrc::m_channelID, this); + m_pluginAPI->registerRxChannel(TCPSrc::m_channelIdURI, TCPSrc::m_channelId, this); } PluginInstanceGUI* TCPSrcPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == TCPSrc::m_channelID) + if(channelName == TCPSrc::m_channelIdURI) { TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceUISet, rxChannel); // deviceAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui); @@ -49,7 +49,7 @@ PluginInstanceGUI* TCPSrcPlugin::createRxChannelGUI(const QString& channelName, BasebandSampleSink* TCPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == TCPSrc::m_channelID) + if(channelName == TCPSrc::m_channelIdURI) { TCPSrc* sink = new TCPSrc(deviceAPI); return sink; diff --git a/plugins/channelrx/udpsrc/udpsrc.cpp b/plugins/channelrx/udpsrc/udpsrc.cpp index 862c1466a..611ff0fa2 100644 --- a/plugins/channelrx/udpsrc/udpsrc.cpp +++ b/plugins/channelrx/udpsrc/udpsrc.cpp @@ -33,7 +33,8 @@ MESSAGE_CLASS_DEFINITION(UDPSrc::MsgConfigureUDPSrc, Message) MESSAGE_CLASS_DEFINITION(UDPSrc::MsgConfigureChannelizer, Message) MESSAGE_CLASS_DEFINITION(UDPSrc::MsgUDPSrcSpectrum, Message) -const QString UDPSrc::m_channelID = "sdrangel.channel.udpsrc"; +const QString UDPSrc::m_channelIdURI = "sdrangel.channel.udpsrc"; +const QString UDPSrc::m_channelId = "UDPSrc"; UDPSrc::UDPSrc(DeviceSourceAPI *deviceAPI) : m_deviceAPI(deviceAPI), @@ -52,7 +53,7 @@ UDPSrc::UDPSrc(DeviceSourceAPI *deviceAPI) : m_agc(9600, m_agcTarget, 1e-6), m_settingsMutex(QMutex::Recursive) { - setObjectName("UDPSrc"); + setObjectName(m_channelId); m_udpBuffer = new UDPSink(this, udpBlockSize, m_settings.m_udpPort); m_udpBufferMono = new UDPSink(this, udpBlockSize, m_settings.m_udpPort); diff --git a/plugins/channelrx/udpsrc/udpsrc.h b/plugins/channelrx/udpsrc/udpsrc.h index 2616bed7a..9d0faa584 100644 --- a/plugins/channelrx/udpsrc/udpsrc.h +++ b/plugins/channelrx/udpsrc/udpsrc.h @@ -110,7 +110,8 @@ public: virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getTitle(QString& title) { title = m_settings.m_title; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; static const int udpBlockSize = 512; // UDP block size in number of bytes public slots: diff --git a/plugins/channelrx/udpsrc/udpsrcgui.cpp b/plugins/channelrx/udpsrc/udpsrcgui.cpp index ff049a8f5..48918ad19 100644 --- a/plugins/channelrx/udpsrc/udpsrcgui.cpp +++ b/plugins/channelrx/udpsrc/udpsrcgui.cpp @@ -183,7 +183,7 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam m_settings.setChannelMarker(&m_channelMarker); m_settings.setSpectrumGUI(ui->spectrumGUI); - m_deviceUISet->registerRxChannelInstance(UDPSrc::m_channelID, this); + m_deviceUISet->registerRxChannelInstance(UDPSrc::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channelrx/udpsrc/udpsrcplugin.cpp b/plugins/channelrx/udpsrc/udpsrcplugin.cpp index 84a2460e1..c5ade4157 100644 --- a/plugins/channelrx/udpsrc/udpsrcplugin.cpp +++ b/plugins/channelrx/udpsrc/udpsrcplugin.cpp @@ -48,12 +48,12 @@ void UDPSrcPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register TCP Channel Source - m_pluginAPI->registerRxChannel(UDPSrc::m_channelID, this); + m_pluginAPI->registerRxChannel(UDPSrc::m_channelIdURI, UDPSrc::m_channelId, this); } PluginInstanceGUI* UDPSrcPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { - if(channelName == UDPSrc::m_channelID) + if(channelName == UDPSrc::m_channelIdURI) { UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceUISet, rxChannel); // deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui); @@ -66,7 +66,7 @@ PluginInstanceGUI* UDPSrcPlugin::createRxChannelGUI(const QString& channelName, BasebandSampleSink* UDPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { - if(channelName == UDPSrc::m_channelID) + if(channelName == UDPSrc::m_channelIdURI) { UDPSrc* sink = new UDPSrc(deviceAPI); return sink; diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index 0e6a63679..dd733a4c5 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -36,7 +36,8 @@ MESSAGE_CLASS_DEFINITION(AMMod::MsgConfigureFileSourceStreamTiming, Message) MESSAGE_CLASS_DEFINITION(AMMod::MsgReportFileSourceStreamData, Message) MESSAGE_CLASS_DEFINITION(AMMod::MsgReportFileSourceStreamTiming, Message) -const QString AMMod::m_channelID = "sdrangel.channeltx.modam"; +const QString AMMod::m_channelIdURI = "sdrangel.channeltx.modam"; +const QString AMMod::m_channelId ="AMMod"; const int AMMod::m_levelNbSamples = 480; // every 10ms AMMod::AMMod(DeviceSinkAPI *deviceAPI) : @@ -54,7 +55,7 @@ AMMod::AMMod(DeviceSinkAPI *deviceAPI) : m_peakLevel(0.0f), m_levelSum(0.0f) { - setObjectName("AMMod"); + setObjectName(m_channelId); m_audioBuffer.resize(1<<14); m_audioBufferFill = 0; diff --git a/plugins/channeltx/modam/ammod.h b/plugins/channeltx/modam/ammod.h index fdd3a9cb6..7f5873c55 100644 --- a/plugins/channeltx/modam/ammod.h +++ b/plugins/channeltx/modam/ammod.h @@ -243,7 +243,8 @@ public: CWKeyer *getCWKeyer() { return &m_cwKeyer; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; signals: /** diff --git a/plugins/channeltx/modam/ammodgui.cpp b/plugins/channeltx/modam/ammodgui.cpp index 19b2b7c94..277aa38a9 100644 --- a/plugins/channeltx/modam/ammodgui.cpp +++ b/plugins/channeltx/modam/ammodgui.cpp @@ -300,7 +300,7 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampl m_settings.setChannelMarker(&m_channelMarker); m_settings.setCWKeyerGUI(ui->cwKeyerGUI); - m_deviceUISet->registerTxChannelInstance(AMMod::m_channelID, this); + m_deviceUISet->registerTxChannelInstance(AMMod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channeltx/modam/ammodplugin.cpp b/plugins/channeltx/modam/ammodplugin.cpp index 1010af8e7..ea3103d62 100644 --- a/plugins/channeltx/modam/ammodplugin.cpp +++ b/plugins/channeltx/modam/ammodplugin.cpp @@ -24,7 +24,7 @@ const PluginDescriptor AMModPlugin::m_pluginDescriptor = { QString("AM Modulator"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -47,12 +47,12 @@ void AMModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register AM modulator - m_pluginAPI->registerTxChannel(AMMod::m_channelID, this); + m_pluginAPI->registerTxChannel(AMMod::m_channelIdURI, AMMod::m_channelId, this); } PluginInstanceGUI* AMModPlugin::createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) { - if(channelName == AMMod::m_channelID) + if(channelName == AMMod::m_channelIdURI) { AMModGUI* gui = AMModGUI::create(m_pluginAPI, deviceUISet, txChannel); return gui; @@ -63,7 +63,7 @@ PluginInstanceGUI* AMModPlugin::createTxChannelGUI(const QString& channelName, D BasebandSampleSource* AMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) { - if(channelName == AMMod::m_channelID) + if(channelName == AMMod::m_channelIdURI) { AMMod* source = new AMMod(deviceAPI); return source; diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index dc50d6df2..92a9bf096 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -40,7 +40,8 @@ MESSAGE_CLASS_DEFINITION(ATVMod::MsgConfigureOverlayText, Message) MESSAGE_CLASS_DEFINITION(ATVMod::MsgConfigureShowOverlayText, Message) MESSAGE_CLASS_DEFINITION(ATVMod::MsgReportEffectiveSampleRate, Message) -const QString ATVMod::m_channelID = "sdrangel.channeltx.modatv"; +const QString ATVMod::m_channelIdURI = "sdrangel.channeltx.modatv"; +const QString ATVMod::m_channelId = "ATVMod"; const float ATVMod::m_blackLevel = 0.3f; const float ATVMod::m_spanLevel = 0.7f; const int ATVMod::m_levelNbSamples = 10000; // every 10ms @@ -73,7 +74,7 @@ ATVMod::ATVMod(DeviceSinkAPI *deviceAPI) : m_DSBFilterBuffer(0), m_DSBFilterBufferIndex(0) { - setObjectName("ATVMod"); + setObjectName(m_channelId); scanCameras(); m_SSBFilter = new fftfilt(0, m_settings.m_rfBandwidth / m_settings.m_outputSampleRate, m_ssbFftLen); diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index 4099554a6..83bdf9d6e 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -412,7 +412,8 @@ public: static void getBaseValues(int outputSampleRate, int linesPerSecond, int& sampleRateUnits, uint32_t& nbPointsPerRateUnit); static float getRFBandwidthDivisor(ATVModSettings::ATVModulation modulation); - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; signals: /** diff --git a/plugins/channeltx/modatv/atvmodgui.cpp b/plugins/channeltx/modatv/atvmodgui.cpp index bdb161ac3..dea11ae3b 100644 --- a/plugins/channeltx/modatv/atvmodgui.cpp +++ b/plugins/channeltx/modatv/atvmodgui.cpp @@ -621,7 +621,7 @@ ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam setTitleColor(m_channelMarker.getColor()); m_settings.setChannelMarker(&m_channelMarker); - m_deviceUISet->registerTxChannelInstance(ATVMod::m_channelID, this); + m_deviceUISet->registerTxChannelInstance(ATVMod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channeltx/modatv/atvmodplugin.cpp b/plugins/channeltx/modatv/atvmodplugin.cpp index eb35b324c..5913847c0 100644 --- a/plugins/channeltx/modatv/atvmodplugin.cpp +++ b/plugins/channeltx/modatv/atvmodplugin.cpp @@ -24,7 +24,7 @@ const PluginDescriptor ATVModPlugin::m_pluginDescriptor = { QString("ATV Modulator"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -47,12 +47,12 @@ void ATVModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register ATV modulator - m_pluginAPI->registerTxChannel(ATVMod::m_channelID, this); + m_pluginAPI->registerTxChannel(ATVMod::m_channelIdURI, ATVMod::m_channelId, this); } PluginInstanceGUI* ATVModPlugin::createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) { - if(channelName == ATVMod::m_channelID) + if(channelName == ATVMod::m_channelIdURI) { ATVModGUI* gui = ATVModGUI::create(m_pluginAPI, deviceUISet, txChannel); return gui; @@ -63,7 +63,7 @@ PluginInstanceGUI* ATVModPlugin::createTxChannelGUI(const QString& channelName, BasebandSampleSource* ATVModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) { - if(channelName == ATVMod::m_channelID) + if(channelName == ATVMod::m_channelIdURI) { ATVMod* source = new ATVMod(deviceAPI); return source; diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index 0ffe43673..d8cfad6e0 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -39,7 +39,8 @@ MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureFileSourceStreamTiming, Message) MESSAGE_CLASS_DEFINITION(NFMMod::MsgReportFileSourceStreamData, Message) MESSAGE_CLASS_DEFINITION(NFMMod::MsgReportFileSourceStreamTiming, Message) -const QString NFMMod::m_channelID = "sdrangel.channeltx.modnfm"; +const QString NFMMod::m_channelIdURI = "sdrangel.channeltx.modnfm"; +const QString NFMMod::m_channelId = "NFMMod"; const int NFMMod::m_levelNbSamples = 480; // every 10ms NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) : @@ -58,7 +59,7 @@ NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) : m_peakLevel(0.0f), m_levelSum(0.0f) { - setObjectName("NFMod"); + setObjectName(m_channelId); m_audioBuffer.resize(1<<14); m_audioBufferFill = 0; diff --git a/plugins/channeltx/modnfm/nfmmod.h b/plugins/channeltx/modnfm/nfmmod.h index 471cc6d28..42070983d 100644 --- a/plugins/channeltx/modnfm/nfmmod.h +++ b/plugins/channeltx/modnfm/nfmmod.h @@ -245,7 +245,8 @@ public: CWKeyer *getCWKeyer() { return &m_cwKeyer; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; signals: /** diff --git a/plugins/channeltx/modnfm/nfmmodgui.cpp b/plugins/channeltx/modnfm/nfmmodgui.cpp index d4c5abe81..471a36cd6 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.cpp +++ b/plugins/channeltx/modnfm/nfmmodgui.cpp @@ -325,7 +325,7 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam m_channelMarker.blockSignals(false); m_channelMarker.setVisible(true); // activate signal on the last setting only - m_deviceUISet->registerTxChannelInstance(NFMMod::m_channelID, this); + m_deviceUISet->registerTxChannelInstance(NFMMod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channeltx/modnfm/nfmmodplugin.cpp b/plugins/channeltx/modnfm/nfmmodplugin.cpp index eadc4b79f..b45c024cd 100644 --- a/plugins/channeltx/modnfm/nfmmodplugin.cpp +++ b/plugins/channeltx/modnfm/nfmmodplugin.cpp @@ -23,7 +23,7 @@ const PluginDescriptor NFMModPlugin::m_pluginDescriptor = { QString("NFM Modulator"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -46,12 +46,12 @@ void NFMModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register AM modulator - m_pluginAPI->registerTxChannel(NFMMod::m_channelID, this); + m_pluginAPI->registerTxChannel(NFMMod::m_channelIdURI, NFMMod::m_channelId, this); } PluginInstanceGUI* NFMModPlugin::createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) { - if(channelName == NFMMod::m_channelID) + if(channelName == NFMMod::m_channelIdURI) { NFMModGUI* gui = NFMModGUI::create(m_pluginAPI, deviceUISet, txChannel); return gui; @@ -62,7 +62,7 @@ PluginInstanceGUI* NFMModPlugin::createTxChannelGUI(const QString& channelName, BasebandSampleSource* NFMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) { - if(channelName == NFMMod::m_channelID) + if(channelName == NFMMod::m_channelIdURI) { NFMMod* source = new NFMMod(deviceAPI); return source; diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index e1f8d11aa..10ed7070e 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -37,7 +37,8 @@ MESSAGE_CLASS_DEFINITION(SSBMod::MsgConfigureFileSourceStreamTiming, Message) MESSAGE_CLASS_DEFINITION(SSBMod::MsgReportFileSourceStreamData, Message) MESSAGE_CLASS_DEFINITION(SSBMod::MsgReportFileSourceStreamTiming, Message) -const QString SSBMod::m_channelID = "sdrangel.channeltx.modssb"; +const QString SSBMod::m_channelIdURI = "sdrangel.channeltx.modssb"; +const QString SSBMod::m_channelId = "SSBMod"; const int SSBMod::m_levelNbSamples = 480; // every 10ms const int SSBMod::m_ssbFftLen = 1024; @@ -63,7 +64,7 @@ SSBMod::SSBMod(DeviceSinkAPI *deviceAPI) : m_levelSum(0.0f), m_inAGC(9600, 0.2, 1e-4) { - setObjectName("SSBMod"); + setObjectName(m_channelId); m_SSBFilter = new fftfilt(m_settings.m_lowCutoff / m_settings.m_audioSampleRate, m_settings.m_bandwidth / m_settings.m_audioSampleRate, m_ssbFftLen); m_DSBFilter = new fftfilt((2.0f * m_settings.m_bandwidth) / m_settings.m_audioSampleRate, 2 * m_ssbFftLen); diff --git a/plugins/channeltx/modssb/ssbmod.h b/plugins/channeltx/modssb/ssbmod.h index 1b55d5b4a..cdd17af72 100644 --- a/plugins/channeltx/modssb/ssbmod.h +++ b/plugins/channeltx/modssb/ssbmod.h @@ -246,7 +246,8 @@ public: CWKeyer *getCWKeyer() { return &m_cwKeyer; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; signals: /** diff --git a/plugins/channeltx/modssb/ssbmodgui.cpp b/plugins/channeltx/modssb/ssbmodgui.cpp index 0d86f82ca..84d521f3a 100644 --- a/plugins/channeltx/modssb/ssbmodgui.cpp +++ b/plugins/channeltx/modssb/ssbmodgui.cpp @@ -397,7 +397,7 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam setTitleColor(m_channelMarker.getColor()); - m_deviceUISet->registerTxChannelInstance(SSBMod::m_channelID, this); + m_deviceUISet->registerTxChannelInstance(SSBMod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channeltx/modssb/ssbmodplugin.cpp b/plugins/channeltx/modssb/ssbmodplugin.cpp index 1a40e6dbd..f7e9014bb 100644 --- a/plugins/channeltx/modssb/ssbmodplugin.cpp +++ b/plugins/channeltx/modssb/ssbmodplugin.cpp @@ -47,12 +47,12 @@ void SSBModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register SSB modulator - m_pluginAPI->registerTxChannel(SSBMod::m_channelID, this); + m_pluginAPI->registerTxChannel(SSBMod::m_channelIdURI, SSBMod::m_channelId, this); } PluginInstanceGUI* SSBModPlugin::createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) { - if(channelName == SSBMod::m_channelID) + if(channelName == SSBMod::m_channelIdURI) { SSBModGUI* gui = SSBModGUI::create(m_pluginAPI, deviceUISet, txChannel); return gui; @@ -63,7 +63,7 @@ PluginInstanceGUI* SSBModPlugin::createTxChannelGUI(const QString& channelName, BasebandSampleSource* SSBModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) { - if(channelName == SSBMod::m_channelID) + if(channelName == SSBMod::m_channelIdURI) { SSBMod* source = new SSBMod(deviceAPI); return source; diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index ed60be4be..4fd4d5488 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -39,7 +39,8 @@ MESSAGE_CLASS_DEFINITION(WFMMod::MsgConfigureFileSourceStreamTiming, Message) MESSAGE_CLASS_DEFINITION(WFMMod::MsgReportFileSourceStreamData, Message) MESSAGE_CLASS_DEFINITION(WFMMod::MsgReportFileSourceStreamTiming, Message) -const QString WFMMod::m_channelID = "sdrangel.channeltx.modwfm"; +const QString WFMMod::m_channelIdURI = "sdrangel.channeltx.modwfm"; +const QString WFMMod::m_channelId = "WFMMod"; const int WFMMod::m_levelNbSamples = 480; // every 10ms const int WFMMod::m_rfFilterFFTLength = 1024; @@ -58,7 +59,7 @@ WFMMod::WFMMod(DeviceSinkAPI *deviceAPI) : m_peakLevel(0.0f), m_levelSum(0.0f) { - setObjectName("WFMod"); + setObjectName(m_channelId); m_rfFilter = new fftfilt(-62500.0 / 384000.0, 62500.0 / 384000.0, m_rfFilterFFTLength); m_rfFilterBuffer = new Complex[m_rfFilterFFTLength]; diff --git a/plugins/channeltx/modwfm/wfmmod.h b/plugins/channeltx/modwfm/wfmmod.h index 368e5c609..719b76881 100644 --- a/plugins/channeltx/modwfm/wfmmod.h +++ b/plugins/channeltx/modwfm/wfmmod.h @@ -244,7 +244,8 @@ public: CWKeyer *getCWKeyer() { return &m_cwKeyer; } - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; signals: /** diff --git a/plugins/channeltx/modwfm/wfmmodgui.cpp b/plugins/channeltx/modwfm/wfmmodgui.cpp index 9948f9b3e..777e66a17 100644 --- a/plugins/channeltx/modwfm/wfmmodgui.cpp +++ b/plugins/channeltx/modwfm/wfmmodgui.cpp @@ -314,7 +314,7 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam m_channelMarker.blockSignals(false); m_channelMarker.setVisible(true); // activate signal on the last setting only - m_deviceUISet->registerTxChannelInstance(WFMMod::m_channelID, this); + m_deviceUISet->registerTxChannelInstance(WFMMod::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channeltx/modwfm/wfmmodplugin.cpp b/plugins/channeltx/modwfm/wfmmodplugin.cpp index ef3b71192..5d0c381e1 100644 --- a/plugins/channeltx/modwfm/wfmmodplugin.cpp +++ b/plugins/channeltx/modwfm/wfmmodplugin.cpp @@ -24,7 +24,7 @@ const PluginDescriptor WFMModPlugin::m_pluginDescriptor = { QString("WFM Modulator"), - QString("3.8.4"), + QString("3.8.5"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, @@ -47,12 +47,12 @@ void WFMModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register AM modulator - m_pluginAPI->registerTxChannel(WFMMod::m_channelID, this); + m_pluginAPI->registerTxChannel(WFMMod::m_channelIdURI, WFMMod::m_channelId, this); } PluginInstanceGUI* WFMModPlugin::createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) { - if(channelName == WFMMod::m_channelID) + if(channelName == WFMMod::m_channelIdURI) { WFMModGUI* gui = WFMModGUI::create(m_pluginAPI, deviceUISet, txChannel); return gui; @@ -63,7 +63,7 @@ PluginInstanceGUI* WFMModPlugin::createTxChannelGUI(const QString& channelName, BasebandSampleSource* WFMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) { - if(channelName == WFMMod::m_channelID) + if(channelName == WFMMod::m_channelIdURI) { WFMMod* source = new WFMMod(deviceAPI); return source; diff --git a/plugins/channeltx/udpsink/udpsink.cpp b/plugins/channeltx/udpsink/udpsink.cpp index 8e2b7a167..bac7a8581 100644 --- a/plugins/channeltx/udpsink/udpsink.cpp +++ b/plugins/channeltx/udpsink/udpsink.cpp @@ -29,7 +29,8 @@ MESSAGE_CLASS_DEFINITION(UDPSink::MsgConfigureChannelizer, Message) MESSAGE_CLASS_DEFINITION(UDPSink::MsgUDPSinkSpectrum, Message) MESSAGE_CLASS_DEFINITION(UDPSink::MsgResetReadIndex, Message) -const QString UDPSink::m_channelID = "sdrangel.channeltx.udpsink"; +const QString UDPSink::m_channelIdURI = "sdrangel.channeltx.udpsink"; +const QString UDPSink::m_channelId = "UDPSink"; UDPSink::UDPSink(DeviceSinkAPI *deviceAPI) : m_deviceAPI(deviceAPI), @@ -55,7 +56,7 @@ UDPSink::UDPSink(DeviceSinkAPI *deviceAPI) : m_SSBFilterBufferIndex(0), m_settingsMutex(QMutex::Recursive) { - setObjectName("UDPSink"); + setObjectName(m_channelId); m_udpHandler.setFeedbackMessageQueue(&m_inputMessageQueue); m_SSBFilter = new fftfilt(m_settings.m_lowCutoff / m_settings.m_inputSampleRate, m_settings.m_rfBandwidth / m_settings.m_inputSampleRate, m_ssbFftLen); diff --git a/plugins/channeltx/udpsink/udpsink.h b/plugins/channeltx/udpsink/udpsink.h index f64febca4..85379d614 100644 --- a/plugins/channeltx/udpsink/udpsink.h +++ b/plugins/channeltx/udpsink/udpsink.h @@ -108,7 +108,8 @@ public: void setSpectrum(bool enabled); void resetReadIndex(); - static const QString m_channelID; + static const QString m_channelIdURI; + static const QString m_channelId; signals: /** diff --git a/plugins/channeltx/udpsink/udpsinkgui.cpp b/plugins/channeltx/udpsink/udpsinkgui.cpp index b610da96c..1ef46ba55 100644 --- a/plugins/channeltx/udpsink/udpsinkgui.cpp +++ b/plugins/channeltx/udpsink/udpsinkgui.cpp @@ -146,7 +146,7 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS m_channelMarker.blockSignals(false); m_channelMarker.setVisible(true); // activate signal on the last setting only - m_deviceUISet->registerTxChannelInstance(UDPSink::m_channelID, this); + m_deviceUISet->registerTxChannelInstance(UDPSink::m_channelIdURI, this); m_deviceUISet->addChannelMarker(&m_channelMarker); m_deviceUISet->addRollupWidget(this); diff --git a/plugins/channeltx/udpsink/udpsinkplugin.cpp b/plugins/channeltx/udpsink/udpsinkplugin.cpp index fac213719..9ef89696e 100644 --- a/plugins/channeltx/udpsink/udpsinkplugin.cpp +++ b/plugins/channeltx/udpsink/udpsinkplugin.cpp @@ -47,12 +47,12 @@ void UDPSinkPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register TCP Channel Source - m_pluginAPI->registerTxChannel(UDPSink::m_channelID, this); + m_pluginAPI->registerTxChannel(UDPSink::m_channelIdURI, UDPSink::m_channelId, this); } PluginInstanceGUI* UDPSinkPlugin::createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) { - if(channelName == UDPSink::m_channelID) + if(channelName == UDPSink::m_channelIdURI) { UDPSinkGUI* gui = UDPSinkGUI::create(m_pluginAPI, deviceUISet, txChannel); // deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui); @@ -65,7 +65,7 @@ PluginInstanceGUI* UDPSinkPlugin::createTxChannelGUI(const QString& channelName, BasebandSampleSource* UDPSinkPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) { - if(channelName == UDPSink::m_channelID) + if(channelName == UDPSink::m_channelIdURI) { UDPSink* source = new UDPSink(deviceAPI); return source; diff --git a/sdrbase/plugin/pluginapi.cpp b/sdrbase/plugin/pluginapi.cpp index 7a3e63e15..ae9198394 100644 --- a/sdrbase/plugin/pluginapi.cpp +++ b/sdrbase/plugin/pluginapi.cpp @@ -1,9 +1,9 @@ #include "plugin/pluginapi.h" #include "plugin/pluginmanager.h" -void PluginAPI::registerRxChannel(const QString& channelName, PluginInterface* plugin) +void PluginAPI::registerRxChannel(const QString& channelIdURI, const QString& channelId, PluginInterface* plugin) { - m_pluginManager->registerRxChannel(channelName, plugin); + m_pluginManager->registerRxChannel(channelIdURI, channelId, plugin); } void PluginAPI::registerSampleSource(const QString& sourceName, PluginInterface* plugin) @@ -16,9 +16,9 @@ PluginAPI::ChannelRegistrations *PluginAPI::getRxChannelRegistrations() return m_pluginManager->getRxChannelRegistrations(); } -void PluginAPI::registerTxChannel(const QString& channelName, PluginInterface* plugin) +void PluginAPI::registerTxChannel(const QString& channelIdURI, const QString& channelId, PluginInterface* plugin) { - m_pluginManager->registerTxChannel(channelName, plugin); + m_pluginManager->registerTxChannel(channelIdURI, channelId, plugin); } void PluginAPI::registerSampleSink(const QString& sinkName, PluginInterface* plugin) diff --git a/sdrbase/plugin/pluginapi.h b/sdrbase/plugin/pluginapi.h index 0cc629fa9..ed7a5ad59 100644 --- a/sdrbase/plugin/pluginapi.h +++ b/sdrbase/plugin/pluginapi.h @@ -31,9 +31,11 @@ public: struct ChannelRegistration { - QString m_channelId; //!< Channel or device type ID + QString m_channelIdURI; //!< Channel type ID in URI form + QString m_channelId; //!< Channel type ID in short form from object name PluginInterface* m_plugin; - ChannelRegistration(const QString& channelId, PluginInterface* plugin) : + ChannelRegistration(const QString& channelIdURI, const QString& channelId, PluginInterface* plugin) : + m_channelIdURI(channelIdURI), m_channelId(channelId), m_plugin(plugin) { } @@ -42,11 +44,11 @@ public: typedef QList ChannelRegistrations; // Rx Channel stuff - void registerRxChannel(const QString& channelName, PluginInterface* plugin); + void registerRxChannel(const QString& channelIdURI, const QString& channelId, PluginInterface* plugin); ChannelRegistrations *getRxChannelRegistrations(); // Tx Channel stuff - void registerTxChannel(const QString& channelName, PluginInterface* plugin); + void registerTxChannel(const QString& channelIdURI, const QString& channelId, PluginInterface* plugin); ChannelRegistrations *getTxChannelRegistrations(); // Sample Source stuff diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index ee49c509d..a53a4e606 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -76,22 +76,22 @@ void PluginManager::loadPlugins() DeviceEnumerator::instance()->enumerateTxDevices(this); } -void PluginManager::registerRxChannel(const QString& channelName, PluginInterface* plugin) +void PluginManager::registerRxChannel(const QString& channelIdURI, const QString& channelId, PluginInterface* plugin) { qDebug() << "PluginManager::registerRxChannel " << plugin->getPluginDescriptor().displayedName.toStdString().c_str() - << " with channel name " << channelName; + << " with channel name " << channelIdURI; - m_rxChannelRegistrations.append(PluginAPI::ChannelRegistration(channelName, plugin)); + m_rxChannelRegistrations.append(PluginAPI::ChannelRegistration(channelIdURI, channelId, plugin)); } -void PluginManager::registerTxChannel(const QString& channelName, PluginInterface* plugin) +void PluginManager::registerTxChannel(const QString& channelIdURI, const QString& channelId, PluginInterface* plugin) { qDebug() << "PluginManager::registerTxChannel " << plugin->getPluginDescriptor().displayedName.toStdString().c_str() - << " with channel name " << channelName; + << " with channel name " << channelIdURI; - m_txChannelRegistrations.append(PluginAPI::ChannelRegistration(channelName, plugin)); + m_txChannelRegistrations.append(PluginAPI::ChannelRegistration(channelIdURI, channelId, plugin)); } void PluginManager::registerSampleSource(const QString& sourceName, PluginInterface* plugin) @@ -172,8 +172,8 @@ void PluginManager::listRxChannels(QList& list) for(PluginAPI::ChannelRegistrations::iterator it = m_rxChannelRegistrations.begin(); it != m_rxChannelRegistrations.end(); ++it) { - const PluginDescriptor& pluginDescipror = it->m_plugin->getPluginDescriptor(); - list.append(pluginDescipror.displayedName); + const PluginDescriptor& pluginDesciptor = it->m_plugin->getPluginDescriptor(); + list.append(pluginDesciptor.displayedName); } } @@ -183,8 +183,8 @@ void PluginManager::createRxChannelInstance(int channelPluginIndex, DeviceUISet { PluginInterface *pluginInterface = m_rxChannelRegistrations[channelPluginIndex].m_plugin; BasebandSampleSink *rxChannel = pluginInterface->createRxChannel( - m_rxChannelRegistrations[channelPluginIndex].m_channelId, deviceAPI); - pluginInterface->createRxChannelGUI(m_rxChannelRegistrations[channelPluginIndex].m_channelId, deviceUISet, rxChannel); + m_rxChannelRegistrations[channelPluginIndex].m_channelIdURI, deviceAPI); + pluginInterface->createRxChannelGUI(m_rxChannelRegistrations[channelPluginIndex].m_channelIdURI, deviceUISet, rxChannel); } } @@ -194,7 +194,7 @@ void PluginManager::createTxChannelInstance(int channelPluginIndex, DeviceUISet { PluginInterface *pluginInterface = m_txChannelRegistrations[channelPluginIndex].m_plugin; BasebandSampleSource *txChannel = pluginInterface->createTxChannel( - m_txChannelRegistrations[channelPluginIndex].m_channelId, deviceAPI); - pluginInterface->createTxChannelGUI(m_txChannelRegistrations[channelPluginIndex].m_channelId, deviceUISet, txChannel); + m_txChannelRegistrations[channelPluginIndex].m_channelIdURI, deviceAPI); + pluginInterface->createTxChannelGUI(m_txChannelRegistrations[channelPluginIndex].m_channelIdURI, deviceUISet, txChannel); } } diff --git a/sdrbase/plugin/pluginmanager.h b/sdrbase/plugin/pluginmanager.h index 489a38a60..dd6857159 100644 --- a/sdrbase/plugin/pluginmanager.h +++ b/sdrbase/plugin/pluginmanager.h @@ -46,9 +46,9 @@ public: const Plugins& getPlugins() const { return m_plugins; } // Callbacks from the plugins - void registerRxChannel(const QString& channelName, PluginInterface* plugin); + void registerRxChannel(const QString& channelIdURI, const QString& channelId, PluginInterface* plugin); void registerSampleSource(const QString& sourceName, PluginInterface* plugin); - void registerTxChannel(const QString& channelName, PluginInterface* plugin); + void registerTxChannel(const QString& channelIdURI, const QString& channelId, PluginInterface* plugin); void registerSampleSink(const QString& sourceName, PluginInterface* plugin); PluginAPI::SamplingDeviceRegistrations& getSourceDeviceRegistrations() { return m_sampleSourceRegistrations; } diff --git a/sdrbase/resources/index.html b/sdrbase/resources/index.html index e4e111799..1ee9e4225 100644 --- a/sdrbase/resources/index.html +++ b/sdrbase/resources/index.html @@ -770,9 +770,13 @@ margin-bottom: 20px; "type" : "string", "description" : "Displayable name of the channel plugin" }, + "idURI" : { + "type" : "string", + "description" : "Key to identify the channel plugin type in URI form" + }, "id" : { "type" : "string", - "description" : "Key to identify the channel plugin type" + "description" : "Key to identify the channel plugin type as short object name" }, "tx" : { "type" : "boolean", @@ -781,6 +785,10 @@ margin-bottom: 20px; "version" : { "type" : "string", "description" : "Channel plugin version number" + }, + "index" : { + "type" : "integer", + "description" : "Index of the channel in the list of registered channels" } }, "description" : "Summarized information about channel plugin" @@ -803,12 +811,24 @@ margin-bottom: 20px; "description" : "List of DV serial devices available in the system" }; defs.DeviceListItem = { - "required" : [ "hwType", "sequence", "serial", "streamIndex" ], + "required" : [ "hwType" ], "properties" : { + "displayedName" : { + "type" : "string", + "description" : "Displayable name that uniquely identifies this device instance" + }, "hwType" : { "type" : "string", "description" : "Key to identify the type of hardware device" }, + "serial" : { + "type" : "string", + "description" : "Serial number of the hardware device" + }, + "sequence" : { + "type" : "integer", + "description" : "Sequence in the enumeration of same device types" + }, "tx" : { "type" : "boolean", "description" : "Set to true if this is a Tx device" @@ -821,13 +841,13 @@ margin-bottom: 20px; "type" : "integer", "description" : "Index of the channel in the device" }, - "sequence" : { + "deviceSetIndex" : { "type" : "integer", - "description" : "Sequence in the enumeration of same device types" + "description" : "Index of the device set that claimed this device (-1 if not claimed)" }, - "serial" : { - "type" : "string", - "description" : "Serial number of the hardware device" + "index" : { + "type" : "integer", + "description" : "Index of the device in the list of registered devices" } }, "description" : "Summarized information about attached hardware device" @@ -7302,7 +7322,7 @@ except ApiException as e:
- Generated 2017-11-19T10:38:58.684+01:00 + Generated 2017-11-23T00:55:26.644+01:00
diff --git a/sdrbase/settings/preset.cpp b/sdrbase/settings/preset.cpp index 5182a3f14..90bbce14f 100644 --- a/sdrbase/settings/preset.cpp +++ b/sdrbase/settings/preset.cpp @@ -66,7 +66,7 @@ QByteArray Preset::serialize() const { // qDebug("Preset::serialize: channel: id: %s", qPrintable(m_channelConfigs[i].m_channel)); - s.writeString(201 + i * 2, m_channelConfigs[i].m_channel); + s.writeString(201 + i * 2, m_channelConfigs[i].m_channelIdURI); s.writeBlob(202 + i * 2, m_channelConfigs[i].m_config); } diff --git a/sdrbase/settings/preset.h b/sdrbase/settings/preset.h index ecfe6c3bb..62ec3eddc 100644 --- a/sdrbase/settings/preset.h +++ b/sdrbase/settings/preset.h @@ -8,11 +8,12 @@ class Preset { public: struct ChannelConfig { - QString m_channel; + QString m_channelIdURI; //!< Channel type ID in URI form + QString m_channelId; //!< Channel type ID in short form from object name TODO: use in the future QByteArray m_config; - ChannelConfig(const QString& channel, const QByteArray& config) : - m_channel(channel), + ChannelConfig(const QString& channelIdURI, const QByteArray& config) : + m_channelIdURI(channelIdURI), m_config(config) { } }; diff --git a/sdrbase/webapi/webapiadapterinterface.cpp b/sdrbase/webapi/webapiadapterinterface.cpp index 6710947af..63be45207 100644 --- a/sdrbase/webapi/webapiadapterinterface.cpp +++ b/sdrbase/webapi/webapiadapterinterface.cpp @@ -20,4 +20,5 @@ QString WebAPIAdapterInterface::instanceSummaryURL = "/sdrangel"; QString WebAPIAdapterInterface::instanceDevicesURL = "/sdrangel/devices"; +QString WebAPIAdapterInterface::instanceChannelsURL = "/sdrangel/channels"; diff --git a/sdrbase/webapi/webapiadapterinterface.h b/sdrbase/webapi/webapiadapterinterface.h index 140ab389f..0ab5bc814 100644 --- a/sdrbase/webapi/webapiadapterinterface.h +++ b/sdrbase/webapi/webapiadapterinterface.h @@ -25,6 +25,7 @@ namespace Swagger { class SWGInstanceSummaryResponse; class SWGInstanceDevicesResponse; + class SWGInstanceChannelsResponse; class SWGErrorResponse; } @@ -52,8 +53,19 @@ public: Swagger::SWGErrorResponse& error __attribute__((unused))) { return 501; } + /** + * Handler of /sdrangel/channels (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels + * returns the Http status code (default 501: not implemented) + */ + virtual int instanceChannels( + bool tx __attribute__((unused)), + Swagger::SWGInstanceChannelsResponse& response __attribute__((unused)), + Swagger::SWGErrorResponse& error __attribute__((unused))) + { return 501; } + static QString instanceSummaryURL; static QString instanceDevicesURL; + static QString instanceChannelsURL; }; diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index 6bd21d22e..4b9814817 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -22,6 +22,7 @@ #include "webapirequestmapper.h" #include "SWGInstanceSummaryResponse.h" #include "SWGInstanceDevicesResponse.h" +#include "SWGInstanceChannelsResponse.h" #include "SWGErrorResponse.h" WebAPIRequestMapper::WebAPIRequestMapper(QObject* parent) : @@ -98,6 +99,32 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http response.setStatus(405,"Invalid HTTP method"); } } + else if (path == WebAPIAdapterInterface::instanceChannelsURL) + { + Swagger::SWGInstanceChannelsResponse normalResponse; + Swagger::SWGErrorResponse errorResponse; + + if (request.getMethod() == "GET") + { + QByteArray txStr = request.getParameter("tx"); + bool tx = (txStr == "true"); + + int status = m_adapter->instanceChannels(tx, normalResponse, errorResponse); + + if (status == 200) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + + response.setStatus(status); + } + else + { + response.write("Invalid HTTP method"); + response.setStatus(405,"Invalid HTTP method"); + } + } else { // QDirIterator it(":", QDirIterator::Subdirectories); diff --git a/sdrgui/device/deviceuiset.cpp b/sdrgui/device/deviceuiset.cpp index 5540695bc..7b17e110b 100644 --- a/sdrgui/device/deviceuiset.cpp +++ b/sdrgui/device/deviceuiset.cpp @@ -156,9 +156,9 @@ void DeviceUISet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginA for(int i = 0; i < openChannels.count(); i++) { - qDebug("DeviceUISet::loadChannelSettings: channels compare [%s] vs [%s]", qPrintable(openChannels[i].m_channelName), qPrintable(channelConfig.m_channel)); + qDebug("DeviceUISet::loadChannelSettings: channels compare [%s] vs [%s]", qPrintable(openChannels[i].m_channelName), qPrintable(channelConfig.m_channelIdURI)); - if(openChannels[i].m_channelName == channelConfig.m_channel) + if(openChannels[i].m_channelName == channelConfig.m_channelIdURI) { qDebug("DeviceSourceAPI::loadChannelSettings: channel [%s] found", qPrintable(openChannels[i].m_channelName)); reg = openChannels.takeAt(i); @@ -173,15 +173,15 @@ void DeviceUISet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginA { for(int i = 0; i < channelRegistrations->count(); i++) { - if((*channelRegistrations)[i].m_channelId == channelConfig.m_channel) + if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI) { - qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel)); + qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channelIdURI)); BasebandSampleSink *rxChannel = (*channelRegistrations)[i].m_plugin->createRxChannel( - channelConfig.m_channel, m_deviceSourceAPI); + channelConfig.m_channelIdURI, m_deviceSourceAPI); PluginInstanceGUI *rxChannelGUI = (*channelRegistrations)[i].m_plugin->createRxChannelGUI( - channelConfig.m_channel, this, rxChannel); + channelConfig.m_channelIdURI, this, rxChannel); reg = ChannelInstanceRegistration( - channelConfig.m_channel, rxChannelGUI); + channelConfig.m_channelIdURI, rxChannelGUI); break; } } @@ -189,7 +189,7 @@ void DeviceUISet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginA if(reg.m_gui != NULL) { - qDebug("DeviceUISet::loadChannelSettings: deserializing channel [%s]", qPrintable(channelConfig.m_channel)); + qDebug("DeviceUISet::loadChannelSettings: deserializing channel [%s]", qPrintable(channelConfig.m_channelIdURI)); reg.m_gui->deserialize(channelConfig.m_config); } } @@ -255,9 +255,9 @@ void DeviceUISet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginA for(int i = 0; i < openChannels.count(); i++) { - qDebug("DeviceUISet::loadChannelSettings: channels compare [%s] vs [%s]", qPrintable(openChannels[i].m_channelName), qPrintable(channelConfig.m_channel)); + qDebug("DeviceUISet::loadChannelSettings: channels compare [%s] vs [%s]", qPrintable(openChannels[i].m_channelName), qPrintable(channelConfig.m_channelIdURI)); - if(openChannels[i].m_channelName == channelConfig.m_channel) + if(openChannels[i].m_channelName == channelConfig.m_channelIdURI) { qDebug("DeviceUISet::loadChannelSettings: channel [%s] found", qPrintable(openChannels[i].m_channelName)); reg = openChannels.takeAt(i); @@ -272,15 +272,15 @@ void DeviceUISet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginA { for(int i = 0; i < channelRegistrations->count(); i++) { - if((*channelRegistrations)[i].m_channelId == channelConfig.m_channel) + if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI) { - qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel)); + qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channelIdURI)); BasebandSampleSource *txChannel = (*channelRegistrations)[i].m_plugin->createTxChannel( - channelConfig.m_channel, m_deviceSinkAPI); + channelConfig.m_channelIdURI, m_deviceSinkAPI); PluginInstanceGUI *txChannelGUI = (*channelRegistrations)[i].m_plugin->createTxChannelGUI( - channelConfig.m_channel, this, txChannel); + channelConfig.m_channelIdURI, this, txChannel); reg = ChannelInstanceRegistration( - channelConfig.m_channel, txChannelGUI); + channelConfig.m_channelIdURI, txChannelGUI); break; } } @@ -288,7 +288,7 @@ void DeviceUISet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginA if(reg.m_gui != 0) { - qDebug("DeviceUISet::loadChannelSettings: deserializing channel [%s]", qPrintable(channelConfig.m_channel)); + qDebug("DeviceUISet::loadChannelSettings: deserializing channel [%s]", qPrintable(channelConfig.m_channelIdURI)); reg.m_gui->deserialize(channelConfig.m_config); } } diff --git a/sdrgui/webapi/webapiadaptergui.cpp b/sdrgui/webapi/webapiadaptergui.cpp index f00859428..5cec9e358 100644 --- a/sdrgui/webapi/webapiadaptergui.cpp +++ b/sdrgui/webapi/webapiadaptergui.cpp @@ -27,11 +27,14 @@ #include "device/deviceenumerator.h" #include "dsp/devicesamplesource.h" #include "dsp/devicesamplesink.h" +#include "plugin/pluginapi.h" +#include "plugin/pluginmanager.h" #include "channel/channelsinkapi.h" #include "channel/channelsourceapi.h" #include "SWGInstanceSummaryResponse.h" #include "SWGInstanceDevicesResponse.h" +#include "SWGInstanceChannelsResponse.h" #include "SWGDeviceListItem.h" #include "SWGErrorResponse.h" @@ -166,3 +169,30 @@ int WebAPIAdapterGUI::instanceDevices( return 200; } + +int WebAPIAdapterGUI::instanceChannels( + bool tx, + Swagger::SWGInstanceChannelsResponse& response, + Swagger::SWGErrorResponse& error __attribute__((unused))) +{ + PluginAPI::ChannelRegistrations *channelRegistrations = tx ? m_mainWindow.m_pluginManager->getTxChannelRegistrations() : m_mainWindow.m_pluginManager->getRxChannelRegistrations(); + int nbChannelDevices = channelRegistrations->size(); + response.setChannelcount(nbChannelDevices); + QList *channels = response.getChannels(); + + for (int i = 0; i < nbChannelDevices; i++) + { + channels->append(new Swagger::SWGChannelListItem); + PluginInterface *channelInterface = channelRegistrations->at(i).m_plugin; + const PluginDescriptor& pluginDescriptor = channelInterface->getPluginDescriptor(); + *channels->back()->getVersion() = pluginDescriptor.version; + *channels->back()->getName() = pluginDescriptor.displayedName; + channels->back()->setTx(tx); + *channels->back()->getIdUri() = channelRegistrations->at(i).m_channelIdURI; + *channels->back()->getId() = channelRegistrations->at(i).m_channelId; + channels->back()->setIndex(i); + } + + return 200; +} + diff --git a/sdrgui/webapi/webapiadaptergui.h b/sdrgui/webapi/webapiadaptergui.h index 366e87895..20e2524a7 100644 --- a/sdrgui/webapi/webapiadaptergui.h +++ b/sdrgui/webapi/webapiadaptergui.h @@ -38,6 +38,11 @@ public: Swagger::SWGInstanceDevicesResponse& response, Swagger::SWGErrorResponse& error); + virtual int instanceChannels( + bool tx, + Swagger::SWGInstanceChannelsResponse& response, + Swagger::SWGErrorResponse& error); + private: MainWindow& m_mainWindow; }; diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index b2f67d6b7..6cacab7c3 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -519,8 +519,11 @@ definitions: name: description: "Displayable name of the channel plugin" type: string + idURI: + description: "Key to identify the channel plugin type in URI form" + type: string id: - description: "Key to identify the channel plugin type" + description: "Key to identify the channel plugin type as short object name" type: string tx: description: "True if this is a Tx channel" @@ -528,6 +531,9 @@ definitions: version: description: "Channel plugin version number" type: string + index: + description: "Index of the channel in the list of registered channels" + type: integer DeviceSet: description: "Sampling device and its associated channels" required: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index e4e111799..1ee9e4225 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -770,9 +770,13 @@ margin-bottom: 20px; "type" : "string", "description" : "Displayable name of the channel plugin" }, + "idURI" : { + "type" : "string", + "description" : "Key to identify the channel plugin type in URI form" + }, "id" : { "type" : "string", - "description" : "Key to identify the channel plugin type" + "description" : "Key to identify the channel plugin type as short object name" }, "tx" : { "type" : "boolean", @@ -781,6 +785,10 @@ margin-bottom: 20px; "version" : { "type" : "string", "description" : "Channel plugin version number" + }, + "index" : { + "type" : "integer", + "description" : "Index of the channel in the list of registered channels" } }, "description" : "Summarized information about channel plugin" @@ -803,12 +811,24 @@ margin-bottom: 20px; "description" : "List of DV serial devices available in the system" }; defs.DeviceListItem = { - "required" : [ "hwType", "sequence", "serial", "streamIndex" ], + "required" : [ "hwType" ], "properties" : { + "displayedName" : { + "type" : "string", + "description" : "Displayable name that uniquely identifies this device instance" + }, "hwType" : { "type" : "string", "description" : "Key to identify the type of hardware device" }, + "serial" : { + "type" : "string", + "description" : "Serial number of the hardware device" + }, + "sequence" : { + "type" : "integer", + "description" : "Sequence in the enumeration of same device types" + }, "tx" : { "type" : "boolean", "description" : "Set to true if this is a Tx device" @@ -821,13 +841,13 @@ margin-bottom: 20px; "type" : "integer", "description" : "Index of the channel in the device" }, - "sequence" : { + "deviceSetIndex" : { "type" : "integer", - "description" : "Sequence in the enumeration of same device types" + "description" : "Index of the device set that claimed this device (-1 if not claimed)" }, - "serial" : { - "type" : "string", - "description" : "Serial number of the hardware device" + "index" : { + "type" : "integer", + "description" : "Index of the device in the list of registered devices" } }, "description" : "Summarized information about attached hardware device" @@ -7302,7 +7322,7 @@ except ApiException as e:
- Generated 2017-11-19T10:38:58.684+01:00 + Generated 2017-11-23T00:55:26.644+01:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelListItem.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelListItem.cpp index 82ea40a37..ac90362ea 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelListItem.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelListItem.cpp @@ -38,9 +38,11 @@ SWGChannelListItem::~SWGChannelListItem() { void SWGChannelListItem::init() { name = new QString(""); + id_uri = new QString(""); id = new QString(""); tx = false; version = new QString(""); + index = 0; } void @@ -50,6 +52,10 @@ SWGChannelListItem::cleanup() { delete name; } + if(id_uri != nullptr) { + delete id_uri; + } + if(id != nullptr) { delete id; } @@ -58,6 +64,7 @@ SWGChannelListItem::cleanup() { if(version != nullptr) { delete version; } + } SWGChannelListItem* @@ -72,9 +79,11 @@ SWGChannelListItem::fromJson(QString &json) { void SWGChannelListItem::fromJsonObject(QJsonObject &pJson) { ::Swagger::setValue(&name, pJson["name"], "QString", "QString"); + ::Swagger::setValue(&id_uri, pJson["idURI"], "QString", "QString"); ::Swagger::setValue(&id, pJson["id"], "QString", "QString"); ::Swagger::setValue(&tx, pJson["tx"], "bool", ""); ::Swagger::setValue(&version, pJson["version"], "QString", "QString"); + ::Swagger::setValue(&index, pJson["index"], "qint32", ""); } QString @@ -93,12 +102,16 @@ SWGChannelListItem::asJsonObject() { toJsonValue(QString("name"), name, obj, QString("QString")); + toJsonValue(QString("idURI"), id_uri, obj, QString("QString")); + toJsonValue(QString("id"), id, obj, QString("QString")); obj->insert("tx", QJsonValue(tx)); toJsonValue(QString("version"), version, obj, QString("QString")); + obj->insert("index", QJsonValue(index)); + return obj; } @@ -111,6 +124,15 @@ SWGChannelListItem::setName(QString* name) { this->name = name; } +QString* +SWGChannelListItem::getIdUri() { + return id_uri; +} +void +SWGChannelListItem::setIdUri(QString* id_uri) { + this->id_uri = id_uri; +} + QString* SWGChannelListItem::getId() { return id; @@ -138,6 +160,15 @@ SWGChannelListItem::setVersion(QString* version) { this->version = version; } +qint32 +SWGChannelListItem::getIndex() { + return index; +} +void +SWGChannelListItem::setIndex(qint32 index) { + this->index = index; +} + } diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelListItem.h b/swagger/sdrangel/code/qt5/client/SWGChannelListItem.h index 8ed1b0e9f..e564a5eb1 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelListItem.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelListItem.h @@ -45,6 +45,9 @@ public: QString* getName(); void setName(QString* name); + QString* getIdUri(); + void setIdUri(QString* id_uri); + QString* getId(); void setId(QString* id); @@ -54,12 +57,17 @@ public: QString* getVersion(); void setVersion(QString* version); + qint32 getIndex(); + void setIndex(qint32 index); + private: QString* name; + QString* id_uri; QString* id; bool tx; QString* version; + qint32 index; }; }