mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-17 13:51:47 -05:00
Added demod constructor interface in the plugin API. Created method in AM demod
This commit is contained in:
parent
aa56988d83
commit
cef9d5d7bc
@ -3,6 +3,7 @@
|
|||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
|
|
||||||
#include "amdemodgui.h"
|
#include "amdemodgui.h"
|
||||||
|
#include "amdemod.h"
|
||||||
#include "amdemodplugin.h"
|
#include "amdemodplugin.h"
|
||||||
|
|
||||||
const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = {
|
const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = {
|
||||||
@ -40,6 +41,17 @@ PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(const QString& channelName,
|
|||||||
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceUISet);
|
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BasebandSampleSink* AMDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||||
|
{
|
||||||
|
if(channelName == AMDemodGUI::m_channelID)
|
||||||
|
{
|
||||||
|
AMDemod* sink = new AMDemod(deviceAPI);
|
||||||
|
return sink;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "plugin/plugininterface.h"
|
#include "plugin/plugininterface.h"
|
||||||
|
|
||||||
class DeviceUISet;
|
class DeviceUISet;
|
||||||
|
class BasebandSampleSink;
|
||||||
|
|
||||||
class AMDemodPlugin : public QObject, PluginInterface {
|
class AMDemodPlugin : public QObject, PluginInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -34,6 +35,7 @@ public:
|
|||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||||
|
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const PluginDescriptor m_pluginDescriptor;
|
static const PluginDescriptor m_pluginDescriptor;
|
||||||
|
@ -22,6 +22,8 @@ class PluginInstanceGUI;
|
|||||||
class QWidget;
|
class QWidget;
|
||||||
class DeviceSampleSource;
|
class DeviceSampleSource;
|
||||||
class DeviceSampleSink;
|
class DeviceSampleSink;
|
||||||
|
class BasebandSampleSink;
|
||||||
|
class BasebandSampleSource;
|
||||||
|
|
||||||
class PluginInterface {
|
class PluginInterface {
|
||||||
public:
|
public:
|
||||||
@ -76,13 +78,23 @@ public:
|
|||||||
DeviceUISet *deviceUISet __attribute__((unused)) )
|
DeviceUISet *deviceUISet __attribute__((unused)) )
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
// channel Tx plugins
|
virtual BasebandSampleSink* createRxChannel(
|
||||||
|
const QString& channelName __attribute__((unused)),
|
||||||
|
DeviceSourceAPI *deviceAPI __attribute__((unused)) )
|
||||||
|
{ return 0; }
|
||||||
|
|
||||||
|
// channel Tx plugins
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createTxChannelGUI(
|
virtual PluginInstanceGUI* createTxChannelGUI(
|
||||||
const QString& channelName __attribute__((unused)),
|
const QString& channelName __attribute__((unused)),
|
||||||
DeviceUISet *deviceUISet __attribute__((unused)) )
|
DeviceUISet *deviceUISet __attribute__((unused)) )
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
|
virtual BasebandSampleSource* createTxChannel(
|
||||||
|
const QString& channelName __attribute__((unused)),
|
||||||
|
DeviceSinkAPI *deviceAPI __attribute__((unused)) )
|
||||||
|
{ return 0; }
|
||||||
|
|
||||||
// device source plugins only
|
// device source plugins only
|
||||||
|
|
||||||
virtual SamplingDevices enumSampleSources() { return SamplingDevices(); }
|
virtual SamplingDevices enumSampleSources() { return SamplingDevices(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user