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 <soapysdrinputthread.h>
Inherits QThread.
Classes | |
struct | Channel |
Public Member Functions | |
SoapySDRInputThread (SoapySDR::Device *dev, unsigned int nbRxChannels, QObject *parent=0) | |
~SoapySDRInputThread () | |
void | startWork () |
void | stopWork () |
bool | isRunning () const |
unsigned int | getNbChannels () const |
void | setLog2Decimation (unsigned int channel, unsigned int log2_decim) |
unsigned int | getLog2Decimation (unsigned int channel) const |
void | setSampleRate (unsigned int sampleRate) |
unsigned int | getSampleRate () const |
void | setFcPos (unsigned int channel, int fcPos) |
int | getFcPos (unsigned int channel) const |
void | setFifo (unsigned int channel, SampleSinkFifo *sampleFifo) |
SampleSinkFifo * | getFifo (unsigned int channel) |
Private Types | |
enum | DecimatorType { Decimator8, Decimator12, Decimator16, DecimatorFloat } |
Private Member Functions | |
void | run () |
unsigned int | getNbFifos () |
void | callbackSI8 (const qint8 *buf, qint32 len, unsigned int channel=0) |
void | callbackSI12 (const qint16 *buf, qint32 len, unsigned int channel=0) |
void | callbackSI16 (const qint16 *buf, qint32 len, unsigned int channel=0) |
void | callbackSIF (const float *buf, qint32 len, unsigned int channel=0) |
void | callbackMI (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 Rx channels. More... | |
unsigned int | m_sampleRate |
unsigned int | m_nbChannels |
DecimatorType | m_decimatorType |
Definition at line 37 of file soapysdrinputthread.h.
|
private |
Enumerator | |
---|---|
Decimator8 | |
Decimator12 | |
Decimator16 | |
DecimatorFloat |
Definition at line 79 of file soapysdrinputthread.h.
SoapySDRInputThread::SoapySDRInputThread | ( | SoapySDR::Device * | dev, |
unsigned int | nbRxChannels, | ||
QObject * | parent = 0 |
||
) |
Definition at line 29 of file soapysdrinputthread.cpp.
References m_channels.
SoapySDRInputThread::~SoapySDRInputThread | ( | ) |
Definition at line 41 of file soapysdrinputthread.cpp.
References m_channels, m_running, and stopWork().
|
private |
Definition at line 256 of file soapysdrinputthread.cpp.
References callbackSI12(), callbackSI16(), callbackSI8(), callbackSIF(), Decimator12, Decimator16, Decimator8, DecimatorFloat, m_decimatorType, and m_nbChannels.
Referenced by run().
|
private |
Definition at line 371 of file soapysdrinputthread.cpp.
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(), m_channels, SoapySDRInputThread::Channel::m_convertBuffer, SoapySDRInputThread::Channel::m_decimators12, SoapySDRInputThread::Channel::m_sampleFifo, and SampleSinkFifo::write().
Referenced by callbackMI(), and run().
|
private |
Definition at line 464 of file soapysdrinputthread.cpp.
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(), m_channels, SoapySDRInputThread::Channel::m_convertBuffer, SoapySDRInputThread::Channel::m_decimators16, SoapySDRInputThread::Channel::m_sampleFifo, and SampleSinkFifo::write().
Referenced by callbackMI(), and run().
|
private |
Definition at line 278 of file soapysdrinputthread.cpp.
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(), m_channels, SoapySDRInputThread::Channel::m_convertBuffer, SoapySDRInputThread::Channel::m_decimators8, SoapySDRInputThread::Channel::m_sampleFifo, and SampleSinkFifo::write().
Referenced by callbackMI(), and run().
|
private |
Definition at line 557 of file soapysdrinputthread.cpp.
References DecimatorsFI::decimate1(), DecimatorsFI::decimate16_cen(), DecimatorsFI::decimate16_inf(), DecimatorsFI::decimate16_sup(), DecimatorsFI::decimate2_cen(), DecimatorsFI::decimate2_inf(), DecimatorsFI::decimate2_sup(), DecimatorsFI::decimate32_cen(), DecimatorsFI::decimate32_inf(), DecimatorsFI::decimate32_sup(), DecimatorsFI::decimate4_cen(), DecimatorsFI::decimate4_inf(), DecimatorsFI::decimate4_sup(), DecimatorsFI::decimate64_cen(), DecimatorsFI::decimate64_inf(), DecimatorsFI::decimate64_sup(), DecimatorsFI::decimate8_cen(), DecimatorsFI::decimate8_inf(), DecimatorsFI::decimate8_sup(), m_channels, SoapySDRInputThread::Channel::m_convertBuffer, SoapySDRInputThread::Channel::m_decimatorsFloat, SoapySDRInputThread::Channel::m_sampleFifo, and SampleSinkFifo::write().
Referenced by callbackMI(), and run().
int SoapySDRInputThread::getFcPos | ( | unsigned int | channel | ) | const |
Definition at line 231 of file soapysdrinputthread.cpp.
References m_channels, SoapySDRInputThread::Channel::m_fcPos, and m_nbChannels.
Referenced by getSampleRate(), SoapySDRInput::start(), and SoapySDRInput::stop().
SampleSinkFifo * SoapySDRInputThread::getFifo | ( | unsigned int | channel | ) |
Definition at line 247 of file soapysdrinputthread.cpp.
References m_channels, m_nbChannels, and SoapySDRInputThread::Channel::m_sampleFifo.
Referenced by getSampleRate(), SoapySDRInput::start(), and SoapySDRInput::stop().
unsigned int SoapySDRInputThread::getLog2Decimation | ( | unsigned int | channel | ) | const |
Definition at line 215 of file soapysdrinputthread.cpp.
References m_channels, SoapySDRInputThread::Channel::m_log2Decim, and m_nbChannels.
Referenced by getNbChannels(), SoapySDRInput::start(), and SoapySDRInput::stop().
|
inline |
Definition at line 47 of file soapysdrinputthread.h.
References getLog2Decimation(), m_nbChannels, and setLog2Decimation().
Referenced by SoapySDRInput::start(), and SoapySDRInput::stop().
|
private |
Definition at line 194 of file soapysdrinputthread.cpp.
References i, m_channels, and m_nbChannels.
Referenced by run().
|
inline |
Definition at line 51 of file soapysdrinputthread.h.
References getFcPos(), getFifo(), m_sampleRate, setFcPos(), and setFifo().
|
inline |
Definition at line 46 of file soapysdrinputthread.h.
References m_running.
Referenced by SoapySDRInput::applySettings().
|
private |
Definition at line 78 of file soapysdrinputthread.cpp.
References callbackMI(), callbackSI12(), callbackSI16(), callbackSI8(), callbackSIF(), Decimator12, Decimator16, Decimator8, DecimatorFloat, getNbFifos(), i, m_channels, SoapySDRInputThread::Channel::m_convertBuffer, m_decimatorType, m_dev, m_nbChannels, m_running, m_sampleRate, and m_startWaiter.
void SoapySDRInputThread::setFcPos | ( | unsigned int | channel, |
int | fcPos | ||
) |
Definition at line 224 of file soapysdrinputthread.cpp.
References m_channels, SoapySDRInputThread::Channel::m_fcPos, and m_nbChannels.
Referenced by SoapySDRInput::applySettings(), getSampleRate(), SoapySDRInput::start(), and SoapySDRInput::stop().
void SoapySDRInputThread::setFifo | ( | unsigned int | channel, |
SampleSinkFifo * | sampleFifo | ||
) |
Definition at line 240 of file soapysdrinputthread.cpp.
References m_channels, m_nbChannels, and SoapySDRInputThread::Channel::m_sampleFifo.
Referenced by getSampleRate(), SoapySDRInput::start(), and SoapySDRInput::stop().
void SoapySDRInputThread::setLog2Decimation | ( | unsigned int | channel, |
unsigned int | log2_decim | ||
) |
Definition at line 208 of file soapysdrinputthread.cpp.
References m_channels, SoapySDRInputThread::Channel::m_log2Decim, and m_nbChannels.
Referenced by SoapySDRInput::applySettings(), getNbChannels(), SoapySDRInput::start(), and SoapySDRInput::stop().
|
inline |
Definition at line 50 of file soapysdrinputthread.h.
References m_sampleRate.
Referenced by SoapySDRInput::applySettings(), and SoapySDRInput::start().
void SoapySDRInputThread::startWork | ( | ) |
Definition at line 52 of file soapysdrinputthread.cpp.
References m_running, m_startWaiter, and m_startWaitMutex.
Referenced by SoapySDRInput::applySettings(), SoapySDRInput::start(), and SoapySDRInput::stop().
void SoapySDRInputThread::stopWork | ( | ) |
Definition at line 68 of file soapysdrinputthread.cpp.
References m_running.
Referenced by SoapySDRInput::applySettings(), SoapySDRInput::start(), SoapySDRInput::stop(), and ~SoapySDRInputThread().
|
private |
Array of channels dynamically allocated for the given number of Rx channels.
Definition at line 92 of file soapysdrinputthread.h.
Referenced by callbackSI12(), callbackSI16(), callbackSI8(), callbackSIF(), getFcPos(), getFifo(), getLog2Decimation(), getNbFifos(), run(), setFcPos(), setFifo(), setLog2Decimation(), SoapySDRInputThread(), and ~SoapySDRInputThread().
|
private |
Definition at line 95 of file soapysdrinputthread.h.
Referenced by callbackMI(), and run().
|
private |
Definition at line 90 of file soapysdrinputthread.h.
Referenced by run().
|
private |
Definition at line 94 of file soapysdrinputthread.h.
Referenced by callbackMI(), getFcPos(), getFifo(), getLog2Decimation(), getNbChannels(), getNbFifos(), run(), setFcPos(), setFifo(), and setLog2Decimation().
|
private |
Definition at line 89 of file soapysdrinputthread.h.
Referenced by isRunning(), run(), startWork(), stopWork(), and ~SoapySDRInputThread().
|
private |
Definition at line 93 of file soapysdrinputthread.h.
Referenced by getSampleRate(), run(), and setSampleRate().
|
private |
Definition at line 88 of file soapysdrinputthread.h.
Referenced by run(), and startWork().
|
private |
Definition at line 87 of file soapysdrinputthread.h.
Referenced by startWork().