SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
dspcommands.h
Go to the documentation of this file.
1 // Copyright (C) 2015 F4EXB //
3 // written by Edouard Griffiths //
4 // //
5 // This program is free software; you can redistribute it and/or modify //
6 // it under the terms of the GNU General Public License as published by //
7 // the Free Software Foundation as version 3 of the License, or //
8 // (at your option) any later version. //
9 // //
10 // This program is distributed in the hope that it will be useful, //
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13 // GNU General Public License V3 for more details. //
14 // //
15 // You should have received a copy of the GNU General Public License //
16 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
18 
19 #ifndef INCLUDE_DSPCOMMANDS_H
20 #define INCLUDE_DSPCOMMANDS_H
21 
22 #include <QString>
23 #include "util/message.h"
24 #include "fftwindow.h"
25 #include "export.h"
26 
27 class DeviceSampleSource;
28 class BasebandSampleSink;
30 class DeviceSampleSink;
33 class AudioFifo;
34 
37 };
38 
41 };
42 
45 };
46 
49 };
50 
53 };
54 
57 };
58 
61 
62 public:
63  void setDeviceDescription(const QString& text) { m_deviceDescription = text; }
64  const QString& getDeviceDescription() const { return m_deviceDescription; }
65 
66 private:
68 };
69 
72 
73 public:
74  void setDeviceDescription(const QString& text) { m_deviceDescription = text; }
75  const QString& getDeviceDescription() const { return m_deviceDescription; }
76 
77 private:
79 };
80 
83 
84 public:
85  void setErrorMessage(const QString& text) { m_errorMessage = text; }
86  const QString& getErrorMessage() const { return m_errorMessage; }
87 
88 private:
89  QString m_errorMessage;
90 };
91 
94 
95 public:
96  DSPSetSource(DeviceSampleSource* sampleSource) : Message(), m_sampleSource(sampleSource) { }
97 
98  DeviceSampleSource* getSampleSource() const { return m_sampleSource; }
99 
100 private:
102 };
103 
106 
107 public:
108  DSPSetSink(DeviceSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
109 
110  DeviceSampleSink* getSampleSink() const { return m_sampleSink; }
111 
112 private:
114 };
115 
118 
119 public:
120  DSPAddBasebandSampleSink(BasebandSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
121 
122  BasebandSampleSink* getSampleSink() const { return m_sampleSink; }
123 
124 private:
126 };
127 
130 
131 public:
132  DSPAddSpectrumSink(BasebandSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
133 
134  BasebandSampleSink* getSampleSink() const { return m_sampleSink; }
135 
136 private:
138 };
139 
142 
143 public:
144  DSPAddBasebandSampleSource(BasebandSampleSource* sampleSource) : Message(), m_sampleSource(sampleSource) { }
145 
146  BasebandSampleSource* getSampleSource() const { return m_sampleSource; }
147 
148 private:
150 };
151 
154 
155 public:
156  DSPRemoveBasebandSampleSink(BasebandSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
157 
158  BasebandSampleSink* getSampleSink() const { return m_sampleSink; }
159 
160 private:
162 };
163 
166 
167 public:
168  DSPRemoveSpectrumSink(BasebandSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
169 
170  BasebandSampleSink* getSampleSink() const { return m_sampleSink; }
171 
172 private:
174 };
175 
178 
179 public:
180  DSPRemoveBasebandSampleSource(BasebandSampleSource* sampleSource) : Message(), m_sampleSource(sampleSource) { }
181 
182  BasebandSampleSource* getSampleSource() const { return m_sampleSource; }
183 
184 private:
186 };
187 
190 
191 public:
192  DSPAddThreadedBasebandSampleSink(ThreadedBasebandSampleSink* threadedSampleSink) : Message(), m_threadedSampleSink(threadedSampleSink) { }
193 
194  ThreadedBasebandSampleSink* getThreadedSampleSink() const { return m_threadedSampleSink; }
195 
196 private:
198 };
199 
202 
203 public:
204  DSPAddThreadedBasebandSampleSource(ThreadedBasebandSampleSource* threadedSampleSource) : Message(), m_threadedSampleSource(threadedSampleSource) { }
205 
206  ThreadedBasebandSampleSource* getThreadedSampleSource() const { return m_threadedSampleSource; }
207 
208 private:
210 };
211 
214 
215 public:
216  DSPRemoveThreadedBasebandSampleSink(ThreadedBasebandSampleSink* threadedSampleSink) : Message(), m_threadedSampleSink(threadedSampleSink) { }
217 
218  ThreadedBasebandSampleSink* getThreadedSampleSink() const { return m_threadedSampleSink; }
219 
220 private:
222 };
223 
226 
227 public:
228  DSPRemoveThreadedBasebandSampleSource(ThreadedBasebandSampleSource* threadedSampleSource) : Message(), m_threadedSampleSource(threadedSampleSource) { }
229 
230  ThreadedBasebandSampleSource* getThreadedSampleSource() const { return m_threadedSampleSource; }
231 
232 private:
234 };
235 
238 
239 public:
240  DSPAddAudioSink(AudioFifo* audioFifo) : Message(), m_audioFifo(audioFifo) { }
241 
242  AudioFifo* getAudioFifo() const { return m_audioFifo; }
243 
244 private:
246 };
247 
250 
251 public:
252  DSPRemoveAudioSink(AudioFifo* audioFifo) : Message(), m_audioFifo(audioFifo) { }
253 
254  AudioFifo* getAudioFifo() const { return m_audioFifo; }
255 
256 private:
258 };
259 
262 
263 public:
264  DSPConfigureCorrection(bool dcOffsetCorrection, bool iqImbalanceCorrection) :
265  Message(),
266  m_dcOffsetCorrection(dcOffsetCorrection),
267  m_iqImbalanceCorrection(iqImbalanceCorrection)
268  { }
269 
270  bool getDCOffsetCorrection() const { return m_dcOffsetCorrection; }
271  bool getIQImbalanceCorrection() const { return m_iqImbalanceCorrection; }
272 
273 private:
276 
277 };
278 
281 
282 public:
283  DSPEngineReport(int sampleRate, quint64 centerFrequency) :
284  Message(),
285  m_sampleRate(sampleRate),
286  m_centerFrequency(centerFrequency)
287  { }
288 
289  int getSampleRate() const { return m_sampleRate; }
290  quint64 getCenterFrequency() const { return m_centerFrequency; }
291 
292 private:
295 };
296 
299 
300 public:
301  DSPConfigureScopeVis(int triggerChannel, Real triggerLevelHigh, Real triggerLevelLow) :
302  Message(),
303  m_triggerChannel(triggerChannel),
304  m_triggerLevelHigh(triggerLevelHigh),
305  m_triggerLevelLow(triggerLevelLow)
306  { }
307 
308  int getTriggerChannel() const { return m_triggerChannel; }
309  Real getTriggerLevelHigh() const { return m_triggerLevelHigh; }
310  Real getTriggerLevelLow() const { return m_triggerLevelLow; }
311 
312 private:
316 };
317 
320 
321 public:
322  DSPSignalNotification(int samplerate, qint64 centerFrequency) :
323  Message(),
324  m_sampleRate(samplerate),
325  m_centerFrequency(centerFrequency)
326  { }
327 
328  int getSampleRate() const { return m_sampleRate; }
329  qint64 getCenterFrequency() const { return m_centerFrequency; }
330 
331 private:
334 };
335 
338 public:
339  DSPMIMOSignalNotification(int samplerate, qint64 centerFrequency, bool sourceOrSink, unsigned int index) :
340  Message(),
341  m_sampleRate(samplerate),
342  m_centerFrequency(centerFrequency),
343  m_sourceOrSink(sourceOrSink),
344  m_index(index)
345  { }
346  int getSampleRate() const { return m_sampleRate; }
347  qint64 getCenterFrequency() const { return m_centerFrequency; }
348  bool getSourceOrSink() const { return m_sourceOrSink; }
349  unsigned int getIndex() const { return m_index; }
350 private:
354  unsigned int m_index;
355 };
356 
359 
360 public:
361  DSPConfigureChannelizer(int sampleRate, int centerFrequency) :
362  Message(),
363  m_sampleRate(sampleRate),
364  m_centerFrequency(centerFrequency)
365  { }
366 
367  int getSampleRate() const { return m_sampleRate; }
368  int getCenterFrequency() const { return m_centerFrequency; }
369 
370 private:
373 };
374 
377 
378 public:
380  {
383  };
384 
385  DSPConfigureAudio(int sampleRate, AudioType audioType) :
386  m_sampleRate(sampleRate),
387  m_autioType(audioType)
388  { }
389 
390  int getSampleRate() const { return m_sampleRate; }
391  AudioType getAudioType() const { return m_autioType; }
392 
393 private:
396 };
397 
398 #endif // INCLUDE_DSPCOMMANDS_H
DSPConfigureCorrection(bool dcOffsetCorrection, bool iqImbalanceCorrection)
Definition: dspcommands.h:264
qint64 getCenterFrequency() const
Definition: dspcommands.h:347
DSPAddThreadedBasebandSampleSink(ThreadedBasebandSampleSink *threadedSampleSink)
Definition: dspcommands.h:192
BasebandSampleSource * m_sampleSource
Definition: dspcommands.h:149
DSPAddBasebandSampleSource(BasebandSampleSource *sampleSource)
Definition: dspcommands.h:144
const QString & getErrorMessage() const
Definition: dspcommands.h:86
Real getTriggerLevelLow() const
Definition: dspcommands.h:310
Real getTriggerLevelHigh() const
Definition: dspcommands.h:309
bool getIQImbalanceCorrection() const
Definition: dspcommands.h:271
BasebandSampleSource * m_sampleSource
Definition: dspcommands.h:185
DSPAddAudioSink(AudioFifo *audioFifo)
Definition: dspcommands.h:240
int getSampleRate() const
Definition: dspcommands.h:367
BasebandSampleSink * getSampleSink() const
Definition: dspcommands.h:134
DSPAddThreadedBasebandSampleSource(ThreadedBasebandSampleSource *threadedSampleSource)
Definition: dspcommands.h:204
DSPMIMOSignalNotification(int samplerate, qint64 centerFrequency, bool sourceOrSink, unsigned int index)
Definition: dspcommands.h:339
AudioFifo * getAudioFifo() const
Definition: dspcommands.h:254
ThreadedBasebandSampleSink * m_threadedSampleSink
Definition: dspcommands.h:221
DSPRemoveThreadedBasebandSampleSource(ThreadedBasebandSampleSource *threadedSampleSource)
Definition: dspcommands.h:228
ThreadedBasebandSampleSink * m_threadedSampleSink
Definition: dspcommands.h:197
ThreadedBasebandSampleSource * getThreadedSampleSource() const
Definition: dspcommands.h:230
DSPEngineReport(int sampleRate, quint64 centerFrequency)
Definition: dspcommands.h:283
DSPConfigureScopeVis(int triggerChannel, Real triggerLevelHigh, Real triggerLevelLow)
Definition: dspcommands.h:301
DSPRemoveBasebandSampleSink(BasebandSampleSink *sampleSink)
Definition: dspcommands.h:156
BasebandSampleSink * getSampleSink() const
Definition: dspcommands.h:158
void setErrorMessage(const QString &text)
Definition: dspcommands.h:85
quint64 m_centerFrequency
Definition: dspcommands.h:294
QString m_errorMessage
Definition: dspcommands.h:89
AudioFifo * m_audioFifo
Definition: dspcommands.h:257
ThreadedBasebandSampleSource * m_threadedSampleSource
Definition: dspcommands.h:233
DSPRemoveAudioSink(AudioFifo *audioFifo)
Definition: dspcommands.h:252
BasebandSampleSink * m_sampleSink
Definition: dspcommands.h:125
bool getSourceOrSink() const
Definition: dspcommands.h:348
DSPAddSpectrumSink(BasebandSampleSink *sampleSink)
Definition: dspcommands.h:132
DeviceSampleSink * getSampleSink() const
Definition: dspcommands.h:110
AudioType getAudioType() const
Definition: dspcommands.h:391
void setDeviceDescription(const QString &text)
Definition: dspcommands.h:63
DSPConfigureAudio(int sampleRate, AudioType audioType)
Definition: dspcommands.h:385
BasebandSampleSink * m_sampleSink
Definition: dspcommands.h:173
qint64 getCenterFrequency() const
Definition: dspcommands.h:329
bool getDCOffsetCorrection() const
Definition: dspcommands.h:270
int getSampleRate() const
Definition: dspcommands.h:390
int getSampleRate() const
Definition: dspcommands.h:289
#define MESSAGE_CLASS_DECLARATION
Definition: message.h:43
int getCenterFrequency() const
Definition: dspcommands.h:368
const QString & getDeviceDescription() const
Definition: dspcommands.h:75
int getTriggerChannel() const
Definition: dspcommands.h:308
BasebandSampleSource * getSampleSource() const
Definition: dspcommands.h:182
DSPAddBasebandSampleSink(BasebandSampleSink *sampleSink)
Definition: dspcommands.h:120
DSPRemoveThreadedBasebandSampleSink(ThreadedBasebandSampleSink *threadedSampleSink)
Definition: dspcommands.h:216
ThreadedBasebandSampleSink * getThreadedSampleSink() const
Definition: dspcommands.h:194
DeviceSampleSource * m_sampleSource
Definition: dspcommands.h:101
DSPConfigureChannelizer(int sampleRate, int centerFrequency)
Definition: dspcommands.h:361
AudioFifo * m_audioFifo
Definition: dspcommands.h:245
quint64 getCenterFrequency() const
Definition: dspcommands.h:290
void setDeviceDescription(const QString &text)
Definition: dspcommands.h:74
AudioType m_autioType
Definition: dspcommands.h:395
DSPSetSource(DeviceSampleSource *sampleSource)
Definition: dspcommands.h:96
const QString & getDeviceDescription() const
Definition: dspcommands.h:64
DSPRemoveBasebandSampleSource(BasebandSampleSource *sampleSource)
Definition: dspcommands.h:180
int getSampleRate() const
Definition: dspcommands.h:328
ThreadedBasebandSampleSource * m_threadedSampleSource
Definition: dspcommands.h:209
DSPSetSink(DeviceSampleSink *sampleSink)
Definition: dspcommands.h:108
ThreadedBasebandSampleSink * getThreadedSampleSink() const
Definition: dspcommands.h:218
BasebandSampleSink * m_sampleSink
Definition: dspcommands.h:161
BasebandSampleSource * getSampleSource() const
Definition: dspcommands.h:146
BasebandSampleSink * getSampleSink() const
Definition: dspcommands.h:170
ThreadedBasebandSampleSource * getThreadedSampleSource() const
Definition: dspcommands.h:206
#define SDRBASE_API
Definition: export.h:40
DSPSignalNotification(int samplerate, qint64 centerFrequency)
Definition: dspcommands.h:322
unsigned int getIndex() const
Definition: dspcommands.h:349
DSPRemoveSpectrumSink(BasebandSampleSink *sampleSink)
Definition: dspcommands.h:168
BasebandSampleSink * getSampleSink() const
Definition: dspcommands.h:122
float Real
Definition: dsptypes.h:42
BasebandSampleSink * m_sampleSink
Definition: dspcommands.h:137
DeviceSampleSource * getSampleSource() const
Definition: dspcommands.h:98
DeviceSampleSink * m_sampleSink
Definition: dspcommands.h:113
AudioFifo * getAudioFifo() const
Definition: dspcommands.h:242