2017-05-05 04:40:45 -04:00
|
|
|
#include "chanalyzerplugin.h"
|
2016-10-02 07:18:07 -04:00
|
|
|
|
2015-06-21 06:46:47 -04:00
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin/pluginapi.h"
|
2016-10-02 07:18:07 -04:00
|
|
|
|
2017-05-05 04:40:45 -04:00
|
|
|
#include "chanalyzergui.h"
|
2017-11-08 08:23:49 -05:00
|
|
|
#include "chanalyzer.h"
|
2015-06-21 06:46:47 -04:00
|
|
|
|
|
|
|
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
|
|
|
|
QString("Channel Analyzer"),
|
2017-12-17 18:06:01 -05:00
|
|
|
QString("3.9.0"),
|
2015-09-01 19:16:40 -04:00
|
|
|
QString("(c) Edouard Griffiths, F4EXB"),
|
|
|
|
QString("https://github.com/f4exb/sdrangel"),
|
2015-06-21 06:46:47 -04:00
|
|
|
true,
|
2015-09-01 19:16:40 -04:00
|
|
|
QString("https://github.com/f4exb/sdrangel")
|
2015-06-21 06:46:47 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
ChannelAnalyzerPlugin::ChannelAnalyzerPlugin(QObject* parent) :
|
2017-05-05 04:40:45 -04:00
|
|
|
QObject(parent),
|
|
|
|
m_pluginAPI(0)
|
2015-06-21 06:46:47 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const PluginDescriptor& ChannelAnalyzerPlugin::getPluginDescriptor() const
|
|
|
|
{
|
|
|
|
return m_pluginDescriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
|
|
|
|
{
|
|
|
|
m_pluginAPI = pluginAPI;
|
|
|
|
|
|
|
|
// register demodulator
|
2017-11-22 19:19:32 -05:00
|
|
|
m_pluginAPI->registerRxChannel(ChannelAnalyzer::m_channelIdURI, ChannelAnalyzer::m_channelId, this);
|
2015-06-21 06:46:47 -04:00
|
|
|
}
|
|
|
|
|
2017-11-08 19:03:05 -05:00
|
|
|
PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
2015-06-21 06:46:47 -04:00
|
|
|
{
|
2017-11-22 19:19:32 -05:00
|
|
|
if(channelName == ChannelAnalyzer::m_channelIdURI)
|
2016-05-16 13:37:53 -04:00
|
|
|
{
|
2017-11-08 19:03:05 -05:00
|
|
|
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
2015-06-21 06:46:47 -04:00
|
|
|
return gui;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
2017-11-08 08:23:49 -05:00
|
|
|
|
2017-12-23 03:54:42 -05:00
|
|
|
BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
2017-11-08 08:23:49 -05:00
|
|
|
{
|
2017-12-23 03:54:42 -05:00
|
|
|
return new ChannelAnalyzer(deviceAPI);
|
2017-11-08 08:23:49 -05:00
|
|
|
}
|
2017-12-17 17:15:42 -05:00
|
|
|
|
2017-12-23 03:54:42 -05:00
|
|
|
ChannelSinkAPI* ChannelAnalyzerPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI)
|
2017-12-17 17:15:42 -05:00
|
|
|
{
|
2017-12-22 23:56:40 -05:00
|
|
|
return new ChannelAnalyzer(deviceAPI);
|
2017-12-17 17:15:42 -05:00
|
|
|
}
|