mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-01 16:38:06 -04:00
Replace separate create channel methods (BS and CS): common plugins
This commit is contained in:
@@ -52,22 +52,28 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(ChannelAnalyzer::m_channelIdURI, ChannelAnalyzer::m_channelId, this);
|
||||
}
|
||||
|
||||
void ChannelAnalyzerPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
ChannelAnalyzer *instance = new ChannelAnalyzer(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const
|
||||
{
|
||||
return ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
}
|
||||
|
||||
BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new ChannelAnalyzer(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* ChannelAnalyzerPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new ChannelAnalyzer(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* ChannelAnalyzerPlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new ChannelAnalyzerWebAPIAdapter();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user