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.
Classes | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
TestSourceThread Class Reference

#include <testsourcethread.h>

Inherits QThread.

+ Collaboration diagram for TestSourceThread:

Classes

class  MsgStartStop
 

Public Member Functions

 TestSourceThread (SampleSinkFifo *sampleFifo, QObject *parent=0)
 
 ~TestSourceThread ()
 
void startStop (bool start)
 
void setSamplerate (int samplerate)
 
void setLog2Decimation (unsigned int log2_decim)
 
void setFcPos (int fcPos)
 
void setBitSize (uint32_t bitSizeIndex)
 
void setAmplitudeBits (int32_t amplitudeBits)
 
void setDCFactor (float iFactor)
 
void setIFactor (float iFactor)
 
void setQFactor (float qFactor)
 
void setPhaseImbalance (float phaseImbalance)
 
void setFrequencyShift (int shift)
 
void setToneFrequency (int toneFrequency)
 
void setModulation (TestSourceSettings::Modulation modulation)
 
void setAMModulation (float amModulation)
 
void setFMDeviation (float deviation)
 
void setPattern0 ()
 
void setPattern1 ()
 
void setPattern2 ()
 

Private Slots

void tick ()
 
void handleInputMessages ()
 

Private Member Functions

void startWork ()
 
void stopWork ()
 
void run ()
 
void callback (const qint16 *buf, qint32 len)
 
void setBuffers (quint32 chunksize)
 
void generate (quint32 chunksize)
 
void pullAF (Real &afSample)
 
void convert_8 (SampleVector::iterator *it, const qint16 *buf, qint32 len)
 
void convert_12 (SampleVector::iterator *it, const qint16 *buf, qint32 len)
 
void convert_16 (SampleVector::iterator *it, const qint16 *buf, qint32 len)
 

Private Attributes

QMutex m_startWaitMutex
 
QWaitCondition m_startWaiter
 
volatile bool m_running
 
qint16 * m_buf
 
quint32 m_bufsize
 
quint32 m_chunksize
 
SampleVector m_convertBuffer
 
SampleSinkFifom_sampleFifo
 
NCOF m_nco
 
NCOF m_toneNco
 
int m_frequencyShift
 
int m_toneFrequency
 
TestSourceSettings::Modulation m_modulation
 
float m_amModulation
 
float m_fmDeviationUnit
 
float m_fmPhasor
 
uint32_t m_pulseWidth
 pulse width in number of samples More...
 
uint32_t m_pulseSampleCount
 
uint32_t m_pulsePatternCount
 
uint32_t m_pulsePatternCycle
 
uint32_t m_pulsePatternPlaces
 
int m_samplerate
 
unsigned int m_log2Decim
 
int m_fcPos
 
uint32_t m_bitSizeIndex
 
uint32_t m_bitShift
 
int32_t m_amplitudeBits
 
float m_dcBias
 
float m_iBias
 
float m_qBias
 
float m_phaseImbalance
 
int32_t m_amplitudeBitsDC
 
int32_t m_amplitudeBitsI
 
int32_t m_amplitudeBitsQ
 
uint64_t m_frequency
 
int m_fcPosShift
 
int m_throttlems
 
QTimer m_timer
 
QElapsedTimer m_elapsedTimer
 
bool m_throttleToggle
 
QMutex m_mutex
 
MessageQueue m_inputMessageQueue
 
Decimators< qint32, qint16, SDR_RX_SAMP_SZ, 8 > m_decimators_8
 
Decimators< qint32, qint16, SDR_RX_SAMP_SZ, 12 > m_decimators_12
 
Decimators< qint32, qint16, SDR_RX_SAMP_SZ, 16 > m_decimators_16
 
std::map< int, int > m_timerHistogram
 
uint32_t m_histoCounter
 

Detailed Description

Definition at line 40 of file testsourcethread.h.

Constructor & Destructor Documentation

◆ TestSourceThread()

TestSourceThread::TestSourceThread ( SampleSinkFifo sampleFifo,
QObject *  parent = 0 
)

Definition at line 30 of file testsourcethread.cpp.

Referenced by TestSourceThread::MsgStartStop::MsgStartStop().

30  :
31  QThread(parent),
32  m_running(false),
33  m_buf(0),
34  m_bufsize(0),
35  m_chunksize(0),
37  m_sampleFifo(sampleFifo),
39  m_toneFrequency(440),
41  m_amModulation(0.5f),
42  m_fmDeviationUnit(0.0f),
43  m_fmPhasor(0.0f),
44  m_pulseWidth(150),
49  m_samplerate(48000),
50  m_log2Decim(4),
51  m_fcPos(0),
52  m_bitSizeIndex(0),
53  m_bitShift(8),
54  m_amplitudeBits(127),
55  m_dcBias(0.0f),
56  m_iBias(0.0f),
57  m_qBias(0.0f),
58  m_phaseImbalance(0.0f),
60  m_amplitudeBitsI(127),
61  m_amplitudeBitsQ(127),
62  m_frequency(435*1000),
63  m_fcPosShift(0),
65  m_throttleToggle(false),
66  m_mutex(QMutex::Recursive),
68 {
69  connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
70 }
uint32_t m_pulsePatternPlaces
uint32_t m_pulseWidth
pulse width in number of samples
uint32_t m_pulsePatternCount
uint32_t m_pulseSampleCount
SampleVector m_convertBuffer
SampleSinkFifo * m_sampleFifo
#define TESTSOURCE_THROTTLE_MS
volatile bool m_running
uint32_t m_pulsePatternCycle
unsigned int m_log2Decim
TestSourceSettings::Modulation m_modulation
MessageQueue m_inputMessageQueue
#define TESTSOURCE_BLOCKSIZE
+ Here is the caller graph for this function:

◆ ~TestSourceThread()

TestSourceThread::~TestSourceThread ( )

Definition at line 72 of file testsourcethread.cpp.

