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