mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-29 19:28:47 -05:00
Plugin interface: simplify createRxChannelGUI
This commit is contained in:
parent
0f7faff299
commit
31aacc9571
@ -34,15 +34,9 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerRxChannel(ChannelAnalyzer::m_channelIdURI, ChannelAnalyzer::m_channelId, this);
|
m_pluginAPI->registerRxChannel(ChannelAnalyzer::m_channelIdURI, ChannelAnalyzer::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == ChannelAnalyzer::m_channelIdURI)
|
return ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||||
|
@ -19,7 +19,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -49,15 +49,9 @@ void ChannelAnalyzerNGPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerRxChannel(ChannelAnalyzerNG::m_channelIdURI, ChannelAnalyzerNG::m_channelId, this);
|
m_pluginAPI->registerRxChannel(ChannelAnalyzerNG::m_channelIdURI, ChannelAnalyzerNG::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* ChannelAnalyzerNGPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* ChannelAnalyzerNGPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == ChannelAnalyzerNG::m_channelIdURI)
|
return ChannelAnalyzerNGGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
ChannelAnalyzerNGGUI* gui = ChannelAnalyzerNGGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasebandSampleSink* ChannelAnalyzerNGPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
BasebandSampleSink* ChannelAnalyzerNGPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -34,15 +34,9 @@ void AMDemodPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerRxChannel(AMDemod::m_channelIdURI, AMDemod::m_channelId, this);
|
m_pluginAPI->registerRxChannel(AMDemod::m_channelIdURI, AMDemod::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == AMDemod::m_channelIdURI)
|
return AMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasebandSampleSink* AMDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
BasebandSampleSink* AMDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -54,17 +54,9 @@ void ATVDemodPlugin::initPlugin(PluginAPI* ptrPluginAPI)
|
|||||||
m_ptrPluginAPI->registerRxChannel(ATVDemod::m_channelIdURI, ATVDemod::m_channelId, this);
|
m_ptrPluginAPI->registerRxChannel(ATVDemod::m_channelIdURI, ATVDemod::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(strChannelName == ATVDemod::m_channelIdURI)
|
return ATVDemodGUI::create(m_ptrPluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
ATVDemodGUI* ptrGui = ATVDemodGUI::create(m_ptrPluginAPI, deviceUISet, rxChannel);
|
|
||||||
return ptrGui;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasebandSampleSink* ATVDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
BasebandSampleSink* ATVDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* ptrPluginAPI);
|
void initPlugin(PluginAPI* ptrPluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -51,15 +51,9 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerRxChannel(BFMDemod::m_channelIdURI, BFMDemod::m_channelId, this);
|
m_pluginAPI->registerRxChannel(BFMDemod::m_channelIdURI, BFMDemod::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* BFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* BFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == BFMDemod::m_channelIdURI)
|
return BFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -51,15 +51,9 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerRxChannel(DSDDemod::m_channelIdURI, DSDDemod::m_channelId, this);
|
m_pluginAPI->registerRxChannel(DSDDemod::m_channelIdURI, DSDDemod::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == DSDDemod::m_channelIdURI)
|
return DSDDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasebandSampleSink* DSDDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
BasebandSampleSink* DSDDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -33,15 +33,9 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerRxChannel(LoRaDemod::m_channelIdURI, LoRaDemod::m_channelId, this);
|
m_pluginAPI->registerRxChannel(LoRaDemod::m_channelIdURI, LoRaDemod::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == LoRaDemod::m_channelIdURI)
|
return LoRaDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasebandSampleSink* LoRaPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
BasebandSampleSink* LoRaPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||||
|
@ -18,7 +18,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -35,21 +35,15 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
|
|
||||||
#ifdef SERVER_MODE
|
#ifdef SERVER_MODE
|
||||||
PluginInstanceGUI* NFMPlugin::createRxChannelGUI(
|
PluginInstanceGUI* NFMPlugin::createRxChannelGUI(
|
||||||
const QString& channelName __attribute__((unused)),
|
|
||||||
DeviceUISet *deviceUISet __attribute__((unused)),
|
DeviceUISet *deviceUISet __attribute__((unused)),
|
||||||
BasebandSampleSink *rxChannel __attribute__((unused)))
|
BasebandSampleSink *rxChannel __attribute__((unused)))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
PluginInstanceGUI* NFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* NFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == NFMDemod::m_channelIdURI) {
|
return NFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -34,15 +34,9 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerRxChannel(SSBDemod::m_channelIdURI, SSBDemod::m_channelId, this);
|
m_pluginAPI->registerRxChannel(SSBDemod::m_channelIdURI, SSBDemod::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* SSBPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* SSBPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == SSBDemod::m_channelIdURI)
|
return SSBDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasebandSampleSink* SSBPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
BasebandSampleSink* SSBPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||||
|
@ -18,7 +18,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -34,15 +34,9 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerRxChannel(WFMDemod::m_channelIdURI, WFMDemod::m_channelId, this);
|
m_pluginAPI->registerRxChannel(WFMDemod::m_channelIdURI, WFMDemod::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* WFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* WFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == WFMDemod::m_channelIdURI)
|
return WFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasebandSampleSink* WFMPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
BasebandSampleSink* WFMPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||||
|
@ -18,7 +18,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -34,17 +34,9 @@ void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerRxChannel(TCPSrc::m_channelIdURI, TCPSrc::m_channelId, this);
|
m_pluginAPI->registerRxChannel(TCPSrc::m_channelIdURI, TCPSrc::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* TCPSrcPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* TCPSrcPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == TCPSrc::m_channelIdURI)
|
return TCPSrcGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
// deviceAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
|
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasebandSampleSink* TCPSrcPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
BasebandSampleSink* TCPSrcPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||||
|
@ -18,7 +18,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -51,17 +51,9 @@ void UDPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerRxChannel(UDPSrc::m_channelIdURI, UDPSrc::m_channelId, this);
|
m_pluginAPI->registerRxChannel(UDPSrc::m_channelIdURI, UDPSrc::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* UDPSrcPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
PluginInstanceGUI* UDPSrcPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
{
|
{
|
||||||
if(channelName == UDPSrc::m_channelIdURI)
|
return UDPSrcGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||||
{
|
|
||||||
UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
|
||||||
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
|
||||||
return gui;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasebandSampleSink* UDPSrcPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
BasebandSampleSink* UDPSrcPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||||
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
virtual BasebandSampleSink* createRxChannelBS(DeviceSourceAPI *deviceAPI);
|
||||||
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
virtual ChannelSinkAPI* createRxChannelCS(DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
|
@ -79,7 +79,6 @@ public:
|
|||||||
// channel Rx plugins
|
// channel Rx plugins
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createRxChannelGUI(
|
virtual PluginInstanceGUI* createRxChannelGUI(
|
||||||
const QString& channelName __attribute__((unused)),
|
|
||||||
DeviceUISet *deviceUISet __attribute__((unused)),
|
DeviceUISet *deviceUISet __attribute__((unused)),
|
||||||
BasebandSampleSink *rxChannel __attribute__((unused)))
|
BasebandSampleSink *rxChannel __attribute__((unused)))
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
@ -184,7 +184,7 @@ void PluginManager::createRxChannelInstance(int channelPluginIndex, DeviceUISet
|
|||||||
{
|
{
|
||||||
PluginInterface *pluginInterface = m_rxChannelRegistrations[channelPluginIndex].m_plugin;
|
PluginInterface *pluginInterface = m_rxChannelRegistrations[channelPluginIndex].m_plugin;
|
||||||
BasebandSampleSink *rxChannel = pluginInterface->createRxChannelBS(deviceAPI);
|
BasebandSampleSink *rxChannel = pluginInterface->createRxChannelBS(deviceAPI);
|
||||||
pluginInterface->createRxChannelGUI(m_rxChannelRegistrations[channelPluginIndex].m_channelIdURI, deviceUISet, rxChannel);
|
pluginInterface->createRxChannelGUI(deviceUISet, rxChannel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,11 +176,11 @@ void DeviceUISet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginA
|
|||||||
if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI)
|
if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI)
|
||||||
{
|
{
|
||||||
qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channelIdURI));
|
qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channelIdURI));
|
||||||
BasebandSampleSink *rxChannel = (*channelRegistrations)[i].m_plugin->createRxChannelBS(m_deviceSourceAPI);
|
BasebandSampleSink *rxChannel
|
||||||
PluginInstanceGUI *rxChannelGUI = (*channelRegistrations)[i].m_plugin->createRxChannelGUI(
|
= (*channelRegistrations)[i].m_plugin->createRxChannelBS(m_deviceSourceAPI);
|
||||||
channelConfig.m_channelIdURI, this, rxChannel);
|
PluginInstanceGUI *rxChannelGUI
|
||||||
reg = ChannelInstanceRegistration(
|
= (*channelRegistrations)[i].m_plugin->createRxChannelGUI(this, rxChannel);
|
||||||
channelConfig.m_channelIdURI, rxChannelGUI);
|
reg = ChannelInstanceRegistration(channelConfig.m_channelIdURI, rxChannelGUI);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user