Referenced by TestSourceThread::MsgStartStop::MsgStartStop().

73 {
74 }
+ Here is the caller graph for this function:

Member Function Documentation

◆ callback()

void TestSourceThread::callback ( const qint16 *  buf,
qint32  len 
)
private

Definition at line 370 of file testsourcethread.cpp.

References convert_12(), convert_16(), convert_8(), m_bitSizeIndex, m_convertBuffer, m_sampleFifo, and SampleSinkFifo::write().

Referenced by generate().

371 {
372  SampleVector::iterator it = m_convertBuffer.begin();
373 
374  switch (m_bitSizeIndex)
375  {
376  case 0: // 8 bit samples
377  convert_8(&it, buf, len);
378  break;
379  case 1: // 12 bit samples
380  convert_12(&it, buf, len);
381  break;
382  case 2: // 16 bit samples
383  default:
384  convert_16(&it, buf, len);
385  break;
386  }
387 
388  m_sampleFifo->write(m_convertBuffer.begin(), it);
389 }
uint write(const quint8 *data, uint count)
void convert_12(SampleVector::iterator *it, const qint16 *buf, qint32 len)
SampleVector m_convertBuffer
void convert_8(SampleVector::iterator *it, const qint16 *buf, qint32 len)
SampleSinkFifo * m_sampleFifo
void convert_16(SampleVector::iterator *it, const qint16 *buf, qint32 len)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convert_12()

void TestSourceThread::convert_12 ( SampleVector::iterator *  it,
const qint16 *  buf,
qint32  len 
)
inlineprivate

Definition at line 228 of file testsourcethread.h.

References Decimators< StorageType, T, SdrBits, InputBits >::decimate1(), Decimators< StorageType, T, SdrBits, InputBits >::decimate16_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate16_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate16_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate2_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate2_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate2_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate32_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate32_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate32_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate4_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate4_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate4_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate64_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate64_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate64_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate8_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate8_inf(), and Decimators< StorageType, T, SdrBits, InputBits >::decimate8_sup().

Referenced by callback().

