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 <soapysdroutputthread.h>
Inherits QThread.
Classes | |
struct | Channel |
Public Member Functions | |
SoapySDROutputThread (SoapySDR::Device *dev, unsigned int nbTxChannels, QObject *parent=0) | |
~SoapySDROutputThread () | |
void | startWork () |
void | stopWork () |
bool | isRunning () const |
unsigned int | getNbChannels () const |
void | setLog2Interpolation (unsigned int channel, unsigned int log2_interp) |
unsigned int | getLog2Interpolation (unsigned int channel) const |
void | setSampleRate (unsigned int sampleRate) |
unsigned int | getSampleRate () const |
void | setFifo (unsigned int channel, SampleSourceFifo *sampleFifo) |
SampleSourceFifo * | getFifo (unsigned int channel) |
Private Types | |
enum | InterpolatorType { Interpolator8, Interpolator12, Interpolator16, InterpolatorFloat } |
Private Member Functions | |
void | run () |
unsigned int | getNbFifos () |
void | callbackSO8 (qint8 *buf, qint32 len, unsigned int channel=0) |
void | callbackSO12 (qint16 *buf, qint32 len, unsigned int channel=0) |
void | callbackSO16 (qint16 *buf, qint32 len, unsigned int channel=0) |
void | callbackSOIF (float *buf, qint32 len, unsigned int channel=0) |
void | callbackMO (std::vector< void *> &buffs, qint32 samplesPerChannel) |
Private Attributes | |
QMutex | m_startWaitMutex |
QWaitCondition | m_startWaiter |
bool | m_running |
SoapySDR::Device * | m_dev |
Channel * | m_channels |
Array of channels dynamically allocated for the given number of Tx channels. More... | |
unsigned int | m_sampleRate |
unsigned int | m_nbChannels |
InterpolatorType | m_interpolatorType |
Definition at line 34 of file soapysdroutputthread.h.
|
private |
Enumerator | |
---|---|
Interpolator8 | |
Interpolator12 | |
Interpolator16 | |
InterpolatorFloat |
Definition at line 71 of file soapysdroutputthread.h.
SoapySDROutputThread::SoapySDROutputThread | ( | SoapySDR::Device * | dev, |
unsigned int | nbTxChannels, | ||
QObject * | parent = 0 |
||
) |
Definition at line 27 of file soapysdroutputthread.cpp.
References m_channels.
SoapySDROutputThread::~SoapySDROutputThread | ( | ) |
Definition at line 39 of file soapysdroutputthread.cpp.
References m_channels, m_running, and stopWork().
|
private |
Definition at line 237 of file soapysdroutputthread.cpp.
References callbackSO12(), callbackSO16(), callbackSO8(), Interpolator12, Interpolator16, Interpolator8, InterpolatorFloat, m_channels, m_interpolatorType, and m_nbChannels.
Referenced by run().
|
private |
Definition at line 335 of file soapysdroutputthread.cpp.
References SampleSourceFifo::getRWBalance(), Interpolators< T, SdrBits, OutputBits >::interpolate1(), Interpolators< T, SdrBits, OutputBits >::interpolate16_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate2_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate32_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate4_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate64_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate8_cen(), m_channels, SoapySDROutputThread::Channel::m_interpolators12, SoapySDROutputThread::Channel::m_sampleFifo, and SampleSourceFifo::readAdvance().
Referenced by callbackMO(), and run().
|
private |
Definition at line 388 of file soapysdroutputthread.cpp.
References SampleSourceFifo::getRWBalance(), Interpolators< T, SdrBits, OutputBits >::interpolate1(), Interpolators< T, SdrBits, OutputBits >::interpolate16_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate2_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate32_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate4_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate64_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate8_cen(), m_channels, SoapySDROutputThread::Channel::m_interpolators16, SoapySDROutputThread::Channel::m_sampleFifo, and SampleSourceFifo::readAdvance().
Referenced by callbackMO(), and run().
|
private |
Definition at line 282 of file soapysdroutputthread.cpp.
References SampleSourceFifo::getRWBalance(), Interpolators< T, SdrBits, OutputBits >::interpolate1(), Interpolators< T, SdrBits, OutputBits >::interpolate16_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate2_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate32_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate4_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate64_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate8_cen(), m_channels, SoapySDROutputThread::Channel::m_interpolators8, SoapySDROutputThread::Channel::m_sampleFifo, and SampleSourceFifo::readAdvance().
Referenced by callbackMO(), and run().
|
private |
Definition at line 442 of file soapysdroutputthread.cpp.
References SampleSourceFifo::getRWBalance(), InterpolatorsIF< OutBits, InBits >::interpolate1(), InterpolatorsIF< OutBits, InBits >::interpolate16_cen(), InterpolatorsIF< OutBits, InBits >::interpolate2_cen(), InterpolatorsIF< OutBits, InBits >::interpolate32_cen(), InterpolatorsIF< OutBits, InBits >::interpolate4_cen(), InterpolatorsIF< OutBits, InBits >::interpolate64_cen(), InterpolatorsIF< OutBits, InBits >::interpolate8_cen(), m_channels, SoapySDROutputThread::Channel::m_interpolatorsIF, SoapySDROutputThread::Channel::m_sampleFifo, and SampleSourceFifo::readAdvance().
Referenced by run().
SampleSourceFifo * SoapySDROutputThread::getFifo | ( | unsigned int | channel | ) |
Definition at line 228 of file soapysdroutputthread.cpp.
References m_channels, m_nbChannels, and SoapySDROutputThread::Channel::m_sampleFifo.
Referenced by SoapySDROutput::applySettings(), getSampleRate(), SoapySDROutput::start(), and SoapySDROutput::stop().
unsigned int SoapySDROutputThread::getLog2Interpolation | ( | unsigned int | channel | ) | const |
Definition at line 212 of file soapysdroutputthread.cpp.
References m_channels, SoapySDROutputThread::Channel::m_log2Interp, and m_nbChannels.
Referenced by getNbChannels(), SoapySDROutput::start(), and SoapySDROutput::stop().
|
inline |
Definition at line 44 of file soapysdroutputthread.h.
References getLog2Interpolation(), m_nbChannels, and setLog2Interpolation().
Referenced by SoapySDROutput::start(), and SoapySDROutput::stop().
|
private |
Definition at line 191 of file soapysdroutputthread.cpp.
References i, m_channels, and m_nbChannels.
Referenced by run().
|
inline |
Definition at line 48 of file soapysdroutputthread.h.
References getFifo(), m_sampleRate, and setFifo().
|
inline |
Definition at line 43 of file soapysdroutputthread.h.
References m_running.
Referenced by SoapySDROutput::applySettings().
|
private |
Definition at line 76 of file soapysdroutputthread.cpp.
References callbackMO(), callbackSO12(), callbackSO16(), callbackSO8(), callbackSOIF(), getNbFifos(), i, Interpolator12, Interpolator16, Interpolator8, InterpolatorFloat, m_dev, m_interpolatorType, m_nbChannels, m_running, m_sampleRate, and m_startWaiter.
void SoapySDROutputThread::setFifo | ( | unsigned int | channel, |
SampleSourceFifo * | sampleFifo | ||
) |
Definition at line 221 of file soapysdroutputthread.cpp.
References m_channels, m_nbChannels, and SoapySDROutputThread::Channel::m_sampleFifo.
Referenced by SoapySDROutput::applySettings(), getSampleRate(), SoapySDROutput::start(), and SoapySDROutput::stop().
void SoapySDROutputThread::setLog2Interpolation | ( | unsigned int | channel, |
unsigned int | log2_interp | ||
) |
Definition at line 205 of file soapysdroutputthread.cpp.
References m_channels, SoapySDROutputThread::Channel::m_log2Interp, and m_nbChannels.
Referenced by SoapySDROutput::applySettings(), getNbChannels(), SoapySDROutput::start(), and SoapySDROutput::stop().
|
inline |
Definition at line 47 of file soapysdroutputthread.h.
References m_sampleRate.
Referenced by SoapySDROutput::applySettings(), and SoapySDROutput::start().
void SoapySDROutputThread::startWork | ( | ) |
Definition at line 50 of file soapysdroutputthread.cpp.
References m_running, m_startWaiter, and m_startWaitMutex.
Referenced by SoapySDROutput::applySettings(), SoapySDROutput::start(), and SoapySDROutput::stop().
void SoapySDROutputThread::stopWork | ( | ) |
Definition at line 66 of file soapysdroutputthread.cpp.
References m_running.
Referenced by SoapySDROutput::applySettings(), SoapySDROutput::start(), SoapySDROutput::stop(), and ~SoapySDROutputThread().
|
private |
Array of channels dynamically allocated for the given number of Tx channels.
Definition at line 85 of file soapysdroutputthread.h.
Referenced by callbackMO(), callbackSO12(), callbackSO16(), callbackSO8(), callbackSOIF(), getFifo(), getLog2Interpolation(), getNbFifos(), setFifo(), setLog2Interpolation(), SoapySDROutputThread(), and ~SoapySDROutputThread().
|
private |
Definition at line 83 of file soapysdroutputthread.h.
Referenced by run().
|
private |
Definition at line 88 of file soapysdroutputthread.h.
Referenced by callbackMO(), and run().
|
private |
Definition at line 87 of file soapysdroutputthread.h.
Referenced by callbackMO(), getFifo(), getLog2Interpolation(), getNbChannels(), getNbFifos(), run(), setFifo(), and setLog2Interpolation().
|
private |
Definition at line 82 of file soapysdroutputthread.h.
Referenced by isRunning(), run(), startWork(), stopWork(), and ~SoapySDROutputThread().
|
private |
Definition at line 86 of file soapysdroutputthread.h.
Referenced by getSampleRate(), run(), and setSampleRate().
|
private |
Definition at line 81 of file soapysdroutputthread.h.
Referenced by run(), and startWork().
|
private |
Definition at line 80 of file soapysdroutputthread.h.
Referenced by startWork().