mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-10 22:38:45 -04:00
Multi device support: migrate device specific stuff outside plugin classes completed for source plugins
This commit is contained in:
parent
4756299ad9
commit
7412ee0d54
@ -48,23 +48,23 @@ AirspyGui::AirspyGui(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
|
||||
|
||||
displaySettings();
|
||||
|
||||
m_sampleSource = new AirspyInput(m_pluginAPI);
|
||||
m_sampleSource = new AirspyInput(m_deviceAPI);
|
||||
m_rates = ((AirspyInput*) m_sampleSource)->getSampleRates();
|
||||
displaySampleRates();
|
||||
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||
m_pluginAPI->setSource(m_sampleSource);
|
||||
m_deviceAPI->setSource(m_sampleSource);
|
||||
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_pluginAPI->getDeviceUID());
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
m_fileSink = new FileSink(std::string(recFileNameCStr));
|
||||
m_deviceAPI->addSink(m_fileSink);
|
||||
|
||||
connect(m_pluginAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
AirspyGui::~AirspyGui()
|
||||
{
|
||||
m_pluginAPI->removeSink(m_fileSink);
|
||||
m_deviceAPI->removeSink(m_fileSink);
|
||||
delete m_fileSink;
|
||||
delete m_sampleSource; // Valgrind memcheck
|
||||
delete ui;
|
||||
@ -140,7 +140,7 @@ void AirspyGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_pluginAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("AirspyGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
@ -175,8 +175,8 @@ void AirspyGui::handleSourceMessages()
|
||||
|
||||
void AirspyGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_pluginAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_pluginAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||
}
|
||||
|
||||
@ -348,15 +348,15 @@ void AirspyGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_pluginAPI->initAcquisition())
|
||||
if (m_deviceAPI->initAcquisition())
|
||||
{
|
||||
m_pluginAPI->startAcquisition();
|
||||
m_deviceAPI->startAcquisition();
|
||||
DSPEngine::instance()->startAudio();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pluginAPI->stopAcquistion();
|
||||
m_deviceAPI->stopAcquisition();
|
||||
DSPEngine::instance()->stopAudio();
|
||||
}
|
||||
}
|
||||
@ -385,7 +385,7 @@ void AirspyGui::updateHardware()
|
||||
|
||||
void AirspyGui::updateStatus()
|
||||
{
|
||||
int state = m_pluginAPI->state();
|
||||
int state = m_deviceAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -402,7 +402,7 @@ void AirspyGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_pluginAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "airspygui.h"
|
||||
#include "airspyinput.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "airspysettings.h"
|
||||
@ -29,8 +29,8 @@
|
||||
MESSAGE_CLASS_DEFINITION(AirspyInput::MsgConfigureAirspy, Message)
|
||||
MESSAGE_CLASS_DEFINITION(AirspyInput::MsgReportAirspy, Message)
|
||||
|
||||
AirspyInput::AirspyInput(PluginAPI *pluginAPI) :
|
||||
m_pluginAPI(pluginAPI),
|
||||
AirspyInput::AirspyInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_settings(),
|
||||
m_dev(0),
|
||||
m_airspyThread(0),
|
||||
@ -228,13 +228,13 @@ bool AirspyInput::applySettings(const AirspySettings& settings, bool force)
|
||||
if (m_settings.m_dcBlock != settings.m_dcBlock)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if (m_settings.m_iqCorrection != settings.m_iqCorrection)
|
||||
{
|
||||
m_settings.m_iqCorrection = settings.m_iqCorrection;
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if ((m_settings.m_devSampleRateIndex != settings.m_devSampleRateIndex) || force)
|
||||
@ -451,7 +451,7 @@ bool AirspyInput::applySettings(const AirspySettings& settings, bool force)
|
||||
{
|
||||
int sampleRate = devSampleRate/(1<<m_settings.m_log2Decim);
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency);
|
||||
m_pluginAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <libairspy/airspy.h>
|
||||
#include <QString>
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceAPI;
|
||||
class AirspyThread;
|
||||
|
||||
class AirspyInput : public SampleSource {
|
||||
@ -67,7 +67,7 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
AirspyInput(PluginAPI *pluginAPI);
|
||||
AirspyInput(DeviceAPI *deviceAPI);
|
||||
virtual ~AirspyInput();
|
||||
|
||||
virtual bool init(const Message& message);
|
||||
@ -86,7 +86,7 @@ private:
|
||||
struct airspy_device *open_airspy_from_sequence(int sequence);
|
||||
void setCenterFrequency(quint64 freq);
|
||||
|
||||
PluginAPI *m_pluginAPI;
|
||||
DeviceAPI *m_deviceAPI;
|
||||
QMutex m_mutex;
|
||||
AirspySettings m_settings;
|
||||
struct airspy_device* m_dev;
|
||||
|
@ -61,20 +61,20 @@ BladerfGui::BladerfGui(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pare
|
||||
|
||||
displaySettings();
|
||||
|
||||
m_sampleSource = new BladerfInput(m_pluginAPI);
|
||||
m_pluginAPI->setSource(m_sampleSource);
|
||||
m_sampleSource = new BladerfInput(m_deviceAPI);
|
||||
m_deviceAPI->setSource(m_sampleSource);
|
||||
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_pluginAPI->getDeviceUID());
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
m_fileSink = new FileSink(std::string(recFileNameCStr));
|
||||
m_deviceAPI->addSink(m_fileSink);
|
||||
|
||||
connect(m_pluginAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
BladerfGui::~BladerfGui()
|
||||
{
|
||||
m_pluginAPI->removeSink(m_fileSink);
|
||||
m_deviceAPI->removeSink(m_fileSink);
|
||||
delete m_fileSink;
|
||||
delete m_sampleSource; // Valgrind memcheck
|
||||
delete ui;
|
||||
@ -148,7 +148,7 @@ void BladerfGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_pluginAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("BladerfGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
@ -168,8 +168,8 @@ void BladerfGui::handleDSPMessages()
|
||||
|
||||
void BladerfGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_pluginAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_pluginAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateLabel->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||
}
|
||||
|
||||
@ -356,15 +356,15 @@ void BladerfGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_pluginAPI->initAcquisition())
|
||||
if (m_deviceAPI->initAcquisition())
|
||||
{
|
||||
m_pluginAPI->startAcquisition();
|
||||
m_deviceAPI->startAcquisition();
|
||||
DSPEngine::instance()->startAudio();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pluginAPI->stopAcquistion();
|
||||
m_deviceAPI->stopAcquisition();
|
||||
DSPEngine::instance()->stopAudio();
|
||||
}
|
||||
}
|
||||
@ -393,7 +393,7 @@ void BladerfGui::updateHardware()
|
||||
|
||||
void BladerfGui::updateStatus()
|
||||
{
|
||||
int state = m_pluginAPI->state();
|
||||
int state = m_deviceAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -410,7 +410,7 @@ void BladerfGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_pluginAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <errno.h>
|
||||
#include <QDebug>
|
||||
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/dspengine.h"
|
||||
@ -29,8 +29,8 @@
|
||||
MESSAGE_CLASS_DEFINITION(BladerfInput::MsgConfigureBladerf, Message)
|
||||
MESSAGE_CLASS_DEFINITION(BladerfInput::MsgReportBladerf, Message)
|
||||
|
||||
BladerfInput::BladerfInput(PluginAPI *pluginAPI) :
|
||||
m_pluginAPI(pluginAPI),
|
||||
BladerfInput::BladerfInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_settings(),
|
||||
m_dev(0),
|
||||
m_bladerfThread(0),
|
||||
@ -182,13 +182,13 @@ bool BladerfInput::applySettings(const BladeRFSettings& settings, bool force)
|
||||
if (m_settings.m_dcBlock != settings.m_dcBlock)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if (m_settings.m_iqCorrection != settings.m_iqCorrection)
|
||||
{
|
||||
m_settings.m_iqCorrection = settings.m_iqCorrection;
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if ((m_settings.m_lnaGain != settings.m_lnaGain) || force)
|
||||
@ -415,7 +415,7 @@ bool BladerfInput::applySettings(const BladeRFSettings& settings, bool force)
|
||||
{
|
||||
int sampleRate = m_settings.m_devSampleRate/(1<<m_settings.m_log2Decim);
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency);
|
||||
m_pluginAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
}
|
||||
|
||||
qDebug() << "BladerfInput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <libbladeRF.h>
|
||||
#include <QString>
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceAPI;
|
||||
class BladerfThread;
|
||||
|
||||
class BladerfInput : public SampleSource {
|
||||
@ -64,7 +64,7 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
BladerfInput(PluginAPI *pluginAPI);
|
||||
BladerfInput(DeviceAPI *deviceAPI);
|
||||
virtual ~BladerfInput();
|
||||
|
||||
virtual bool init(const Message& message);
|
||||
@ -82,7 +82,7 @@ private:
|
||||
bladerf_lna_gain getLnaGain(int lnaGain);
|
||||
struct bladerf *open_bladerf_from_serial(const char *serial);
|
||||
|
||||
PluginAPI *m_pluginAPI;
|
||||
DeviceAPI *m_deviceAPI;
|
||||
QMutex m_mutex;
|
||||
BladeRFSettings m_settings;
|
||||
struct bladerf* m_dev;
|
||||
|
@ -142,20 +142,20 @@ FCDProGui::FCDProGui(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
|
||||
|
||||
displaySettings();
|
||||
|
||||
m_sampleSource = new FCDProInput(m_pluginAPI);
|
||||
m_pluginAPI->setSource(m_sampleSource);
|
||||
m_sampleSource = new FCDProInput(m_deviceAPI);
|
||||
m_deviceAPI->setSource(m_sampleSource);
|
||||
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_pluginAPI->getDeviceUID());
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
m_fileSink = new FileSink(std::string(recFileNameCStr));
|
||||
m_deviceAPI->addSink(m_fileSink);
|
||||
|
||||
connect(m_pluginAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
FCDProGui::~FCDProGui()
|
||||
{
|
||||
m_pluginAPI->removeSink(m_fileSink);
|
||||
m_deviceAPI->removeSink(m_fileSink);
|
||||
delete m_fileSink;
|
||||
delete ui;
|
||||
}
|
||||
@ -223,7 +223,7 @@ void FCDProGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_pluginAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("FCDProGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
@ -243,8 +243,8 @@ void FCDProGui::handleDSPMessages()
|
||||
|
||||
void FCDProGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_pluginAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_pluginAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||
}
|
||||
|
||||
@ -426,15 +426,15 @@ void FCDProGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_pluginAPI->initAcquisition())
|
||||
if (m_deviceAPI->initAcquisition())
|
||||
{
|
||||
m_pluginAPI->startAcquisition();
|
||||
m_deviceAPI->startAcquisition();
|
||||
DSPEngine::instance()->startAudio();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pluginAPI->stopAcquistion();
|
||||
m_deviceAPI->stopAcquisition();
|
||||
DSPEngine::instance()->stopAudio();
|
||||
}
|
||||
}
|
||||
@ -455,7 +455,7 @@ void FCDProGui::on_record_toggled(bool checked)
|
||||
|
||||
void FCDProGui::updateStatus()
|
||||
{
|
||||
int state = m_pluginAPI->state();
|
||||
int state = m_deviceAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -472,7 +472,7 @@ void FCDProGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_pluginAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "fcdproinput.h"
|
||||
@ -33,8 +33,8 @@
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(FCDProInput::MsgConfigureFCD, Message)
|
||||
|
||||
FCDProInput::FCDProInput(PluginAPI *pluginAPI) :
|
||||
m_pluginAPI(pluginAPI),
|
||||
FCDProInput::FCDProInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_dev(0),
|
||||
m_settings(),
|
||||
m_FCDThread(0),
|
||||
@ -335,19 +335,19 @@ void FCDProInput::applySettings(const FCDProSettings& settings, bool force)
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if ((m_settings.m_iqCorrection != settings.m_iqCorrection) || force)
|
||||
{
|
||||
m_settings.m_iqCorrection = settings.m_iqCorrection;
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if (signalChange)
|
||||
{
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(fcd_traits<Pro>::sampleRate, m_settings.m_centerFrequency);
|
||||
m_pluginAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ struct fcd_buffer {
|
||||
std::size_t length;
|
||||
};
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceAPI;
|
||||
class FCDProThread;
|
||||
|
||||
class FCDProInput : public SampleSource {
|
||||
@ -54,7 +54,7 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
FCDProInput(PluginAPI *pluginAPI);
|
||||
FCDProInput(DeviceAPI *deviceAPI);
|
||||
virtual ~FCDProInput();
|
||||
|
||||
virtual bool init(const Message& cmd);
|
||||
@ -90,7 +90,7 @@ private:
|
||||
void applySettings(const FCDProSettings& settings, bool force);
|
||||
void set_lo_ppm();
|
||||
|
||||
PluginAPI *m_pluginAPI;
|
||||
DeviceAPI *m_deviceAPI;
|
||||
hid_device *m_dev;
|
||||
QMutex m_mutex;
|
||||
FCDProSettings m_settings;
|
||||
|
@ -60,20 +60,20 @@ FCDProPlusGui::FCDProPlusGui(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget
|
||||
|
||||
displaySettings();
|
||||
|
||||
m_sampleSource = new FCDProPlusInput(m_pluginAPI);
|
||||
m_pluginAPI->setSource(m_sampleSource);
|
||||
m_sampleSource = new FCDProPlusInput(m_deviceAPI);
|
||||
m_deviceAPI->setSource(m_sampleSource);
|
||||
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_pluginAPI->getDeviceUID());
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
m_fileSink = new FileSink(std::string(recFileNameCStr));
|
||||
m_deviceAPI->addSink(m_fileSink);
|
||||
|
||||
connect(m_pluginAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
FCDProPlusGui::~FCDProPlusGui()
|
||||
{
|
||||
m_pluginAPI->removeSink(m_fileSink);
|
||||
m_deviceAPI->removeSink(m_fileSink);
|
||||
delete m_fileSink;
|
||||
delete ui;
|
||||
}
|
||||
@ -141,7 +141,7 @@ void FCDProPlusGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_pluginAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("RTLSDRGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
@ -161,8 +161,8 @@ void FCDProPlusGui::handleDSPMessages()
|
||||
|
||||
void FCDProPlusGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_pluginAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_pluginAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ void FCDProPlusGui::updateHardware()
|
||||
|
||||
void FCDProPlusGui::updateStatus()
|
||||
{
|
||||
int state = m_pluginAPI->state();
|
||||
int state = m_deviceAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -232,7 +232,7 @@ void FCDProPlusGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_pluginAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -290,15 +290,15 @@ void FCDProPlusGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_pluginAPI->initAcquisition())
|
||||
if (m_deviceAPI->initAcquisition())
|
||||
{
|
||||
m_pluginAPI->startAcquisition();
|
||||
m_deviceAPI->startAcquisition();
|
||||
DSPEngine::instance()->startAudio();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pluginAPI->stopAcquistion();
|
||||
m_deviceAPI->stopAcquisition();
|
||||
DSPEngine::instance()->stopAudio();
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "fcdproplusinput.h"
|
||||
@ -32,8 +32,8 @@
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(FCDProPlusInput::MsgConfigureFCD, Message)
|
||||
|
||||
FCDProPlusInput::FCDProPlusInput(PluginAPI *pluginAPI) :
|
||||
m_pluginApi(pluginAPI),
|
||||
FCDProPlusInput::FCDProPlusInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_dev(0),
|
||||
m_settings(),
|
||||
m_FCDThread(0),
|
||||
@ -234,19 +234,19 @@ void FCDProPlusInput::applySettings(const FCDProPlusSettings& settings, bool for
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
m_pluginApi->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
}
|
||||
|
||||
if ((m_settings.m_iqImbalance != settings.m_iqImbalance) || force)
|
||||
{
|
||||
m_settings.m_iqImbalance = settings.m_iqImbalance;
|
||||
m_pluginApi->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
}
|
||||
|
||||
if (signalChange)
|
||||
{
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(fcd_traits<ProPlus>::sampleRate, m_settings.m_centerFrequency);
|
||||
m_pluginApi->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ struct fcd_buffer {
|
||||
std::size_t length;
|
||||
};
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceAPI;
|
||||
class FCDProPlusThread;
|
||||
|
||||
class FCDProPlusInput : public SampleSource {
|
||||
@ -53,7 +53,7 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
FCDProPlusInput(PluginAPI *pluginAPI);
|
||||
FCDProPlusInput(DeviceAPI *deviceAPI);
|
||||
virtual ~FCDProPlusInput();
|
||||
|
||||
virtual bool init(const Message& cmd);
|
||||
@ -78,7 +78,7 @@ public:
|
||||
private:
|
||||
void applySettings(const FCDProPlusSettings& settings, bool force);
|
||||
|
||||
PluginAPI *m_pluginApi;
|
||||
DeviceAPI *m_deviceAPI;
|
||||
hid_device *m_dev;
|
||||
QMutex m_mutex;
|
||||
FCDProPlusSettings m_settings;
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "ui_filesourcegui.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "gui/colormapper.h"
|
||||
#include "gui/glspectrum.h"
|
||||
#include "dsp/dspengine.h"
|
||||
@ -68,9 +69,9 @@ FileSourceGui::FileSourceGui(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget
|
||||
|
||||
m_sampleSource = new FileSourceInput(m_pluginAPI->getMainWindow()->getMasterTimer());
|
||||
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||
m_pluginAPI->setSource(m_sampleSource);
|
||||
m_deviceAPI->setSource(m_sampleSource);
|
||||
|
||||
connect(m_pluginAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
FileSourceGui::~FileSourceGui()
|
||||
@ -133,7 +134,7 @@ void FileSourceGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_pluginAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("FileSourceGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
@ -196,8 +197,8 @@ void FileSourceGui::handleSourceMessages()
|
||||
|
||||
void FileSourceGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_pluginAPI->getSpectrum()->setSampleRate(m_deviceSampleRate);
|
||||
m_pluginAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_deviceSampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_deviceSampleRate / 1000));
|
||||
}
|
||||
|
||||
@ -218,22 +219,22 @@ void FileSourceGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_pluginAPI->initAcquisition())
|
||||
if (m_deviceAPI->initAcquisition())
|
||||
{
|
||||
m_pluginAPI->startAcquisition();
|
||||
m_deviceAPI->startAcquisition();
|
||||
DSPEngine::instance()->startAudio();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pluginAPI->stopAcquistion();
|
||||
m_deviceAPI->stopAcquisition();
|
||||
DSPEngine::instance()->stopAudio();
|
||||
}
|
||||
}
|
||||
|
||||
void FileSourceGui::updateStatus()
|
||||
{
|
||||
int state = m_pluginAPI->state();
|
||||
int state = m_deviceAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -250,7 +251,7 @@ void FileSourceGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_pluginAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -48,24 +48,24 @@ HackRFGui::HackRFGui(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
|
||||
|
||||
displaySettings();
|
||||
|
||||
m_sampleSource = new HackRFInput(m_pluginAPI);
|
||||
m_sampleSource = new HackRFInput(m_deviceAPI);
|
||||
|
||||
displaySampleRates();
|
||||
displayBandwidths();
|
||||
|
||||
m_pluginAPI->setSource(m_sampleSource);
|
||||
m_deviceAPI->setSource(m_sampleSource);
|
||||
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_pluginAPI->getDeviceUID());
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
m_fileSink = new FileSink(std::string(recFileNameCStr));
|
||||
m_deviceAPI->addSink(m_fileSink);
|
||||
|
||||
connect(m_pluginAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
HackRFGui::~HackRFGui()
|
||||
{
|
||||
m_pluginAPI->removeSink(m_fileSink);
|
||||
m_deviceAPI->removeSink(m_fileSink);
|
||||
delete m_fileSink;
|
||||
delete m_sampleSource; // Valgrind memcheck
|
||||
delete ui;
|
||||
@ -131,7 +131,7 @@ void HackRFGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_pluginAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("HackRFGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
@ -151,8 +151,8 @@ void HackRFGui::handleDSPMessages()
|
||||
|
||||
void HackRFGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_pluginAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_pluginAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||
}
|
||||
|
||||
@ -331,15 +331,15 @@ void HackRFGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_pluginAPI->initAcquisition())
|
||||
if (m_deviceAPI->initAcquisition())
|
||||
{
|
||||
m_pluginAPI->startAcquisition();
|
||||
m_deviceAPI->startAcquisition();
|
||||
DSPEngine::instance()->startAudio();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pluginAPI->stopAcquistion();
|
||||
m_deviceAPI->stopAcquisition();
|
||||
DSPEngine::instance()->stopAudio();
|
||||
}
|
||||
}
|
||||
@ -368,7 +368,7 @@ void HackRFGui::updateHardware()
|
||||
|
||||
void HackRFGui::updateStatus()
|
||||
{
|
||||
int state = m_pluginAPI->state();
|
||||
int state = m_deviceAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -385,7 +385,7 @@ void HackRFGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_pluginAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <errno.h>
|
||||
#include <QDebug>
|
||||
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/dspengine.h"
|
||||
@ -30,8 +30,8 @@
|
||||
MESSAGE_CLASS_DEFINITION(HackRFInput::MsgConfigureHackRF, Message)
|
||||
MESSAGE_CLASS_DEFINITION(HackRFInput::MsgReportHackRF, Message)
|
||||
|
||||
HackRFInput::HackRFInput(PluginAPI *pluginAPI) :
|
||||
m_pluginAPI(pluginAPI),
|
||||
HackRFInput::HackRFInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_settings(),
|
||||
m_dev(0),
|
||||
m_hackRFThread(0),
|
||||
@ -185,13 +185,13 @@ bool HackRFInput::applySettings(const HackRFSettings& settings, bool force)
|
||||
if (m_settings.m_dcBlock != settings.m_dcBlock)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if (m_settings.m_iqCorrection != settings.m_iqCorrection)
|
||||
{
|
||||
m_settings.m_iqCorrection = settings.m_iqCorrection;
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if ((m_settings.m_devSampleRateIndex != settings.m_devSampleRateIndex) || force)
|
||||
@ -398,7 +398,7 @@ bool HackRFInput::applySettings(const HackRFSettings& settings, bool force)
|
||||
{
|
||||
int sampleRate = devSampleRate/(1<<m_settings.m_log2Decim);
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency);
|
||||
m_pluginAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "hackrfsettings.h"
|
||||
#include <QString>
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceAPI;
|
||||
class HackRFThread;
|
||||
|
||||
class HackRFInput : public SampleSource {
|
||||
@ -65,7 +65,7 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
HackRFInput(PluginAPI *pluginAPI);
|
||||
HackRFInput(DeviceAPI *deviceAPI);
|
||||
virtual ~HackRFInput();
|
||||
|
||||
virtual bool init(const Message& message);
|
||||
@ -83,7 +83,7 @@ private:
|
||||
hackrf_device *open_hackrf_from_sequence(int sequence);
|
||||
void setCenterFrequency(quint64 freq);
|
||||
|
||||
PluginAPI *m_pluginAPI;
|
||||
DeviceAPI *m_deviceAPI;
|
||||
QMutex m_mutex;
|
||||
HackRFSettings m_settings;
|
||||
struct hackrf_device* m_dev;
|
||||
|
@ -53,21 +53,21 @@ RTLSDRGui::RTLSDRGui(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
|
||||
|
||||
displaySettings();
|
||||
|
||||
m_sampleSource = new RTLSDRInput(m_pluginAPI);
|
||||
m_sampleSource = new RTLSDRInput(m_deviceAPI);
|
||||
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||
m_pluginAPI->setSource(m_sampleSource);
|
||||
m_deviceAPI->setSource(m_sampleSource);
|
||||
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_pluginAPI->getDeviceUID());
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
m_fileSink = new FileSink(std::string(recFileNameCStr));
|
||||
m_deviceAPI->addSink(m_fileSink);
|
||||
|
||||
connect(m_pluginAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
RTLSDRGui::~RTLSDRGui()
|
||||
{
|
||||
m_pluginAPI->removeSink(m_fileSink);
|
||||
m_deviceAPI->removeSink(m_fileSink);
|
||||
delete m_fileSink;
|
||||
delete ui;
|
||||
}
|
||||
@ -157,7 +157,7 @@ void RTLSDRGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_pluginAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("RTLSDRGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
@ -192,8 +192,8 @@ void RTLSDRGui::handleSourceMessages()
|
||||
|
||||
void RTLSDRGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_pluginAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_pluginAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||
}
|
||||
|
||||
@ -315,15 +315,15 @@ void RTLSDRGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_pluginAPI->initAcquisition())
|
||||
if (m_deviceAPI->initAcquisition())
|
||||
{
|
||||
m_pluginAPI->startAcquisition();
|
||||
m_deviceAPI->startAcquisition();
|
||||
DSPEngine::instance()->startAudio();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pluginAPI->stopAcquistion();
|
||||
m_deviceAPI->stopAcquisition();
|
||||
DSPEngine::instance()->stopAudio();
|
||||
}
|
||||
}
|
||||
@ -351,7 +351,7 @@ void RTLSDRGui::updateHardware()
|
||||
|
||||
void RTLSDRGui::updateStatus()
|
||||
{
|
||||
int state = m_pluginAPI->state();
|
||||
int state = m_deviceAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -368,7 +368,7 @@ void RTLSDRGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_pluginAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -21,15 +21,15 @@
|
||||
#include "rtlsdrinput.h"
|
||||
#include "rtlsdrthread.h"
|
||||
#include "rtlsdrgui.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/dspengine.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(RTLSDRInput::MsgConfigureRTLSDR, Message)
|
||||
MESSAGE_CLASS_DEFINITION(RTLSDRInput::MsgReportRTLSDR, Message)
|
||||
|
||||
RTLSDRInput::RTLSDRInput(PluginAPI *pluginAPI) :
|
||||
m_pluginAPI(pluginAPI),
|
||||
RTLSDRInput::RTLSDRInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_settings(),
|
||||
m_dev(0),
|
||||
m_rtlSDRThread(0),
|
||||
@ -358,20 +358,20 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force)
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
}
|
||||
|
||||
if ((m_settings.m_iqImbalance != settings.m_iqImbalance) || force)
|
||||
{
|
||||
m_settings.m_iqImbalance = settings.m_iqImbalance;
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
}
|
||||
|
||||
if (forwardChange)
|
||||
{
|
||||
int sampleRate = m_settings.m_devSampleRate/(1<<m_settings.m_log2Decim);
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency);
|
||||
m_pluginAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <rtl-sdr.h>
|
||||
#include <QString>
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceAPI;
|
||||
class RTLSDRThread;
|
||||
|
||||
class RTLSDRInput : public SampleSource {
|
||||
@ -68,7 +68,7 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
RTLSDRInput(PluginAPI *pluginAPI);
|
||||
RTLSDRInput(DeviceAPI *deviceAPI);
|
||||
virtual ~RTLSDRInput();
|
||||
|
||||
virtual bool init(const Message& message);
|
||||
@ -84,7 +84,7 @@ public:
|
||||
void set_ds_mode(int on);
|
||||
|
||||
private:
|
||||
PluginAPI *m_pluginAPI;
|
||||
DeviceAPI *m_deviceAPI;
|
||||
QMutex m_mutex;
|
||||
RTLSDRSettings m_settings;
|
||||
rtlsdr_dev_t* m_dev;
|
||||
|
@ -90,25 +90,25 @@ SDRdaemonGui::SDRdaemonGui(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget*
|
||||
m_statusTimer.start(500);
|
||||
connect(&(m_pluginAPI->getMainWindow()->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
|
||||
m_sampleSource = new SDRdaemonInput(m_pluginAPI->getMainWindow()->getMasterTimer(), m_pluginAPI);
|
||||
m_sampleSource = new SDRdaemonInput(m_pluginAPI->getMainWindow()->getMasterTimer(), m_deviceAPI);
|
||||
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||
m_pluginAPI->setSource(m_sampleSource);
|
||||
m_deviceAPI->setSource(m_sampleSource);
|
||||
|
||||
displaySettings();
|
||||
ui->applyButton->setEnabled(false);
|
||||
ui->sendButton->setEnabled(false);
|
||||
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_pluginAPI->getDeviceUID());
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
m_fileSink = new FileSink(std::string(recFileNameCStr));
|
||||
m_deviceAPI->addSink(m_fileSink);
|
||||
|
||||
connect(m_pluginAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
SDRdaemonGui::~SDRdaemonGui()
|
||||
{
|
||||
m_pluginAPI->removeSink(m_fileSink);
|
||||
m_deviceAPI->removeSink(m_fileSink);
|
||||
delete m_fileSink;
|
||||
delete ui;
|
||||
}
|
||||
@ -337,7 +337,7 @@ void SDRdaemonGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_pluginAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("SDRdaemonGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
@ -372,8 +372,8 @@ void SDRdaemonGui::handleSourceMessages()
|
||||
|
||||
void SDRdaemonGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_pluginAPI->getSpectrum()->setSampleRate(m_deviceSampleRate);
|
||||
m_pluginAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_deviceSampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_deviceSampleRate / 1000));
|
||||
}
|
||||
|
||||
@ -587,15 +587,15 @@ void SDRdaemonGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_pluginAPI->initAcquisition())
|
||||
if (m_deviceAPI->initAcquisition())
|
||||
{
|
||||
m_pluginAPI->startAcquisition();
|
||||
m_deviceAPI->startAcquisition();
|
||||
DSPEngine::instance()->startAudio();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pluginAPI->stopAcquistion();
|
||||
m_deviceAPI->stopAcquisition();
|
||||
DSPEngine::instance()->stopAudio();
|
||||
}
|
||||
}
|
||||
@ -701,7 +701,7 @@ void SDRdaemonGui::updateWithStreamTime()
|
||||
|
||||
void SDRdaemonGui::updateStatus()
|
||||
{
|
||||
int state = m_pluginAPI->state();
|
||||
int state = m_deviceAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -718,7 +718,7 @@ void SDRdaemonGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_pluginAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <errno.h>
|
||||
#include <QDebug>
|
||||
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/dspengine.h"
|
||||
@ -38,8 +38,8 @@ MESSAGE_CLASS_DEFINITION(SDRdaemonInput::MsgReportSDRdaemonAcquisition, Message)
|
||||
MESSAGE_CLASS_DEFINITION(SDRdaemonInput::MsgReportSDRdaemonStreamData, Message)
|
||||
MESSAGE_CLASS_DEFINITION(SDRdaemonInput::MsgReportSDRdaemonStreamTiming, Message)
|
||||
|
||||
SDRdaemonInput::SDRdaemonInput(const QTimer& masterTimer, PluginAPI *pluginAPI) :
|
||||
m_pluginAPI(pluginAPI),
|
||||
SDRdaemonInput::SDRdaemonInput(const QTimer& masterTimer, DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_address("127.0.0.1"),
|
||||
m_port(9090),
|
||||
m_SDRdaemonUDPHandler(0),
|
||||
@ -52,7 +52,7 @@ SDRdaemonInput::SDRdaemonInput(const QTimer& masterTimer, PluginAPI *pluginAPI)
|
||||
m_autoCorrBuffer(false)
|
||||
{
|
||||
m_sampleFifo.setSize(96000 * 4);
|
||||
m_SDRdaemonUDPHandler = new SDRdaemonUDPHandler(&m_sampleFifo, getOutputMessageQueueToGUI(), m_pluginAPI);
|
||||
m_SDRdaemonUDPHandler = new SDRdaemonUDPHandler(&m_sampleFifo, getOutputMessageQueueToGUI(), m_deviceAPI);
|
||||
m_SDRdaemonUDPHandler->connectTimer(&m_masterTimer);
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ bool SDRdaemonInput::handleMessage(const Message& message)
|
||||
MsgConfigureSDRdaemonAutoCorr& conf = (MsgConfigureSDRdaemonAutoCorr&) message;
|
||||
bool dcBlock = conf.getDCBlock();
|
||||
bool iqImbalance = conf.getIQImbalance();
|
||||
m_pluginAPI->configureCorrections(dcBlock, iqImbalance);
|
||||
m_deviceAPI->configureCorrections(dcBlock, iqImbalance);
|
||||
return true;
|
||||
}
|
||||
else if (MsgConfigureSDRdaemonAutoFollowPolicy::match(message))
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <iostream>
|
||||
#include <stdint.h>
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceAPI;
|
||||
class SDRdaemonUDPHandler;
|
||||
|
||||
class SDRdaemonInput : public SampleSource {
|
||||
@ -274,7 +274,7 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
SDRdaemonInput(const QTimer& masterTimer, PluginAPI *pluginAPI);
|
||||
SDRdaemonInput(const QTimer& masterTimer, DeviceAPI *deviceAPI);
|
||||
virtual ~SDRdaemonInput();
|
||||
|
||||
virtual bool init(const Message& message);
|
||||
@ -290,7 +290,7 @@ public:
|
||||
virtual bool handleMessage(const Message& message);
|
||||
|
||||
private:
|
||||
PluginAPI *m_pluginAPI;
|
||||
DeviceAPI *m_deviceAPI;
|
||||
QMutex m_mutex;
|
||||
QString m_address;
|
||||
quint16 m_port;
|
||||
|
@ -19,14 +19,14 @@
|
||||
#include <QTimer>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "sdrdaemonudphandler.h"
|
||||
#include "sdrdaemoninput.h"
|
||||
|
||||
SDRdaemonUDPHandler::SDRdaemonUDPHandler(SampleFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, PluginAPI *pluginAPI) :
|
||||
m_pluginAPI(pluginAPI),
|
||||
SDRdaemonUDPHandler::SDRdaemonUDPHandler(SampleFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *devieAPI) :
|
||||
m_deviceAPI(devieAPI),
|
||||
m_sdrDaemonBuffer(m_rateDivider),
|
||||
m_dataSocket(0),
|
||||
m_dataAddress(QHostAddress::LocalHost),
|
||||
@ -91,7 +91,7 @@ void SDRdaemonUDPHandler::start()
|
||||
|
||||
// Need to notify the DSP engine to actually start
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(m_samplerate, m_centerFrequency * 1000); // Frequency in Hz for the DSP engine
|
||||
m_pluginAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_elapsedTimer.start();
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ void SDRdaemonUDPHandler::processData()
|
||||
if (change)
|
||||
{
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(m_samplerate, m_centerFrequency * 1000); // Frequency in Hz for the DSP engine
|
||||
m_pluginAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
SDRdaemonInput::MsgReportSDRdaemonStreamData *report = SDRdaemonInput::MsgReportSDRdaemonStreamData::create(
|
||||
m_sdrDaemonBuffer.getSampleRateStream(),
|
||||
m_samplerate,
|
||||
|
@ -30,13 +30,13 @@
|
||||
class SampleFifo;
|
||||
class MessageQueue;
|
||||
class QTimer;
|
||||
class PluginAPI;
|
||||
class DeviceAPI;
|
||||
|
||||
class SDRdaemonUDPHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SDRdaemonUDPHandler(SampleFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, PluginAPI *pluginAPI);
|
||||
SDRdaemonUDPHandler(SampleFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *deviceAPI);
|
||||
~SDRdaemonUDPHandler();
|
||||
void connectTimer(const QTimer* timer);
|
||||
void start();
|
||||
@ -50,7 +50,7 @@ public slots:
|
||||
void dataReadyRead();
|
||||
|
||||
private:
|
||||
PluginAPI *m_pluginAPI;
|
||||
DeviceAPI *m_deviceAPI;
|
||||
SDRdaemonBuffer m_sdrDaemonBuffer;
|
||||
QUdpSocket *m_dataSocket;
|
||||
QHostAddress m_dataAddress;
|
||||
|
@ -64,10 +64,10 @@ void PluginAPI::registerSampleSource(const QString& sourceName, PluginInterface*
|
||||
// m_pluginManager->addSink(sink);
|
||||
//}
|
||||
|
||||
void PluginAPI::removeSink(SampleSink* sink)
|
||||
{
|
||||
m_pluginManager->removeSink(sink);
|
||||
}
|
||||
//void PluginAPI::removeSink(SampleSink* sink)
|
||||
//{
|
||||
// m_pluginManager->removeSink(sink);
|
||||
//}
|
||||
|
||||
void PluginAPI::addThreadedSink(ThreadedSampleSink* sink)
|
||||
{
|
||||
@ -79,60 +79,60 @@ void PluginAPI::removeThreadedSink(ThreadedSampleSink* sink)
|
||||
m_pluginManager->removeThreadedSink(sink);
|
||||
}
|
||||
|
||||
void PluginAPI::setSource(SampleSource* source)
|
||||
{
|
||||
m_pluginManager->setSource(source);
|
||||
}
|
||||
//void PluginAPI::setSource(SampleSource* source)
|
||||
//{
|
||||
// m_pluginManager->setSource(source);
|
||||
//}
|
||||
|
||||
bool PluginAPI::initAcquisition()
|
||||
{
|
||||
return m_pluginManager->initAcquisition();
|
||||
}
|
||||
//bool PluginAPI::initAcquisition()
|
||||
//{
|
||||
// return m_pluginManager->initAcquisition();
|
||||
//}
|
||||
//
|
||||
//bool PluginAPI::startAcquisition()
|
||||
//{
|
||||
// return m_pluginManager->startAcquisition();
|
||||
//}
|
||||
//
|
||||
//void PluginAPI::stopAcquistion()
|
||||
//{
|
||||
// m_pluginManager->stopAcquistion();
|
||||
//}
|
||||
|
||||
bool PluginAPI::startAcquisition()
|
||||
{
|
||||
return m_pluginManager->startAcquisition();
|
||||
}
|
||||
//DSPDeviceEngine::State PluginAPI::state() const
|
||||
//{
|
||||
// return m_pluginManager->state();
|
||||
//}
|
||||
//
|
||||
//QString PluginAPI::errorMessage()
|
||||
//{
|
||||
// return m_pluginManager->errorMessage();
|
||||
//}
|
||||
|
||||
void PluginAPI::stopAcquistion()
|
||||
{
|
||||
m_pluginManager->stopAcquistion();
|
||||
}
|
||||
//uint PluginAPI::getDeviceUID() const
|
||||
//{
|
||||
// return m_pluginManager->getDeviceUID();
|
||||
//}
|
||||
|
||||
DSPDeviceEngine::State PluginAPI::state() const
|
||||
{
|
||||
return m_pluginManager->state();
|
||||
}
|
||||
//MessageQueue *PluginAPI::getDeviceInputMessageQueue()
|
||||
//{
|
||||
// return m_pluginManager->getDeviceInputMessageQueue();
|
||||
//}
|
||||
//
|
||||
//MessageQueue *PluginAPI::getDeviceOutputMessageQueue()
|
||||
//{
|
||||
// return m_pluginManager->getDeviceOutputMessageQueue();
|
||||
//}
|
||||
|
||||
QString PluginAPI::errorMessage()
|
||||
{
|
||||
return m_pluginManager->errorMessage();
|
||||
}
|
||||
//void PluginAPI::configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection)
|
||||
//{
|
||||
// m_pluginManager->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
|
||||
//}
|
||||
|
||||
uint PluginAPI::getDeviceUID() const
|
||||
{
|
||||
return m_pluginManager->getDeviceUID();
|
||||
}
|
||||
|
||||
MessageQueue *PluginAPI::getDeviceInputMessageQueue()
|
||||
{
|
||||
return m_pluginManager->getDeviceInputMessageQueue();
|
||||
}
|
||||
|
||||
MessageQueue *PluginAPI::getDeviceOutputMessageQueue()
|
||||
{
|
||||
return m_pluginManager->getDeviceOutputMessageQueue();
|
||||
}
|
||||
|
||||
void PluginAPI::configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection)
|
||||
{
|
||||
m_pluginManager->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
|
||||
}
|
||||
|
||||
GLSpectrum *PluginAPI::getSpectrum()
|
||||
{
|
||||
return m_pluginManager->getSpectrum();
|
||||
}
|
||||
//GLSpectrum *PluginAPI::getSpectrum()
|
||||
//{
|
||||
// return m_pluginManager->getSpectrum();
|
||||
//}
|
||||
|
||||
PluginAPI::PluginAPI(PluginManager* pluginManager, MainWindow* mainWindow) :
|
||||
QObject(mainWindow),
|
||||
|
@ -42,21 +42,21 @@ public:
|
||||
|
||||
// Device engine stuff
|
||||
// void addSink(SampleSink* sink); //!< Add a sample sink to device engine
|
||||
void removeSink(SampleSink* sink); //!< Remove a sample sink from device engine
|
||||
// void removeSink(SampleSink* sink); //!< Remove a sample sink from device engine
|
||||
void addThreadedSink(ThreadedSampleSink* sink); //!< Add a sample sink that will run on its own thread to device engine
|
||||
void setSource(SampleSource* source); //!< Set device engine sample source type
|
||||
void removeThreadedSink(ThreadedSampleSink* sink); //!< Remove a sample sink that runs on its own thread from device engine
|
||||
bool initAcquisition(); //!< Initialize device engine acquisition sequence
|
||||
bool startAcquisition(); //!< Start device engine acquisition sequence
|
||||
void stopAcquistion(); //!< Stop device engine acquisition sequence
|
||||
DSPDeviceEngine::State state() const; //!< device engine state
|
||||
QString errorMessage(); //!< Return the current device engine error message
|
||||
uint getDeviceUID() const; //!< Return the current device engine unique ID
|
||||
MessageQueue *getDeviceInputMessageQueue();
|
||||
MessageQueue *getDeviceOutputMessageQueue();
|
||||
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection); //!< Configure current device engine DSP corrections
|
||||
void removeThreadedSink(ThreadedSampleSink* sink); //!< Remove a sample sink that runs on its own thread from device engine
|
||||
// void setSource(SampleSource* source); //!< Set device engine sample source type
|
||||
// bool initAcquisition(); //!< Initialize device engine acquisition sequence
|
||||
// bool startAcquisition(); //!< Start device engine acquisition sequence
|
||||
// void stopAcquistion(); //!< Stop device engine acquisition sequence
|
||||
// DSPDeviceEngine::State state() const; //!< device engine state
|
||||
// QString errorMessage(); //!< Return the current device engine error message
|
||||
// uint getDeviceUID() const; //!< Return the current device engine unique ID
|
||||
// MessageQueue *getDeviceInputMessageQueue();
|
||||
// MessageQueue *getDeviceOutputMessageQueue();
|
||||
// void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection); //!< Configure current device engine DSP corrections
|
||||
|
||||
GLSpectrum *getSpectrum();
|
||||
// GLSpectrum *getSpectrum();
|
||||
|
||||
// R/O access to main window
|
||||
const MainWindow* getMainWindow() const { return m_mainWindow; }
|
||||
|
@ -111,10 +111,10 @@ void PluginManager::setInputGUI(QWidget* gui, const QString& sourceDisplayName)
|
||||
// m_dspDeviceEngine->addSink(sink);
|
||||
//}
|
||||
|
||||
void PluginManager::removeSink(SampleSink* sink)
|
||||
{
|
||||
m_dspDeviceEngine->removeSink(sink);
|
||||
}
|
||||
//void PluginManager::removeSink(SampleSink* sink)
|
||||
//{
|
||||
// m_dspDeviceEngine->removeSink(sink);
|
||||
//}
|
||||
|
||||
void PluginManager::addThreadedSink(ThreadedSampleSink* sink)
|
||||
{
|
||||
|
@ -60,25 +60,25 @@ public:
|
||||
void setInputGUI(QWidget* gui, const QString& sourceDisplayName);
|
||||
|
||||
// void addSink(SampleSink* sink);
|
||||
void removeSink(SampleSink* sink);
|
||||
// void removeSink(SampleSink* sink);
|
||||
void addThreadedSink(ThreadedSampleSink* sink);
|
||||
void removeThreadedSink(ThreadedSampleSink* sink);
|
||||
void setSource(SampleSource* source) { m_dspDeviceEngine->setSource(source); }; //!< Set device engine sample source type
|
||||
bool initAcquisition() { return m_dspDeviceEngine->initAcquisition(); } //!< Initialize device engine acquisition sequence
|
||||
bool startAcquisition() { return m_dspDeviceEngine->startAcquisition(); } //!< Start device engine acquisition sequence
|
||||
void stopAcquistion() { m_dspDeviceEngine->stopAcquistion(); } //!< Stop device engine acquisition sequence
|
||||
DSPDeviceEngine::State state() const { return m_dspDeviceEngine->state(); }
|
||||
QString errorMessage() { return m_dspDeviceEngine->errorMessage(); } //!< Return the current device engine error message
|
||||
uint getDeviceUID() const { return m_dspDeviceEngine->getUID(); } //!< Return the current device engine unique ID
|
||||
MessageQueue *getDeviceInputMessageQueue() { return m_dspDeviceEngine->getInputMessageQueue(); }
|
||||
MessageQueue *getDeviceOutputMessageQueue() { return m_dspDeviceEngine->getOutputMessageQueue(); }
|
||||
// void setSource(SampleSource* source) { m_dspDeviceEngine->setSource(source); }; //!< Set device engine sample source type
|
||||
// bool initAcquisition() { return m_dspDeviceEngine->initAcquisition(); } //!< Initialize device engine acquisition sequence
|
||||
// bool startAcquisition() { return m_dspDeviceEngine->startAcquisition(); } //!< Start device engine acquisition sequence
|
||||
// void stopAcquistion() { m_dspDeviceEngine->stopAcquistion(); } //!< Stop device engine acquisition sequence
|
||||
// DSPDeviceEngine::State state() const { return m_dspDeviceEngine->state(); }
|
||||
// QString errorMessage() { return m_dspDeviceEngine->errorMessage(); } //!< Return the current device engine error message
|
||||
// uint getDeviceUID() const { return m_dspDeviceEngine->getUID(); } //!< Return the current device engine unique ID
|
||||
// MessageQueue *getDeviceInputMessageQueue() { return m_dspDeviceEngine->getInputMessageQueue(); }
|
||||
// MessageQueue *getDeviceOutputMessageQueue() { return m_dspDeviceEngine->getOutputMessageQueue(); }
|
||||
|
||||
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection) //!< Configure current device engine DSP corrections
|
||||
{
|
||||
m_dspDeviceEngine->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
|
||||
}
|
||||
// void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection) //!< Configure current device engine DSP corrections
|
||||
// {
|
||||
// m_dspDeviceEngine->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
|
||||
// }
|
||||
|
||||
GLSpectrum *getSpectrum() { return m_spectrum; }
|
||||
// GLSpectrum *getSpectrum() { return m_spectrum; }
|
||||
|
||||
void loadSettings(const Preset* preset);
|
||||
void loadSourceSettings(const Preset* preset);
|
||||
|
Loading…
Reference in New Issue
Block a user