2015-01-10 19:12:58 -05:00
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin/pluginapi.h"
|
|
|
|
#include "loraplugin.h"
|
|
|
|
#include "lorademodgui.h"
|
|
|
|
|
|
|
|
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
|
|
|
|
QString("LoRa Demodulator"),
|
2016-05-17 09:29:28 -04:00
|
|
|
QString("2.0.0"),
|
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) :
|
|
|
|
QObject(parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const PluginDescriptor& LoRaPlugin::getPluginDescriptor() const
|
|
|
|
{
|
|
|
|
return m_pluginDescriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
|
|
|
{
|
|
|
|
m_pluginAPI = pluginAPI;
|
|
|
|
|
|
|
|
// register demodulator
|
2016-05-16 13:37:53 -04:00
|
|
|
m_pluginAPI->registerChannel(LoRaDemodGUI::m_channelID, this);
|
2015-01-10 19:12:58 -05:00
|
|
|
}
|
|
|
|
|
2016-05-16 04:05:09 -04:00
|
|
|
PluginGUI* LoRaPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
2015-01-10 19:12:58 -05:00
|
|
|
{
|
2016-05-16 13:37:53 -04:00
|
|
|
if(channelName == LoRaDemodGUI::m_channelID)
|
|
|
|
{
|
2016-05-16 04:05:09 -04:00
|
|
|
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
2015-01-10 19:12:58 -05:00
|
|
|
return gui;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-16 04:05:09 -04:00
|
|
|
void LoRaPlugin::createInstanceLoRa(DeviceAPI *deviceAPI)
|
2015-01-10 19:12:58 -05:00
|
|
|
{
|
2016-05-16 04:05:09 -04:00
|
|
|
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
2015-01-10 19:12:58 -05:00
|
|
|
}
|