2015-08-12 03:03:02 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright (C) 2015 F4EXB //
|
|
|
|
// written by Edouard Griffiths //
|
|
|
|
// //
|
|
|
|
// This program is free software; you can redistribute it and/or modify //
|
|
|
|
// it under the terms of the GNU General Public License as published by //
|
|
|
|
// the Free Software Foundation as version 3 of the License, or //
|
|
|
|
// //
|
|
|
|
// This program is distributed in the hope that it will be useful, //
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
|
|
|
// GNU General Public License V3 for more details. //
|
|
|
|
// //
|
|
|
|
// You should have received a copy of the GNU General Public License //
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
#ifndef INCLUDE_DSPCOMMANDS_H
|
|
|
|
#define INCLUDE_DSPCOMMANDS_H
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include "util/message.h"
|
|
|
|
#include "fftwindow.h"
|
|
|
|
#include "util/export.h"
|
|
|
|
|
2016-10-02 17:16:40 -04:00
|
|
|
class DeviceSampleSource;
|
2016-10-02 16:29:04 -04:00
|
|
|
class BasebandSampleSink;
|
2016-10-03 09:55:16 -04:00
|
|
|
class ThreadedBasebandSampleSink;
|
2016-10-17 12:15:08 -04:00
|
|
|
class DeviceSampleSink;
|
|
|
|
class BasebandSampleSource;
|
|
|
|
class ThreadedBasebandSampleSource;
|
2014-05-18 11:52:39 -04:00
|
|
|
class AudioFifo;
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPAcquisitionInit : public Message {
|
2015-08-12 03:03:02 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPAcquisitionStart : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPAcquisitionStop : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
};
|
|
|
|
|
2016-10-17 12:15:08 -04:00
|
|
|
class SDRANGEL_API DSPGenerationInit : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
};
|
|
|
|
|
|
|
|
class SDRANGEL_API DSPGenerationStart : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
};
|
|
|
|
|
|
|
|
class SDRANGEL_API DSPGenerationStop : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPGetSourceDeviceDescription : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
void setDeviceDescription(const QString& text) { m_deviceDescription = text; }
|
|
|
|
const QString& getDeviceDescription() const { return m_deviceDescription; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString m_deviceDescription;
|
|
|
|
};
|
|
|
|
|
2016-10-17 12:15:08 -04:00
|
|
|
class SDRANGEL_API DSPGetSinkDeviceDescription : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
void setDeviceDescription(const QString& text) { m_deviceDescription = text; }
|
|
|
|
const QString& getDeviceDescription() const { return m_deviceDescription; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString m_deviceDescription;
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPGetErrorMessage : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
void setErrorMessage(const QString& text) { m_errorMessage = text; }
|
|
|
|
const QString& getErrorMessage() const { return m_errorMessage; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString m_errorMessage;
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPSetSource : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2016-10-02 17:16:40 -04:00
|
|
|
DSPSetSource(DeviceSampleSource* sampleSource) : Message(), m_sampleSource(sampleSource) { }
|
2014-05-18 11:52:39 -04:00
|
|
|
|
2016-10-02 17:16:40 -04:00
|
|
|
DeviceSampleSource* getSampleSource() const { return m_sampleSource; }
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
private:
|
2016-10-02 17:16:40 -04:00
|
|
|
DeviceSampleSource* m_sampleSource;
|
2014-05-18 11:52:39 -04:00
|
|
|
};
|
|
|
|
|
2016-10-17 12:15:08 -04:00
|
|
|
class SDRANGEL_API DSPSetSink : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
DSPSetSink(DeviceSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
|
|
|
|
|
|
|
|
DeviceSampleSink* getSampleSink() const { return m_sampleSink; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
DeviceSampleSink* m_sampleSink;
|
|
|
|
};
|
|
|
|
|
2018-01-01 19:04:49 -05:00
|
|
|
class SDRANGEL_API DSPAddBasebandSampleSink : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2018-01-01 19:04:49 -05:00
|
|
|
DSPAddBasebandSampleSink(BasebandSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
|
2014-05-18 11:52:39 -04:00
|
|
|
|
2016-10-02 16:29:04 -04:00
|
|
|
BasebandSampleSink* getSampleSink() const { return m_sampleSink; }
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
private:
|
2016-10-02 16:29:04 -04:00
|
|
|
BasebandSampleSink* m_sampleSink;
|
2014-05-18 11:52:39 -04:00
|
|
|
};
|
|
|
|
|
2016-10-24 12:06:44 -04:00
|
|
|
class SDRANGEL_API DSPAddSpectrumSink : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
DSPAddSpectrumSink(BasebandSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
|
|
|
|
|
|
|
|
BasebandSampleSink* getSampleSink() const { return m_sampleSink; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
BasebandSampleSink* m_sampleSink;
|
|
|
|
};
|
|
|
|
|
2018-01-01 20:14:31 -05:00
|
|
|
class SDRANGEL_API DSPAddBasebandSampleSource : public Message {
|
2016-10-17 12:15:08 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2018-01-01 20:14:31 -05:00
|
|
|
DSPAddBasebandSampleSource(BasebandSampleSource* sampleSource) : Message(), m_sampleSource(sampleSource) { }
|
2016-10-17 12:15:08 -04:00
|
|
|
|
|
|
|
BasebandSampleSource* getSampleSource() const { return m_sampleSource; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
BasebandSampleSource* m_sampleSource;
|
|
|
|
};
|
|
|
|
|
2018-01-01 19:04:49 -05:00
|
|
|
class SDRANGEL_API DSPRemoveBasebandSampleSink : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2018-01-01 19:04:49 -05:00
|
|
|
DSPRemoveBasebandSampleSink(BasebandSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
|
2014-05-18 11:52:39 -04:00
|
|
|
|
2016-10-02 16:29:04 -04:00
|
|
|
BasebandSampleSink* getSampleSink() const { return m_sampleSink; }
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
private:
|
2016-10-02 16:29:04 -04:00
|
|
|
BasebandSampleSink* m_sampleSink;
|
2014-05-18 11:52:39 -04:00
|
|
|
};
|
|
|
|
|
2016-10-24 12:06:44 -04:00
|
|
|
class SDRANGEL_API DSPRemoveSpectrumSink : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
DSPRemoveSpectrumSink(BasebandSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
|
|
|
|
|
|
|
|
BasebandSampleSink* getSampleSink() const { return m_sampleSink; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
BasebandSampleSink* m_sampleSink;
|
|
|
|
};
|
|
|
|
|
2018-01-01 20:14:31 -05:00
|
|
|
class SDRANGEL_API DSPRemoveBasebandSampleSource : public Message {
|
2016-10-17 12:15:08 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2018-01-01 20:14:31 -05:00
|
|
|
DSPRemoveBasebandSampleSource(BasebandSampleSource* sampleSource) : Message(), m_sampleSource(sampleSource) { }
|
2016-10-17 12:15:08 -04:00
|
|
|
|
|
|
|
BasebandSampleSource* getSampleSource() const { return m_sampleSource; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
BasebandSampleSource* m_sampleSource;
|
|
|
|
};
|
|
|
|
|
2018-01-01 19:04:49 -05:00
|
|
|
class SDRANGEL_API DSPAddThreadedBasebandSampleSink : public Message {
|
2015-08-17 02:29:34 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2018-01-01 19:04:49 -05:00
|
|
|
DSPAddThreadedBasebandSampleSink(ThreadedBasebandSampleSink* threadedSampleSink) : Message(), m_threadedSampleSink(threadedSampleSink) { }
|
2015-08-17 02:29:34 -04:00
|
|
|
|
2016-10-03 09:55:16 -04:00
|
|
|
ThreadedBasebandSampleSink* getThreadedSampleSink() const { return m_threadedSampleSink; }
|
2015-08-17 02:29:34 -04:00
|
|
|
|
|
|
|
private:
|
2016-10-03 09:55:16 -04:00
|
|
|
ThreadedBasebandSampleSink* m_threadedSampleSink;
|
2015-08-17 02:29:34 -04:00
|
|
|
};
|
|
|
|
|
2018-01-01 20:14:31 -05:00
|
|
|
class SDRANGEL_API DSPAddThreadedBasebandSampleSource : public Message {
|
2016-10-17 12:15:08 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2018-01-01 20:14:31 -05:00
|
|
|
DSPAddThreadedBasebandSampleSource(ThreadedBasebandSampleSource* threadedSampleSource) : Message(), m_threadedSampleSource(threadedSampleSource) { }
|
2016-10-17 12:15:08 -04:00
|
|
|
|
|
|
|
ThreadedBasebandSampleSource* getThreadedSampleSource() const { return m_threadedSampleSource; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
ThreadedBasebandSampleSource* m_threadedSampleSource;
|
|
|
|
};
|
|
|
|
|
2018-01-01 19:04:49 -05:00
|
|
|
class SDRANGEL_API DSPRemoveThreadedBasebandSampleSink : public Message {
|
2015-08-17 02:29:34 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2018-01-01 19:04:49 -05:00
|
|
|
DSPRemoveThreadedBasebandSampleSink(ThreadedBasebandSampleSink* threadedSampleSink) : Message(), m_threadedSampleSink(threadedSampleSink) { }
|
2015-08-17 02:29:34 -04:00
|
|
|
|
2016-10-03 09:55:16 -04:00
|
|
|
ThreadedBasebandSampleSink* getThreadedSampleSink() const { return m_threadedSampleSink; }
|
2015-08-17 02:29:34 -04:00
|
|
|
|
|
|
|
private:
|
2016-10-03 09:55:16 -04:00
|
|
|
ThreadedBasebandSampleSink* m_threadedSampleSink;
|
2015-08-17 02:29:34 -04:00
|
|
|
};
|
|
|
|
|
2018-01-01 20:14:31 -05:00
|
|
|
class SDRANGEL_API DSPRemoveThreadedBasebandSampleSource : public Message {
|
2016-10-17 12:15:08 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2018-01-01 20:14:31 -05:00
|
|
|
DSPRemoveThreadedBasebandSampleSource(ThreadedBasebandSampleSource* threadedSampleSource) : Message(), m_threadedSampleSource(threadedSampleSource) { }
|
2016-10-17 12:15:08 -04:00
|
|
|
|
|
|
|
ThreadedBasebandSampleSource* getThreadedSampleSource() const { return m_threadedSampleSource; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
ThreadedBasebandSampleSource* m_threadedSampleSource;
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPAddAudioSink : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2015-08-12 03:03:02 -04:00
|
|
|
DSPAddAudioSink(AudioFifo* audioFifo) : Message(), m_audioFifo(audioFifo) { }
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
AudioFifo* getAudioFifo() const { return m_audioFifo; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
AudioFifo* m_audioFifo;
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPRemoveAudioSink : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2015-08-12 03:03:02 -04:00
|
|
|
DSPRemoveAudioSink(AudioFifo* audioFifo) : Message(), m_audioFifo(audioFifo) { }
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
AudioFifo* getAudioFifo() const { return m_audioFifo; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
AudioFifo* m_audioFifo;
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPConfigureSpectrumVis : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2015-08-13 23:00:28 -04:00
|
|
|
DSPConfigureSpectrumVis(int fftSize, int overlapPercent, FFTWindow::Function window) :
|
|
|
|
Message(),
|
|
|
|
m_fftSize(fftSize),
|
|
|
|
m_overlapPercent(overlapPercent),
|
|
|
|
m_window(window)
|
|
|
|
{ }
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
int getFFTSize() const { return m_fftSize; }
|
|
|
|
int getOverlapPercent() const { return m_overlapPercent; }
|
|
|
|
FFTWindow::Function getWindow() const { return m_window; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_fftSize;
|
|
|
|
int m_overlapPercent;
|
|
|
|
FFTWindow::Function m_window;
|
2015-08-19 16:12:52 -04:00
|
|
|
};
|
2014-05-18 11:52:39 -04:00
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPConfigureCorrection : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2015-08-13 23:00:28 -04:00
|
|
|
DSPConfigureCorrection(bool dcOffsetCorrection, bool iqImbalanceCorrection) :
|
|
|
|
Message(),
|
|
|
|
m_dcOffsetCorrection(dcOffsetCorrection),
|
|
|
|
m_iqImbalanceCorrection(iqImbalanceCorrection)
|
|
|
|
{ }
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
bool getDCOffsetCorrection() const { return m_dcOffsetCorrection; }
|
|
|
|
bool getIQImbalanceCorrection() const { return m_iqImbalanceCorrection; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_dcOffsetCorrection;
|
|
|
|
bool m_iqImbalanceCorrection;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPEngineReport : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2015-08-13 23:00:28 -04:00
|
|
|
DSPEngineReport(int sampleRate, quint64 centerFrequency) :
|
|
|
|
Message(),
|
|
|
|
m_sampleRate(sampleRate),
|
|
|
|
m_centerFrequency(centerFrequency)
|
|
|
|
{ }
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
int getSampleRate() const { return m_sampleRate; }
|
|
|
|
quint64 getCenterFrequency() const { return m_centerFrequency; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_sampleRate;
|
|
|
|
quint64 m_centerFrequency;
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPConfigureScopeVis : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2015-08-13 23:00:28 -04:00
|
|
|
DSPConfigureScopeVis(int triggerChannel, Real triggerLevelHigh, Real triggerLevelLow) :
|
|
|
|
Message(),
|
|
|
|
m_triggerChannel(triggerChannel),
|
|
|
|
m_triggerLevelHigh(triggerLevelHigh),
|
|
|
|
m_triggerLevelLow(triggerLevelLow)
|
|
|
|
{ }
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
int getTriggerChannel() const { return m_triggerChannel; }
|
|
|
|
Real getTriggerLevelHigh() const { return m_triggerLevelHigh; }
|
|
|
|
Real getTriggerLevelLow() const { return m_triggerLevelLow; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_triggerChannel;
|
|
|
|
Real m_triggerLevelHigh;
|
|
|
|
Real m_triggerLevelLow;
|
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPSignalNotification : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2015-08-19 16:12:52 -04:00
|
|
|
DSPSignalNotification(int samplerate, qint64 centerFrequency) :
|
2015-08-13 23:00:28 -04:00
|
|
|
Message(),
|
|
|
|
m_sampleRate(samplerate),
|
2015-08-19 16:12:52 -04:00
|
|
|
m_centerFrequency(centerFrequency)
|
2015-08-13 23:00:28 -04:00
|
|
|
{ }
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
int getSampleRate() const { return m_sampleRate; }
|
2015-08-19 16:12:52 -04:00
|
|
|
qint64 getCenterFrequency() const { return m_centerFrequency; }
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
int m_sampleRate;
|
2015-08-19 16:12:52 -04:00
|
|
|
qint64 m_centerFrequency;
|
2014-05-18 11:52:39 -04:00
|
|
|
};
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API DSPConfigureChannelizer : public Message {
|
2014-05-18 11:52:39 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2015-08-13 23:00:28 -04:00
|
|
|
DSPConfigureChannelizer(int sampleRate, int centerFrequency) :
|
|
|
|
Message(),
|
|
|
|
m_sampleRate(sampleRate),
|
|
|
|
m_centerFrequency(centerFrequency)
|
|
|
|
{ }
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
int getSampleRate() const { return m_sampleRate; }
|
|
|
|
int getCenterFrequency() const { return m_centerFrequency; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_sampleRate;
|
|
|
|
int m_centerFrequency;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDE_DSPCOMMANDS_H
|