mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Multi device support: use device API for channel registrations
This commit is contained in:
parent
e1e3df466f
commit
2f1c9eac6e
@ -35,6 +35,8 @@
|
|||||||
#include "chanalyzer.h"
|
#include "chanalyzer.h"
|
||||||
#include "chanalyzergui.h"
|
#include "chanalyzergui.h"
|
||||||
|
|
||||||
|
const QString ChannelAnalyzerGUI::m_channelID = "org.f4exb.sdrangelove.channel.chanalyzer";
|
||||||
|
|
||||||
ChannelAnalyzerGUI* ChannelAnalyzerGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
ChannelAnalyzerGUI* ChannelAnalyzerGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
ChannelAnalyzerGUI* gui = new ChannelAnalyzerGUI(pluginAPI, deviceAPI);
|
ChannelAnalyzerGUI* gui = new ChannelAnalyzerGUI(pluginAPI, deviceAPI);
|
||||||
@ -347,7 +349,10 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAP
|
|||||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.setVisible(true);
|
||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||||
|
|
||||||
|
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceAPI->addRollupWidget(this);
|
||||||
|
|
||||||
@ -360,7 +365,7 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAP
|
|||||||
|
|
||||||
ChannelAnalyzerGUI::~ChannelAnalyzerGUI()
|
ChannelAnalyzerGUI::~ChannelAnalyzerGUI()
|
||||||
{
|
{
|
||||||
m_pluginAPI->removeChannelInstance(this);
|
m_deviceAPI->removeChannelInstance(this);
|
||||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||||
delete m_threadedChannelizer;
|
delete m_threadedChannelizer;
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
|
@ -54,6 +54,8 @@ public:
|
|||||||
|
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void viewChanged();
|
void viewChanged();
|
||||||
void channelSampleRateChanged();
|
void channelSampleRateChanged();
|
||||||
|
@ -27,14 +27,15 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register demodulator
|
// register demodulator
|
||||||
m_pluginAPI->registerChannel("org.f4exb.sdrangelove.channel.chanalyzer", this);
|
m_pluginAPI->registerChannel(ChannelAnalyzerGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(channelName == "org.f4exb.sdrangelove.channel.chanalyzer") {
|
if(channelName == ChannelAnalyzerGUI::m_channelID)
|
||||||
|
{
|
||||||
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI);
|
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui);
|
// deviceAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
@ -45,6 +46,6 @@ PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, Devi
|
|||||||
void ChannelAnalyzerPlugin::createInstanceChannelAnalyzer(DeviceAPI *deviceAPI)
|
void ChannelAnalyzerPlugin::createInstanceChannelAnalyzer(DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI);
|
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui);
|
// deviceAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
#include "amdemod.h"
|
#include "amdemod.h"
|
||||||
|
|
||||||
|
const QString AMDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.am";
|
||||||
|
|
||||||
const int AMDemodGUI::m_rfBW[] = {
|
const int AMDemodGUI::m_rfBW[] = {
|
||||||
5000, 6250, 8330, 10000, 12500, 15000, 20000, 25000, 40000
|
5000, 6250, 8330, 10000, 12500, 15000, 20000, 25000, 40000
|
||||||
};
|
};
|
||||||
@ -232,10 +234,11 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pare
|
|||||||
m_channelMarker.setBandwidth(12500);
|
m_channelMarker.setBandwidth(12500);
|
||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.setVisible(true);
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
|
||||||
//m_pluginAPI->addChannelMarker(&m_channelMarker);
|
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
|
||||||
|
|
||||||
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||||
|
|
||||||
|
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||||
|
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceAPI->addRollupWidget(this);
|
||||||
|
|
||||||
applySettings();
|
applySettings();
|
||||||
@ -243,7 +246,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pare
|
|||||||
|
|
||||||
AMDemodGUI::~AMDemodGUI()
|
AMDemodGUI::~AMDemodGUI()
|
||||||
{
|
{
|
||||||
m_pluginAPI->removeChannelInstance(this);
|
m_deviceAPI->removeChannelInstance(this);
|
||||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||||
delete m_threadedChannelizer;
|
delete m_threadedChannelizer;
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
|
@ -35,6 +35,8 @@ public:
|
|||||||
|
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void viewChanged();
|
void viewChanged();
|
||||||
void on_deltaFrequency_changed(quint64 value);
|
void on_deltaFrequency_changed(quint64 value);
|
||||||
|
@ -29,14 +29,15 @@ void AMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register AM demodulator
|
// register AM demodulator
|
||||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.am", this);
|
m_pluginAPI->registerChannel(AMDemodGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* AMPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
PluginGUI* AMPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(channelName == "de.maintech.sdrangelove.channel.am") {
|
if(channelName == AMDemodGUI::m_channelID)
|
||||||
|
{
|
||||||
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceAPI);
|
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.am", gui);
|
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.am", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
@ -47,6 +48,6 @@ PluginGUI* AMPlugin::createChannel(const QString& channelName, DeviceAPI *device
|
|||||||
void AMPlugin::createInstanceAM(DeviceAPI *deviceAPI)
|
void AMPlugin::createInstanceAM(DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceAPI);
|
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.am", gui);
|
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.am", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
#include "bfmdemod.h"
|
#include "bfmdemod.h"
|
||||||
#include "rdstmc.h"
|
#include "rdstmc.h"
|
||||||
|
|
||||||
|
const QString BFMDemodGUI::m_channelID = "sdrangel.channel.bfm";
|
||||||
|
|
||||||
const int BFMDemodGUI::m_rfBW[] = {
|
const int BFMDemodGUI::m_rfBW[] = {
|
||||||
80000, 100000, 120000, 140000, 160000, 180000, 200000, 220000, 250000
|
80000, 100000, 120000, 140000, 160000, 180000, 200000, 220000, 250000
|
||||||
};
|
};
|
||||||
@ -397,7 +399,10 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
m_channelMarker.setBandwidth(12500);
|
m_channelMarker.setBandwidth(12500);
|
||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.setVisible(true);
|
||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||||
|
|
||||||
|
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceAPI->addRollupWidget(this);
|
||||||
|
|
||||||
@ -415,7 +420,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
BFMDemodGUI::~BFMDemodGUI()
|
BFMDemodGUI::~BFMDemodGUI()
|
||||||
{
|
{
|
||||||
m_pluginAPI->removeChannelInstance(this);
|
m_deviceAPI->removeChannelInstance(this);
|
||||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||||
delete m_threadedChannelizer;
|
delete m_threadedChannelizer;
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
|
@ -54,6 +54,8 @@ public:
|
|||||||
|
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void viewChanged();
|
void viewChanged();
|
||||||
void channelSampleRateChanged();
|
void channelSampleRateChanged();
|
||||||
|
@ -46,14 +46,15 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register BFM demodulator
|
// register BFM demodulator
|
||||||
m_pluginAPI->registerChannel("sdrangel.channel.bfm", this);
|
m_pluginAPI->registerChannel(BFMDemodGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* BFMPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
PluginGUI* BFMPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(channelName == "sdrangel.channel.bfm") {
|
if(channelName == BFMDemodGUI::m_channelID)
|
||||||
|
{
|
||||||
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("sdrangel.channel.bfm", gui);
|
// deviceAPI->registerChannelInstance("sdrangel.channel.bfm", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
@ -64,6 +65,6 @@ PluginGUI* BFMPlugin::createChannel(const QString& channelName, DeviceAPI *devic
|
|||||||
void BFMPlugin::createInstanceBFM(DeviceAPI *deviceAPI)
|
void BFMPlugin::createInstanceBFM(DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("sdrangel.channel.bfm", gui);
|
// deviceAPI->registerChannelInstance("sdrangel.channel.bfm", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,8 @@
|
|||||||
#include "dsddemod.h"
|
#include "dsddemod.h"
|
||||||
#include "dsddemodgui.h"
|
#include "dsddemodgui.h"
|
||||||
|
|
||||||
|
const QString DSDDemodGUI::m_channelID = "sdrangel.channel.dsddemod";
|
||||||
|
|
||||||
DSDDemodGUI* DSDDemodGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
DSDDemodGUI* DSDDemodGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
DSDDemodGUI* gui = new DSDDemodGUI(pluginAPI, deviceAPI);
|
DSDDemodGUI* gui = new DSDDemodGUI(pluginAPI, deviceAPI);
|
||||||
@ -288,6 +290,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||||
|
|
||||||
|
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceAPI->addRollupWidget(this);
|
||||||
|
|
||||||
@ -298,7 +301,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
DSDDemodGUI::~DSDDemodGUI()
|
DSDDemodGUI::~DSDDemodGUI()
|
||||||
{
|
{
|
||||||
m_pluginAPI->removeChannelInstance(this);
|
m_deviceAPI->removeChannelInstance(this);
|
||||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||||
delete m_threadedChannelizer;
|
delete m_threadedChannelizer;
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
|
@ -54,6 +54,8 @@ public:
|
|||||||
|
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void viewChanged();
|
void viewChanged();
|
||||||
void formatStatusText();
|
void formatStatusText();
|
||||||
|
@ -45,14 +45,15 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register DSD demodulator
|
// register DSD demodulator
|
||||||
m_pluginAPI->registerChannel("sdrangel.channel.dsddemod", this);
|
m_pluginAPI->registerChannel(DSDDemodGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(channelName == "sdrangel.channel.dsddemod") {
|
if(channelName == DSDDemodGUI::m_channelID)
|
||||||
|
{
|
||||||
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceAPI);
|
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("sdrangel.channel.dsddemod", gui);
|
// deviceAPI->registerChannelInstance("sdrangel.channel.dsddemod", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
@ -63,6 +64,6 @@ PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName, DeviceAPI *
|
|||||||
void DSDDemodPlugin::createInstanceDSDDemod(DeviceAPI *deviceAPI)
|
void DSDDemodPlugin::createInstanceDSDDemod(DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceAPI);
|
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("sdrangel.channel.dsddemod", gui);
|
// deviceAPI->registerChannelInstance("sdrangel.channel.dsddemod", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
#include "gui/basicchannelsettingswidget.h"
|
#include "gui/basicchannelsettingswidget.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
|
|
||||||
|
const QString LoRaDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.lora";
|
||||||
|
|
||||||
LoRaDemodGUI* LoRaDemodGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
LoRaDemodGUI* LoRaDemodGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
LoRaDemodGUI* gui = new LoRaDemodGUI(pluginAPI, deviceAPI);
|
LoRaDemodGUI* gui = new LoRaDemodGUI(pluginAPI, deviceAPI);
|
||||||
@ -179,7 +181,10 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget*
|
|||||||
m_channelMarker.setBandwidth(7813);
|
m_channelMarker.setBandwidth(7813);
|
||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.setVisible(true);
|
||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||||
|
|
||||||
|
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceAPI->addRollupWidget(this);
|
||||||
|
|
||||||
@ -190,7 +195,7 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget*
|
|||||||
|
|
||||||
LoRaDemodGUI::~LoRaDemodGUI()
|
LoRaDemodGUI::~LoRaDemodGUI()
|
||||||
{
|
{
|
||||||
m_pluginAPI->removeChannelInstance(this);
|
m_deviceAPI->removeChannelInstance(this);
|
||||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||||
delete m_threadedChannelizer;
|
delete m_threadedChannelizer;
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
|
@ -36,6 +36,8 @@ public:
|
|||||||
|
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void viewChanged();
|
void viewChanged();
|
||||||
void on_BW_valueChanged(int value);
|
void on_BW_valueChanged(int value);
|
||||||
|
@ -27,14 +27,15 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register demodulator
|
// register demodulator
|
||||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.lora", this);
|
m_pluginAPI->registerChannel(LoRaDemodGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* LoRaPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
PluginGUI* LoRaPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(channelName == "de.maintech.sdrangelove.channel.lora") {
|
if(channelName == LoRaDemodGUI::m_channelID)
|
||||||
|
{
|
||||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui);
|
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
@ -45,6 +46,6 @@ PluginGUI* LoRaPlugin::createChannel(const QString& channelName, DeviceAPI *devi
|
|||||||
void LoRaPlugin::createInstanceLoRa(DeviceAPI *deviceAPI)
|
void LoRaPlugin::createInstanceLoRa(DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui);
|
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
const QString NFMDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.nfm";
|
||||||
|
|
||||||
const int NFMDemodGUI::m_rfBW[] = {
|
const int NFMDemodGUI::m_rfBW[] = {
|
||||||
5000, 6250, 8330, 10000, 12500, 15000, 20000, 25000, 40000
|
5000, 6250, 8330, 10000, 12500, 15000, 20000, 25000, 40000
|
||||||
};
|
};
|
||||||
@ -301,6 +303,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||||
|
|
||||||
|
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceAPI->addRollupWidget(this);
|
||||||
|
|
||||||
@ -309,7 +312,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
NFMDemodGUI::~NFMDemodGUI()
|
NFMDemodGUI::~NFMDemodGUI()
|
||||||
{
|
{
|
||||||
m_pluginAPI->removeChannelInstance(this);
|
m_deviceAPI->removeChannelInstance(this);
|
||||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||||
delete m_threadedChannelizer;
|
delete m_threadedChannelizer;
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
|
@ -37,6 +37,8 @@ public:
|
|||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
void setCtcssFreq(Real ctcssFreq);
|
void setCtcssFreq(Real ctcssFreq);
|
||||||
|
|
||||||
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void viewChanged();
|
void viewChanged();
|
||||||
void on_deltaFrequency_changed(quint64 value);
|
void on_deltaFrequency_changed(quint64 value);
|
||||||
|
@ -27,14 +27,14 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register NFM demodulator
|
// register NFM demodulator
|
||||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.nfm", this);
|
m_pluginAPI->registerChannel(NFMDemodGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* NFMPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
PluginGUI* NFMPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(channelName == "de.maintech.sdrangelove.channel.nfm") {
|
if(channelName == NFMDemodGUI::m_channelID) {
|
||||||
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.nfm", gui);
|
// deviceAPI->registerChannelInstance(NFMDemodGUI::m_channelID, gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
@ -45,6 +45,6 @@ PluginGUI* NFMPlugin::createChannel(const QString& channelName, DeviceAPI *devic
|
|||||||
void NFMPlugin::createInstanceNFM(DeviceAPI *deviceAPI)
|
void NFMPlugin::createInstanceNFM(DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.nfm", gui);
|
// deviceAPI->registerChannelInstance(NFMDemodGUI::m_channelID, gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
const QString SSBDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.ssb";
|
||||||
|
|
||||||
SSBDemodGUI* SSBDemodGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
SSBDemodGUI* SSBDemodGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
SSBDemodGUI* gui = new SSBDemodGUI(pluginAPI, deviceAPI);
|
SSBDemodGUI* gui = new SSBDemodGUI(pluginAPI, deviceAPI);
|
||||||
@ -359,7 +361,10 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.setVisible(true);
|
||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||||
|
|
||||||
|
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceAPI->addRollupWidget(this);
|
||||||
|
|
||||||
@ -371,7 +376,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
SSBDemodGUI::~SSBDemodGUI()
|
SSBDemodGUI::~SSBDemodGUI()
|
||||||
{
|
{
|
||||||
m_pluginAPI->removeChannelInstance(this);
|
m_deviceAPI->removeChannelInstance(this);
|
||||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||||
delete m_threadedChannelizer;
|
delete m_threadedChannelizer;
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
|
@ -37,6 +37,8 @@ public:
|
|||||||
|
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void viewChanged();
|
void viewChanged();
|
||||||
void on_deltaFrequency_changed(quint64 value);
|
void on_deltaFrequency_changed(quint64 value);
|
||||||
|
@ -28,14 +28,15 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register demodulator
|
// register demodulator
|
||||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.ssb", this);
|
m_pluginAPI->registerChannel(SSBDemodGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* SSBPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
PluginGUI* SSBPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(channelName == "de.maintech.sdrangelove.channel.ssb") {
|
if(channelName == SSBDemodGUI::m_channelID)
|
||||||
|
{
|
||||||
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceAPI);
|
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.ssb", gui);
|
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.ssb", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
@ -46,6 +47,6 @@ PluginGUI* SSBPlugin::createChannel(const QString& channelName, DeviceAPI *devic
|
|||||||
void SSBPlugin::createInstanceSSB(DeviceAPI *deviceAPI)
|
void SSBPlugin::createInstanceSSB(DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceAPI);
|
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.ssb", gui);
|
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.ssb", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
#include "wfmdemod.h"
|
#include "wfmdemod.h"
|
||||||
#include "wfmdemodgui.h"
|
#include "wfmdemodgui.h"
|
||||||
|
|
||||||
|
const QString WFMDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.wfm";
|
||||||
|
|
||||||
const int WFMDemodGUI::m_rfBW[] = {
|
const int WFMDemodGUI::m_rfBW[] = {
|
||||||
48000, 80000, 120000, 140000, 160000, 180000, 200000, 220000, 250000
|
48000, 80000, 120000, 140000, 160000, 180000, 200000, 220000, 250000
|
||||||
};
|
};
|
||||||
@ -243,7 +245,10 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
m_channelMarker.setBandwidth(12500);
|
m_channelMarker.setBandwidth(12500);
|
||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.setVisible(true);
|
||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||||
|
|
||||||
|
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceAPI->addRollupWidget(this);
|
||||||
|
|
||||||
@ -252,7 +257,7 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
WFMDemodGUI::~WFMDemodGUI()
|
WFMDemodGUI::~WFMDemodGUI()
|
||||||
{
|
{
|
||||||
m_pluginAPI->removeChannelInstance(this);
|
m_deviceAPI->removeChannelInstance(this);
|
||||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||||
delete m_threadedChannelizer;
|
delete m_threadedChannelizer;
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
|
@ -35,6 +35,8 @@ public:
|
|||||||
|
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void viewChanged();
|
void viewChanged();
|
||||||
void on_deltaFrequency_changed(quint64 value);
|
void on_deltaFrequency_changed(quint64 value);
|
||||||
|
@ -28,14 +28,15 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register WFM demodulator
|
// register WFM demodulator
|
||||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.wfm", this);
|
m_pluginAPI->registerChannel(WFMDemodGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* WFMPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
PluginGUI* WFMPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(channelName == "de.maintech.sdrangelove.channel.wfm") {
|
if(channelName == WFMDemodGUI::m_channelID)
|
||||||
|
{
|
||||||
WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.wfm", gui);
|
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.wfm", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
@ -46,6 +47,6 @@ PluginGUI* WFMPlugin::createChannel(const QString& channelName, DeviceAPI *devic
|
|||||||
void WFMPlugin::createInstanceWFM(DeviceAPI *deviceAPI)
|
void WFMPlugin::createInstanceWFM(DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.wfm", gui);
|
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.wfm", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include "ui_tcpsrcgui.h"
|
#include "ui_tcpsrcgui.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
const QString TCPSrcGUI::m_channelID = "sdrangel.channel.tcpsrc";
|
||||||
|
|
||||||
TCPSrcGUI* TCPSrcGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
TCPSrcGUI* TCPSrcGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
TCPSrcGUI* gui = new TCPSrcGUI(pluginAPI, deviceAPI);
|
TCPSrcGUI* gui = new TCPSrcGUI(pluginAPI, deviceAPI);
|
||||||
@ -220,7 +222,10 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
|
|||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setColor(Qt::green);
|
m_channelMarker.setColor(Qt::green);
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.setVisible(true);
|
||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||||
|
|
||||||
|
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceAPI->addRollupWidget(this);
|
||||||
|
|
||||||
@ -231,7 +236,7 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
|
|||||||
|
|
||||||
TCPSrcGUI::~TCPSrcGUI()
|
TCPSrcGUI::~TCPSrcGUI()
|
||||||
{
|
{
|
||||||
m_pluginAPI->removeChannelInstance(this);
|
m_deviceAPI->removeChannelInstance(this);
|
||||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||||
delete m_threadedChannelizer;
|
delete m_threadedChannelizer;
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
|
@ -37,6 +37,8 @@ public:
|
|||||||
|
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void channelMarkerChanged();
|
void channelMarkerChanged();
|
||||||
void on_deltaFrequency_changed(quint64 value);
|
void on_deltaFrequency_changed(quint64 value);
|
||||||
|
@ -27,14 +27,15 @@ void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register TCP Channel Source
|
// register TCP Channel Source
|
||||||
m_pluginAPI->registerChannel("sdrangel.channel.tcpsrc", this);
|
m_pluginAPI->registerChannel(TCPSrcGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* TCPSrcPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
PluginGUI* TCPSrcPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(channelName == "sdrangel.channel.tcpsrc") {
|
if(channelName == TCPSrcGUI::m_channelID)
|
||||||
|
{
|
||||||
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceAPI);
|
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
|
// deviceAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
@ -45,6 +46,6 @@ PluginGUI* TCPSrcPlugin::createChannel(const QString& channelName, DeviceAPI *de
|
|||||||
void TCPSrcPlugin::createInstanceTCPSrc(DeviceAPI *deviceAPI)
|
void TCPSrcPlugin::createInstanceTCPSrc(DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceAPI);
|
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
|
// deviceAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "udpsrc.h"
|
#include "udpsrc.h"
|
||||||
|
|
||||||
|
const QString UDPSrcGUI::m_channelID = "sdrangel.channel.udpsrc";
|
||||||
|
|
||||||
UDPSrcGUI* UDPSrcGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
UDPSrcGUI* UDPSrcGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
UDPSrcGUI* gui = new UDPSrcGUI(pluginAPI, deviceAPI);
|
UDPSrcGUI* gui = new UDPSrcGUI(pluginAPI, deviceAPI);
|
||||||
@ -260,7 +262,10 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
|
|||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setColor(Qt::green);
|
m_channelMarker.setColor(Qt::green);
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.setVisible(true);
|
||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||||
|
|
||||||
|
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceAPI->addRollupWidget(this);
|
||||||
|
|
||||||
@ -272,7 +277,7 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
|
|||||||
|
|
||||||
UDPSrcGUI::~UDPSrcGUI()
|
UDPSrcGUI::~UDPSrcGUI()
|
||||||
{
|
{
|
||||||
m_pluginAPI->removeChannelInstance(this);
|
m_deviceAPI->removeChannelInstance(this);
|
||||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||||
delete m_threadedChannelizer;
|
delete m_threadedChannelizer;
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
|
@ -55,6 +55,8 @@ public:
|
|||||||
|
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void channelMarkerChanged();
|
void channelMarkerChanged();
|
||||||
void on_deltaFrequency_changed(quint64 value);
|
void on_deltaFrequency_changed(quint64 value);
|
||||||
|
@ -46,14 +46,15 @@ void UDPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register TCP Channel Source
|
// register TCP Channel Source
|
||||||
m_pluginAPI->registerChannel("sdrangel.channel.udpsrc", this);
|
m_pluginAPI->registerChannel(UDPSrcGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* UDPSrcPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
PluginGUI* UDPSrcPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(channelName == "sdrangel.channel.udpsrc") {
|
if(channelName == UDPSrcGUI::m_channelID)
|
||||||
|
{
|
||||||
UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceAPI);
|
UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
@ -64,6 +65,6 @@ PluginGUI* UDPSrcPlugin::createChannel(const QString& channelName, DeviceAPI *de
|
|||||||
void UDPSrcPlugin::createInstanceUDPSrc(DeviceAPI *deviceAPI)
|
void UDPSrcPlugin::createInstanceUDPSrc(DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceAPI);
|
UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceAPI);
|
||||||
m_pluginAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -13,15 +13,15 @@ void PluginAPI::registerChannel(const QString& channelName, PluginInterface* plu
|
|||||||
m_pluginManager->registerChannel(channelName, plugin);
|
m_pluginManager->registerChannel(channelName, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PluginAPI::registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI)
|
//void PluginAPI::registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI)
|
||||||
{
|
//{
|
||||||
m_pluginManager->registerChannelInstance(channelName, pluginGUI);
|
// m_pluginManager->registerChannelInstance(channelName, pluginGUI);
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
void PluginAPI::removeChannelInstance(PluginGUI* pluginGUI)
|
//void PluginAPI::removeChannelInstance(PluginGUI* pluginGUI)
|
||||||
{
|
//{
|
||||||
m_pluginManager->removeChannelInstance(pluginGUI);
|
// m_pluginManager->removeChannelInstance(pluginGUI);
|
||||||
}
|
//}
|
||||||
|
|
||||||
void PluginAPI::registerSampleSource(const QString& sourceName, PluginInterface* plugin)
|
void PluginAPI::registerSampleSource(const QString& sourceName, PluginInterface* plugin)
|
||||||
{
|
{
|
||||||
|
@ -35,8 +35,8 @@ public:
|
|||||||
|
|
||||||
// Channel stuff
|
// Channel stuff
|
||||||
void registerChannel(const QString& channelName, PluginInterface* plugin);
|
void registerChannel(const QString& channelName, PluginInterface* plugin);
|
||||||
void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
// void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
||||||
void removeChannelInstance(PluginGUI* pluginGUI);
|
// void removeChannelInstance(PluginGUI* pluginGUI);
|
||||||
ChannelRegistrations *getChannelRegistrations();
|
ChannelRegistrations *getChannelRegistrations();
|
||||||
|
|
||||||
// Sample Source stuff
|
// Sample Source stuff
|
||||||
|
@ -59,22 +59,22 @@ void PluginManager::registerChannel(const QString& channelName, PluginInterface*
|
|||||||
m_channelRegistrations.append(PluginAPI::ChannelRegistration(channelName, plugin));
|
m_channelRegistrations.append(PluginAPI::ChannelRegistration(channelName, plugin));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PluginManager::registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI)
|
//void PluginManager::registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI)
|
||||||
{
|
//{
|
||||||
m_channelInstanceRegistrations.append(ChannelInstanceRegistration(channelName, pluginGUI));
|
// m_channelInstanceRegistrations.append(ChannelInstanceRegistration(channelName, pluginGUI));
|
||||||
renameChannelInstances();
|
// renameChannelInstances();
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
void PluginManager::removeChannelInstance(PluginGUI* pluginGUI)
|
//void PluginManager::removeChannelInstance(PluginGUI* pluginGUI)
|
||||||
{
|
//{
|
||||||
for(ChannelInstanceRegistrations::iterator it = m_channelInstanceRegistrations.begin(); it != m_channelInstanceRegistrations.end(); ++it) {
|
// for(ChannelInstanceRegistrations::iterator it = m_channelInstanceRegistrations.begin(); it != m_channelInstanceRegistrations.end(); ++it) {
|
||||||
if(it->m_gui == pluginGUI) {
|
// if(it->m_gui == pluginGUI) {
|
||||||
m_channelInstanceRegistrations.erase(it);
|
// m_channelInstanceRegistrations.erase(it);
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
renameChannelInstances();
|
// renameChannelInstances();
|
||||||
}
|
//}
|
||||||
|
|
||||||
void PluginManager::registerSampleSource(const QString& sourceName, PluginInterface* plugin)
|
void PluginManager::registerSampleSource(const QString& sourceName, PluginInterface* plugin)
|
||||||
{
|
{
|
||||||
|
@ -43,8 +43,8 @@ public:
|
|||||||
|
|
||||||
// Callbacks from the plugins
|
// Callbacks from the plugins
|
||||||
void registerChannel(const QString& channelName, PluginInterface* plugin);
|
void registerChannel(const QString& channelName, PluginInterface* plugin);
|
||||||
void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
// void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
||||||
void removeChannelInstance(PluginGUI* pluginGUI);
|
// void removeChannelInstance(PluginGUI* pluginGUI);
|
||||||
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
|
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
|
||||||
|
|
||||||
PluginAPI::ChannelRegistrations *getChannelRegistrations() { return &m_channelRegistrations; }
|
PluginAPI::ChannelRegistrations *getChannelRegistrations() { return &m_channelRegistrations; }
|
||||||
|
Loading…
Reference in New Issue
Block a user