diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodplugin.cpp b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodplugin.cpp index e860a9064..3a5e7bd96 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodplugin.cpp +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodplugin.cpp @@ -55,6 +55,22 @@ void BeamSteeringCWModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerMIMOChannel(BeamSteeringCWMod::m_channelIdURI, BeamSteeringCWMod::m_channelId, this); } +void BeamSteeringCWModPlugin::createMIMOChannel(DeviceAPI *deviceAPI, MIMOChannel **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + BeamSteeringCWMod *instance = new BeamSteeringCWMod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* BeamSteeringCWModPlugin::createMIMOChannelGUI( DeviceUISet *deviceUISet, @@ -69,16 +85,6 @@ PluginInstanceGUI* BeamSteeringCWModPlugin::createMIMOChannelGUI(DeviceUISet *de } #endif -MIMOChannel* BeamSteeringCWModPlugin::createMIMOChannelBS(DeviceAPI *deviceAPI) const -{ - return new BeamSteeringCWMod(deviceAPI); -} - -ChannelAPI* BeamSteeringCWModPlugin::createMIMOChannelCS(DeviceAPI *deviceAPI) const -{ - return new BeamSteeringCWMod(deviceAPI); -} - ChannelWebAPIAdapter* BeamSteeringCWModPlugin::createChannelWebAPIAdapter() const { return new BeamSteeringCWModWebAPIAdapter(); diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodplugin.h b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodplugin.h index ed620050a..93ba5a47c 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodplugin.h +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createMIMOChannel(DeviceAPI *deviceAPI, MIMOChannel **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createMIMOChannelGUI(DeviceUISet *deviceUISet, MIMOChannel *mimoChannel) const; - virtual MIMOChannel* createMIMOChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createMIMOChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelmimo/interferometer/interferometerplugin.cpp b/plugins/channelmimo/interferometer/interferometerplugin.cpp index 5f84f3c73..a2916694a 100644 --- a/plugins/channelmimo/interferometer/interferometerplugin.cpp +++ b/plugins/channelmimo/interferometer/interferometerplugin.cpp @@ -56,6 +56,22 @@ void InterferometerPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerMIMOChannel(Interferometer::m_channelIdURI, Interferometer::m_channelId, this); } +void InterferometerPlugin::createMIMOChannel(DeviceAPI *deviceAPI, MIMOChannel **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + Interferometer *instance = new Interferometer(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* InterferometerPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -70,16 +86,6 @@ PluginInstanceGUI* InterferometerPlugin::createMIMOChannelGUI(DeviceUISet *devic } #endif -MIMOChannel* InterferometerPlugin::createMIMOChannelBS(DeviceAPI *deviceAPI) const -{ - return new Interferometer(deviceAPI); -} - -ChannelAPI* InterferometerPlugin::createMIMOChannelCS(DeviceAPI *deviceAPI) const -{ - return new Interferometer(deviceAPI); -} - ChannelWebAPIAdapter* InterferometerPlugin::createChannelWebAPIAdapter() const { return new InterferometerWebAPIAdapter(); diff --git a/plugins/channelmimo/interferometer/interferometerplugin.h b/plugins/channelmimo/interferometer/interferometerplugin.h index d3b560a7d..649c7b153 100644 --- a/plugins/channelmimo/interferometer/interferometerplugin.h +++ b/plugins/channelmimo/interferometer/interferometerplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createMIMOChannel(DeviceAPI *deviceAPI, MIMOChannel **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createMIMOChannelGUI(DeviceUISet *deviceUISet, MIMOChannel *mimoChannel) const; - virtual MIMOChannel* createMIMOChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createMIMOChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/demodchirpchat/chirpchatplugin.cpp b/plugins/channelrx/demodchirpchat/chirpchatplugin.cpp index 41710f752..973830845 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatplugin.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatplugin.cpp @@ -53,6 +53,22 @@ void ChirpChatPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(ChirpChatDemod::m_channelIdURI, ChirpChatDemod::m_channelId, this); } +void ChirpChatPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + ChirpChatDemod *instance = new ChirpChatDemod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* ChirpChatPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -66,14 +82,3 @@ PluginInstanceGUI* ChirpChatPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, return ChirpChatDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); } #endif - -BasebandSampleSink* ChirpChatPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new ChirpChatDemod(deviceAPI); -} - -ChannelAPI* ChirpChatPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new ChirpChatDemod(deviceAPI); -} - diff --git a/plugins/channelrx/demodchirpchat/chirpchatplugin.h b/plugins/channelrx/demodchirpchat/chirpchatplugin.h index b720af1f3..90006e7b3 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatplugin.h +++ b/plugins/channelrx/demodchirpchat/chirpchatplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; private: static const PluginDescriptor m_pluginDescriptor; diff --git a/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.cpp b/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.cpp index 46203d663..2c19de347 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.cpp +++ b/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.cpp @@ -55,6 +55,22 @@ void SigMFFileSinkPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(SigMFFileSink::m_channelIdURI, SigMFFileSink::m_channelId, this); } +void SigMFFileSinkPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + SigMFFileSink *instance = new SigMFFileSink(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* SigMFFileSinkPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -69,16 +85,6 @@ PluginInstanceGUI* SigMFFileSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUI } #endif -BasebandSampleSink* SigMFFileSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new SigMFFileSink(deviceAPI); -} - -ChannelAPI* SigMFFileSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new SigMFFileSink(deviceAPI); -} - ChannelWebAPIAdapter* SigMFFileSinkPlugin::createChannelWebAPIAdapter() const { return new SigMFFileSinkWebAPIAdapter(); diff --git a/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.h b/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.h index 49644b969..57c495534 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.h +++ b/plugins/channelrx/sigmffilesink/sigmffilesinkplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/modchirpchat/chirpchatmodplugin.cpp b/plugins/channeltx/modchirpchat/chirpchatmodplugin.cpp index b8f417ead..25222b85c 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmodplugin.cpp +++ b/plugins/channeltx/modchirpchat/chirpchatmodplugin.cpp @@ -54,6 +54,22 @@ void ChirpChatModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerTxChannel(ChirpChatMod::m_channelIdURI, ChirpChatMod::m_channelId, this); } +void ChirpChatModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + ChirpChatMod *instance = new ChirpChatMod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* ChirpChatModPlugin::createTxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* ChirpChatModPlugin::createTxChannelGUI(DeviceUISet *deviceUIS } #endif -BasebandSampleSource* ChirpChatModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const -{ - return new ChirpChatMod(deviceAPI); -} - -ChannelAPI* ChirpChatModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const -{ - return new ChirpChatMod(deviceAPI); -} - ChannelWebAPIAdapter* ChirpChatModPlugin::createChannelWebAPIAdapter() const { return new ChirpChatModWebAPIAdapter(); diff --git a/plugins/channeltx/modchirpchat/chirpchatmodplugin.h b/plugins/channeltx/modchirpchat/chirpchatmodplugin.h index c9695649a..a3f312be0 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmodplugin.h +++ b/plugins/channeltx/modchirpchat/chirpchatmodplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *rxChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: