From 9299eac9dd8235b21d70cb259085edd3d6a7b8e8 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 13 Oct 2016 23:42:08 +0200 Subject: [PATCH] Tx ph.1: plugins (2) --- plugins/channelrx/chanalyzer/chanalyzerplugin.cpp | 2 +- plugins/channelrx/chanalyzer/chanalyzerplugin.h | 2 +- plugins/channelrx/demodam/amplugin.cpp | 2 +- plugins/channelrx/demodam/amplugin.h | 2 +- plugins/channelrx/demodbfm/bfmplugin.cpp | 2 +- plugins/channelrx/demodbfm/bfmplugin.h | 2 +- plugins/channelrx/demoddsd/dsddemodplugin.cpp | 2 +- plugins/channelrx/demoddsd/dsddemodplugin.h | 2 +- plugins/channelrx/demodlora/loraplugin.cpp | 2 +- plugins/channelrx/demodlora/loraplugin.h | 2 +- plugins/channelrx/demodnfm/nfmplugin.cpp | 2 +- plugins/channelrx/demodnfm/nfmplugin.h | 2 +- plugins/channelrx/demodssb/ssbplugin.cpp | 2 +- plugins/channelrx/demodssb/ssbplugin.h | 2 +- plugins/channelrx/demodwfm/wfmplugin.cpp | 2 +- plugins/channelrx/demodwfm/wfmplugin.h | 2 +- plugins/channelrx/tcpsrc/tcpsrcplugin.cpp | 2 +- plugins/channelrx/tcpsrc/tcpsrcplugin.h | 2 +- plugins/channelrx/udpsrc/udpsrcplugin.cpp | 2 +- plugins/channelrx/udpsrc/udpsrcplugin.h | 2 +- sdrbase/device/devicesourceapi.cpp | 2 +- sdrbase/gui/samplingdevicecontrol.cpp | 4 ++-- sdrbase/plugin/plugininterface.h | 4 ++-- sdrbase/plugin/pluginmanager.cpp | 6 +++--- sdrbase/plugin/pluginmanager.h | 4 ++-- 25 files changed, 30 insertions(+), 30 deletions(-) diff --git a/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp b/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp index 3dc103767..c99dcb927 100644 --- a/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp @@ -32,7 +32,7 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(ChannelAnalyzerGUI::m_channelID, this); } -PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* ChannelAnalyzerPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == ChannelAnalyzerGUI::m_channelID) { diff --git a/plugins/channelrx/chanalyzer/chanalyzerplugin.h b/plugins/channelrx/chanalyzer/chanalyzerplugin.h index 186e34005..15f2db3b4 100644 --- a/plugins/channelrx/chanalyzer/chanalyzerplugin.h +++ b/plugins/channelrx/chanalyzer/chanalyzerplugin.h @@ -17,7 +17,7 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); - PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodam/amplugin.cpp b/plugins/channelrx/demodam/amplugin.cpp index a00d7b990..b5d309675 100644 --- a/plugins/channelrx/demodam/amplugin.cpp +++ b/plugins/channelrx/demodam/amplugin.cpp @@ -33,7 +33,7 @@ void AMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(AMDemodGUI::m_channelID, this); } -PluginGUI* AMPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* AMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == AMDemodGUI::m_channelID) { diff --git a/plugins/channelrx/demodam/amplugin.h b/plugins/channelrx/demodam/amplugin.h index ce4aab8bd..083215499 100644 --- a/plugins/channelrx/demodam/amplugin.h +++ b/plugins/channelrx/demodam/amplugin.h @@ -17,7 +17,7 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); - PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodbfm/bfmplugin.cpp b/plugins/channelrx/demodbfm/bfmplugin.cpp index 34286127f..5a84c0fab 100644 --- a/plugins/channelrx/demodbfm/bfmplugin.cpp +++ b/plugins/channelrx/demodbfm/bfmplugin.cpp @@ -49,7 +49,7 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(BFMDemodGUI::m_channelID, this); } -PluginGUI* BFMPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* BFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == BFMDemodGUI::m_channelID) { diff --git a/plugins/channelrx/demodbfm/bfmplugin.h b/plugins/channelrx/demodbfm/bfmplugin.h index d50efd044..ab37a1371 100644 --- a/plugins/channelrx/demodbfm/bfmplugin.h +++ b/plugins/channelrx/demodbfm/bfmplugin.h @@ -34,7 +34,7 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); - PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.cpp b/plugins/channelrx/demoddsd/dsddemodplugin.cpp index 058787dc2..bd443053e 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.cpp +++ b/plugins/channelrx/demoddsd/dsddemodplugin.cpp @@ -49,7 +49,7 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(DSDDemodGUI::m_channelID, this); } -PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* DSDDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == DSDDemodGUI::m_channelID) { diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.h b/plugins/channelrx/demoddsd/dsddemodplugin.h index b72915a43..347b18c3c 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.h +++ b/plugins/channelrx/demoddsd/dsddemodplugin.h @@ -34,7 +34,7 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); - PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodlora/loraplugin.cpp b/plugins/channelrx/demodlora/loraplugin.cpp index 4e5ba0501..1a5925e0e 100644 --- a/plugins/channelrx/demodlora/loraplugin.cpp +++ b/plugins/channelrx/demodlora/loraplugin.cpp @@ -32,7 +32,7 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(LoRaDemodGUI::m_channelID, this); } -PluginGUI* LoRaPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* LoRaPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == LoRaDemodGUI::m_channelID) { diff --git a/plugins/channelrx/demodlora/loraplugin.h b/plugins/channelrx/demodlora/loraplugin.h index 2e51fd237..e0b83f505 100644 --- a/plugins/channelrx/demodlora/loraplugin.h +++ b/plugins/channelrx/demodlora/loraplugin.h @@ -17,7 +17,7 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); - PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodnfm/nfmplugin.cpp b/plugins/channelrx/demodnfm/nfmplugin.cpp index e5da33a70..9c6b9aa5f 100644 --- a/plugins/channelrx/demodnfm/nfmplugin.cpp +++ b/plugins/channelrx/demodnfm/nfmplugin.cpp @@ -32,7 +32,7 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(NFMDemodGUI::m_channelID, this); } -PluginGUI* NFMPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* NFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == NFMDemodGUI::m_channelID) { NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI); diff --git a/plugins/channelrx/demodnfm/nfmplugin.h b/plugins/channelrx/demodnfm/nfmplugin.h index 1505fe00d..294c9700b 100644 --- a/plugins/channelrx/demodnfm/nfmplugin.h +++ b/plugins/channelrx/demodnfm/nfmplugin.h @@ -17,7 +17,7 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); - PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodssb/ssbplugin.cpp b/plugins/channelrx/demodssb/ssbplugin.cpp index 8f571a46f..fc6bfb2d9 100644 --- a/plugins/channelrx/demodssb/ssbplugin.cpp +++ b/plugins/channelrx/demodssb/ssbplugin.cpp @@ -32,7 +32,7 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(SSBDemodGUI::m_channelID, this); } -PluginGUI* SSBPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* SSBPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == SSBDemodGUI::m_channelID) { diff --git a/plugins/channelrx/demodssb/ssbplugin.h b/plugins/channelrx/demodssb/ssbplugin.h index dea4937b1..49c5cc43d 100644 --- a/plugins/channelrx/demodssb/ssbplugin.h +++ b/plugins/channelrx/demodssb/ssbplugin.h @@ -17,7 +17,7 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); - PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodwfm/wfmplugin.cpp b/plugins/channelrx/demodwfm/wfmplugin.cpp index 7997939bd..81687df11 100644 --- a/plugins/channelrx/demodwfm/wfmplugin.cpp +++ b/plugins/channelrx/demodwfm/wfmplugin.cpp @@ -32,7 +32,7 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(WFMDemodGUI::m_channelID, this); } -PluginGUI* WFMPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* WFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == WFMDemodGUI::m_channelID) { diff --git a/plugins/channelrx/demodwfm/wfmplugin.h b/plugins/channelrx/demodwfm/wfmplugin.h index 5000f3173..e933c4393 100644 --- a/plugins/channelrx/demodwfm/wfmplugin.h +++ b/plugins/channelrx/demodwfm/wfmplugin.h @@ -17,7 +17,7 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); - PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp b/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp index 03fbffb1d..808fb70e0 100644 --- a/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp +++ b/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp @@ -32,7 +32,7 @@ void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(TCPSrcGUI::m_channelID, this); } -PluginGUI* TCPSrcPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* TCPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == TCPSrcGUI::m_channelID) { diff --git a/plugins/channelrx/tcpsrc/tcpsrcplugin.h b/plugins/channelrx/tcpsrc/tcpsrcplugin.h index 95f483d1e..a8d8efa0c 100644 --- a/plugins/channelrx/tcpsrc/tcpsrcplugin.h +++ b/plugins/channelrx/tcpsrc/tcpsrcplugin.h @@ -17,7 +17,7 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); - PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/udpsrc/udpsrcplugin.cpp b/plugins/channelrx/udpsrc/udpsrcplugin.cpp index 6d8abf438..31054bf1b 100644 --- a/plugins/channelrx/udpsrc/udpsrcplugin.cpp +++ b/plugins/channelrx/udpsrc/udpsrcplugin.cpp @@ -49,7 +49,7 @@ void UDPSrcPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(UDPSrcGUI::m_channelID, this); } -PluginGUI* UDPSrcPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* UDPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == UDPSrcGUI::m_channelID) { diff --git a/plugins/channelrx/udpsrc/udpsrcplugin.h b/plugins/channelrx/udpsrc/udpsrcplugin.h index c190b8c71..1180384d3 100644 --- a/plugins/channelrx/udpsrc/udpsrcplugin.h +++ b/plugins/channelrx/udpsrc/udpsrcplugin.h @@ -34,7 +34,7 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); - PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/sdrbase/device/devicesourceapi.cpp b/sdrbase/device/devicesourceapi.cpp index 0364bff45..3c889c682 100644 --- a/sdrbase/device/devicesourceapi.cpp +++ b/sdrbase/device/devicesourceapi.cpp @@ -287,7 +287,7 @@ void DeviceSourceAPI::loadChannelSettings(const Preset *preset, PluginAPI *plugi if((*channelRegistrations)[i].m_channelName == channelConfig.m_channel) { qDebug("DeviceSourceAPI::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel)); - reg = ChannelInstanceRegistration(channelConfig.m_channel, (*channelRegistrations)[i].m_plugin->createChannel(channelConfig.m_channel, this)); + reg = ChannelInstanceRegistration(channelConfig.m_channel, (*channelRegistrations)[i].m_plugin->createRxChannel(channelConfig.m_channel, this)); break; } } diff --git a/sdrbase/gui/samplingdevicecontrol.cpp b/sdrbase/gui/samplingdevicecontrol.cpp index 95f693594..88cc0670c 100644 --- a/sdrbase/gui/samplingdevicecontrol.cpp +++ b/sdrbase/gui/samplingdevicecontrol.cpp @@ -48,7 +48,7 @@ void SamplingDeviceControl::populateChannelSelector() { if (m_pluginManager) { - m_pluginManager->populateChannelComboBox(ui->channelSelect); + m_pluginManager->populateRxChannelComboBox(ui->channelSelect); } } @@ -65,7 +65,7 @@ void SamplingDeviceControl::on_addChannel_clicked(bool checked) { if (m_pluginManager) { - m_pluginManager->createChannelInstance(ui->channelSelect->currentIndex(), m_deviceAPI); + m_pluginManager->createRxChannelInstance(ui->channelSelect->currentIndex(), m_deviceAPI); } } diff --git a/sdrbase/plugin/plugininterface.h b/sdrbase/plugin/plugininterface.h index 94619d0c1..386ddd837 100644 --- a/sdrbase/plugin/plugininterface.h +++ b/sdrbase/plugin/plugininterface.h @@ -45,8 +45,8 @@ public: virtual const PluginDescriptor& getPluginDescriptor() const = 0; virtual void initPlugin(PluginAPI* pluginAPI) = 0; - // channel plugins - virtual PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { return 0; } + // channel Rx plugins + virtual PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { return 0; } // device plugins only virtual SamplingDevices enumSampleSources() { return SamplingDevices(); } diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index 0a2f1f9f1..7d8cfcc9d 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -419,7 +419,7 @@ void PluginManager::loadPlugins(const QDir& dir) } } -void PluginManager::populateChannelComboBox(QComboBox *channels) +void PluginManager::populateRxChannelComboBox(QComboBox *channels) { for(PluginAPI::ChannelRegistrations::iterator it = m_rxChannelRegistrations.begin(); it != m_rxChannelRegistrations.end(); ++it) { @@ -428,11 +428,11 @@ void PluginManager::populateChannelComboBox(QComboBox *channels) } } -void PluginManager::createChannelInstance(int channelPluginIndex, DeviceSourceAPI *deviceAPI) +void PluginManager::createRxChannelInstance(int channelPluginIndex, DeviceSourceAPI *deviceAPI) { if (channelPluginIndex < m_rxChannelRegistrations.size()) { PluginInterface *pluginInterface = m_rxChannelRegistrations[channelPluginIndex].m_plugin; - pluginInterface->createChannel(m_rxChannelRegistrations[channelPluginIndex].m_channelName, deviceAPI); + pluginInterface->createRxChannel(m_rxChannelRegistrations[channelPluginIndex].m_channelName, deviceAPI); } } diff --git a/sdrbase/plugin/pluginmanager.h b/sdrbase/plugin/pluginmanager.h index e8ff1b2c6..bf33ccb59 100644 --- a/sdrbase/plugin/pluginmanager.h +++ b/sdrbase/plugin/pluginmanager.h @@ -55,8 +55,8 @@ public: int selectSampleSourceBySerialOrSequence(const QString& sourceId, const QString& sourceSerial, int sourceSequence, DeviceSourceAPI *deviceAPI); void selectSampleSourceByDevice(void *devicePtr, DeviceSourceAPI *deviceAPI); - void populateChannelComboBox(QComboBox *channels); - void createChannelInstance(int channelPluginIndex, DeviceSourceAPI *deviceAPI); + void populateRxChannelComboBox(QComboBox *channels); + void createRxChannelInstance(int channelPluginIndex, DeviceSourceAPI *deviceAPI); private: struct SamplingDeviceRegistration {