1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-05-24 03:02:29 -04:00

57 lines
1.2 KiB
C++
Raw Normal View History

2015-01-11 00:12:58 +00:00
#include <QtPlugin>
#include "plugin/pluginapi.h"
2017-10-08 02:26:47 +02:00
#include "loraplugin.h"
#include "lorademodgui.h"
#include "lorademod.h"
2015-01-11 00:12:58 +00:00
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
LoRaDemod::m_channelId,
2015-01-11 00:12:58 +00:00
QString("LoRa Demodulator"),
2020-10-06 07:41:32 +02:00
QString("4.19.0"),
2015-01-11 00:12:58 +00:00
QString("(c) 2015 John Greb"),
QString("http://www.maintech.de"),
true,
QString("github.com/hexameron/rtl-sdrangelove")
};
LoRaPlugin::LoRaPlugin(QObject* parent) :
2017-05-05 10:40:45 +02:00
QObject(parent),
m_pluginAPI(0)
2015-01-11 00:12:58 +00:00
{
}
const PluginDescriptor& LoRaPlugin::getPluginDescriptor() const
{
return m_pluginDescriptor;
}
void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
{
m_pluginAPI = pluginAPI;
// register demodulator
m_pluginAPI->registerRxChannel(LoRaDemod::m_channelIdURI, LoRaDemod::m_channelId, this);
2015-01-11 00:12:58 +00:00
}
void LoRaPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
{
if (bs || cs)
{
LoRaDemod *instance = new LoRaDemod(deviceAPI);
if (bs) {
*bs = instance;
}
if (cs) {
*cs = instance;
}
}
}
2017-12-17 23:15:42 +01:00
ChannelGUI* LoRaPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const
2017-12-17 23:15:42 +01:00
{
return LoRaDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
2017-12-17 23:15:42 +01:00
}