229  {
230  if (m_log2Decim == 0) {
231  m_decimators_12.decimate1(it, buf, len);
232  } else {
233  if (m_fcPos == 0) { // Infradyne
234  switch (m_log2Decim) {
235  case 1:
236  m_decimators_12.decimate2_inf(it, buf, len);
237  break;
238  case 2:
239  m_decimators_12.decimate4_inf(it, buf, len);
240  break;
241  case 3:
242  m_decimators_12.decimate8_inf(it, buf, len);
243  break;
244  case 4:
245  m_decimators_12.decimate16_inf(it, buf, len);
246  break;
247  case 5:
248  m_decimators_12.decimate32_inf(it, buf, len);
249  break;
250  case 6:
251  m_decimators_12.decimate64_inf(it, buf, len);
252  break;
253  default:
254  break;
255  }
256  } else if (m_fcPos == 1) {// Supradyne
257  switch (m_log2Decim) {
258  case 1:
259  m_decimators_12.decimate2_sup(it, buf, len);
260  break;
261  case 2:
262  m_decimators_12.decimate4_sup(it, buf, len);
263  break;
264  case 3:
265  m_decimators_12.decimate8_sup(it, buf, len);
266  break;
267  case 4:
268  m_decimators_12.decimate16_sup(it, buf, len);
269  break;
270  case 5:
271  m_decimators_12.decimate32_sup(it, buf, len);
272  break;
273  case 6:
274  m_decimators_12.decimate64_sup(it, buf, len);
275  break;
276  default:
277  break;
278  }
279  } else { // Centered
280  switch (m_log2Decim) {
281  case 1:
282  m_decimators_12.decimate2_cen(it, buf, len);
283  break;
284  case 2:
285  m_decimators_12.decimate4_cen(it, buf, len);
286  break;
287  case 3:
288  m_decimators_12.decimate8_cen(it, buf, len);
289  break;
290  case 4:
291  m_decimators_12.decimate16_cen(it, buf, len);
292  break;
293  case 5:
294  m_decimators_12.decimate32_cen(it, buf, len);
295  break;
296  case 6:
297  m_decimators_12.decimate64_cen(it, buf, len);
298  break;
299  default:
300  break;
301  }
302  }
303  }
304  }
void decimate2_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:498
void decimate64_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:2975
void decimate64_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:3040
void decimate2_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:526
void decimate2_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:554
void decimate8_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:941
void decimate64_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:2418
void decimate32_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1592
void decimate32_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1902
void decimate4_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:682
void decimate8_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1057
void decimate8_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:825
void decimate16_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1300
void decimate4_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:782
void decimate4_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:582
Decimators< qint32, qint16, SDR_RX_SAMP_SZ, 12 > m_decimators_12
unsigned int m_log2Decim
void decimate16_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1117
void decimate16_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1483
void decimate32_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:2212
void decimate1(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:462
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convert_16()

void TestSourceThread::convert_16 ( SampleVector::iterator *  it,
const qint16 *  buf,
qint32  len 
)
inlineprivate

Definition at line 306 of file testsourcethread.h.

References Decimators< StorageType, T, SdrBits, InputBits >::decimate1(), Decimators< StorageType, T, SdrBits, InputBits >::decimate16_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate16_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate16_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate2_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate2_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate2_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate32_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate32_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate32_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate4_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate4_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate4_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate64_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate64_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate64_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate8_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate8_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate8_sup(), handleInputMessages(), and tick().

Referenced by callback().

307  {
308  if (m_log2Decim == 0) {
309  m_decimators_16.decimate1(it, buf, len);
310  } else {
311  if (m_fcPos == 0) { // Infradyne
312  switch (m_log2Decim) {
313  case 1:
314  m_decimators_16.decimate2_inf(it, buf, len);
315  break;
316  case 2:
317  m_decimators_16.decimate4_inf(it, buf, len);
318  break;
319  case 3:
320  m_decimators_16.decimate8_inf(it, buf, len);
321  break;
322  case 4:
323  m_decimators_16.decimate16_inf(it, buf, len);
324  break;
325  case 5:
326  m_decimators_16.decimate32_inf(it, buf, len);
327  break;
328  case 6:
329  m_decimators_16.decimate64_inf(it, buf, len);
330  break;
331  default:
332  break;
333  }
334  } else if (m_fcPos == 1) {// Supradyne
335  switch (m_log2Decim) {
336  case 1:
337  m_decimators_16.decimate2_sup(it, buf, len);
338  break;
339  case 2:
340  m_decimators_16.decimate4_sup(it, buf, len);
341  break;
342  case 3:
343  m_decimators_16.decimate8_sup(it, buf, len);
344  break;
345  case 4:
346  m_decimators_16.decimate16_sup(it, buf, len);
347  break;
348  case 5:
349  m_decimators_16.decimate32_sup(it, buf, len);
350  break;
351  case 6:
352  m_decimators_16.decimate64_sup(it, buf, len);
353  break;
354  default:
355  break;
356  }
357  } else { // Centered
358  switch (m_log2Decim) {
359  case 1:
360  m_decimators_16.decimate2_cen(it, buf, len);
361  break;
362  case 2:
363  m_decimators_16.decimate4_cen(it, buf, len);
364  break;
365  case 3:
366  m_decimators_16.decimate8_cen(it, buf, len);
367  break;
368  case 4:
369  m_decimators_16.decimate16_cen(it, buf, len);
370  break;
371  case 5:
372  m_decimators_16.decimate32_cen(it, buf, len);
373  break;
374  case 6:
375  m_decimators_16.decimate64_cen(it, buf, len);
376  break;
377  default:
378  break;
379  }
380  }
381  }
382  }
Decimators< qint32, qint16, SDR_RX_SAMP_SZ, 16 > m_decimators_16
void decimate2_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:498
void decimate64_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:2975
void decimate64_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:3040
void decimate2_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:526
void decimate2_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:554
void decimate8_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:941
void decimate64_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:2418
void decimate32_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1592
void decimate32_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1902
void decimate4_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:682
void decimate8_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1057
void decimate8_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:825
void decimate16_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1300
void decimate4_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:782
void decimate4_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:582
unsigned int m_log2Decim
void decimate16_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1117
void decimate16_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1483
void decimate32_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:2212
void decimate1(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:462
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convert_8()

void TestSourceThread::convert_8 ( SampleVector::iterator *  it,
const qint16 *  buf,
qint32  len 
)
inlineprivate

Definition at line 150 of file testsourcethread.h.

References Decimators< StorageType, T, SdrBits, InputBits >::decimate1(), Decimators< StorageType, T, SdrBits, InputBits >::decimate16_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate16_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate16_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate2_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate2_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate2_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate32_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate32_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate32_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate4_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate4_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate4_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate64_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate64_inf(), Decimators< StorageType, T, SdrBits, InputBits >::decimate64_sup(), Decimators< StorageType, T, SdrBits, InputBits >::decimate8_cen(), Decimators< StorageType, T, SdrBits, InputBits >::decimate8_inf(), and Decimators< StorageType, T, SdrBits, InputBits >::decimate8_sup().

Referenced by callback().

151  {
152  if (m_log2Decim == 0) {
153  m_decimators_8.decimate1(it, buf, len);
154  } else {
155  if (m_fcPos == 0) { // Infradyne
156  switch (m_log2Decim) {
157  case 1:
158  m_decimators_8.decimate2_inf(it, buf, len);
159  break;
160  case 2:
161  m_decimators_8.decimate4_inf(it, buf, len);
162  break;
163  case 3:
164  m_decimators_8.decimate8_inf(it, buf, len);
165  break;
166  case 4:
167  m_decimators_8.decimate16_inf(it, buf, len);
168  break;
169  case 5:
170  m_decimators_8.decimate32_inf(it, buf, len);
171  break;
172  case 6:
173  m_decimators_8.decimate64_inf(it, buf, len);
174  break;
175  default:
176  break;
177  }
178  } else if (m_fcPos == 1) {// Supradyne
179  switch (m_log2Decim) {
180  case 1:
181  m_decimators_8.decimate2_sup(it, buf, len);
182  break;
183  case 2:
184  m_decimators_8.decimate4_sup(it, buf, len);
185  break;
186  case 3:
187  m_decimators_8.decimate8_sup(it, buf, len);
188  break;
189  case 4:
190  m_decimators_8.decimate16_sup(it, buf, len);
191  break;
192  case 5:
193  m_decimators_8.decimate32_sup(it, buf, len);
194  break;
195  case 6:
196  m_decimators_8.decimate64_sup(it, buf, len);
197  break;
198  default:
199  break;
200  }
201  } else { // Centered
202  switch (m_log2Decim) {
203  case 1:
204  m_decimators_8.decimate2_cen(it, buf, len);
205  break;
206  case 2:
207  m_decimators_8.decimate4_cen(it, buf, len);
208  break;
209  case 3:
210  m_decimators_8.decimate8_cen(it, buf, len);
211  break;
212  case 4:
213  m_decimators_8.decimate16_cen(it, buf, len);
214  break;
215  case 5:
216  m_decimators_8.decimate32_cen(it, buf, len);
217  break;
218  case 6:
219  m_decimators_8.decimate64_cen(it, buf, len);
220  break;
221  default:
222  break;
223  }
224  }
225  }
226  }
void decimate2_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:498
void decimate64_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:2975
void decimate64_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:3040
void decimate2_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:526
void decimate2_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:554
void decimate8_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:941
void decimate64_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:2418
void decimate32_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1592
void decimate32_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1902
Decimators< qint32, qint16, SDR_RX_SAMP_SZ, 8 > m_decimators_8
void decimate4_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:682
void decimate8_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1057
void decimate8_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:825
void decimate16_sup(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1300
void decimate4_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:782
void decimate4_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:582
unsigned int m_log2Decim
void decimate16_inf(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1117
void decimate16_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:1483
void decimate32_cen(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:2212
void decimate1(SampleVector::iterator *it, const T *buf, qint32 len)
Definition: decimators.h:462
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generate()

void TestSourceThread::generate ( quint32  chunksize)
private

Definition at line 241 of file testsourcethread.cpp.

References callback(), cos(), i, m_amModulation, m_amplitudeBitsDC, m_amplitudeBitsI, m_amplitudeBitsQ, m_buf, m_fmDeviationUnit, m_fmPhasor, m_modulation, m_nco, m_phaseImbalance, M_PI, m_pulsePatternCount, m_pulsePatternCycle, m_pulsePatternPlaces, m_pulseSampleCount, m_pulseWidth, TestSourceSettings::ModulationAM, TestSourceSettings::ModulationFM, TestSourceSettings::ModulationNone, TestSourceSettings::ModulationPattern0, TestSourceSettings::ModulationPattern1, TestSourceSettings::ModulationPattern2, NCOF::nextIQ(), pullAF(), setBuffers(), and sin().

Referenced by tick().

242 {
243  int n = chunksize / 2;
244  setBuffers(chunksize);
245 
246  for (int i = 0; i < n-1;)
247  {
248  switch (m_modulation)
249  {
251  {
252  Complex c = m_nco.nextIQ();
253  Real t, re, im;
254  pullAF(t);
255  t = (t*m_amModulation + 1.0f)*0.5f;
256  re = c.real()*t;
257  im = c.imag()*t + m_phaseImbalance*re;
258  m_buf[i++] = (int16_t) (re * (float) m_amplitudeBitsI) + m_amplitudeBitsDC;
259  m_buf[i++] = (int16_t) (im * (float) m_amplitudeBitsQ);
260  }
261  break;
263  {
264  Complex c = m_nco.nextIQ();
265  Real t, re, im;
266  pullAF(t);
268  m_fmPhasor = m_fmPhasor < -1.0f ? -m_fmPhasor - 1.0f : m_fmPhasor > 1.0f ? m_fmPhasor - 1.0f : m_fmPhasor;
269  re = c.real()*cos(m_fmPhasor*M_PI) - c.imag()*sin(m_fmPhasor*M_PI);
270  im = (c.real()*sin(m_fmPhasor*M_PI) + c.imag()*cos(m_fmPhasor*M_PI)) + m_phaseImbalance*re;
271  m_buf[i++] = (int16_t) (re * (float) m_amplitudeBitsI) + m_amplitudeBitsDC;
272  m_buf[i++] = (int16_t) (im * (float) m_amplitudeBitsQ);
273  }
274  break;
275  case TestSourceSettings::ModulationPattern0: // binary pattern
276  {
277  if (m_pulseSampleCount < m_pulseWidth) // sync pattern: 0
278  {
280  m_buf[i++] = 0;
281  }
282  else if (m_pulseSampleCount < 2*m_pulseWidth) // sync pattern: 1
283  {
285  m_buf[i++] = (int16_t) (m_phaseImbalance * (float) m_amplitudeBitsQ);
286  }
287  else if (m_pulseSampleCount < 3*m_pulseWidth) // sync pattern: 0
288  {
290  m_buf[i++] = 0;
291  }
292  else if (m_pulseSampleCount < (3+m_pulsePatternPlaces)*m_pulseWidth) // binary pattern
293  {
294  uint32_t patPulseSampleCount = m_pulseSampleCount - 3*m_pulseWidth;
295  uint32_t patPulseIndex = patPulseSampleCount / m_pulseWidth;
296  float patFigure = (m_pulsePatternCount & (1<<patPulseIndex)) != 0 ? 0.3 : 0.0; // make binary pattern ~-10dB vs sync pattern
297  m_buf[i++] = (int16_t) (patFigure * (float) m_amplitudeBitsI) + m_amplitudeBitsDC;
298  m_buf[i++] = (int16_t) (patFigure * (float) m_phaseImbalance * m_amplitudeBitsQ);
299  }
300 
301  if (m_pulseSampleCount < (4+m_pulsePatternPlaces)*m_pulseWidth - 1)
302  {
304  }
305  else
306  {
309  } else {
311  }
312 
313  m_pulseSampleCount = 0;
314  }
315  }
316  break;
317  case TestSourceSettings::ModulationPattern1: // sawtooth pattern
318  {
319  Real re, im;
320  re = (float) (m_pulseWidth - m_pulseSampleCount) / (float) m_pulseWidth;
321  im = m_phaseImbalance*re;
322  m_buf[i++] = (int16_t) (re * (float) m_amplitudeBitsI) + m_amplitudeBitsDC;
323  m_buf[i++] = (int16_t) (im * (float) m_amplitudeBitsQ);
324 
325  if (m_pulseSampleCount < m_pulseWidth - 1) {
327  } else {
328  m_pulseSampleCount = 0;
329  }
330  }
331  break;
332  case TestSourceSettings::ModulationPattern2: // 50% duty cycle square pattern
333  {
334  if (m_pulseSampleCount < m_pulseWidth) // 1
335  {
337  m_buf[i++] = (int16_t) (m_phaseImbalance * (float) m_amplitudeBitsQ);
338  } else { // 0
340  m_buf[i++] = 0;
341  }
342 
343  if (m_pulseSampleCount < 2*m_pulseWidth - 1) {
345  } else {
346  m_pulseSampleCount = 0;
347  }
348  }
349  break;
351  default:
352  {
354  m_buf[i++] = (int16_t) (c.real() * (float) m_amplitudeBitsI) + m_amplitudeBitsDC;
355  m_buf[i++] = (int16_t) (c.imag() * (float) m_amplitudeBitsQ);
356  }
357  break;
358  }
359  }
360 
361  callback(m_buf, n);
362 }
short int16_t
Definition: rtptypes_win.h:43
uint32_t m_pulsePatternPlaces
Fixed< IntType, IntBits > cos(Fixed< IntType, IntBits > const &x)
Definition: fixed.h:2271
uint32_t m_pulseWidth
pulse width in number of samples
uint32_t m_pulsePatternCount
uint32_t m_pulseSampleCount
#define M_PI
Definition: rdsdemod.cpp:27
Complex nextIQ()
Return next complex sample.
Definition: ncof.cpp:63
unsigned int uint32_t
Definition: rtptypes_win.h:46
uint32_t m_pulsePatternCycle
Fixed< IntType, IntBits > sin(Fixed< IntType, IntBits > const &x)
Definition: fixed.h:2265
int32_t i
Definition: decimators.h:244
void callback(const qint16 *buf, qint32 len)
void pullAF(Real &afSample)
void setBuffers(quint32 chunksize)
TestSourceSettings::Modulation m_modulation
std::complex< Real > Complex
Definition: dsptypes.h:43
float Real
Definition: dsptypes.h:42
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleInputMessages

void TestSourceThread::handleInputMessages ( )
privateslot

Definition at line 428 of file testsourcethread.cpp.

References TestSourceThread::MsgStartStop::getStartStop(), m_inputMessageQueue, Message::match(), MessageQueue::pop(), startWork(), and stopWork().

Referenced by convert_16().

429 {
430  Message* message;
431 
432  while ((message = m_inputMessageQueue.pop()) != 0)
433  {
434  if (MsgStartStop::match(*message))
435  {
436  MsgStartStop* notif = (MsgStartStop*) message;
437  qDebug("TestSourceThread::handleInputMessages: MsgStartStop: %s", notif->getStartStop() ? "start" : "stop");
438 
439  if (notif->getStartStop()) {
440  startWork();
441  } else {
442  stopWork();
443  }
444 
445  delete message;
446  }
447  }
448 }
Message * pop()
Pop message from queue.
static bool match(const Message *message)
Definition: message.cpp:45
MessageQueue m_inputMessageQueue
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pullAF()

void TestSourceThread::pullAF ( Real afSample)
private

Definition at line 364 of file testsourcethread.cpp.

References m_toneNco, and NCOF::next().

Referenced by generate().

365 {
366  afSample = m_toneNco.next();
367 }
Real next()
Return next real sample.
Definition: ncof.cpp:57
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ run()

void TestSourceThread::run ( )
private

Definition at line 202 of file testsourcethread.cpp.

References m_running, and m_startWaiter.

203 {
204  m_running = true;
205  m_startWaiter.wakeAll();
206 
207  while (m_running) // actual work is in the tick() function
208  {
209  sleep(1);
210  }
211 
212  m_running = false;
213 }
QWaitCondition m_startWaiter
volatile bool m_running

◆ setAMModulation()

void TestSourceThread::setAMModulation ( float  amModulation)

Definition at line 184 of file testsourcethread.cpp.

References m_amModulation.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

185 {
186  m_amModulation = amModulation < 0.0f ? 0.0f : amModulation > 1.0f ? 1.0f : amModulation;
187 }
+ Here is the caller graph for this function:

◆ setAmplitudeBits()

void TestSourceThread::setAmplitudeBits ( int32_t  amplitudeBits)

Definition at line 138 of file testsourcethread.cpp.

References m_amplitudeBits, m_amplitudeBitsDC, m_amplitudeBitsI, m_amplitudeBitsQ, m_dcBias, m_iBias, and m_qBias.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

139 {
140  m_amplitudeBits = amplitudeBits;
141  m_amplitudeBitsDC = m_dcBias * amplitudeBits;
142  m_amplitudeBitsI = (1.0f + m_iBias) * amplitudeBits;
143  m_amplitudeBitsQ = (1.0f + m_qBias) * amplitudeBits;
144 }
+ Here is the caller graph for this function:

◆ setBitSize()

void TestSourceThread::setBitSize ( uint32_t  bitSizeIndex)

Definition at line 118 of file testsourcethread.cpp.

References m_bitShift, and m_bitSizeIndex.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

119 {
120  switch (bitSizeIndex)
121  {
122  case 0:
123  m_bitShift = 7;
124  m_bitSizeIndex = 0;
125  break;
126  case 1:
127  m_bitShift = 11;
128  m_bitSizeIndex = 1;
129  break;
130  case 2:
131  default:
132  m_bitShift = 15;
133  m_bitSizeIndex = 2;
134  break;
135  }
136 }
+ Here is the caller graph for this function:

◆ setBuffers()

void TestSourceThread::setBuffers ( quint32  chunksize)
private

Definition at line 215 of file testsourcethread.cpp.

References m_buf, m_bufsize, and m_convertBuffer.

Referenced by generate().

216 {
217  if (chunksize > m_bufsize)
218  {
219  m_bufsize = chunksize;
220 
221  if (m_buf == 0)
222  {
223  qDebug() << "TestSourceThread::setBuffer: Allocate buffer: "
224  << " size: " << m_bufsize << " bytes"
225  << " #samples: " << (m_bufsize/4);
226  m_buf = (qint16*) malloc(m_bufsize);
227  }
228  else
229  {
230  qDebug() << "TestSourceThread::setBuffer: Re-allocate buffer: "
231  << " size: " << m_bufsize << " bytes"
232  << " #samples: " << (m_bufsize/4);
233  free(m_buf);
234  m_buf = (qint16*) malloc(m_bufsize);
235  }
236 
237  m_convertBuffer.resize(chunksize/4);
238  }
239 }
SampleVector m_convertBuffer
+ Here is the caller graph for this function:

◆ setDCFactor()

void TestSourceThread::setDCFactor ( float  iFactor)

Definition at line 146 of file testsourcethread.cpp.

References m_amplitudeBits, m_amplitudeBitsDC, and m_dcBias.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

147 {
148  m_dcBias = dcFactor;
150 }
+ Here is the caller graph for this function:

◆ setFcPos()

void TestSourceThread::setFcPos ( int  fcPos)

Definition at line 113 of file testsourcethread.cpp.

References m_fcPos.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

114 {
115  m_fcPos = fcPos;
116 }
+ Here is the caller graph for this function:

◆ setFMDeviation()

void TestSourceThread::setFMDeviation ( float  deviation)

Definition at line 189 of file testsourcethread.cpp.

References m_fmDeviationUnit, and m_samplerate.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

190 {
191  float fmDeviationUnit = deviation / (float) m_samplerate;
192  m_fmDeviationUnit = fmDeviationUnit < 0.0f ? 0.0f : fmDeviationUnit > 0.5f ? 0.5f : fmDeviationUnit;
193  qDebug("TestSourceThread::setFMDeviation: m_fmDeviationUnit: %f", m_fmDeviationUnit);
194 }
+ Here is the caller graph for this function:

◆ setFrequencyShift()

void TestSourceThread::setFrequencyShift ( int  shift)

Definition at line 169 of file testsourcethread.cpp.

References m_nco, m_samplerate, and NCOF::setFreq().

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

170 {
171  m_nco.setFreq(shift, m_samplerate);
172 }
void setFreq(Real freq, Real sampleRate)
Definition: ncof.cpp:51
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setIFactor()

void TestSourceThread::setIFactor ( float  iFactor)

Definition at line 152 of file testsourcethread.cpp.

References m_amplitudeBits, m_amplitudeBitsI, and m_iBias.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

153 {
154  m_iBias = iFactor;
156 }
+ Here is the caller graph for this function:

◆ setLog2Decimation()

void TestSourceThread::setLog2Decimation ( unsigned int  log2_decim)

Definition at line 108 of file testsourcethread.cpp.

References m_log2Decim.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

109 {
110  m_log2Decim = log2_decim;
111 }
unsigned int m_log2Decim
+ Here is the caller graph for this function:

◆ setModulation()

void TestSourceThread::setModulation ( TestSourceSettings::Modulation  modulation)

Definition at line 179 of file testsourcethread.cpp.

References m_modulation.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

180 {
181  m_modulation = modulation;
182 }
TestSourceSettings::Modulation m_modulation
+ Here is the caller graph for this function:

◆ setPattern0()

void TestSourceThread::setPattern0 ( )

Definition at line 450 of file testsourcethread.cpp.

References m_pulsePatternCount, m_pulsePatternCycle, m_pulsePatternPlaces, m_pulseSampleCount, and m_pulseWidth.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

451 {
452  m_pulseWidth = 150;
453  m_pulseSampleCount = 0;
457 }
uint32_t m_pulsePatternPlaces
uint32_t m_pulseWidth
pulse width in number of samples
uint32_t m_pulsePatternCount
uint32_t m_pulseSampleCount
uint32_t m_pulsePatternCycle
+ Here is the caller graph for this function:

◆ setPattern1()

void TestSourceThread::setPattern1 ( )

Definition at line 459 of file testsourcethread.cpp.

References m_pulseSampleCount, and m_pulseWidth.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

460 {
461  m_pulseWidth = 1000;
462  m_pulseSampleCount = 0;
463 }
uint32_t m_pulseWidth
pulse width in number of samples
uint32_t m_pulseSampleCount
+ Here is the caller graph for this function:

◆ setPattern2()

void TestSourceThread::setPattern2 ( )

Definition at line 465 of file testsourcethread.cpp.

References m_pulseSampleCount, and m_pulseWidth.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

466 {
467  m_pulseWidth = 1000;
468  m_pulseSampleCount = 0;
469 }
uint32_t m_pulseWidth
pulse width in number of samples
uint32_t m_pulseSampleCount
+ Here is the caller graph for this function:

◆ setPhaseImbalance()

void TestSourceThread::setPhaseImbalance ( float  phaseImbalance)

Definition at line 164 of file testsourcethread.cpp.

References m_phaseImbalance.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

165 {
166  m_phaseImbalance = phaseImbalance;
167 }
+ Here is the caller graph for this function:

◆ setQFactor()

void TestSourceThread::setQFactor ( float  qFactor)

Definition at line 158 of file testsourcethread.cpp.

References m_amplitudeBits, m_amplitudeBitsQ, and m_qBias.

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

159 {
160  m_qBias = iFactor;
162 }
+ Here is the caller graph for this function:

◆ setSamplerate()

void TestSourceThread::setSamplerate ( int  samplerate)

Definition at line 97 of file testsourcethread.cpp.

References m_chunksize, m_frequencyShift, m_mutex, m_nco, m_samplerate, m_throttlems, m_throttleToggle, m_toneFrequency, m_toneNco, and NCOF::setFreq().

Referenced by TestSourceInput::applySettings(), TestSourceThread::MsgStartStop::MsgStartStop(), and TestSourceInput::start().

98 {
99  QMutexLocker mutexLocker(&m_mutex);
100 
101  m_samplerate = samplerate;
102  m_chunksize = 4 * ((m_samplerate * (m_throttlems+(m_throttleToggle ? 1 : 0))) / 1000);
106 }
void setFreq(Real freq, Real sampleRate)
Definition: ncof.cpp:51
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setToneFrequency()

void TestSourceThread::setToneFrequency ( int  toneFrequency)

Definition at line 174 of file testsourcethread.cpp.

References m_samplerate, m_toneNco, and NCOF::setFreq().

Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().

175 {
176  m_toneNco.setFreq(toneFrequency, m_samplerate);
177 }
void setFreq(Real freq, Real sampleRate)
Definition: ncof.cpp:51
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startStop()

void TestSourceThread::startStop ( bool  start)

Definition at line 196 of file testsourcethread.cpp.

References TestSourceThread::MsgStartStop::create(), m_inputMessageQueue, and MessageQueue::push().

Referenced by TestSourceThread::MsgStartStop::MsgStartStop(), TestSourceInput::start(), and TestSourceInput::stop().

197 {
198  MsgStartStop *msg = MsgStartStop::create(start);
200 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
static MsgStartStop * create(bool startStop)
MessageQueue m_inputMessageQueue
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startWork()

void TestSourceThread::startWork ( )
private

Definition at line 76 of file testsourcethread.cpp.

References m_elapsedTimer, m_running, m_startWaiter, m_startWaitMutex, m_timer, and tick().

Referenced by handleInputMessages().

77 {
78  m_timer.setTimerType(Qt::PreciseTimer);
79  connect(&m_timer, SIGNAL(timeout()), this, SLOT(tick()));
80  m_timer.start(50);
81  m_startWaitMutex.lock();
82  m_elapsedTimer.start();
83  start();
84  while(!m_running)
85  m_startWaiter.wait(&m_startWaitMutex, 100);
86  m_startWaitMutex.unlock();
87 }
QWaitCondition m_startWaiter
volatile bool m_running
QElapsedTimer m_elapsedTimer
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stopWork()

void TestSourceThread::stopWork ( )
private

Definition at line 89 of file testsourcethread.cpp.

References m_running, m_timer, and tick().

Referenced by handleInputMessages().

90 {
91  m_running = false;
92  wait();
93  m_timer.stop();
94  disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(tick()));
95 }
volatile bool m_running
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tick

void TestSourceThread::tick ( )
privateslot

Definition at line 391 of file testsourcethread.cpp.

References generate(), m_chunksize, m_elapsedTimer, m_histoCounter, m_mutex, m_running, m_samplerate, m_throttlems, m_throttleToggle, and m_timerHistogram.

Referenced by convert_16(), startWork(), and stopWork().

392 {
393  if (m_running)
394  {
395  qint64 throttlems = m_elapsedTimer.restart();
396 
397  std::map<int,int>::iterator it;
398  it = m_timerHistogram.find(throttlems);
399 
400  if (it == m_timerHistogram.end()) {
401  m_timerHistogram[throttlems] = 1;
402  } else {
403  it->second++;
404  }
405 
406  if (m_histoCounter < 49) {
407  m_histoCounter++;
408  } else {
409  qDebug("TestSourceThread::tick: -----------");
410  for (std::map<int,int>::iterator it = m_timerHistogram.begin(); it != m_timerHistogram.end(); ++it) {
411  qDebug("TestSourceThread::tick: %d: %d", it->first, it->second);
412  }
413  m_histoCounter = 0;
414  }
415 
416  if ((throttlems > 45) && (throttlems < 55) && (throttlems != m_throttlems))
417  {
418  QMutexLocker mutexLocker(&m_mutex);
419  m_throttlems = throttlems;
420  m_chunksize = 4 * ((m_samplerate * (m_throttlems+(m_throttleToggle ? 1 : 0))) / 1000);
422  }
423 
425  }
426 }
volatile bool m_running
void generate(quint32 chunksize)
std::map< int, int > m_timerHistogram
QElapsedTimer m_elapsedTimer
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_amModulation

float TestSourceThread::m_amModulation
private

Definition at line 100 of file testsourcethread.h.

Referenced by generate(), and setAMModulation().

◆ m_amplitudeBits

int32_t TestSourceThread::m_amplitudeBits
private

Definition at line 114 of file testsourcethread.h.

Referenced by setAmplitudeBits(), setDCFactor(), setIFactor(), and setQFactor().

◆ m_amplitudeBitsDC

int32_t TestSourceThread::m_amplitudeBitsDC
private

Definition at line 119 of file testsourcethread.h.

Referenced by generate(), setAmplitudeBits(), and setDCFactor().

◆ m_amplitudeBitsI

int32_t TestSourceThread::m_amplitudeBitsI
private

Definition at line 120 of file testsourcethread.h.

Referenced by generate(), setAmplitudeBits(), and setIFactor().

◆ m_amplitudeBitsQ

int32_t TestSourceThread::m_amplitudeBitsQ
private

Definition at line 121 of file testsourcethread.h.

Referenced by generate(), setAmplitudeBits(), and setQFactor().

◆ m_bitShift

uint32_t TestSourceThread::m_bitShift
private

Definition at line 113 of file testsourcethread.h.

Referenced by setBitSize().

◆ m_bitSizeIndex

uint32_t TestSourceThread::m_bitSizeIndex
private

Definition at line 112 of file testsourcethread.h.

Referenced by callback(), and setBitSize().

◆ m_buf

qint16* TestSourceThread::m_buf
private

Definition at line 90 of file testsourcethread.h.

Referenced by generate(), and setBuffers().

◆ m_bufsize

quint32 TestSourceThread::m_bufsize
private

Definition at line 91 of file testsourcethread.h.

Referenced by setBuffers().

◆ m_chunksize

quint32 TestSourceThread::m_chunksize
private

Definition at line 92 of file testsourcethread.h.

Referenced by setSamplerate(), and tick().

◆ m_convertBuffer

SampleVector TestSourceThread::m_convertBuffer
private

Definition at line 93 of file testsourcethread.h.

Referenced by callback(), and setBuffers().

◆ m_dcBias

float TestSourceThread::m_dcBias
private

Definition at line 115 of file testsourcethread.h.

Referenced by setAmplitudeBits(), and setDCFactor().

◆ m_decimators_12

Decimators<qint32, qint16, SDR_RX_SAMP_SZ, 12> TestSourceThread::m_decimators_12
private

Definition at line 135 of file testsourcethread.h.

◆ m_decimators_16

Decimators<qint32, qint16, SDR_RX_SAMP_SZ, 16> TestSourceThread::m_decimators_16
private

Definition at line 136 of file testsourcethread.h.

◆ m_decimators_8

Decimators<qint32, qint16, SDR_RX_SAMP_SZ, 8> TestSourceThread::m_decimators_8
private

Definition at line 134 of file testsourcethread.h.

◆ m_elapsedTimer

QElapsedTimer TestSourceThread::m_elapsedTimer
private

Definition at line 128 of file testsourcethread.h.

Referenced by startWork(), and tick().

◆ m_fcPos

int TestSourceThread::m_fcPos
private

Definition at line 111 of file testsourcethread.h.

Referenced by setFcPos().

◆ m_fcPosShift

int TestSourceThread::m_fcPosShift
private

Definition at line 124 of file testsourcethread.h.

◆ m_fmDeviationUnit

float TestSourceThread::m_fmDeviationUnit
private

Definition at line 101 of file testsourcethread.h.

Referenced by generate(), and setFMDeviation().

◆ m_fmPhasor

float TestSourceThread::m_fmPhasor
private

Definition at line 102 of file testsourcethread.h.

Referenced by generate().

◆ m_frequency

uint64_t TestSourceThread::m_frequency
private

Definition at line 123 of file testsourcethread.h.

◆ m_frequencyShift

int TestSourceThread::m_frequencyShift
private

Definition at line 97 of file testsourcethread.h.

Referenced by setSamplerate().

◆ m_histoCounter

uint32_t TestSourceThread::m_histoCounter
private

Definition at line 139 of file testsourcethread.h.

Referenced by tick().

◆ m_iBias

float TestSourceThread::m_iBias
private

Definition at line 116 of file testsourcethread.h.

Referenced by setAmplitudeBits(), and setIFactor().

◆ m_inputMessageQueue

MessageQueue TestSourceThread::m_inputMessageQueue
private

Definition at line 132 of file testsourcethread.h.

Referenced by handleInputMessages(), and startStop().

◆ m_log2Decim

unsigned int TestSourceThread::m_log2Decim
private

Definition at line 110 of file testsourcethread.h.

Referenced by setLog2Decimation().

◆ m_modulation

TestSourceSettings::Modulation TestSourceThread::m_modulation
private

Definition at line 99 of file testsourcethread.h.

Referenced by generate(), and setModulation().

◆ m_mutex

QMutex TestSourceThread::m_mutex
private

Definition at line 130 of file testsourcethread.h.

Referenced by setSamplerate(), and tick().

◆ m_nco

NCOF TestSourceThread::m_nco
private

Definition at line 95 of file testsourcethread.h.

Referenced by generate(), setFrequencyShift(), and setSamplerate().

◆ m_phaseImbalance

float TestSourceThread::m_phaseImbalance
private

Definition at line 118 of file testsourcethread.h.

Referenced by generate(), and setPhaseImbalance().

◆ m_pulsePatternCount

uint32_t TestSourceThread::m_pulsePatternCount
private

Definition at line 105 of file testsourcethread.h.

Referenced by generate(), and setPattern0().

◆ m_pulsePatternCycle

uint32_t TestSourceThread::m_pulsePatternCycle
private

Definition at line 106 of file testsourcethread.h.

Referenced by generate(), and setPattern0().

◆ m_pulsePatternPlaces

uint32_t TestSourceThread::m_pulsePatternPlaces
private

Definition at line 107 of file testsourcethread.h.

Referenced by generate(), and setPattern0().

◆ m_pulseSampleCount

uint32_t TestSourceThread::m_pulseSampleCount
private

Definition at line 104 of file testsourcethread.h.

Referenced by generate(), setPattern0(), setPattern1(), and setPattern2().

◆ m_pulseWidth

uint32_t TestSourceThread::m_pulseWidth
private

pulse width in number of samples

Definition at line 103 of file testsourcethread.h.

Referenced by generate(), setPattern0(), setPattern1(), and setPattern2().

◆ m_qBias

float TestSourceThread::m_qBias
private

Definition at line 117 of file testsourcethread.h.

Referenced by setAmplitudeBits(), and setQFactor().

◆ m_running

volatile bool TestSourceThread::m_running
private

Definition at line 88 of file testsourcethread.h.

Referenced by run(), startWork(), stopWork(), and tick().

◆ m_sampleFifo

SampleSinkFifo* TestSourceThread::m_sampleFifo
private

Definition at line 94 of file testsourcethread.h.

Referenced by callback().

◆ m_samplerate

int TestSourceThread::m_samplerate
private

◆ m_startWaiter

QWaitCondition TestSourceThread::m_startWaiter
private

Definition at line 87 of file testsourcethread.h.

Referenced by run(), and startWork().

◆ m_startWaitMutex

QMutex TestSourceThread::m_startWaitMutex
private

Definition at line 86 of file testsourcethread.h.

Referenced by startWork().

◆ m_throttlems

int TestSourceThread::m_throttlems
private

Definition at line 126 of file testsourcethread.h.

Referenced by setSamplerate(), and tick().

◆ m_throttleToggle

bool TestSourceThread::m_throttleToggle
private

Definition at line 129 of file testsourcethread.h.

Referenced by setSamplerate(), and tick().

◆ m_timer

QTimer TestSourceThread::m_timer
private

Definition at line 127 of file testsourcethread.h.

Referenced by startWork(), and stopWork().

◆ m_timerHistogram

std::map<int, int> TestSourceThread::m_timerHistogram
private

Definition at line 138 of file testsourcethread.h.

Referenced by tick().

◆ m_toneFrequency

int TestSourceThread::m_toneFrequency
private

Definition at line 98 of file testsourcethread.h.

Referenced by setSamplerate().

◆ m_toneNco

NCOF TestSourceThread::m_toneNco
private

Definition at line 96 of file testsourcethread.h.

Referenced by pullAF(), setSamplerate(), and setToneFrequency().


The documentation for this class was generated from the following files: