1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 00:18:37 -05:00

Created demod constructor method in all Rx channel plugins

This commit is contained in:
f4exb 2017-11-08 14:23:49 +01:00
parent cef9d5d7bc
commit 4ad038ed9d
71 changed files with 2036 additions and 1887 deletions

View File

@ -25,11 +25,12 @@
#include "device/devicesourceapi.h"
#include "audio/audiooutput.h"
MESSAGE_CLASS_DEFINITION(ChannelAnalyzer::MsgConfigureChannelAnalyzer, Message)
MESSAGE_CLASS_DEFINITION(ChannelAnalyzer::MsgConfigureChannelizer, Message)
MESSAGE_CLASS_DEFINITION(ChannelAnalyzer::MsgReportChannelSampleRateChanged, Message)
const QString ChannelAnalyzer::m_channelID = "org.f4exb.sdrangelove.channel.chanalyzer";
ChannelAnalyzer::ChannelAnalyzer(DeviceSourceAPI *deviceAPI) :
m_deviceAPI(deviceAPI),
m_sampleSink(0),

View File

@ -123,6 +123,8 @@ public:
virtual void stop();
virtual bool handleMessage(const Message& cmd);
static const QString m_channelID;
private slots:
void channelSampleRateChanged();

View File

@ -38,8 +38,6 @@
#include "chanalyzer.h"
const QString ChannelAnalyzerGUI::m_channelID = "org.f4exb.sdrangelove.channel.chanalyzer";
ChannelAnalyzerGUI* ChannelAnalyzerGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
{
ChannelAnalyzerGUI* gui = new ChannelAnalyzerGUI(pluginAPI, deviceUISet);
@ -370,7 +368,7 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *device
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(ChannelAnalyzer::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -55,8 +55,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
static const QString m_channelID;
private slots:
void viewChanged();
void on_deltaFrequency_changed(quint64 value);

View File

@ -4,6 +4,7 @@
#include "plugin/pluginapi.h"
#include "chanalyzergui.h"
#include "chanalyzer.h"
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
QString("Channel Analyzer"),
@ -30,12 +31,12 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register demodulator
m_pluginAPI->registerRxChannel(ChannelAnalyzerGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(ChannelAnalyzer::m_channelID, this);
}
PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == ChannelAnalyzerGUI::m_channelID)
if(channelName == ChannelAnalyzer::m_channelID)
{
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet);
return gui;
@ -43,3 +44,15 @@ PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(const QString& chan
return NULL;
}
}
BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == ChannelAnalyzer::m_channelID)
{
ChannelAnalyzer* sink = new ChannelAnalyzer(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -5,6 +5,7 @@
#include "plugin/plugininterface.h"
class DeviceUISet;
class BasebandSampleSink;
class ChannelAnalyzerPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -18,6 +19,7 @@ public:
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -25,11 +25,12 @@
#include "dsp/threadedbasebandsamplesink.h"
#include "dsp/downchannelizer.h"
MESSAGE_CLASS_DEFINITION(ChannelAnalyzerNG::MsgConfigureChannelAnalyzer, Message)
MESSAGE_CLASS_DEFINITION(ChannelAnalyzerNG::MsgConfigureChannelizer, Message)
MESSAGE_CLASS_DEFINITION(ChannelAnalyzerNG::MsgReportChannelSampleRateChanged, Message)
const QString ChannelAnalyzerNG::m_channelID = "sdrangel.channel.chanalyzerng";
ChannelAnalyzerNG::ChannelAnalyzerNG(DeviceSourceAPI *deviceAPI) :
m_deviceAPI(deviceAPI),
m_sampleSink(0),

View File

@ -143,6 +143,8 @@ public:
virtual void stop();
virtual bool handleMessage(const Message& cmd);
static const QString m_channelID;
private slots:
void channelizerInputSampleRateChanged();

View File

@ -38,8 +38,6 @@
#include "chanalyzerng.h"
const QString ChannelAnalyzerNGGUI::m_channelID = "sdrangel.channel.chanalyzerng";
ChannelAnalyzerNGGUI* ChannelAnalyzerNGGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
{
ChannelAnalyzerNGGUI* gui = new ChannelAnalyzerNGGUI(pluginAPI, deviceUISet);
@ -407,7 +405,7 @@ ChannelAnalyzerNGGUI::ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceUISet *de
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(ChannelAnalyzerNG::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -55,8 +55,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
static const QString m_channelID;
private slots:
void viewChanged();
// void channelizerInputSampleRateChanged();

View File

@ -19,10 +19,11 @@
#include "plugin/pluginapi.h"
#include "chanalyzerngplugin.h"
#include "chanalyzernggui.h"
#include "chanalyzerng.h"
const PluginDescriptor ChannelAnalyzerNGPlugin::m_pluginDescriptor = {
QString("Channel Analyzer NG"),
QString("3.8.0"),
QString("3.8.2"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
@ -45,16 +46,28 @@ void ChannelAnalyzerNGPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register demodulator
m_pluginAPI->registerRxChannel(ChannelAnalyzerNGGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(ChannelAnalyzerNG::m_channelID, this);
}
PluginInstanceGUI* ChannelAnalyzerNGPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == ChannelAnalyzerNGGUI::m_channelID)
if(channelName == ChannelAnalyzerNG::m_channelID)
{
ChannelAnalyzerNGGUI* gui = ChannelAnalyzerNGGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return NULL;
return 0;
}
}
BasebandSampleSink* ChannelAnalyzerNGPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == ChannelAnalyzerNG::m_channelID)
{
ChannelAnalyzerNG* sink = new ChannelAnalyzerNG(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -22,6 +22,7 @@
#include "plugin/plugininterface.h"
class DeviceUISet;
class BasebandSampleSink;
class ChannelAnalyzerNGPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -35,6 +36,7 @@ public:
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -32,6 +32,7 @@
MESSAGE_CLASS_DEFINITION(AMDemod::MsgConfigureAMDemod, Message)
MESSAGE_CLASS_DEFINITION(AMDemod::MsgConfigureChannelizer, Message)
const QString AMDemod::m_channelID = "de.maintech.sdrangelove.channel.am";
const int AMDemod::m_udpBlockSize = 512;
AMDemod::AMDemod(DeviceSourceAPI *deviceAPI) :

View File

@ -103,6 +103,8 @@ public:
m_magsqCount = 0;
}
static const QString m_channelID;
private:
enum RateState {
RSInitialFill,

View File

@ -34,8 +34,6 @@
#include "amdemod.h"
const QString AMDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.am";
AMDemodGUI* AMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
{
AMDemodGUI* gui = new AMDemodGUI(pluginAPI, deviceUISet);
@ -206,7 +204,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget*
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(AMDemod::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -37,8 +37,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
static const QString m_channelID;
private slots:
void channelMarkerChanged();
void on_deltaFrequency_changed(qint64 value);

View File

@ -31,12 +31,12 @@ void AMDemodPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register AM demodulator
m_pluginAPI->registerRxChannel(AMDemodGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(AMDemod::m_channelID, this);
}
PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == AMDemodGUI::m_channelID)
if(channelName == AMDemod::m_channelID)
{
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceUISet);
return gui;
@ -47,7 +47,7 @@ PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(const QString& channelName,
BasebandSampleSink* AMDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == AMDemodGUI::m_channelID)
if(channelName == AMDemod::m_channelID)
{
AMDemod* sink = new AMDemod(deviceAPI);
return sink;

View File

@ -35,6 +35,7 @@ MESSAGE_CLASS_DEFINITION(ATVDemod::MsgReportEffectiveSampleRate, Message)
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgConfigureChannelizer, Message)
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgReportChannelSampleRateChanged, Message)
const QString ATVDemod::m_channelID = "sdrangel.channel.demodatv";
const int ATVDemod::m_ssbFftLen = 1024;
ATVDemod::ATVDemod(DeviceSourceAPI *deviceAPI) :

View File

@ -227,6 +227,8 @@ public:
double getMagSq() const { return m_objMagSqAverage.average(); } //!< Beware this is scaled to 2^30
bool getBFOLocked();
static const QString m_channelID;
private slots:
void channelSampleRateChanged();

View File

@ -36,8 +36,6 @@
#include "atvdemod.h"
const QString ATVDemodGUI::m_strChannelID = "sdrangel.channel.demodatv";
ATVDemodGUI* ATVDemodGUI::create(PluginAPI* objPluginAPI,
DeviceUISet *deviceUISet)
{
@ -312,7 +310,7 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet,
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
m_deviceUISet->registerRxChannelInstance(m_strChannelID, this);
m_deviceUISet->registerRxChannelInstance(ATVDemod::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -54,8 +54,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& objMessage);
static const QString m_strChannelID;
private slots:
void viewChanged();
void handleSourceMessages();

View File

@ -21,6 +21,7 @@
#include "plugin/pluginapi.h"
#include "atvdemodgui.h"
#include "atvdemod.h"
#include "atvdemodplugin.h"
const PluginDescriptor ATVDemodPlugin::m_ptrPluginDescriptor =
@ -50,18 +51,30 @@ void ATVDemodPlugin::initPlugin(PluginAPI* ptrPluginAPI)
m_ptrPluginAPI = ptrPluginAPI;
// register ATV demodulator
m_ptrPluginAPI->registerRxChannel(ATVDemodGUI::m_strChannelID, this);
m_ptrPluginAPI->registerRxChannel(ATVDemod::m_channelID, this);
}
PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet)
{
if(strChannelName == ATVDemodGUI::m_strChannelID)
if(strChannelName == ATVDemod::m_channelID)
{
ATVDemodGUI* ptrGui = ATVDemodGUI::create(m_ptrPluginAPI, deviceUISet);
return ptrGui;
}
else
{
return NULL;
return 0;
}
}
BasebandSampleSink* ATVDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == ATVDemod::m_channelID)
{
ATVDemod* sink = new ATVDemod(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -22,6 +22,7 @@
#include "plugin/plugininterface.h"
class DeviceUISet;
class BasebandSampleSink;
class ATVDemodPlugin : public QObject, PluginInterface
{
@ -36,6 +37,7 @@ public:
void initPlugin(PluginAPI* ptrPluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_ptrPluginDescriptor;

View File

@ -34,6 +34,7 @@ MESSAGE_CLASS_DEFINITION(BFMDemod::MsgConfigureChannelizer, Message)
MESSAGE_CLASS_DEFINITION(BFMDemod::MsgReportChannelSampleRateChanged, Message)
MESSAGE_CLASS_DEFINITION(BFMDemod::MsgConfigureBFMDemod, Message)
const QString BFMDemod::m_channelID = "sdrangel.channel.bfm";
const Real BFMDemod::default_deemphasis = 50.0; // 50 us
const int BFMDemod::m_udpBlockSize = 512;

View File

@ -144,6 +144,8 @@ public:
RDSParser& getRDSParser() { return m_rdsParser; }
static const QString m_channelID;
private slots:
void channelSampleRateChanged();

View File

@ -43,8 +43,6 @@
#include "rdstmc.h"
#include "ui_bfmdemodgui.h"
const QString BFMDemodGUI::m_channelID = "sdrangel.channel.bfm";
BFMDemodGUI* BFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUIset)
{
BFMDemodGUI* gui = new BFMDemodGUI(pluginAPI, deviceUIset);
@ -364,7 +362,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(BFMDemod::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -56,8 +56,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
static const QString m_channelID;
private slots:
void on_deltaFrequency_changed(qint64 value);
void on_rfBW_valueChanged(int value);

View File

@ -21,6 +21,7 @@
#include "plugin/pluginapi.h"
#include "bfmdemodgui.h"
#include "bfmdemod.h"
const PluginDescriptor BFMPlugin::m_pluginDescriptor = {
QString("Broadcast FM Demodulator"),
@ -47,12 +48,12 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register BFM demodulator
m_pluginAPI->registerRxChannel(BFMDemodGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(BFMDemod::m_channelID, this);
}
PluginInstanceGUI* BFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == BFMDemodGUI::m_channelID)
if(channelName == BFMDemod::m_channelID)
{
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceUISet);
return gui;
@ -60,3 +61,15 @@ PluginInstanceGUI* BFMPlugin::createRxChannelGUI(const QString& channelName, Dev
return 0;
}
}
BasebandSampleSink* BFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == BFMDemod::m_channelID)
{
BFMDemod* sink = new BFMDemod(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -35,6 +35,7 @@ public:
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -35,6 +35,7 @@ MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureChannelizer, Message)
MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureDSDDemod, Message)
MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureMyPosition, Message)
const QString DSDDemod::m_channelID = "sdrangel.channel.dsddemod";
const int DSDDemod::m_udpBlockSize = 512;
DSDDemod::DSDDemod(DeviceSourceAPI *deviceAPI) :

View File

@ -115,6 +115,7 @@ public:
m_magsqCount = 0;
}
static const QString m_channelID;
private:
class MsgConfigureMyPosition : public Message {

View File

@ -38,8 +38,6 @@
#include "dsddemodbaudrates.h"
#include "dsddemod.h"
const QString DSDDemodGUI::m_channelID = "sdrangel.channel.dsddemod";
DSDDemodGUI* DSDDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
{
DSDDemodGUI* gui = new DSDDemodGUI(pluginAPI, deviceUISet);
@ -281,7 +279,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(DSDDemod::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -57,8 +57,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
static const QString m_channelID;
private slots:
void formatStatusText();
void channelMarkerChanged();

View File

@ -21,6 +21,7 @@
#include <QtPlugin>
#include "plugin/pluginapi.h"
#include "dsddemodgui.h"
#include "dsddemod.h"
const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
QString("DSD Demodulator"),
@ -47,16 +48,27 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register DSD demodulator
m_pluginAPI->registerRxChannel(DSDDemodGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(DSDDemod::m_channelID, this);
}
PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == DSDDemodGUI::m_channelID)
if(channelName == DSDDemod::m_channelID)
{
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return NULL;
return 0;
}
}
BasebandSampleSink* DSDDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == DSDDemod::m_channelID)
{
DSDDemod* sink = new DSDDemod(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -22,6 +22,7 @@
#include "plugin/plugininterface.h"
class DeviceUISet;
class BasebandSampleSink;
class DSDDemodPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -35,6 +36,7 @@ public:
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -31,6 +31,8 @@
MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgConfigureLoRaDemod, Message)
MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgConfigureChannelizer, Message)
const QString LoRaDemod::m_channelID = "de.maintech.sdrangelove.channel.lora";
LoRaDemod::LoRaDemod(DeviceSourceAPI* deviceAPI) :
m_deviceAPI(deviceAPI),
m_sampleSink(0),

View File

@ -96,6 +96,8 @@ public:
virtual void stop();
virtual bool handleMessage(const Message& cmd);
static const QString m_channelID;
private:
int detect(Complex sample, Complex angle);
void dumpRaw(void);

View File

@ -16,8 +16,6 @@
#include "lorademod.h"
#include "lorademodgui.h"
const QString LoRaDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.lora";
LoRaDemodGUI* LoRaDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
{
LoRaDemodGUI* gui = new LoRaDemodGUI(pluginAPI, deviceUISet);
@ -153,7 +151,7 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidg
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(LoRaDemod::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -35,8 +35,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
static const QString m_channelID;
private slots:
void viewChanged();
void on_BW_valueChanged(int value);

View File

@ -3,6 +3,7 @@
#include "loraplugin.h"
#include "lorademodgui.h"
#include "lorademod.h"
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
QString("LoRa Demodulator"),
@ -29,16 +30,27 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register demodulator
m_pluginAPI->registerRxChannel(LoRaDemodGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(LoRaDemod::m_channelID, this);
}
PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == LoRaDemodGUI::m_channelID)
if(channelName == LoRaDemod::m_channelID)
{
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return NULL;
return 0;
}
}
BasebandSampleSink* LoRaPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == LoRaDemod::m_channelID)
{
LoRaDemod* sink = new LoRaDemod(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -5,6 +5,7 @@
#include "plugin/plugininterface.h"
class DeviceUISet;
class BasebandSampleSink;
class LoRaPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -18,6 +19,7 @@ public:
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -35,6 +35,8 @@ MESSAGE_CLASS_DEFINITION(NFMDemod::MsgConfigureNFMDemod, Message)
MESSAGE_CLASS_DEFINITION(NFMDemod::MsgConfigureChannelizer, Message)
MESSAGE_CLASS_DEFINITION(NFMDemod::MsgReportCTCSSFreq, Message)
const QString NFMDemod::m_channelID = "de.maintech.sdrangelove.channel.nfm";
static const double afSqTones[2] = {1000.0, 6000.0}; // {1200.0, 8000.0};
const int NFMDemod::m_udpBlockSize = 512;

View File

@ -138,6 +138,8 @@ public:
m_magsqCount = 0;
}
static const QString m_channelID;
private:
enum RateState {
RSInitialFill,

View File

@ -16,8 +16,6 @@
#include "mainwindow.h"
#include "nfmdemod.h"
const QString NFMDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.nfm";
NFMDemodGUI* NFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
{
NFMDemodGUI* gui = new NFMDemodGUI(pluginAPI, deviceUISet);
@ -277,7 +275,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(NFMDemod::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -38,8 +38,6 @@ public:
virtual bool handleMessage(const Message& message);
void setCtcssFreq(Real ctcssFreq);
static const QString m_channelID;
private slots:
void channelMarkerChanged();
void on_deltaFrequency_changed(qint64 value);

View File

@ -3,6 +3,7 @@
#include "nfmplugin.h"
#include "nfmdemodgui.h"
#include "nfmdemod.h"
const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
QString("NFM Demodulator"),
@ -29,15 +30,26 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register NFM demodulator
m_pluginAPI->registerRxChannel(NFMDemodGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(NFMDemod::m_channelID, this);
}
PluginInstanceGUI* NFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == NFMDemodGUI::m_channelID) {
if(channelName == NFMDemod::m_channelID) {
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return NULL;
return 0;
}
}
BasebandSampleSink* NFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == NFMDemod::m_channelID)
{
NFMDemod* sink = new NFMDemod(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -5,6 +5,7 @@
#include "plugin/plugininterface.h"
class DeviceUISet;
class BasebandSampleSink;
class NFMPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -18,6 +19,7 @@ public:
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -34,6 +34,8 @@ MESSAGE_CLASS_DEFINITION(SSBDemod::MsgConfigureSSBDemod, Message)
MESSAGE_CLASS_DEFINITION(SSBDemod::MsgConfigureSSBDemodPrivate, Message)
MESSAGE_CLASS_DEFINITION(SSBDemod::MsgConfigureChannelizer, Message)
const QString SSBDemod::m_channelID = "de.maintech.sdrangelove.channel.ssb";
SSBDemod::SSBDemod(DeviceSourceAPI *deviceAPI) :
m_deviceAPI(deviceAPI),
m_audioBinaual(false),

View File

@ -124,6 +124,8 @@ public:
m_magsqCount = 0;
}
static const QString m_channelID;
private:
class MsgConfigureSSBDemodPrivate : public Message {
MESSAGE_CLASS_DECLARATION

View File

@ -17,8 +17,6 @@
#include "mainwindow.h"
#include "ssbdemod.h"
const QString SSBDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.ssb";
SSBDemodGUI* SSBDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
{
SSBDemodGUI* gui = new SSBDemodGUI(pluginAPI, deviceUISet);
@ -253,7 +251,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(SSBDemod::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -37,8 +37,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
static const QString m_channelID;
private slots:
void viewChanged();
void on_deltaFrequency_changed(qint64 value);

View File

@ -4,6 +4,7 @@
#include <QtPlugin>
#include "plugin/pluginapi.h"
#include "ssbdemodgui.h"
#include "ssbdemod.h"
const PluginDescriptor SSBPlugin::m_pluginDescriptor = {
QString("SSB Demodulator"),
@ -30,16 +31,27 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register demodulator
m_pluginAPI->registerRxChannel(SSBDemodGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(SSBDemod::m_channelID, this);
}
PluginInstanceGUI* SSBPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == SSBDemodGUI::m_channelID)
if(channelName == SSBDemod::m_channelID)
{
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return NULL;
return 0;
}
}
BasebandSampleSink* SSBPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == SSBDemod::m_channelID)
{
SSBDemod* sink = new SSBDemod(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -5,6 +5,7 @@
#include "plugin/plugininterface.h"
class DeviceUISet;
class BasebandSampleSink;
class SSBPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -18,6 +19,7 @@ public:
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -33,6 +33,8 @@
MESSAGE_CLASS_DEFINITION(WFMDemod::MsgConfigureWFMDemod, Message)
MESSAGE_CLASS_DEFINITION(WFMDemod::MsgConfigureChannelizer, Message)
const QString WFMDemod::m_channelID = "de.maintech.sdrangelove.channel.wfm";
WFMDemod::WFMDemod(DeviceSourceAPI* deviceAPI) :
m_deviceAPI(deviceAPI),
m_squelchOpen(false),

View File

@ -109,6 +109,8 @@ public:
m_magsqCount = 0;
}
static const QString m_channelID;
private:
enum RateState {
RSInitialFill,

View File

@ -18,8 +18,6 @@
#include "wfmdemod.h"
const QString WFMDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.wfm";
WFMDemodGUI* WFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
{
WFMDemodGUI* gui = new WFMDemodGUI(pluginAPI, deviceUISet);
@ -187,7 +185,7 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(WFMDemod::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -36,8 +36,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
static const QString m_channelID;
private slots:
void channelMarkerChanged();
void on_deltaFrequency_changed(qint64 value);

View File

@ -4,6 +4,7 @@
#include "plugin/pluginapi.h"
#include "wfmdemodgui.h"
#include "wfmdemod.h"
const PluginDescriptor WFMPlugin::m_pluginDescriptor = {
QString("WFM Demodulator"),
@ -30,16 +31,27 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register WFM demodulator
m_pluginAPI->registerRxChannel(WFMDemodGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(WFMDemod::m_channelID, this);
}
PluginInstanceGUI* WFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == WFMDemodGUI::m_channelID)
if(channelName == WFMDemod::m_channelID)
{
WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return NULL;
return 0;
}
}
BasebandSampleSink* WFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == WFMDemod::m_channelID)
{
WFMDemod* sink = new WFMDemod(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -5,6 +5,7 @@
#include "plugin/plugininterface.h"
class DeviceUISet;
class BasebandSampleSink;
class WFMPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -18,6 +19,7 @@ public:
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -30,6 +30,8 @@ MESSAGE_CLASS_DEFINITION(TCPSrc::MsgConfigureChannelizer, Message)
MESSAGE_CLASS_DEFINITION(TCPSrc::MsgTCPSrcConnection, Message)
MESSAGE_CLASS_DEFINITION(TCPSrc::MsgTCPSrcSpectrum, Message)
const QString TCPSrc::m_channelID = "sdrangel.channel.tcpsrc";
TCPSrc::TCPSrc(DeviceSourceAPI* deviceAPI) :
m_deviceAPI(deviceAPI),
m_settingsMutex(QMutex::Recursive)

View File

@ -113,6 +113,8 @@ public:
virtual void stop();
virtual bool handleMessage(const Message& cmd);
static const QString m_channelID;
protected:
class MsgTCPSrcSpectrum : public Message {
MESSAGE_CLASS_DECLARATION

View File

@ -12,8 +12,6 @@
#include "mainwindow.h"
#include "tcpsrc.h"
const QString TCPSrcGUI::m_channelID = "sdrangel.channel.tcpsrc";
TCPSrcGUI* TCPSrcGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
{
TCPSrcGUI* gui = new TCPSrcGUI(pluginAPI, deviceUISet);
@ -165,7 +163,7 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* pa
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(TCPSrc::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -39,8 +39,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
static const QString m_channelID;
private slots:
void channelMarkerChanged();
void on_deltaFrequency_changed(qint64 value);

View File

@ -4,6 +4,7 @@
#include "plugin/pluginapi.h"
#include "tcpsrcgui.h"
#include "tcpsrc.h"
const PluginDescriptor TCPSrcPlugin::m_pluginDescriptor = {
QString("TCP Channel Source"),
@ -30,18 +31,29 @@ void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register TCP Channel Source
m_pluginAPI->registerRxChannel(TCPSrcGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(TCPSrc::m_channelID, this);
}
PluginInstanceGUI* TCPSrcPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == TCPSrcGUI::m_channelID)
if(channelName == TCPSrc::m_channelID)
{
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceUISet);
// deviceAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
// m_pluginAPI->addChannelRollup(gui);
return gui;
} else {
return NULL;
return 0;
}
}
BasebandSampleSink* TCPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == TCPSrc::m_channelID)
{
TCPSrc* sink = new TCPSrc(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -5,6 +5,7 @@
#include "plugin/plugininterface.h"
class DeviceUISet;
class BasebandSampleSink;
class TCPSrcPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -18,6 +19,7 @@ public:
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -33,6 +33,8 @@ MESSAGE_CLASS_DEFINITION(UDPSrc::MsgConfigureUDPSrc, Message)
MESSAGE_CLASS_DEFINITION(UDPSrc::MsgConfigureChannelizer, Message)
MESSAGE_CLASS_DEFINITION(UDPSrc::MsgUDPSrcSpectrum, Message)
const QString UDPSrc::m_channelID = "sdrangel.channel.udpsrc";
UDPSrc::UDPSrc(DeviceSourceAPI *deviceAPI) :
m_deviceAPI(deviceAPI),
m_outMovingAverage(480, 1e-10),

View File

@ -104,6 +104,7 @@ public:
virtual void stop();
virtual bool handleMessage(const Message& cmd);
static const QString m_channelID;
static const int udpBlockSize = 512; // UDP block size in number of bytes
public slots:

View File

@ -30,8 +30,6 @@
#include "udpsrc.h"
const QString UDPSrcGUI::m_channelID = "sdrangel.channel.udpsrc";
UDPSrcGUI* UDPSrcGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
{
UDPSrcGUI* gui = new UDPSrcGUI(pluginAPI, deviceUISet);
@ -185,7 +183,7 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* pa
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->registerRxChannelInstance(UDPSrc::m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -55,8 +55,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
static const QString m_channelID;
private slots:
void channelMarkerChanged();
void on_deltaFrequency_changed(qint64 value);

View File

@ -21,6 +21,7 @@
#include "plugin/pluginapi.h"
#include "udpsrcgui.h"
#include "udpsrc.h"
const PluginDescriptor UDPSrcPlugin::m_pluginDescriptor = {
QString("UDP Channel Source"),
@ -47,12 +48,12 @@ void UDPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register TCP Channel Source
m_pluginAPI->registerRxChannel(UDPSrcGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(UDPSrc::m_channelID, this);
}
PluginInstanceGUI* UDPSrcPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == UDPSrcGUI::m_channelID)
if(channelName == UDPSrc::m_channelID)
{
UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceUISet);
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
@ -62,3 +63,14 @@ PluginInstanceGUI* UDPSrcPlugin::createRxChannelGUI(const QString& channelName,
return 0;
}
}
BasebandSampleSink* UDPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == UDPSrc::m_channelID)
{
UDPSrc* sink = new UDPSrc(deviceAPI);
return sink;
} else {
return 0;
}
}

View File

@ -22,6 +22,7 @@
#include "plugin/plugininterface.h"
class DeviceUISet;
class BasebandSampleSink;
class UDPSrcPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -35,6 +36,7 @@ public:
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;