1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-14 15:33:34 -04:00

Make channels and features creation consistent between GUI and Server flavors

This commit is contained in:
f4exb
2020-09-30 13:24:26 +02:00
parent 05cd1460e9
commit e4f2c80172
4 changed files with 25 additions and 70 deletions
-40
View File
@@ -276,46 +276,6 @@ void PluginManager::listFeatures(QList<QString>& list)
}
}
void PluginManager::createRxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceAPI *deviceAPI)
{
if (channelPluginIndex < m_rxChannelRegistrations.size())
{
PluginInterface *pluginInterface = m_rxChannelRegistrations[channelPluginIndex].m_plugin;
BasebandSampleSink *rxChannel = pluginInterface->createRxChannelBS(deviceAPI);
pluginInterface->createRxChannelGUI(deviceUISet, rxChannel);
}
}
void PluginManager::createTxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceAPI *deviceAPI)
{
if (channelPluginIndex < m_txChannelRegistrations.size())
{
PluginInterface *pluginInterface = m_txChannelRegistrations[channelPluginIndex].m_plugin;
BasebandSampleSource *txChannel = pluginInterface->createTxChannelBS(deviceAPI);
pluginInterface->createTxChannelGUI(deviceUISet, txChannel);
}
}
void PluginManager::createMIMOChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceAPI *deviceAPI)
{
if (channelPluginIndex < m_mimoChannelRegistrations.size())
{
PluginInterface *pluginInterface = m_mimoChannelRegistrations[channelPluginIndex].m_plugin;
MIMOChannel *mimoChannel = pluginInterface->createMIMOChannelBS(deviceAPI);
pluginInterface->createMIMOChannelGUI(deviceUISet, mimoChannel);
}
}
void PluginManager::createFeatureInstance(int featurePluginIndex, FeatureUISet *featureUISet, WebAPIAdapterInterface *webAPIAdapterInterface)
{
if (featurePluginIndex < m_featureRegistrations.size())
{
PluginInterface *pluginInterface = m_featureRegistrations[featurePluginIndex].m_plugin;
Feature *feature = pluginInterface->createFeature(webAPIAdapterInterface);
pluginInterface->createFeatureGUI(featureUISet, feature);
}
}
const PluginInterface *PluginManager::getChannelPluginInterface(const QString& channelIdURI) const
{
for (PluginAPI::ChannelRegistrations::const_iterator it = m_rxChannelRegistrations.begin(); it != m_rxChannelRegistrations.end(); ++it)
-7
View File
@@ -80,16 +80,9 @@ public:
PluginAPI::ChannelRegistrations *getMIMOChannelRegistrations() { return &m_mimoChannelRegistrations; }
PluginAPI::FeatureRegistrations *getFeatureRegistrations() { return &m_featureRegistrations; }
void createRxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceAPI *deviceAPI);
void listRxChannels(QList<QString>& list);
void createTxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceAPI *deviceAPI);
void listTxChannels(QList<QString>& list);
void createMIMOChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceAPI *deviceAPI);
void listMIMOChannels(QList<QString>& list);
void createFeatureInstance(int featurePluginIndex, FeatureUISet *featureUISet, WebAPIAdapterInterface *webAPIAdapterInterface);
void listFeatures(QList<QString>& list);
const PluginInterface *getChannelPluginInterface(const QString& channelIdURI) const;