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 <testmithread.h>
Inherits QThread.
Classes | |
class | MsgStartStop |
Public Member Functions | |
TestMIThread (SampleSinkFifo *sampleFifo, int streamIndex, QObject *parent=0) | |
~TestMIThread () | |
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 (TestMIStreamSettings::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 38 of file testmithread.h.
TestMIThread::TestMIThread | ( | SampleSinkFifo * | sampleFifo, |
int | streamIndex, | ||
QObject * | parent = 0 |
||
) |
Definition at line 31 of file testmithread.cpp.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
TestMIThread::~TestMIThread | ( | ) |
Definition at line 73 of file testmithread.cpp.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
|
private |
Definition at line 371 of file testmithread.cpp.
References convert_12(), convert_16(), convert_8(), m_bitSizeIndex, m_convertBuffer, m_sampleFifo, and SampleSinkFifo::write().
Referenced by generate().
|
inlineprivate |
Definition at line 224 of file testmithread.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 302 of file testmithread.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 146 of file testmithread.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 242 of file testmithread.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, TestMIStreamSettings::ModulationAM, TestMIStreamSettings::ModulationFM, TestMIStreamSettings::ModulationNone, TestMIStreamSettings::ModulationPattern0, TestMIStreamSettings::ModulationPattern1, TestMIStreamSettings::ModulationPattern2, NCOF::nextIQ(), pullAF(), setBuffers(), and sin().
Referenced by tick().
|
privateslot |
Definition at line 410 of file testmithread.cpp.
References TestMIThread::MsgStartStop::getStartStop(), m_inputMessageQueue, Message::match(), MessageQueue::pop(), startWork(), and stopWork().
Referenced by convert_16().
|
private |
Definition at line 365 of file testmithread.cpp.
References m_toneNco, and NCOF::next().
Referenced by generate().
|
private |
void TestMIThread::setAMModulation | ( | float | amModulation | ) |
Definition at line 185 of file testmithread.cpp.
References m_amModulation.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setAmplitudeBits | ( | int32_t | amplitudeBits | ) |
Definition at line 139 of file testmithread.cpp.
References m_amplitudeBits, m_amplitudeBitsDC, m_amplitudeBitsI, m_amplitudeBitsQ, m_dcBias, m_iBias, and m_qBias.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setBitSize | ( | uint32_t | bitSizeIndex | ) |
Definition at line 119 of file testmithread.cpp.
References m_bitShift, and m_bitSizeIndex.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
|
private |
Definition at line 216 of file testmithread.cpp.
References m_buf, m_bufsize, and m_convertBuffer.
Referenced by generate().
void TestMIThread::setDCFactor | ( | float | iFactor | ) |
Definition at line 147 of file testmithread.cpp.
References m_amplitudeBits, m_amplitudeBitsDC, and m_dcBias.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setFcPos | ( | int | fcPos | ) |
Definition at line 114 of file testmithread.cpp.
References m_fcPos.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setFMDeviation | ( | float | deviation | ) |
Definition at line 190 of file testmithread.cpp.
References m_fmDeviationUnit, and m_samplerate.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setFrequencyShift | ( | int | shift | ) |
Definition at line 170 of file testmithread.cpp.
References m_nco, m_samplerate, and NCOF::setFreq().
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setIFactor | ( | float | iFactor | ) |
Definition at line 153 of file testmithread.cpp.
References m_amplitudeBits, m_amplitudeBitsI, and m_iBias.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setLog2Decimation | ( | unsigned int | log2_decim | ) |
Definition at line 109 of file testmithread.cpp.
References m_log2Decim.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setModulation | ( | TestMIStreamSettings::Modulation | modulation | ) |
Definition at line 180 of file testmithread.cpp.
References m_modulation.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setPattern0 | ( | ) |
Definition at line 432 of file testmithread.cpp.
References m_pulsePatternCount, m_pulsePatternCycle, m_pulsePatternPlaces, m_pulseSampleCount, and m_pulseWidth.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setPattern1 | ( | ) |
Definition at line 441 of file testmithread.cpp.
References m_pulseSampleCount, and m_pulseWidth.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setPattern2 | ( | ) |
Definition at line 447 of file testmithread.cpp.
References m_pulseSampleCount, and m_pulseWidth.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setPhaseImbalance | ( | float | phaseImbalance | ) |
Definition at line 165 of file testmithread.cpp.
References m_phaseImbalance.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setQFactor | ( | float | qFactor | ) |
Definition at line 159 of file testmithread.cpp.
References m_amplitudeBits, m_amplitudeBitsQ, and m_qBias.
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setSamplerate | ( | int | samplerate | ) |
Definition at line 98 of file testmithread.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 TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::setToneFrequency | ( | int | toneFrequency | ) |
Definition at line 175 of file testmithread.cpp.
References m_samplerate, m_toneNco, and NCOF::setFreq().
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
void TestMIThread::startStop | ( | bool | start | ) |
Definition at line 197 of file testmithread.cpp.
References TestMIThread::MsgStartStop::create(), m_inputMessageQueue, and MessageQueue::push().
Referenced by TestMIThread::MsgStartStop::MsgStartStop().
|
private |
Definition at line 77 of file testmithread.cpp.
References m_elapsedTimer, m_running, m_startWaiter, m_startWaitMutex, m_timer, and tick().
Referenced by handleInputMessages().
|
private |
Definition at line 90 of file testmithread.cpp.
References m_running, m_timer, and tick().
Referenced by handleInputMessages().
|
privateslot |
Definition at line 392 of file testmithread.cpp.
References generate(), m_chunksize, m_elapsedTimer, m_mutex, m_running, m_samplerate, m_throttlems, and m_throttleToggle.
Referenced by convert_16(), startWork(), and stopWork().
|
private |
Definition at line 99 of file testmithread.h.
Referenced by generate(), and setAMModulation().
|
private |
Definition at line 113 of file testmithread.h.
Referenced by setAmplitudeBits(), setDCFactor(), setIFactor(), and setQFactor().
|
private |
Definition at line 118 of file testmithread.h.
Referenced by generate(), setAmplitudeBits(), and setDCFactor().
|
private |
Definition at line 119 of file testmithread.h.
Referenced by generate(), setAmplitudeBits(), and setIFactor().
|
private |
Definition at line 120 of file testmithread.h.
Referenced by generate(), setAmplitudeBits(), and setQFactor().
|
private |
Definition at line 112 of file testmithread.h.
Referenced by setBitSize().
|
private |
Definition at line 111 of file testmithread.h.
Referenced by callback(), and setBitSize().
|
private |
Definition at line 88 of file testmithread.h.
Referenced by generate(), and setBuffers().
|
private |
Definition at line 89 of file testmithread.h.
Referenced by setBuffers().
|
private |
Definition at line 90 of file testmithread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 91 of file testmithread.h.
Referenced by callback(), and setBuffers().
|
private |
Definition at line 114 of file testmithread.h.
Referenced by setAmplitudeBits(), and setDCFactor().
|
private |
Definition at line 134 of file testmithread.h.
|
private |
Definition at line 135 of file testmithread.h.
|
private |
Definition at line 133 of file testmithread.h.
|
private |
Definition at line 127 of file testmithread.h.
Referenced by startWork(), and tick().
|
private |
Definition at line 110 of file testmithread.h.
Referenced by setFcPos().
|
private |
Definition at line 123 of file testmithread.h.
|
private |
Definition at line 100 of file testmithread.h.
Referenced by generate(), and setFMDeviation().
|
private |
Definition at line 101 of file testmithread.h.
Referenced by generate().
|
private |
Definition at line 122 of file testmithread.h.
|
private |
Definition at line 96 of file testmithread.h.
Referenced by setSamplerate().
|
private |
Definition at line 115 of file testmithread.h.
Referenced by setAmplitudeBits(), and setIFactor().
|
private |
Definition at line 131 of file testmithread.h.
Referenced by handleInputMessages(), and startStop().
|
private |
Definition at line 109 of file testmithread.h.
Referenced by setLog2Decimation().
|
private |
Definition at line 98 of file testmithread.h.
Referenced by generate(), and setModulation().
|
private |
Definition at line 129 of file testmithread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 94 of file testmithread.h.
Referenced by generate(), setFrequencyShift(), and setSamplerate().
|
private |
Definition at line 117 of file testmithread.h.
Referenced by generate(), and setPhaseImbalance().
|
private |
Definition at line 104 of file testmithread.h.
Referenced by generate(), and setPattern0().
|
private |
Definition at line 105 of file testmithread.h.
Referenced by generate(), and setPattern0().
|
private |
Definition at line 106 of file testmithread.h.
Referenced by generate(), and setPattern0().
|
private |
Definition at line 103 of file testmithread.h.
Referenced by generate(), setPattern0(), setPattern1(), and setPattern2().
|
private |
pulse width in number of samples
Definition at line 102 of file testmithread.h.
Referenced by generate(), setPattern0(), setPattern1(), and setPattern2().
|
private |
Definition at line 116 of file testmithread.h.
Referenced by setAmplitudeBits(), and setQFactor().
|
private |
Definition at line 86 of file testmithread.h.
Referenced by run(), startWork(), stopWork(), and tick().
|
private |
Definition at line 92 of file testmithread.h.
Referenced by callback().
|
private |
Definition at line 108 of file testmithread.h.
Referenced by setFMDeviation(), setFrequencyShift(), setSamplerate(), setToneFrequency(), and tick().
|
private |
Definition at line 85 of file testmithread.h.
Referenced by run(), and startWork().
|
private |
Definition at line 84 of file testmithread.h.
Referenced by startWork().
|
private |
Definition at line 93 of file testmithread.h.
|
private |
Definition at line 125 of file testmithread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 128 of file testmithread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 126 of file testmithread.h.
Referenced by startWork(), and stopWork().
|
private |
Definition at line 97 of file testmithread.h.
Referenced by setSamplerate().
|
private |
Definition at line 95 of file testmithread.h.
Referenced by pullAF(), setSamplerate(), and setToneFrequency().