2015-01-11 00:12:58 +00:00
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin/pluginapi.h"
|
2016-10-02 13:18:07 +02:00
|
|
|
|
2017-10-08 02:26:47 +02:00
|
|
|
#include "loraplugin.h"
|
|
|
|
#include "lorademodgui.h"
|
2017-11-08 14:23:49 +01:00
|
|
|
#include "lorademod.h"
|
2015-01-11 00:12:58 +00:00
|
|
|
|
|
|
|
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
|
2019-12-16 01:03:47 +01:00
|
|
|
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
|
2017-11-23 01:19:32 +01:00
|
|
|
m_pluginAPI->registerRxChannel(LoRaDemod::m_channelIdURI, LoRaDemod::m_channelId, this);
|
2015-01-11 00:12:58 +00:00
|
|
|
}
|
|
|
|
|
2020-10-01 23:23:39 +02:00
|
|
|
void LoRaPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
|
2017-11-08 14:23:49 +01:00
|
|
|
{
|
2020-10-01 23:23:39 +02:00
|
|
|
if (bs || cs)
|
|
|
|
{
|
|
|
|
LoRaDemod *instance = new LoRaDemod(deviceAPI);
|
|
|
|
|
|
|
|
if (bs) {
|
|
|
|
*bs = instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (cs) {
|
|
|
|
*cs = instance;
|
|
|
|
}
|
|
|
|
}
|
2017-11-08 14:23:49 +01:00
|
|
|
}
|
2017-12-17 23:15:42 +01:00
|
|
|
|
2020-10-04 06:16:15 +02:00
|
|
|
ChannelGUI* LoRaPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const
|
2017-12-17 23:15:42 +01:00
|
|
|
{
|
2020-10-01 23:23:39 +02:00
|
|
|
return LoRaDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
2017-12-17 23:15:42 +01:00
|
|
|
}
|