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.
|
#include <testsourcethread.h>
Inherits QThread.
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) |
Definition at line 40 of file testsourcethread.h.
TestSourceThread::TestSourceThread | ( | SampleSinkFifo * | sampleFifo, |
QObject * | parent = 0 |
||
) |
Definition at line 30 of file testsourcethread.cpp.
Referenced by TestSourceThread::MsgStartStop::MsgStartStop().
TestSourceThread::~TestSourceThread | ( | ) |
Definition at line 72 of file testsourcethread.cpp.
Referenced by TestSourceThread::MsgStartStop::MsgStartStop().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
private |
Definition at line 364 of file testsourcethread.cpp.
References m_toneNco, and NCOF::next().
Referenced by generate().
|
private |
void TestSourceThread::setAMModulation | ( | float | amModulation | ) |
Definition at line 184 of file testsourcethread.cpp.
References m_amModulation.
Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().
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().
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().
|
private |
Definition at line 215 of file testsourcethread.cpp.
References m_buf, m_bufsize, and m_convertBuffer.
Referenced by generate().
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().
void TestSourceThread::setFcPos | ( | int | fcPos | ) |
Definition at line 113 of file testsourcethread.cpp.
References m_fcPos.
Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().
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().
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().
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().
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().
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().
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().
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().
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().
void TestSourceThread::setPhaseImbalance | ( | float | phaseImbalance | ) |
Definition at line 164 of file testsourcethread.cpp.
References m_phaseImbalance.
Referenced by TestSourceInput::applySettings(), and TestSourceThread::MsgStartStop::MsgStartStop().
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().
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().
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().
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().
|
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().
|
private |
Definition at line 89 of file testsourcethread.cpp.
References m_running, m_timer, and tick().
Referenced by handleInputMessages().
|
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().
|
private |
Definition at line 100 of file testsourcethread.h.
Referenced by generate(), and setAMModulation().
|
private |
Definition at line 114 of file testsourcethread.h.
Referenced by setAmplitudeBits(), setDCFactor(), setIFactor(), and setQFactor().
|
private |
Definition at line 119 of file testsourcethread.h.
Referenced by generate(), setAmplitudeBits(), and setDCFactor().
|
private |
Definition at line 120 of file testsourcethread.h.
Referenced by generate(), setAmplitudeBits(), and setIFactor().
|
private |
Definition at line 121 of file testsourcethread.h.
Referenced by generate(), setAmplitudeBits(), and setQFactor().
|
private |
Definition at line 113 of file testsourcethread.h.
Referenced by setBitSize().
|
private |
Definition at line 112 of file testsourcethread.h.
Referenced by callback(), and setBitSize().
|
private |
Definition at line 90 of file testsourcethread.h.
Referenced by generate(), and setBuffers().
|
private |
Definition at line 91 of file testsourcethread.h.
Referenced by setBuffers().
|
private |
Definition at line 92 of file testsourcethread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 93 of file testsourcethread.h.
Referenced by callback(), and setBuffers().
|
private |
Definition at line 115 of file testsourcethread.h.
Referenced by setAmplitudeBits(), and setDCFactor().
|
private |
Definition at line 135 of file testsourcethread.h.
|
private |
Definition at line 136 of file testsourcethread.h.
|
private |
Definition at line 134 of file testsourcethread.h.
|
private |
Definition at line 128 of file testsourcethread.h.
Referenced by startWork(), and tick().
|
private |
Definition at line 111 of file testsourcethread.h.
Referenced by setFcPos().
|
private |
Definition at line 124 of file testsourcethread.h.
|
private |
Definition at line 101 of file testsourcethread.h.
Referenced by generate(), and setFMDeviation().
|
private |
Definition at line 102 of file testsourcethread.h.
Referenced by generate().
|
private |
Definition at line 123 of file testsourcethread.h.
|
private |
Definition at line 97 of file testsourcethread.h.
Referenced by setSamplerate().
|
private |
Definition at line 139 of file testsourcethread.h.
Referenced by tick().
|
private |
Definition at line 116 of file testsourcethread.h.
Referenced by setAmplitudeBits(), and setIFactor().
|
private |
Definition at line 132 of file testsourcethread.h.
Referenced by handleInputMessages(), and startStop().
|
private |
Definition at line 110 of file testsourcethread.h.
Referenced by setLog2Decimation().
|
private |
Definition at line 99 of file testsourcethread.h.
Referenced by generate(), and setModulation().
|
private |
Definition at line 130 of file testsourcethread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 95 of file testsourcethread.h.
Referenced by generate(), setFrequencyShift(), and setSamplerate().
|
private |
Definition at line 118 of file testsourcethread.h.
Referenced by generate(), and setPhaseImbalance().
|
private |
Definition at line 105 of file testsourcethread.h.
Referenced by generate(), and setPattern0().
|
private |
Definition at line 106 of file testsourcethread.h.
Referenced by generate(), and setPattern0().
|
private |
Definition at line 107 of file testsourcethread.h.
Referenced by generate(), and setPattern0().
|
private |
Definition at line 104 of file testsourcethread.h.
Referenced by generate(), setPattern0(), setPattern1(), and setPattern2().
|
private |
pulse width in number of samples
Definition at line 103 of file testsourcethread.h.
Referenced by generate(), setPattern0(), setPattern1(), and setPattern2().
|
private |
Definition at line 117 of file testsourcethread.h.
Referenced by setAmplitudeBits(), and setQFactor().
|
private |
Definition at line 88 of file testsourcethread.h.
Referenced by run(), startWork(), stopWork(), and tick().
|
private |
Definition at line 94 of file testsourcethread.h.
Referenced by callback().
|
private |
Definition at line 109 of file testsourcethread.h.
Referenced by setFMDeviation(), setFrequencyShift(), setSamplerate(), setToneFrequency(), and tick().
|
private |
Definition at line 87 of file testsourcethread.h.
Referenced by run(), and startWork().
|
private |
Definition at line 86 of file testsourcethread.h.
Referenced by startWork().
|
private |
Definition at line 126 of file testsourcethread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 129 of file testsourcethread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 127 of file testsourcethread.h.
Referenced by startWork(), and stopWork().
|
private |
Definition at line 138 of file testsourcethread.h.
Referenced by tick().
|
private |
Definition at line 98 of file testsourcethread.h.
Referenced by setSamplerate().
|
private |
Definition at line 96 of file testsourcethread.h.
Referenced by pullAF(), setSamplerate(), and setToneFrequency().