1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-11-10 00:00:42 -05:00

80 lines
2.8 KiB
C++
Raw Normal View History

///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019-2020 Edouard Griffiths, F4EXB //
// //
// 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/>. //
///////////////////////////////////////////////////////////////////////////////////
2015-01-11 00:12:58 +00:00
#include <QtPlugin>
#include "plugin/pluginapi.h"
2020-03-03 21:52:46 +01:00
#include "chirpchatplugin.h"
#ifndef SERVER_MODE
2020-03-03 21:52:46 +01:00
#include "chirpchatdemodgui.h"
#endif
2020-03-03 21:52:46 +01:00
#include "chirpchatdemod.h"
2015-01-11 00:12:58 +00:00
2020-03-03 21:52:46 +01:00
const PluginDescriptor ChirpChatPlugin::m_pluginDescriptor = {
ChirpChatDemod::m_channelId,
QString("ChirpChat Demodulator"),
QString("5.6.0"),
2020-02-12 13:17:15 +01:00
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
2015-01-11 00:12:58 +00:00
true,
2020-02-12 13:17:15 +01:00
QString("https://github.com/f4exb/sdrangel")
2015-01-11 00:12:58 +00:00
};
2020-03-03 21:52:46 +01:00
ChirpChatPlugin::ChirpChatPlugin(QObject* parent) :
2017-05-05 10:40:45 +02:00
QObject(parent),
m_pluginAPI(nullptr)
2015-01-11 00:12:58 +00:00
{
}
2020-03-03 21:52:46 +01:00
const PluginDescriptor& ChirpChatPlugin::getPluginDescriptor() const
2015-01-11 00:12:58 +00:00
{
return m_pluginDescriptor;
}
2020-03-03 21:52:46 +01:00
void ChirpChatPlugin::initPlugin(PluginAPI* pluginAPI)
2015-01-11 00:12:58 +00:00
{
m_pluginAPI = pluginAPI;
// register demodulator
2020-03-03 21:52:46 +01:00
m_pluginAPI->registerRxChannel(ChirpChatDemod::m_channelIdURI, ChirpChatDemod::m_channelId, this);
2015-01-11 00:12:58 +00:00
}
#ifdef SERVER_MODE
2020-03-03 21:52:46 +01:00
PluginInstanceGUI* ChirpChatPlugin::createRxChannelGUI(
DeviceUISet *deviceUISet,
BasebandSampleSink *rxChannel) const
{
return 0;
}
#else
2020-03-03 21:52:46 +01:00
PluginInstanceGUI* ChirpChatPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const
2015-01-11 00:12:58 +00:00
{
2020-03-03 21:52:46 +01:00
return ChirpChatDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
2015-01-11 00:12:58 +00:00
}
#endif
2020-03-03 21:52:46 +01:00
BasebandSampleSink* ChirpChatPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const
{
2020-03-03 21:52:46 +01:00
return new ChirpChatDemod(deviceAPI);
}
2017-12-17 23:15:42 +01:00
2020-03-03 21:52:46 +01:00
ChannelAPI* ChirpChatPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
2017-12-17 23:15:42 +01:00
{
2020-03-03 21:52:46 +01:00
return new ChirpChatDemod(deviceAPI);
2017-12-17 23:15:42 +01:00
}