From 1987bbac772b9d0170d2409fc9def361358a1133 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 24 Dec 2017 19:58:26 +0100 Subject: [PATCH] Device plugins: make setMessageQueueToGUI pure virtual so that child classes must have to deal with this --- .../samplesink/bladerfoutput/bladerfoutput.h | 1 + plugins/samplesink/filesink/filesinkoutput.h | 1 + .../samplesink/hackrfoutput/hackrfoutput.h | 1 + .../samplesink/limesdroutput/limesdroutput.h | 1 + .../plutosdroutput/plutosdroutput.h | 1 + .../sdrdaemonsink/sdrdaemonsinkoutput.h | 1 + plugins/samplesource/airspy/airspyinput.h | 1 + .../samplesource/bladerfinput/bladerfinput.h | 1 + plugins/samplesource/fcdpro/fcdproinput.h | 1 + .../samplesource/fcdproplus/fcdproplusinput.h | 1 + .../samplesource/filesource/filesourceinput.h | 1 + .../samplesource/hackrfinput/hackrfinput.h | 1 + .../samplesource/limesdrinput/limesdrinput.h | 1 + .../plutosdrinput/plutosdrinput.h | 1 + plugins/samplesource/rtlsdr/rtlsdrgui.cpp | 11 ++---- plugins/samplesource/rtlsdr/rtlsdrgui.h | 2 +- plugins/samplesource/rtlsdr/rtlsdrinput.cpp | 12 ------ plugins/samplesource/rtlsdr/rtlsdrinput.h | 22 +---------- .../sdrdaemonsource/sdrdaemonsourceinput.cpp | 16 ++++---- .../sdrdaemonsource/sdrdaemonsourceinput.h | 3 +- .../sdrdaemonsourceudphandler.cpp | 39 ++++++++++--------- .../sdrdaemonsourceudphandler.h | 2 +- plugins/samplesource/sdrplay/sdrplayinput.h | 1 + sdrbase/dsp/devicesamplesink.h | 2 +- sdrbase/dsp/devicesamplesource.h | 2 +- 25 files changed, 54 insertions(+), 72 deletions(-) diff --git a/plugins/samplesink/bladerfoutput/bladerfoutput.h b/plugins/samplesink/bladerfoutput/bladerfoutput.h index 03c44020e..c668575cd 100644 --- a/plugins/samplesink/bladerfoutput/bladerfoutput.h +++ b/plugins/samplesink/bladerfoutput/bladerfoutput.h @@ -97,6 +97,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesink/filesink/filesinkoutput.h b/plugins/samplesink/filesink/filesinkoutput.h index afecc5ddd..3117f4b3d 100644 --- a/plugins/samplesink/filesink/filesinkoutput.h +++ b/plugins/samplesink/filesink/filesinkoutput.h @@ -177,6 +177,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesink/hackrfoutput/hackrfoutput.h b/plugins/samplesink/hackrfoutput/hackrfoutput.h index c18370530..c2e9bb30f 100644 --- a/plugins/samplesink/hackrfoutput/hackrfoutput.h +++ b/plugins/samplesink/hackrfoutput/hackrfoutput.h @@ -97,6 +97,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesink/limesdroutput/limesdroutput.h b/plugins/samplesink/limesdroutput/limesdroutput.h index 82a9c0705..19571645e 100644 --- a/plugins/samplesink/limesdroutput/limesdroutput.h +++ b/plugins/samplesink/limesdroutput/limesdroutput.h @@ -191,6 +191,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesink/plutosdroutput/plutosdroutput.h b/plugins/samplesink/plutosdroutput/plutosdroutput.h index 037240c81..9606469a0 100644 --- a/plugins/samplesink/plutosdroutput/plutosdroutput.h +++ b/plugins/samplesink/plutosdroutput/plutosdroutput.h @@ -79,6 +79,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkoutput.h b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkoutput.h index 2aad5cac9..0be2c199d 100644 --- a/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkoutput.h +++ b/plugins/samplesink/sdrdaemonsink/sdrdaemonsinkoutput.h @@ -158,6 +158,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesource/airspy/airspyinput.h b/plugins/samplesource/airspy/airspyinput.h index 73a5dba7c..828ae1120 100644 --- a/plugins/samplesource/airspy/airspyinput.h +++ b/plugins/samplesource/airspy/airspyinput.h @@ -97,6 +97,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesource/bladerfinput/bladerfinput.h b/plugins/samplesource/bladerfinput/bladerfinput.h index 5b464dcc2..24ee4286c 100644 --- a/plugins/samplesource/bladerfinput/bladerfinput.h +++ b/plugins/samplesource/bladerfinput/bladerfinput.h @@ -100,6 +100,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesource/fcdpro/fcdproinput.h b/plugins/samplesource/fcdpro/fcdproinput.h index 248db0db0..b623e41c7 100644 --- a/plugins/samplesource/fcdpro/fcdproinput.h +++ b/plugins/samplesource/fcdpro/fcdproinput.h @@ -104,6 +104,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesource/fcdproplus/fcdproplusinput.h b/plugins/samplesource/fcdproplus/fcdproplusinput.h index 46108a514..30b876afa 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusinput.h +++ b/plugins/samplesource/fcdproplus/fcdproplusinput.h @@ -103,6 +103,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesource/filesource/filesourceinput.h b/plugins/samplesource/filesource/filesourceinput.h index cad728555..ea5ed431c 100644 --- a/plugins/samplesource/filesource/filesourceinput.h +++ b/plugins/samplesource/filesource/filesourceinput.h @@ -229,6 +229,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesource/hackrfinput/hackrfinput.h b/plugins/samplesource/hackrfinput/hackrfinput.h index 1fe08c1a0..3e603fc9a 100644 --- a/plugins/samplesource/hackrfinput/hackrfinput.h +++ b/plugins/samplesource/hackrfinput/hackrfinput.h @@ -117,6 +117,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesource/limesdrinput/limesdrinput.h b/plugins/samplesource/limesdrinput/limesdrinput.h index 927280f8b..42314ef92 100644 --- a/plugins/samplesource/limesdrinput/limesdrinput.h +++ b/plugins/samplesource/limesdrinput/limesdrinput.h @@ -211,6 +211,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesource/plutosdrinput/plutosdrinput.h b/plugins/samplesource/plutosdrinput/plutosdrinput.h index b1132a5cd..6504418d7 100644 --- a/plugins/samplesource/plutosdrinput/plutosdrinput.h +++ b/plugins/samplesource/plutosdrinput/plutosdrinput.h @@ -99,6 +99,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp index c200fbac6..8553eee5e 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp @@ -55,6 +55,9 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) : displaySettings(); + m_gains = m_sampleSource->getGains(); + displayGains(); + connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); } @@ -133,13 +136,7 @@ bool RTLSDRGui::deserialize(const QByteArray& data) bool RTLSDRGui::handleMessage(const Message& message) { - if (RTLSDRInput::MsgReportRTLSDR::match(message)) - { - m_gains = ((RTLSDRInput::MsgReportRTLSDR&) message).getGains(); - displayGains(); - return true; - } - else if (RTLSDRInput::MsgConfigureRTLSDR::match(message)) + if (RTLSDRInput::MsgConfigureRTLSDR::match(message)) { const RTLSDRInput::MsgConfigureRTLSDR& cfg = (RTLSDRInput::MsgConfigureRTLSDR&) message; m_settings = cfg.getSettings(); diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.h b/plugins/samplesource/rtlsdr/rtlsdrgui.h index 3693f4cab..a7d6bf37a 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.h +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.h @@ -61,7 +61,7 @@ private: QTimer m_updateTimer; QTimer m_statusTimer; std::vector m_gains; - DeviceSampleSource* m_sampleSource; + RTLSDRInput* m_sampleSource; int m_sampleRate; quint64 m_deviceCenterFrequency; //!< Center frequency in device int m_lastEngineState; diff --git a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp index 57e43ce9c..0accf0e8d 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp @@ -32,7 +32,6 @@ #include "dsp/filerecord.h" MESSAGE_CLASS_DEFINITION(RTLSDRInput::MsgConfigureRTLSDR, Message) -MESSAGE_CLASS_DEFINITION(RTLSDRInput::MsgReportRTLSDR, Message) MESSAGE_CLASS_DEFINITION(RTLSDRInput::MsgFileRecord, Message) MESSAGE_CLASS_DEFINITION(RTLSDRInput::MsgStartStop, Message) @@ -481,17 +480,6 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force) return true; } -void RTLSDRInput::setMessageQueueToGUI(MessageQueue *queue) -{ - qDebug("RTLSDRInput::setMessageQueueToGUI: %p", queue); - DeviceSampleSource::setMessageQueueToGUI(queue); - - if (queue) { - MsgReportRTLSDR *message = MsgReportRTLSDR::create(m_gains); - queue->push(message); - } -} - void RTLSDRInput::set_ds_mode(int on) { rtlsdr_set_direct_sampling(m_dev, on); diff --git a/plugins/samplesource/rtlsdr/rtlsdrinput.h b/plugins/samplesource/rtlsdr/rtlsdrinput.h index 7b6b7c911..54a82d67f 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrinput.h +++ b/plugins/samplesource/rtlsdr/rtlsdrinput.h @@ -53,26 +53,6 @@ public: { } }; - class MsgReportRTLSDR : public Message { - MESSAGE_CLASS_DECLARATION - - public: - const std::vector& getGains() const { return m_gains; } - - static MsgReportRTLSDR* create(const std::vector& gains) - { - return new MsgReportRTLSDR(gains); - } - - protected: - std::vector m_gains; - - MsgReportRTLSDR(const std::vector& gains) : - Message(), - m_gains(gains) - { } - }; - class MsgFileRecord : public Message { MESSAGE_CLASS_DECLARATION @@ -118,12 +98,12 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; virtual bool handleMessage(const Message& message); - virtual void setMessageQueueToGUI(MessageQueue *queue); virtual int webapiSettingsGet( SWGSDRangel::SWGDeviceSettings& response, diff --git a/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceinput.cpp b/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceinput.cpp index 9b4ed86d0..5bbb06b5d 100644 --- a/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceinput.cpp +++ b/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceinput.cpp @@ -54,7 +54,8 @@ SDRdaemonSourceInput::SDRdaemonSourceInput(DeviceSourceAPI *deviceAPI) : m_autoCorrBuffer(false) { m_sampleFifo.setSize(96000 * 4); - m_SDRdaemonUDPHandler = new SDRdaemonSourceUDPHandler(&m_sampleFifo, &m_inputMessageQueue, m_deviceAPI); + //m_SDRdaemonUDPHandler = new SDRdaemonSourceUDPHandler(&m_sampleFifo, &m_inputMessageQueue, m_deviceAPI); + m_SDRdaemonUDPHandler = new SDRdaemonSourceUDPHandler(&m_sampleFifo, m_deviceAPI); m_SDRdaemonUDPHandler->connectTimer(&m_masterTimer); char recFileNameCStr[30]; @@ -91,6 +92,12 @@ void SDRdaemonSourceInput::stop() getInputMessageQueue()->push(command); } +void SDRdaemonSourceInput::setMessageQueueToGUI(MessageQueue *queue) +{ + m_guiMessageQueue = queue; + m_SDRdaemonUDPHandler->setMessageQueueToGUI(queue); +} + const QString& SDRdaemonSourceInput::getDeviceDescription() const { return m_deviceDescription; @@ -224,13 +231,6 @@ bool SDRdaemonSourceInput::handleMessage(const Message& message) } } -void SDRdaemonSourceInput::setMessageQueueToGUI(MessageQueue *queue) -{ - qDebug("SDRdaemonSourceInput::setMessageQueueToGUI: %p", queue); - DeviceSampleSource::setMessageQueueToGUI(queue); - m_SDRdaemonUDPHandler->setMessageQueueToGUI(queue); -} - int SDRdaemonSourceInput::webapiRunGet( SWGSDRangel::SWGDeviceState& response, QString& errorMessage __attribute__((unused))) diff --git a/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceinput.h b/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceinput.h index cc5f1f02e..5fdcb87ff 100644 --- a/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceinput.h +++ b/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceinput.h @@ -329,6 +329,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue); virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; @@ -337,8 +338,6 @@ public: virtual bool handleMessage(const Message& message); - virtual void setMessageQueueToGUI(MessageQueue *queue); - virtual int webapiRunGet( SWGSDRangel::SWGDeviceState& response, QString& errorMessage); diff --git a/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceudphandler.cpp b/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceudphandler.cpp index 58eae51fc..66bcf3be7 100644 --- a/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceudphandler.cpp +++ b/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceudphandler.cpp @@ -26,7 +26,7 @@ #include "sdrdaemonsourceinput.h" #include "sdrdaemonsourceudphandler.h" -SDRdaemonSourceUDPHandler::SDRdaemonSourceUDPHandler(SampleSinkFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceSourceAPI *devieAPI) : +SDRdaemonSourceUDPHandler::SDRdaemonSourceUDPHandler(SampleSinkFifo *sampleFifo, DeviceSourceAPI *devieAPI) : m_deviceAPI(devieAPI), m_sdrDaemonBuffer(m_rateDivider), m_dataSocket(0), @@ -41,7 +41,7 @@ SDRdaemonSourceUDPHandler::SDRdaemonSourceUDPHandler(SampleSinkFifo *sampleFifo, m_centerFrequency(0), m_tv_sec(0), m_tv_usec(0), - m_outputMessageQueueToGUI(outputMessageQueueToGUI), + m_outputMessageQueueToGUI(0), m_tickCount(0), m_samplesCount(0), m_timer(0), @@ -244,22 +244,25 @@ void SDRdaemonSourceUDPHandler::tick() framesDecodingStatus = 2; } - SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming *report = SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming::create( - m_tv_sec, - m_tv_usec, - m_sdrDaemonBuffer.getBufferLengthInSecs(), - m_sdrDaemonBuffer.getBufferGauge(), - framesDecodingStatus, - minNbBlocks == nbOriginalBlocks + nbFECblocks, - minNbBlocks, - minNbOriginalBlocks, - m_sdrDaemonBuffer.getMaxNbRecovery(), - m_sdrDaemonBuffer.getAvgNbBlocks(), - m_sdrDaemonBuffer.getAvgOriginalBlocks(), - m_sdrDaemonBuffer.getAvgNbRecovery(), - nbOriginalBlocks, - nbFECblocks); + if (m_outputMessageQueueToGUI) + { + SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming *report = SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming::create( + m_tv_sec, + m_tv_usec, + m_sdrDaemonBuffer.getBufferLengthInSecs(), + m_sdrDaemonBuffer.getBufferGauge(), + framesDecodingStatus, + minNbBlocks == nbOriginalBlocks + nbFECblocks, + minNbBlocks, + minNbOriginalBlocks, + m_sdrDaemonBuffer.getMaxNbRecovery(), + m_sdrDaemonBuffer.getAvgNbBlocks(), + m_sdrDaemonBuffer.getAvgOriginalBlocks(), + m_sdrDaemonBuffer.getAvgNbRecovery(), + nbOriginalBlocks, + nbFECblocks); - m_outputMessageQueueToGUI->push(report); + m_outputMessageQueueToGUI->push(report); + } } } diff --git a/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceudphandler.h b/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceudphandler.h index 47cf5689f..2ef6bd05e 100644 --- a/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceudphandler.h +++ b/plugins/samplesource/sdrdaemonsource/sdrdaemonsourceudphandler.h @@ -36,7 +36,7 @@ class SDRdaemonSourceUDPHandler : public QObject { Q_OBJECT public: - SDRdaemonSourceUDPHandler(SampleSinkFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceSourceAPI *deviceAPI); + SDRdaemonSourceUDPHandler(SampleSinkFifo* sampleFifo, DeviceSourceAPI *deviceAPI); ~SDRdaemonSourceUDPHandler(); void setMessageQueueToGUI(MessageQueue *queue) { m_outputMessageQueueToGUI = queue; } void connectTimer(const QTimer* timer); diff --git a/plugins/samplesource/sdrplay/sdrplayinput.h b/plugins/samplesource/sdrplay/sdrplayinput.h index b82e057ac..f1b90e98b 100644 --- a/plugins/samplesource/sdrplay/sdrplayinput.h +++ b/plugins/samplesource/sdrplay/sdrplayinput.h @@ -135,6 +135,7 @@ public: virtual bool start(); virtual void stop(); + virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } virtual const QString& getDeviceDescription() const; virtual int getSampleRate() const; virtual quint64 getCenterFrequency() const; diff --git a/sdrbase/dsp/devicesamplesink.h b/sdrbase/dsp/devicesamplesink.h index 5c425c7a6..a76d8d18e 100644 --- a/sdrbase/dsp/devicesamplesink.h +++ b/sdrbase/dsp/devicesamplesink.h @@ -69,7 +69,7 @@ public: { errorMessage = "Not implemented"; return 501; } MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } + virtual void setMessageQueueToGUI(MessageQueue *queue) = 0; // pure virtual so that child classes must have to deal with this MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; } SampleSourceFifo* getSampleFifo() { return &m_sampleSourceFifo; } diff --git a/sdrbase/dsp/devicesamplesource.h b/sdrbase/dsp/devicesamplesource.h index 479c2b5b8..88971024b 100644 --- a/sdrbase/dsp/devicesamplesource.h +++ b/sdrbase/dsp/devicesamplesource.h @@ -69,7 +69,7 @@ public: { errorMessage = "Not implemented"; return 501; } MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } + virtual void setMessageQueueToGUI(MessageQueue *queue) = 0; // pure virtual so that child classes must have to deal with this MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; } SampleSinkFifo* getSampleFifo() { return &m_sampleFifo; }