From 703aa211598aafbf8bdadb4903248d4ea590a046 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 23 Dec 2017 09:54:42 +0100 Subject: [PATCH] Plugin interface: simplify createRxChannel --- .../channelrx/chanalyzer/chanalyzerplugin.cpp | 18 ++++++------------ .../channelrx/chanalyzer/chanalyzerplugin.h | 4 ++-- .../chanalyzerng/chanalyzerngplugin.cpp | 18 ++++++------------ .../chanalyzerng/chanalyzerngplugin.h | 4 ++-- plugins/channelrx/demodam/amdemodplugin.cpp | 18 ++++++------------ plugins/channelrx/demodam/amdemodplugin.h | 4 ++-- plugins/channelrx/demodatv/atvdemodplugin.cpp | 18 ++++++------------ plugins/channelrx/demodatv/atvdemodplugin.h | 4 ++-- plugins/channelrx/demodbfm/bfmplugin.cpp | 18 ++++++------------ plugins/channelrx/demodbfm/bfmplugin.h | 4 ++-- plugins/channelrx/demoddsd/dsddemodplugin.cpp | 18 ++++++------------ plugins/channelrx/demoddsd/dsddemodplugin.h | 4 ++-- plugins/channelrx/demodlora/loraplugin.cpp | 18 ++++++------------ plugins/channelrx/demodlora/loraplugin.h | 4 ++-- plugins/channelrx/demodnfm/nfmplugin.cpp | 18 ++++++------------ plugins/channelrx/demodnfm/nfmplugin.h | 4 ++-- plugins/channelrx/demodssb/ssbplugin.cpp | 18 ++++++------------ plugins/channelrx/demodssb/ssbplugin.h | 4 ++-- plugins/channelrx/demodwfm/wfmplugin.cpp | 18 ++++++------------ plugins/channelrx/demodwfm/wfmplugin.h | 4 ++-- plugins/channelrx/tcpsrc/tcpsrcplugin.cpp | 18 ++++++------------ plugins/channelrx/tcpsrc/tcpsrcplugin.h | 4 ++-- plugins/channelrx/udpsrc/udpsrcplugin.cpp | 18 ++++++------------ plugins/channelrx/udpsrc/udpsrcplugin.h | 4 ++-- plugins/channeltx/modam/ammodplugin.cpp | 4 ++-- plugins/channeltx/modam/ammodplugin.h | 4 ++-- plugins/channeltx/modatv/atvmodplugin.cpp | 4 ++-- plugins/channeltx/modatv/atvmodplugin.h | 4 ++-- plugins/channeltx/modnfm/nfmmodplugin.cpp | 4 ++-- plugins/channeltx/modnfm/nfmmodplugin.h | 4 ++-- plugins/channeltx/modssb/ssbmodplugin.cpp | 4 ++-- plugins/channeltx/modssb/ssbmodplugin.h | 4 ++-- plugins/channeltx/modwfm/wfmmodplugin.cpp | 4 ++-- plugins/channeltx/modwfm/wfmmodplugin.h | 4 ++-- plugins/channeltx/udpsink/udpsinkplugin.cpp | 4 ++-- plugins/channeltx/udpsink/udpsinkplugin.h | 4 ++-- sdrbase/plugin/plugininterface.h | 9 ++++----- sdrbase/plugin/pluginmanager.cpp | 5 ++--- sdrgui/device/deviceuiset.cpp | 5 ++--- sdrsrv/device/deviceset.cpp | 8 ++++---- swagger/sdrangel/api/swagger/swagger.yaml | 4 ++-- 41 files changed, 134 insertions(+), 209 deletions(-) diff --git a/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp b/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp index 0a4eca655..6fabc23b3 100644 --- a/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp @@ -45,18 +45,12 @@ PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(const QString& chan } } -BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == ChannelAnalyzer::m_channelIdURI) - { - ChannelAnalyzer* sink = new ChannelAnalyzer(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* ChannelAnalyzerPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new ChannelAnalyzer(deviceAPI); +} + +ChannelSinkAPI* ChannelAnalyzerPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new ChannelAnalyzer(deviceAPI); } diff --git a/plugins/channelrx/chanalyzer/chanalyzerplugin.h b/plugins/channelrx/chanalyzer/chanalyzerplugin.h index 1dee36035..80b7df73a 100644 --- a/plugins/channelrx/chanalyzer/chanalyzerplugin.h +++ b/plugins/channelrx/chanalyzer/chanalyzerplugin.h @@ -20,8 +20,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp b/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp index e01807ffc..a93f78267 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp +++ b/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp @@ -60,18 +60,12 @@ PluginInstanceGUI* ChannelAnalyzerNGPlugin::createRxChannelGUI(const QString& ch } } -BasebandSampleSink* ChannelAnalyzerNGPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == ChannelAnalyzerNG::m_channelIdURI) - { - ChannelAnalyzerNG* sink = new ChannelAnalyzerNG(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* ChannelAnalyzerNGPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* ChannelAnalyzerNGPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new ChannelAnalyzerNG(deviceAPI); +} + +ChannelSinkAPI* ChannelAnalyzerNGPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new ChannelAnalyzerNG(deviceAPI); } diff --git a/plugins/channelrx/chanalyzerng/chanalyzerngplugin.h b/plugins/channelrx/chanalyzerng/chanalyzerngplugin.h index f5e6daae9..10fa369cd 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzerngplugin.h +++ b/plugins/channelrx/chanalyzerng/chanalyzerngplugin.h @@ -36,8 +36,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodam/amdemodplugin.cpp b/plugins/channelrx/demodam/amdemodplugin.cpp index 540ee995e..681498f83 100644 --- a/plugins/channelrx/demodam/amdemodplugin.cpp +++ b/plugins/channelrx/demodam/amdemodplugin.cpp @@ -45,18 +45,12 @@ PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(const QString& channelName, } } -BasebandSampleSink* AMDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == AMDemod::m_channelIdURI) - { - AMDemod* sink = new AMDemod(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* AMDemodPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* AMDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new AMDemod(deviceAPI); +} + +ChannelSinkAPI* AMDemodPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new AMDemod(deviceAPI); } diff --git a/plugins/channelrx/demodam/amdemodplugin.h b/plugins/channelrx/demodam/amdemodplugin.h index 1af76b331..d7bd0358f 100644 --- a/plugins/channelrx/demodam/amdemodplugin.h +++ b/plugins/channelrx/demodam/amdemodplugin.h @@ -35,8 +35,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodatv/atvdemodplugin.cpp b/plugins/channelrx/demodatv/atvdemodplugin.cpp index cdfcc3b7a..133e3a491 100644 --- a/plugins/channelrx/demodatv/atvdemodplugin.cpp +++ b/plugins/channelrx/demodatv/atvdemodplugin.cpp @@ -67,18 +67,12 @@ PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(const QString& strChannelN } } -BasebandSampleSink* ATVDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == ATVDemod::m_channelIdURI) - { - ATVDemod* sink = new ATVDemod(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* ATVDemodPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* ATVDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new ATVDemod(deviceAPI); +} + +ChannelSinkAPI* ATVDemodPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new ATVDemod(deviceAPI); } diff --git a/plugins/channelrx/demodatv/atvdemodplugin.h b/plugins/channelrx/demodatv/atvdemodplugin.h index f7ad3dbe1..7835a78cb 100644 --- a/plugins/channelrx/demodatv/atvdemodplugin.h +++ b/plugins/channelrx/demodatv/atvdemodplugin.h @@ -37,8 +37,8 @@ public: void initPlugin(PluginAPI* ptrPluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_ptrPluginDescriptor; diff --git a/plugins/channelrx/demodbfm/bfmplugin.cpp b/plugins/channelrx/demodbfm/bfmplugin.cpp index dd1ab203e..ccba09aff 100644 --- a/plugins/channelrx/demodbfm/bfmplugin.cpp +++ b/plugins/channelrx/demodbfm/bfmplugin.cpp @@ -63,18 +63,12 @@ PluginInstanceGUI* BFMPlugin::createRxChannelGUI(const QString& channelName, Dev } -BasebandSampleSink* BFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == BFMDemod::m_channelIdURI) - { - BFMDemod* sink = new BFMDemod(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* BFMPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* BFMPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new BFMDemod(deviceAPI); +} + +ChannelSinkAPI* BFMPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new BFMDemod(deviceAPI); } diff --git a/plugins/channelrx/demodbfm/bfmplugin.h b/plugins/channelrx/demodbfm/bfmplugin.h index d0bff22c2..28de90f8b 100644 --- a/plugins/channelrx/demodbfm/bfmplugin.h +++ b/plugins/channelrx/demodbfm/bfmplugin.h @@ -35,8 +35,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.cpp b/plugins/channelrx/demoddsd/dsddemodplugin.cpp index 15f240eab..0ad9aca4f 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.cpp +++ b/plugins/channelrx/demoddsd/dsddemodplugin.cpp @@ -62,18 +62,12 @@ PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(const QString& channelName } } -BasebandSampleSink* DSDDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == DSDDemod::m_channelIdURI) - { - DSDDemod* sink = new DSDDemod(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* DSDDemodPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* DSDDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new DSDDemod(deviceAPI); +} + +ChannelSinkAPI* DSDDemodPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new DSDDemod(deviceAPI); } diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.h b/plugins/channelrx/demoddsd/dsddemodplugin.h index e9a66448f..0cdbbace9 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.h +++ b/plugins/channelrx/demoddsd/dsddemodplugin.h @@ -36,8 +36,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodlora/loraplugin.cpp b/plugins/channelrx/demodlora/loraplugin.cpp index f8fb8ad92..f9826ecbf 100644 --- a/plugins/channelrx/demodlora/loraplugin.cpp +++ b/plugins/channelrx/demodlora/loraplugin.cpp @@ -44,18 +44,12 @@ PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(const QString& channelName, De } } -BasebandSampleSink* LoRaPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == LoRaDemod::m_channelIdURI) - { - LoRaDemod* sink = new LoRaDemod(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* LoRaPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* LoRaPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new LoRaDemod(deviceAPI); +} + +ChannelSinkAPI* LoRaPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new LoRaDemod(deviceAPI); } diff --git a/plugins/channelrx/demodlora/loraplugin.h b/plugins/channelrx/demodlora/loraplugin.h index a63830aa1..93f54cf70 100644 --- a/plugins/channelrx/demodlora/loraplugin.h +++ b/plugins/channelrx/demodlora/loraplugin.h @@ -19,8 +19,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodnfm/nfmplugin.cpp b/plugins/channelrx/demodnfm/nfmplugin.cpp index 1d3610f89..02a05cb70 100644 --- a/plugins/channelrx/demodnfm/nfmplugin.cpp +++ b/plugins/channelrx/demodnfm/nfmplugin.cpp @@ -53,18 +53,12 @@ PluginInstanceGUI* NFMPlugin::createRxChannelGUI(const QString& channelName, Dev } #endif -BasebandSampleSink* NFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == NFMDemod::m_channelIdURI) - { - NFMDemod* sink = new NFMDemod(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* NFMPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* NFMPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new NFMDemod(deviceAPI); +} + +ChannelSinkAPI* NFMPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new NFMDemod(deviceAPI); } diff --git a/plugins/channelrx/demodnfm/nfmplugin.h b/plugins/channelrx/demodnfm/nfmplugin.h index 3747f3222..88d9e993f 100644 --- a/plugins/channelrx/demodnfm/nfmplugin.h +++ b/plugins/channelrx/demodnfm/nfmplugin.h @@ -19,8 +19,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodssb/ssbplugin.cpp b/plugins/channelrx/demodssb/ssbplugin.cpp index c76aeff39..d4b851a6d 100644 --- a/plugins/channelrx/demodssb/ssbplugin.cpp +++ b/plugins/channelrx/demodssb/ssbplugin.cpp @@ -45,18 +45,12 @@ PluginInstanceGUI* SSBPlugin::createRxChannelGUI(const QString& channelName, Dev } } -BasebandSampleSink* SSBPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == SSBDemod::m_channelIdURI) - { - SSBDemod* sink = new SSBDemod(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* SSBPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* SSBPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new SSBDemod(deviceAPI); +} + +ChannelSinkAPI* SSBPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new SSBDemod(deviceAPI); } diff --git a/plugins/channelrx/demodssb/ssbplugin.h b/plugins/channelrx/demodssb/ssbplugin.h index c6df3c17f..2b2c26220 100644 --- a/plugins/channelrx/demodssb/ssbplugin.h +++ b/plugins/channelrx/demodssb/ssbplugin.h @@ -19,8 +19,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/demodwfm/wfmplugin.cpp b/plugins/channelrx/demodwfm/wfmplugin.cpp index 3f6715935..5e698e449 100644 --- a/plugins/channelrx/demodwfm/wfmplugin.cpp +++ b/plugins/channelrx/demodwfm/wfmplugin.cpp @@ -45,18 +45,12 @@ PluginInstanceGUI* WFMPlugin::createRxChannelGUI(const QString& channelName, Dev } } -BasebandSampleSink* WFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == WFMDemod::m_channelIdURI) - { - WFMDemod* sink = new WFMDemod(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* WFMPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* WFMPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new WFMDemod(deviceAPI); +} + +ChannelSinkAPI* WFMPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new WFMDemod(deviceAPI); } diff --git a/plugins/channelrx/demodwfm/wfmplugin.h b/plugins/channelrx/demodwfm/wfmplugin.h index 6e98d2380..fd8450fae 100644 --- a/plugins/channelrx/demodwfm/wfmplugin.h +++ b/plugins/channelrx/demodwfm/wfmplugin.h @@ -19,8 +19,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp b/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp index 44ea03e52..5a2552c5c 100644 --- a/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp +++ b/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp @@ -47,18 +47,12 @@ PluginInstanceGUI* TCPSrcPlugin::createRxChannelGUI(const QString& channelName, } } -BasebandSampleSink* TCPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == TCPSrc::m_channelIdURI) - { - TCPSrc* sink = new TCPSrc(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* TCPSrcPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* TCPSrcPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new TCPSrc(deviceAPI); +} + +ChannelSinkAPI* TCPSrcPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new TCPSrc(deviceAPI); } diff --git a/plugins/channelrx/tcpsrc/tcpsrcplugin.h b/plugins/channelrx/tcpsrc/tcpsrcplugin.h index a71ce6f57..35e524aa6 100644 --- a/plugins/channelrx/tcpsrc/tcpsrcplugin.h +++ b/plugins/channelrx/tcpsrc/tcpsrcplugin.h @@ -19,8 +19,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/udpsrc/udpsrcplugin.cpp b/plugins/channelrx/udpsrc/udpsrcplugin.cpp index 7f5cf8dc2..dca27ab34 100644 --- a/plugins/channelrx/udpsrc/udpsrcplugin.cpp +++ b/plugins/channelrx/udpsrc/udpsrcplugin.cpp @@ -64,18 +64,12 @@ PluginInstanceGUI* UDPSrcPlugin::createRxChannelGUI(const QString& channelName, } } -BasebandSampleSink* UDPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) -{ - if(channelName == UDPSrc::m_channelIdURI) - { - UDPSrc* sink = new UDPSrc(deviceAPI); - return sink; - } else { - return 0; - } -} - -ChannelSinkAPI* UDPSrcPlugin::createRxChannel(DeviceSourceAPI *deviceAPI) +BasebandSampleSink* UDPSrcPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) +{ + return new UDPSrc(deviceAPI); +} + +ChannelSinkAPI* UDPSrcPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI) { return new UDPSrc(deviceAPI); } diff --git a/plugins/channelrx/udpsrc/udpsrcplugin.h b/plugins/channelrx/udpsrc/udpsrcplugin.h index bd6515e64..a760d1c58 100644 --- a/plugins/channelrx/udpsrc/udpsrcplugin.h +++ b/plugins/channelrx/udpsrc/udpsrcplugin.h @@ -36,8 +36,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); - virtual BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - virtual ChannelSinkAPI* createRxChannel(DeviceSourceAPI *deviceAPI); + virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI); + virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channeltx/modam/ammodplugin.cpp b/plugins/channeltx/modam/ammodplugin.cpp index 304bebd04..2c69548e2 100644 --- a/plugins/channeltx/modam/ammodplugin.cpp +++ b/plugins/channeltx/modam/ammodplugin.cpp @@ -61,7 +61,7 @@ PluginInstanceGUI* AMModPlugin::createTxChannelGUI(const QString& channelName, D } } -BasebandSampleSource* AMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) +BasebandSampleSource* AMModPlugin::createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI) { if(channelName == AMMod::m_channelIdURI) { @@ -72,7 +72,7 @@ BasebandSampleSource* AMModPlugin::createTxChannel(const QString& channelName, D } } -ChannelSourceAPI* AMModPlugin::createTxChannel(DeviceSinkAPI *deviceAPI) +ChannelSourceAPI* AMModPlugin::createTxChannelCS(DeviceSinkAPI *deviceAPI) { return new AMMod(deviceAPI); } diff --git a/plugins/channeltx/modam/ammodplugin.h b/plugins/channeltx/modam/ammodplugin.h index e8b9fc4fa..1220d3d14 100644 --- a/plugins/channeltx/modam/ammodplugin.h +++ b/plugins/channeltx/modam/ammodplugin.h @@ -35,8 +35,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); - virtual BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI); - virtual ChannelSourceAPI* createTxChannel(DeviceSinkAPI *deviceAPI); + virtual BasebandSampleSource* createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI); + virtual ChannelSourceAPI* createTxChannelCS(DeviceSinkAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channeltx/modatv/atvmodplugin.cpp b/plugins/channeltx/modatv/atvmodplugin.cpp index 0f5eea756..95e1216d7 100644 --- a/plugins/channeltx/modatv/atvmodplugin.cpp +++ b/plugins/channeltx/modatv/atvmodplugin.cpp @@ -61,7 +61,7 @@ PluginInstanceGUI* ATVModPlugin::createTxChannelGUI(const QString& channelName, } } -BasebandSampleSource* ATVModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) +BasebandSampleSource* ATVModPlugin::createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI) { if(channelName == ATVMod::m_channelIdURI) { @@ -72,7 +72,7 @@ BasebandSampleSource* ATVModPlugin::createTxChannel(const QString& channelName, } } -ChannelSourceAPI* ATVModPlugin::createTxChannel(DeviceSinkAPI *deviceAPI) +ChannelSourceAPI* ATVModPlugin::createTxChannelCS(DeviceSinkAPI *deviceAPI) { return new ATVMod(deviceAPI); } diff --git a/plugins/channeltx/modatv/atvmodplugin.h b/plugins/channeltx/modatv/atvmodplugin.h index aae2d0d44..7e27a0bdb 100644 --- a/plugins/channeltx/modatv/atvmodplugin.h +++ b/plugins/channeltx/modatv/atvmodplugin.h @@ -35,8 +35,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); - virtual BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI); - virtual ChannelSourceAPI* createTxChannel(DeviceSinkAPI *deviceAPI); + virtual BasebandSampleSource* createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI); + virtual ChannelSourceAPI* createTxChannelCS(DeviceSinkAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channeltx/modnfm/nfmmodplugin.cpp b/plugins/channeltx/modnfm/nfmmodplugin.cpp index fd701ace8..b7a9ba510 100644 --- a/plugins/channeltx/modnfm/nfmmodplugin.cpp +++ b/plugins/channeltx/modnfm/nfmmodplugin.cpp @@ -70,7 +70,7 @@ PluginInstanceGUI* NFMModPlugin::createTxChannelGUI(const QString& channelName, } #endif -BasebandSampleSource* NFMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) +BasebandSampleSource* NFMModPlugin::createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI) { if(channelName == NFMMod::m_channelIdURI) { @@ -81,7 +81,7 @@ BasebandSampleSource* NFMModPlugin::createTxChannel(const QString& channelName, } } -ChannelSourceAPI* NFMModPlugin::createTxChannel(DeviceSinkAPI *deviceAPI) +ChannelSourceAPI* NFMModPlugin::createTxChannelCS(DeviceSinkAPI *deviceAPI) { return new NFMMod(deviceAPI); } diff --git a/plugins/channeltx/modnfm/nfmmodplugin.h b/plugins/channeltx/modnfm/nfmmodplugin.h index 7ae032449..691306669 100644 --- a/plugins/channeltx/modnfm/nfmmodplugin.h +++ b/plugins/channeltx/modnfm/nfmmodplugin.h @@ -35,8 +35,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *rxChannel); - virtual BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI); - virtual ChannelSourceAPI* createTxChannel(DeviceSinkAPI *deviceAPI); + virtual BasebandSampleSource* createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI); + virtual ChannelSourceAPI* createTxChannelCS(DeviceSinkAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channeltx/modssb/ssbmodplugin.cpp b/plugins/channeltx/modssb/ssbmodplugin.cpp index 1407dc29d..327c94f5f 100644 --- a/plugins/channeltx/modssb/ssbmodplugin.cpp +++ b/plugins/channeltx/modssb/ssbmodplugin.cpp @@ -61,7 +61,7 @@ PluginInstanceGUI* SSBModPlugin::createTxChannelGUI(const QString& channelName, } } -BasebandSampleSource* SSBModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) +BasebandSampleSource* SSBModPlugin::createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI) { if(channelName == SSBMod::m_channelIdURI) { @@ -72,7 +72,7 @@ BasebandSampleSource* SSBModPlugin::createTxChannel(const QString& channelName, } } -ChannelSourceAPI* SSBModPlugin::createTxChannel(DeviceSinkAPI *deviceAPI) +ChannelSourceAPI* SSBModPlugin::createTxChannelCS(DeviceSinkAPI *deviceAPI) { return new SSBMod(deviceAPI); } diff --git a/plugins/channeltx/modssb/ssbmodplugin.h b/plugins/channeltx/modssb/ssbmodplugin.h index a7dc018e9..6ed2d0027 100644 --- a/plugins/channeltx/modssb/ssbmodplugin.h +++ b/plugins/channeltx/modssb/ssbmodplugin.h @@ -35,8 +35,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); - virtual BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI); - virtual ChannelSourceAPI* createTxChannel(DeviceSinkAPI *deviceAPI); + virtual BasebandSampleSource* createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI); + virtual ChannelSourceAPI* createTxChannelCS(DeviceSinkAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channeltx/modwfm/wfmmodplugin.cpp b/plugins/channeltx/modwfm/wfmmodplugin.cpp index 8ecb00cea..47ec2b70c 100644 --- a/plugins/channeltx/modwfm/wfmmodplugin.cpp +++ b/plugins/channeltx/modwfm/wfmmodplugin.cpp @@ -61,7 +61,7 @@ PluginInstanceGUI* WFMModPlugin::createTxChannelGUI(const QString& channelName, } } -BasebandSampleSource* WFMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) +BasebandSampleSource* WFMModPlugin::createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI) { if(channelName == WFMMod::m_channelIdURI) { @@ -72,7 +72,7 @@ BasebandSampleSource* WFMModPlugin::createTxChannel(const QString& channelName, } } -ChannelSourceAPI* WFMModPlugin::createTxChannel(DeviceSinkAPI *deviceAPI) +ChannelSourceAPI* WFMModPlugin::createTxChannelCS(DeviceSinkAPI *deviceAPI) { return new WFMMod(deviceAPI); } diff --git a/plugins/channeltx/modwfm/wfmmodplugin.h b/plugins/channeltx/modwfm/wfmmodplugin.h index 24eca2a93..2c8e10ad1 100644 --- a/plugins/channeltx/modwfm/wfmmodplugin.h +++ b/plugins/channeltx/modwfm/wfmmodplugin.h @@ -34,8 +34,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); - virtual BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI); - virtual ChannelSourceAPI* createTxChannel(DeviceSinkAPI *deviceAPI); + virtual BasebandSampleSource* createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI); + virtual ChannelSourceAPI* createTxChannelCS(DeviceSinkAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channeltx/udpsink/udpsinkplugin.cpp b/plugins/channeltx/udpsink/udpsinkplugin.cpp index fb5c9b019..9f3853137 100644 --- a/plugins/channeltx/udpsink/udpsinkplugin.cpp +++ b/plugins/channeltx/udpsink/udpsinkplugin.cpp @@ -63,7 +63,7 @@ PluginInstanceGUI* UDPSinkPlugin::createTxChannelGUI(const QString& channelName, } } -BasebandSampleSource* UDPSinkPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI) +BasebandSampleSource* UDPSinkPlugin::createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI) { if(channelName == UDPSink::m_channelIdURI) { @@ -74,7 +74,7 @@ BasebandSampleSource* UDPSinkPlugin::createTxChannel(const QString& channelName, } } -ChannelSourceAPI* UDPSinkPlugin::createTxChannel(DeviceSinkAPI *deviceAPI) +ChannelSourceAPI* UDPSinkPlugin::createTxChannelCS(DeviceSinkAPI *deviceAPI) { return new UDPSink(deviceAPI); } diff --git a/plugins/channeltx/udpsink/udpsinkplugin.h b/plugins/channeltx/udpsink/udpsinkplugin.h index 215b2b31f..9f5d9c1dc 100644 --- a/plugins/channeltx/udpsink/udpsinkplugin.h +++ b/plugins/channeltx/udpsink/udpsinkplugin.h @@ -36,8 +36,8 @@ public: void initPlugin(PluginAPI* pluginAPI); virtual PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); - virtual BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI); - virtual ChannelSourceAPI* createTxChannel(DeviceSinkAPI *deviceAPI); + virtual BasebandSampleSource* createTxChannelBS(const QString& channelName, DeviceSinkAPI *deviceAPI); + virtual ChannelSourceAPI* createTxChannelCS(DeviceSinkAPI *deviceAPI); private: static const PluginDescriptor m_pluginDescriptor; diff --git a/sdrbase/plugin/plugininterface.h b/sdrbase/plugin/plugininterface.h index cdec27afc..f029ae295 100644 --- a/sdrbase/plugin/plugininterface.h +++ b/sdrbase/plugin/plugininterface.h @@ -84,12 +84,11 @@ public: BasebandSampleSink *rxChannel __attribute__((unused))) { return 0; } - virtual BasebandSampleSink* createRxChannel( - const QString& channelName __attribute__((unused)), + virtual BasebandSampleSink* createRxChannelBS( DeviceSourceAPI *deviceAPI __attribute__((unused)) ) { return 0; } - virtual ChannelSinkAPI* createRxChannel( + virtual ChannelSinkAPI* createRxChannelCS( DeviceSourceAPI *deviceAPI __attribute__((unused)) ) { return 0; } @@ -101,12 +100,12 @@ public: BasebandSampleSource *txChannel __attribute__((unused))) { return 0; } - virtual BasebandSampleSource* createTxChannel( + virtual BasebandSampleSource* createTxChannelBS( const QString& channelName __attribute__((unused)), DeviceSinkAPI *deviceAPI __attribute__((unused)) ) { return 0; } - virtual ChannelSourceAPI* createTxChannel( + virtual ChannelSourceAPI* createTxChannelCS( DeviceSinkAPI *deviceAPI __attribute__((unused)) ) { return 0; } diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index dd719eab4..aa0386607 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -183,8 +183,7 @@ void PluginManager::createRxChannelInstance(int channelPluginIndex, DeviceUISet if (channelPluginIndex < m_rxChannelRegistrations.size()) { PluginInterface *pluginInterface = m_rxChannelRegistrations[channelPluginIndex].m_plugin; - BasebandSampleSink *rxChannel = pluginInterface->createRxChannel( - m_rxChannelRegistrations[channelPluginIndex].m_channelIdURI, deviceAPI); + BasebandSampleSink *rxChannel = pluginInterface->createRxChannelBS(deviceAPI); pluginInterface->createRxChannelGUI(m_rxChannelRegistrations[channelPluginIndex].m_channelIdURI, deviceUISet, rxChannel); } } @@ -194,7 +193,7 @@ void PluginManager::createTxChannelInstance(int channelPluginIndex, DeviceUISet if (channelPluginIndex < m_txChannelRegistrations.size()) { PluginInterface *pluginInterface = m_txChannelRegistrations[channelPluginIndex].m_plugin; - BasebandSampleSource *txChannel = pluginInterface->createTxChannel( + BasebandSampleSource *txChannel = pluginInterface->createTxChannelBS( m_txChannelRegistrations[channelPluginIndex].m_channelIdURI, deviceAPI); pluginInterface->createTxChannelGUI(m_txChannelRegistrations[channelPluginIndex].m_channelIdURI, deviceUISet, txChannel); } diff --git a/sdrgui/device/deviceuiset.cpp b/sdrgui/device/deviceuiset.cpp index 39b2ad66f..232bc3548 100644 --- a/sdrgui/device/deviceuiset.cpp +++ b/sdrgui/device/deviceuiset.cpp @@ -176,8 +176,7 @@ void DeviceUISet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginA if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI) { qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channelIdURI)); - BasebandSampleSink *rxChannel = (*channelRegistrations)[i].m_plugin->createRxChannel( - channelConfig.m_channelIdURI, m_deviceSourceAPI); + BasebandSampleSink *rxChannel = (*channelRegistrations)[i].m_plugin->createRxChannelBS(m_deviceSourceAPI); PluginInstanceGUI *rxChannelGUI = (*channelRegistrations)[i].m_plugin->createRxChannelGUI( channelConfig.m_channelIdURI, this, rxChannel); reg = ChannelInstanceRegistration( @@ -275,7 +274,7 @@ void DeviceUISet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginA if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI) { qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channelIdURI)); - BasebandSampleSource *txChannel = (*channelRegistrations)[i].m_plugin->createTxChannel( + BasebandSampleSource *txChannel = (*channelRegistrations)[i].m_plugin->createTxChannelBS( channelConfig.m_channelIdURI, m_deviceSinkAPI); PluginInstanceGUI *txChannelGUI = (*channelRegistrations)[i].m_plugin->createTxChannelGUI( channelConfig.m_channelIdURI, this, txChannel); diff --git a/sdrsrv/device/deviceset.cpp b/sdrsrv/device/deviceset.cpp index da9c53b61..28428b744 100644 --- a/sdrsrv/device/deviceset.cpp +++ b/sdrsrv/device/deviceset.cpp @@ -102,7 +102,7 @@ void DeviceSet::freeTxChannels() void DeviceSet::addRxChannel(int selectedChannelIndex, PluginAPI *pluginAPI) { PluginAPI::ChannelRegistrations *channelRegistrations = pluginAPI->getRxChannelRegistrations(); // Available channel plugins - ChannelSinkAPI *rxChannel =(*channelRegistrations)[selectedChannelIndex].m_plugin->createRxChannel(m_deviceSourceAPI); + ChannelSinkAPI *rxChannel =(*channelRegistrations)[selectedChannelIndex].m_plugin->createRxChannelCS(m_deviceSourceAPI); ChannelInstanceRegistration reg = ChannelInstanceRegistration(rxChannel->getName(), rxChannel); m_rxChannelInstanceRegistrations.append(reg); qDebug("DeviceSet::addRxChannel: %s", qPrintable(rxChannel->getName())); @@ -111,7 +111,7 @@ void DeviceSet::addRxChannel(int selectedChannelIndex, PluginAPI *pluginAPI) void DeviceSet::addTxChannel(int selectedChannelIndex, PluginAPI *pluginAPI) { PluginAPI::ChannelRegistrations *channelRegistrations = pluginAPI->getTxChannelRegistrations(); // Available channel plugins - ChannelSourceAPI *txChannel = (*channelRegistrations)[selectedChannelIndex].m_plugin->createTxChannel(m_deviceSinkAPI); + ChannelSourceAPI *txChannel = (*channelRegistrations)[selectedChannelIndex].m_plugin->createTxChannelCS(m_deviceSinkAPI); ChannelInstanceRegistration reg = ChannelInstanceRegistration(txChannel->getName(), txChannel); m_txChannelInstanceRegistrations.append(reg); qDebug("DeviceSet::addTxChannel: %s", qPrintable(txChannel->getName())); @@ -161,7 +161,7 @@ void DeviceSet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginAPI if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI) { qDebug("DeviceSet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channelIdURI)); - ChannelSinkAPI *rxChannel = (*channelRegistrations)[i].m_plugin->createRxChannel(m_deviceSourceAPI); + ChannelSinkAPI *rxChannel = (*channelRegistrations)[i].m_plugin->createRxChannelCS(m_deviceSourceAPI); reg = ChannelInstanceRegistration(channelConfig.m_channelIdURI, rxChannel); m_rxChannelInstanceRegistrations.append(reg); break; @@ -257,7 +257,7 @@ void DeviceSet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginAPI if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI) { qDebug("DeviceSet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channelIdURI)); - ChannelSourceAPI *txChannel = (*channelRegistrations)[i].m_plugin->createTxChannel(m_deviceSinkAPI); + ChannelSourceAPI *txChannel = (*channelRegistrations)[i].m_plugin->createTxChannelCS(m_deviceSinkAPI); reg = ChannelInstanceRegistration(channelConfig.m_channelIdURI, txChannel); m_txChannelInstanceRegistrations.append(reg); break; diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index 664dc29d6..9e1ecb3a4 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -505,7 +505,7 @@ paths: description: Add (append) a new device set with default values operationId: instanceDeviceSetPost tags: - - Instance + - DeviceSet parameters: - name: tx in: query @@ -525,7 +525,7 @@ paths: description: Remove last device set. The GUI version does not remove the first device. operationId: instanceDeviceSetDelete tags: - - Instance + - DeviceSet responses: "202": description: Message to remove last device set was sent successfully