1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-13 20:01:46 -05:00

Tx ph.1: plugins (2)

This commit is contained in:
f4exb 2016-10-13 23:42:08 +02:00
parent 94e479bb75
commit 9299eac9dd
25 changed files with 30 additions and 30 deletions

View File

@ -32,7 +32,7 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(ChannelAnalyzerGUI::m_channelID, this);
}
PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
PluginGUI* ChannelAnalyzerPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == ChannelAnalyzerGUI::m_channelID)
{

View File

@ -17,7 +17,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -33,7 +33,7 @@ void AMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(AMDemodGUI::m_channelID, this);
}
PluginGUI* AMPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
PluginGUI* AMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == AMDemodGUI::m_channelID)
{

View File

@ -17,7 +17,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -49,7 +49,7 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(BFMDemodGUI::m_channelID, this);
}
PluginGUI* BFMPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
PluginGUI* BFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == BFMDemodGUI::m_channelID)
{

View File

@ -34,7 +34,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -49,7 +49,7 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(DSDDemodGUI::m_channelID, this);
}
PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
PluginGUI* DSDDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == DSDDemodGUI::m_channelID)
{

View File

@ -34,7 +34,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -32,7 +32,7 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(LoRaDemodGUI::m_channelID, this);
}
PluginGUI* LoRaPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
PluginGUI* LoRaPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == LoRaDemodGUI::m_channelID)
{

View File

@ -17,7 +17,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -32,7 +32,7 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(NFMDemodGUI::m_channelID, this);
}
PluginGUI* NFMPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
PluginGUI* NFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == NFMDemodGUI::m_channelID) {
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI);

View File

@ -17,7 +17,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -32,7 +32,7 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(SSBDemodGUI::m_channelID, this);
}
PluginGUI* SSBPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
PluginGUI* SSBPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == SSBDemodGUI::m_channelID)
{

View File

@ -17,7 +17,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -32,7 +32,7 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(WFMDemodGUI::m_channelID, this);
}
PluginGUI* WFMPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
PluginGUI* WFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == WFMDemodGUI::m_channelID)
{

View File

@ -17,7 +17,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -32,7 +32,7 @@ void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(TCPSrcGUI::m_channelID, this);
}
PluginGUI* TCPSrcPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
PluginGUI* TCPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == TCPSrcGUI::m_channelID)
{

View File

@ -17,7 +17,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -49,7 +49,7 @@ void UDPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(UDPSrcGUI::m_channelID, this);
}
PluginGUI* UDPSrcPlugin::createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
PluginGUI* UDPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == UDPSrcGUI::m_channelID)
{

View File

@ -34,7 +34,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -287,7 +287,7 @@ void DeviceSourceAPI::loadChannelSettings(const Preset *preset, PluginAPI *plugi
if((*channelRegistrations)[i].m_channelName == channelConfig.m_channel)
{
qDebug("DeviceSourceAPI::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel));
reg = ChannelInstanceRegistration(channelConfig.m_channel, (*channelRegistrations)[i].m_plugin->createChannel(channelConfig.m_channel, this));
reg = ChannelInstanceRegistration(channelConfig.m_channel, (*channelRegistrations)[i].m_plugin->createRxChannel(channelConfig.m_channel, this));
break;
}
}

View File

@ -48,7 +48,7 @@ void SamplingDeviceControl::populateChannelSelector()
{
if (m_pluginManager)
{
m_pluginManager->populateChannelComboBox(ui->channelSelect);
m_pluginManager->populateRxChannelComboBox(ui->channelSelect);
}
}
@ -65,7 +65,7 @@ void SamplingDeviceControl::on_addChannel_clicked(bool checked)
{
if (m_pluginManager)
{
m_pluginManager->createChannelInstance(ui->channelSelect->currentIndex(), m_deviceAPI);
m_pluginManager->createRxChannelInstance(ui->channelSelect->currentIndex(), m_deviceAPI);
}
}

View File

@ -45,8 +45,8 @@ public:
virtual const PluginDescriptor& getPluginDescriptor() const = 0;
virtual void initPlugin(PluginAPI* pluginAPI) = 0;
// channel plugins
virtual PluginGUI* createChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { return 0; }
// channel Rx plugins
virtual PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { return 0; }
// device plugins only
virtual SamplingDevices enumSampleSources() { return SamplingDevices(); }

View File

@ -419,7 +419,7 @@ void PluginManager::loadPlugins(const QDir& dir)
}
}
void PluginManager::populateChannelComboBox(QComboBox *channels)
void PluginManager::populateRxChannelComboBox(QComboBox *channels)
{
for(PluginAPI::ChannelRegistrations::iterator it = m_rxChannelRegistrations.begin(); it != m_rxChannelRegistrations.end(); ++it)
{
@ -428,11 +428,11 @@ void PluginManager::populateChannelComboBox(QComboBox *channels)
}
}
void PluginManager::createChannelInstance(int channelPluginIndex, DeviceSourceAPI *deviceAPI)
void PluginManager::createRxChannelInstance(int channelPluginIndex, DeviceSourceAPI *deviceAPI)
{
if (channelPluginIndex < m_rxChannelRegistrations.size())
{
PluginInterface *pluginInterface = m_rxChannelRegistrations[channelPluginIndex].m_plugin;
pluginInterface->createChannel(m_rxChannelRegistrations[channelPluginIndex].m_channelName, deviceAPI);
pluginInterface->createRxChannel(m_rxChannelRegistrations[channelPluginIndex].m_channelName, deviceAPI);
}
}

View File

@ -55,8 +55,8 @@ public:
int selectSampleSourceBySerialOrSequence(const QString& sourceId, const QString& sourceSerial, int sourceSequence, DeviceSourceAPI *deviceAPI);
void selectSampleSourceByDevice(void *devicePtr, DeviceSourceAPI *deviceAPI);
void populateChannelComboBox(QComboBox *channels);
void createChannelInstance(int channelPluginIndex, DeviceSourceAPI *deviceAPI);
void populateRxChannelComboBox(QComboBox *channels);
void createRxChannelInstance(int channelPluginIndex, DeviceSourceAPI *deviceAPI);
private:
struct SamplingDeviceRegistration {