mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-03 06:24:48 -04:00
Replace separate create channel methods (BS and CS): common plugins
This commit is contained in:
@@ -54,6 +54,22 @@ void SSBModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(SSBMod::m_channelIdURI, SSBMod::m_channelId, this);
|
||||
}
|
||||
|
||||
void SSBModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
SSBMod *instance = new SSBMod(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* SSBModPlugin::createTxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@@ -68,16 +84,6 @@ PluginInstanceGUI* SSBModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, Ba
|
||||
}
|
||||
#endif
|
||||
|
||||
BasebandSampleSource* SSBModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new SSBMod(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* SSBModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new SSBMod(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* SSBModPlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new SSBModWebAPIAdapter();
|
||||
|
||||
Reference in New Issue
Block a user