2015-01-10 19:12:58 -05:00
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin/pluginapi.h"
|
2016-10-02 07:18:07 -04:00
|
|
|
|
2017-10-07 20:26:47 -04:00
|
|
|
#include "loraplugin.h"
|
|
|
|
#include "lorademodgui.h"
|
2017-11-08 08:23:49 -05:00
|
|
|
#include "lorademod.h"
|
2015-01-10 19:12:58 -05:00
|
|
|
|
|
|
|
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
|
2019-12-15 19:03:47 -05:00
|
|
|
LoRaDemod::m_channelId,
|
2015-01-10 19:12:58 -05:00
|
|
|
QString("LoRa Demodulator"),
|
2020-05-16 02:15:47 -04:00
|
|
|
QString("4.14.6"),
|
2015-01-10 19:12:58 -05: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 04:40:45 -04:00
|
|
|
QObject(parent),
|
|
|
|
m_pluginAPI(0)
|
2015-01-10 19:12:58 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const PluginDescriptor& LoRaPlugin::getPluginDescriptor() const
|
|
|
|
{
|
|
|
|
return m_pluginDescriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
|
|
|
{
|
|
|
|
m_pluginAPI = pluginAPI;
|
|
|
|
|
|
|
|
// register demodulator
|
2017-11-22 19:19:32 -05:00
|
|
|
m_pluginAPI->registerRxChannel(LoRaDemod::m_channelIdURI, LoRaDemod::m_channelId, this);
|
2015-01-10 19:12:58 -05:00
|
|
|
}
|
|
|
|
|
2020-10-01 17:23:39 -04:00
|
|
|
void LoRaPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
|
2017-11-08 08:23:49 -05:00
|
|
|
{
|
2020-10-01 17:23:39 -04:00
|
|
|
if (bs || cs)
|
|
|
|
{
|
|
|
|
LoRaDemod *instance = new LoRaDemod(deviceAPI);
|
|
|
|
|
|
|
|
if (bs) {
|
|
|
|
*bs = instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (cs) {
|
|
|
|
*cs = instance;
|
|
|
|
}
|
|
|
|
}
|
2017-11-08 08:23:49 -05:00
|
|
|
}
|
2017-12-17 17:15:42 -05:00
|
|
|
|
2020-10-04 00:16:15 -04:00
|
|
|
ChannelGUI* LoRaPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const
|
2017-12-17 17:15:42 -05:00
|
|
|
{
|
2020-10-01 17:23:39 -04:00
|
|
|
return LoRaDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
2017-12-17 17:15:42 -05:00
|
|
|
}
|