1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 18:15:45 -05:00
sdrangel/plugins/channelrx/demodvormc/vordemodmcplugin.cpp

93 lines
3.1 KiB
C++
Raw Normal View History

2020-11-24 07:31:16 -05:00
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2016 Edouard Griffiths, F4EXB //
// Copyright (C) 2020 Jon Beniston, M7RCE //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <QtPlugin>
#include "plugin/pluginapi.h"
#ifndef SERVER_MODE
#include "vordemodmcgui.h"
2020-11-24 07:31:16 -05:00
#endif
#include "vordemodmc.h"
#include "vordemodmcwebapiadapter.h"
#include "vordemodmcplugin.h"
2020-11-24 07:31:16 -05:00
const PluginDescriptor VORDemodMCPlugin::m_pluginDescriptor = {
VORDemodMC::m_channelId,
QStringLiteral("VOR Multi Channel Demodulator"),
2022-03-30 16:16:08 -04:00
QStringLiteral("6.20.2"),
2020-11-24 08:51:35 -05:00
QStringLiteral("(c) Jon Beniston, M7RCE"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
2020-11-24 07:31:16 -05:00
true,
2020-11-24 08:51:35 -05:00
QStringLiteral("https://github.com/f4exb/sdrangel")
2020-11-24 07:31:16 -05:00
};
VORDemodMCPlugin::VORDemodMCPlugin(QObject* parent) :
2020-11-24 07:31:16 -05:00
QObject(parent),
m_pluginAPI(0)
{
}
const PluginDescriptor& VORDemodMCPlugin::getPluginDescriptor() const
2020-11-24 07:31:16 -05:00
{
return m_pluginDescriptor;
}
void VORDemodMCPlugin::initPlugin(PluginAPI* pluginAPI)
2020-11-24 07:31:16 -05:00
{
m_pluginAPI = pluginAPI;
m_pluginAPI->registerRxChannel(VORDemodMC::m_channelIdURI, VORDemodMC::m_channelId, this);
2020-11-24 07:31:16 -05:00
}
void VORDemodMCPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
2020-11-24 07:31:16 -05:00
{
if (bs || cs)
{
VORDemodMC *instance = new VORDemodMC(deviceAPI);
2020-11-24 07:31:16 -05:00
if (bs) {
*bs = instance;
}
if (cs) {
*cs = instance;
}
}
}
#ifdef SERVER_MODE
ChannelGUI* VORDemodMCPlugin::createRxChannelGUI(
2020-11-24 07:31:16 -05:00
DeviceUISet *deviceUISet,
BasebandSampleSink *rxChannel) const
{
2020-11-24 09:15:11 -05:00
(void) deviceUISet;
(void) rxChannel;
2020-11-24 07:31:16 -05:00
return 0;
}
#else
ChannelGUI* VORDemodMCPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const
2020-11-24 07:31:16 -05:00
{
return VORDemodMCGUI::create(m_pluginAPI, deviceUISet, rxChannel);
2020-11-24 07:31:16 -05:00
}
#endif
ChannelWebAPIAdapter* VORDemodMCPlugin::createChannelWebAPIAdapter() const
2020-11-24 07:31:16 -05:00
{
return new VORDemodMCWebAPIAdapter();
2020-11-24 07:31:16 -05:00
}