![]() |
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 <deviceplutosdrbox.h>
Classes | |
| struct | Sample |
| struct | SampleRates |
Public Types | |
| enum | DeviceType { DEVICE_PHY, DEVICE_RX, DEVICE_TX } |
| enum | DeviceUse { USE_RX, USE_TX } |
Public Member Functions | |
| DevicePlutoSDRBox (const std::string &uri) | |
| ~DevicePlutoSDRBox () | |
| bool | isValid () const |
| void | set_params (DeviceType devType, const std::vector< std::string > ¶ms) |
| bool | get_param (DeviceType devType, const std::string ¶m, std::string &value) |
| bool | openRx () |
| bool | openTx () |
| void | closeRx () |
| void | closeTx () |
| struct iio_buffer * | createRxBuffer (unsigned int size, bool cyclic) |
| struct iio_buffer * | createTxBuffer (unsigned int size, bool cyclic) |
| void | deleteRxBuffer () |
| void | deleteTxBuffer () |
| ssize_t | getRxSampleSize () |
| ssize_t | getTxSampleSize () |
| struct iio_channel * | getRxChannel0 () |
| struct iio_channel * | getTxChannel0I () |
| struct iio_channel * | getTxChannel0Q () |
| ssize_t | rxBufferRefill () |
| ssize_t | txBufferPush () |
| std::ptrdiff_t | rxBufferStep () |
| char * | rxBufferEnd () |
| char * | rxBufferFirst () |
| std::ptrdiff_t | txBufferStep () |
| char * | txBufferEnd () |
| char * | txBufferFirst () |
| void | txChannelConvert (int16_t *dst, int16_t *src) |
| bool | getRxSampleRates (SampleRates &sampleRates) |
| bool | getTxSampleRates (SampleRates &sampleRates) |
| void | setSampleRate (uint32_t sampleRate) |
| void | setFIR (uint32_t sampleRate, uint32_t intdec, DeviceUse use, uint32_t bw, int gain) |
| void | setFIREnable (bool enable) |
| void | setLOPPMTenths (int ppmTenths) |
| bool | getRxGain (int &gaindB, unsigned int chan) |
| bool | getRxRSSI (std::string &rssiStr, unsigned int chan) |
| bool | getTxRSSI (std::string &rssiStr, unsigned int chan) |
| void | getRxLORange (uint64_t &minLimit, uint64_t &maxLimit) |
| void | getTxLORange (uint64_t &minLimit, uint64_t &maxLimit) |
| void | getbbLPRxRange (uint32_t &minLimit, uint32_t &maxLimit) |
| void | getbbLPTxRange (uint32_t &minLimit, uint32_t &maxLimit) |
| bool | fetchTemp () |
| float | getTemp () const |
| bool | getRateGovernors (std::string &rateGovernors) |
Static Public Member Functions | |
| static bool | probeURI (const std::string &uri) |
Public Attributes | |
| uint64_t | m_devSampleRate |
| Host interface sample rate. More... | |
| int32_t | m_LOppmTenths |
| XO correction. More... | |
| bool | m_lpfFIREnable |
| enable digital lowpass FIR filter More... | |
| float | m_lpfFIRBW |
| digital lowpass FIR filter bandwidth (Hz) More... | |
| uint32_t | m_lpfFIRlog2Decim |
| digital lowpass FIR filter log2 of decimation factor (0..2) More... | |
| int | m_lpfFIRRxGain |
| digital lowpass FIR filter gain Rx side (dB) More... | |
| int | m_lpfFIRTxGain |
| digital lowpass FIR filter gain Tx side (dB) More... | |
Private Member Functions | |
| bool | parseSampleRates (const std::string &rateStr, SampleRates &sampleRates) |
| void | setFilter (const std::string &filterConfigStr) |
| void | formatFIRHeader (std::ostringstream &str, uint32_t intdec) |
| void | formatFIRCoefficients (std::ostringstream &str, uint32_t nbTaps, double normalizedBW) |
| void | getXO () |
Private Attributes | |
| struct iio_context * | m_ctx |
| struct iio_device * | m_devPhy |
| struct iio_device * | m_devRx |
| struct iio_device * | m_devTx |
| struct iio_channel * | m_chnRx0 |
| struct iio_channel * | m_chnTx0i |
| struct iio_channel * | m_chnTx0q |
| struct iio_buffer * | m_rxBuf |
| struct iio_buffer * | m_txBuf |
| bool | m_valid |
| int64_t | m_xoInitial |
| float | m_temp |
Definition at line 33 of file deviceplutosdrbox.h.
| Enumerator | |
|---|---|
| USE_RX | |
| USE_TX | |
Definition at line 43 of file deviceplutosdrbox.h.
| DevicePlutoSDRBox::DevicePlutoSDRBox | ( | const std::string & | uri | ) |
Definition at line 31 of file deviceplutosdrbox.cpp.
References getXO(), m_ctx, m_devPhy, m_devRx, m_devTx, and m_valid.
Here is the call graph for this function:| DevicePlutoSDRBox::~DevicePlutoSDRBox | ( | ) |
Definition at line 75 of file deviceplutosdrbox.cpp.
References closeRx(), closeTx(), deleteRxBuffer(), deleteTxBuffer(), and m_ctx.
Here is the call graph for this function:| void DevicePlutoSDRBox::closeRx | ( | ) |
Definition at line 328 of file deviceplutosdrbox.cpp.
References m_chnRx0.
Referenced by ~DevicePlutoSDRBox().
Here is the caller graph for this function:| void DevicePlutoSDRBox::closeTx | ( | ) |
Definition at line 333 of file deviceplutosdrbox.cpp.
References m_chnTx0i, and m_chnTx0q.
Referenced by ~DevicePlutoSDRBox().
Here is the caller graph for this function:| struct iio_buffer * DevicePlutoSDRBox::createRxBuffer | ( | unsigned int | size, |
| bool | cyclic | ||
| ) |
Definition at line 339 of file deviceplutosdrbox.cpp.
References m_devRx, and m_rxBuf.
Referenced by PlutoSDRInput::openDevice().
Here is the caller graph for this function:| struct iio_buffer * DevicePlutoSDRBox::createTxBuffer | ( | unsigned int | size, |
| bool | cyclic | ||
| ) |
Definition at line 350 of file deviceplutosdrbox.cpp.
References m_devTx, and m_txBuf.
Referenced by PlutoSDROutput::openDevice().
Here is the caller graph for this function:| void DevicePlutoSDRBox::deleteRxBuffer | ( | ) |
Definition at line 361 of file deviceplutosdrbox.cpp.
References m_rxBuf.
Referenced by ~DevicePlutoSDRBox().
Here is the caller graph for this function:| void DevicePlutoSDRBox::deleteTxBuffer | ( | ) |
Definition at line 369 of file deviceplutosdrbox.cpp.
References m_txBuf.
Referenced by ~DevicePlutoSDRBox().
Here is the caller graph for this function:| bool DevicePlutoSDRBox::fetchTemp | ( | ) |
Definition at line 801 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, get_param(), and m_temp.
Referenced by PlutoSDROutput::fetchTemperature(), and PlutoSDRInput::fetchTemperature().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 642 of file deviceplutosdrbox.cpp.
References WFIR::BasicFIR(), i, WFIR::LPF, WFIR::wtBLACKMAN_HARRIS, and WFIR::wtHAMMING.
Referenced by setFIR().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 636 of file deviceplutosdrbox.cpp.
References m_lpfFIRRxGain, and m_lpfFIRTxGain.
Referenced by setFIR().
Here is the caller graph for this function:| bool DevicePlutoSDRBox::get_param | ( | DeviceType | devType, |
| const std::string & | param, | ||
| std::string & | value | ||
| ) |
Definition at line 188 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, DEVICE_RX, DEVICE_TX, m_devPhy, m_devRx, and m_devTx.
Referenced by fetchTemp(), getbbLPRxRange(), getbbLPTxRange(), getRateGovernors(), getRxGain(), getRxLORange(), getRxRSSI(), getRxSampleRates(), getTxLORange(), getTxRSSI(), getTxSampleRates(), and getXO().
Here is the caller graph for this function:Definition at line 758 of file deviceplutosdrbox.cpp.
References DevicePlutoSDR::bbLPRxHighLimitFreq, DevicePlutoSDR::bbLPRxLowLimitFreq, DEVICE_PHY, and get_param().
Referenced by PlutoSDRInput::getbbLPRange().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 779 of file deviceplutosdrbox.cpp.
References DevicePlutoSDR::bbLPTxHighLimitFreq, DevicePlutoSDR::bbLPTxLowLimitFreq, DEVICE_PHY, and get_param().
Referenced by PlutoSDROutput::getbbLPRange().
Here is the call graph for this function:
Here is the caller graph for this function:| bool DevicePlutoSDRBox::getRateGovernors | ( | std::string & | rateGovernors | ) |
Definition at line 825 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, and get_param().
Here is the call graph for this function:
|
inline |
Definition at line 88 of file deviceplutosdrbox.h.
| bool DevicePlutoSDRBox::getRxGain | ( | int & | gaindB, |
| unsigned int | chan | ||
| ) |
Definition at line 669 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, and get_param().
Referenced by PlutoSDRInput::getGain().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 716 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, get_param(), DevicePlutoSDR::rxLOHighLimitFreq, and DevicePlutoSDR::rxLOLowLimitFreq.
Referenced by PlutoSDRInput::getLORange().
Here is the call graph for this function:
Here is the caller graph for this function:| bool DevicePlutoSDRBox::getRxRSSI | ( | std::string & | rssiStr, |
| unsigned int | chan | ||
| ) |
Definition at line 700 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, and get_param().
Referenced by PlutoSDRInput::getRSSI().
Here is the call graph for this function:
Here is the caller graph for this function:| bool DevicePlutoSDRBox::getRxSampleRates | ( | SampleRates & | sampleRates | ) |
Definition at line 477 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, get_param(), and parseSampleRates().
Referenced by PlutoSDRInput::applySettings(), and setFIR().
Here is the call graph for this function:
Here is the caller graph for this function:| ssize_t DevicePlutoSDRBox::getRxSampleSize | ( | ) |
Definition at line 377 of file deviceplutosdrbox.cpp.
References m_devRx.
Referenced by PlutoSDROutputThread::run(), and PlutoSDRInputThread::run().
Here is the caller graph for this function:
|
inline |
Definition at line 114 of file deviceplutosdrbox.h.
Referenced by PlutoSDROutput::getTemperature(), and PlutoSDRInput::getTemperature().
Here is the caller graph for this function:
|
inline |
Definition at line 89 of file deviceplutosdrbox.h.
|
inline |
Definition at line 90 of file deviceplutosdrbox.h.
Definition at line 737 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, get_param(), DevicePlutoSDR::txLOHighLimitFreq, and DevicePlutoSDR::txLOLowLimitFreq.
Referenced by PlutoSDROutput::getLORange().
Here is the call graph for this function:
Here is the caller graph for this function:| bool DevicePlutoSDRBox::getTxRSSI | ( | std::string & | rssiStr, |
| unsigned int | chan | ||
| ) |
Definition at line 708 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, and get_param().
Referenced by PlutoSDROutput::getRSSI().
Here is the call graph for this function:
Here is the caller graph for this function:| bool DevicePlutoSDRBox::getTxSampleRates | ( | SampleRates & | sampleRates | ) |
Definition at line 489 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, get_param(), and parseSampleRates().
Referenced by PlutoSDROutput::applySettings().
Here is the call graph for this function:
Here is the caller graph for this function:| ssize_t DevicePlutoSDRBox::getTxSampleSize | ( | ) |
Definition at line 386 of file deviceplutosdrbox.cpp.
References m_devTx.
Referenced by PlutoSDROutputThread::run(), and PlutoSDRInputThread::run().
Here is the caller graph for this function:
|
private |
Definition at line 654 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, get_param(), and m_xoInitial.
Referenced by DevicePlutoSDRBox().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 73 of file deviceplutosdrbox.h.
| bool DevicePlutoSDRBox::openRx | ( | ) |
Definition at line 253 of file deviceplutosdrbox.cpp.
References m_chnRx0, m_devRx, and m_valid.
Referenced by PlutoSDRInput::openDevice().
Here is the caller graph for this function:| bool DevicePlutoSDRBox::openTx | ( | ) |
Definition at line 280 of file deviceplutosdrbox.cpp.
References m_chnTx0i, m_chnTx0q, m_devTx, and m_valid.
Referenced by PlutoSDROutput::openDevice().
Here is the caller graph for this function:
|
private |
Definition at line 500 of file deviceplutosdrbox.cpp.
References DevicePlutoSDRBox::SampleRates::m_addaConnvRate, DevicePlutoSDRBox::SampleRates::m_bbRateHz, DevicePlutoSDRBox::SampleRates::m_firRate, DevicePlutoSDRBox::SampleRates::m_hb1Rate, DevicePlutoSDRBox::SampleRates::m_hb2Rate, and DevicePlutoSDRBox::SampleRates::m_hb3Rate.
Referenced by getRxSampleRates(), and getTxSampleRates().
Here is the caller graph for this function:
|
static |
Definition at line 84 of file deviceplutosdrbox.cpp.
Referenced by DevicePlutoSDRScan::scan().
Here is the caller graph for this function:| char * DevicePlutoSDRBox::rxBufferEnd | ( | ) |
Definition at line 422 of file deviceplutosdrbox.cpp.
References m_rxBuf.
Referenced by PlutoSDRInputThread::run().
Here is the caller graph for this function:| char * DevicePlutoSDRBox::rxBufferFirst | ( | ) |
Definition at line 431 of file deviceplutosdrbox.cpp.
References m_chnRx0, and m_rxBuf.
Referenced by PlutoSDRInputThread::run().
Here is the caller graph for this function:| ssize_t DevicePlutoSDRBox::rxBufferRefill | ( | ) |
Definition at line 395 of file deviceplutosdrbox.cpp.
References m_rxBuf.
Referenced by PlutoSDRInputThread::run().
Here is the caller graph for this function:| std::ptrdiff_t DevicePlutoSDRBox::rxBufferStep | ( | ) |
Definition at line 413 of file deviceplutosdrbox.cpp.
References m_rxBuf.
Referenced by PlutoSDRInputThread::run().
Here is the caller graph for this function:| void DevicePlutoSDRBox::set_params | ( | DeviceType | devType, |
| const std::vector< std::string > & | params | ||
| ) |
Definition at line 99 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, DEVICE_RX, DEVICE_TX, m_devPhy, m_devRx, and m_devTx.
Referenced by PlutoSDROutput::applySettings(), PlutoSDRInput::applySettings(), setFIREnable(), setLOPPMTenths(), and setSampleRate().
Here is the caller graph for this function:
|
private |
Definition at line 241 of file deviceplutosdrbox.cpp.
References m_devPhy.
Referenced by setFIR().
Here is the caller graph for this function:| void DevicePlutoSDRBox::setFIR | ( | uint32_t | sampleRate, |
| uint32_t | log2IntDec, | ||
| DeviceUse | use, | ||
| uint32_t | bw, | ||
| int | gain | ||
| ) |
| sampleRate | baseband sample rate (S/s) |
| log2IntDec | FIR interpolation or decimation factor |
| use | Rx or Tx. Applies to the rest of the parameters |
| bw | FIR filter bandwidth at approximately -6 dB cutoff (Hz) |
| gain | FIR filter gain (dB) |
Definition at line 552 of file deviceplutosdrbox.cpp.
References DevicePlutoSDR::firBWHighLimitFactor, DevicePlutoSDR::firBWLowLimitFactor, formatFIRCoefficients(), formatFIRHeader(), getRxSampleRates(), DevicePlutoSDRBox::SampleRates::m_addaConnvRate, DevicePlutoSDRBox::SampleRates::m_hb1Rate, m_lpfFIRBW, m_lpfFIRlog2Decim, m_lpfFIRRxGain, m_lpfFIRTxGain, setFilter(), setFIREnable(), setSampleRate(), and USE_RX.
Referenced by PlutoSDROutput::applySettings(), and PlutoSDRInput::applySettings().
Here is the call graph for this function:
Here is the caller graph for this function:| void DevicePlutoSDRBox::setFIREnable | ( | bool | enable | ) |
Definition at line 615 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, m_lpfFIREnable, and set_params().
Referenced by PlutoSDROutput::applySettings(), PlutoSDRInput::applySettings(), and setFIR().
Here is the call graph for this function:
Here is the caller graph for this function:| void DevicePlutoSDRBox::setLOPPMTenths | ( | int | ppmTenths | ) |
Definition at line 625 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, m_LOppmTenths, m_xoInitial, and set_params().
Referenced by PlutoSDROutput::applySettings(), and PlutoSDRInput::applySettings().
Here is the call graph for this function:
Here is the caller graph for this function:| void DevicePlutoSDRBox::setSampleRate | ( | uint32_t | sampleRate | ) |
Definition at line 533 of file deviceplutosdrbox.cpp.
References DEVICE_PHY, m_devSampleRate, and set_params().
Referenced by PlutoSDROutput::applySettings(), PlutoSDRInput::applySettings(), and setFIR().
Here is the call graph for this function:
Here is the caller graph for this function:| char * DevicePlutoSDRBox::txBufferEnd | ( | ) |
Definition at line 449 of file deviceplutosdrbox.cpp.
References m_txBuf.
Referenced by PlutoSDROutputThread::run().
Here is the caller graph for this function:| char * DevicePlutoSDRBox::txBufferFirst | ( | ) |
Definition at line 458 of file deviceplutosdrbox.cpp.
References m_chnTx0i, and m_txBuf.
Referenced by PlutoSDROutputThread::run().
Here is the caller graph for this function:| ssize_t DevicePlutoSDRBox::txBufferPush | ( | ) |
Definition at line 404 of file deviceplutosdrbox.cpp.
References m_txBuf.
Referenced by PlutoSDROutputThread::run().
Here is the caller graph for this function:| std::ptrdiff_t DevicePlutoSDRBox::txBufferStep | ( | ) |
Definition at line 440 of file deviceplutosdrbox.cpp.
References m_txBuf.
Referenced by PlutoSDROutputThread::run().
Here is the caller graph for this function:Definition at line 467 of file deviceplutosdrbox.cpp.
References m_chnTx0i, and m_chnTx0q.
Referenced by PlutoSDROutputThread::run().
Here is the caller graph for this function:
|
private |
Definition at line 122 of file deviceplutosdrbox.h.
Referenced by closeRx(), openRx(), and rxBufferFirst().
|
private |
Definition at line 123 of file deviceplutosdrbox.h.
Referenced by closeTx(), openTx(), txBufferFirst(), and txChannelConvert().
|
private |
Definition at line 124 of file deviceplutosdrbox.h.
Referenced by closeTx(), openTx(), and txChannelConvert().
|
private |
Definition at line 118 of file deviceplutosdrbox.h.
Referenced by DevicePlutoSDRBox(), and ~DevicePlutoSDRBox().
|
private |
Definition at line 119 of file deviceplutosdrbox.h.
Referenced by DevicePlutoSDRBox(), get_param(), set_params(), and setFilter().
|
private |
Definition at line 120 of file deviceplutosdrbox.h.
Referenced by createRxBuffer(), DevicePlutoSDRBox(), get_param(), getRxSampleSize(), openRx(), and set_params().
| uint64_t DevicePlutoSDRBox::m_devSampleRate |
Host interface sample rate.
Definition at line 63 of file deviceplutosdrbox.h.
Referenced by setSampleRate().
|
private |
Definition at line 121 of file deviceplutosdrbox.h.
Referenced by createTxBuffer(), DevicePlutoSDRBox(), get_param(), getTxSampleSize(), openTx(), and set_params().
| int32_t DevicePlutoSDRBox::m_LOppmTenths |
| float DevicePlutoSDRBox::m_lpfFIRBW |
digital lowpass FIR filter bandwidth (Hz)
Definition at line 66 of file deviceplutosdrbox.h.
Referenced by setFIR().
| bool DevicePlutoSDRBox::m_lpfFIREnable |
enable digital lowpass FIR filter
Definition at line 65 of file deviceplutosdrbox.h.
Referenced by setFIREnable().
| uint32_t DevicePlutoSDRBox::m_lpfFIRlog2Decim |
digital lowpass FIR filter log2 of decimation factor (0..2)
Definition at line 67 of file deviceplutosdrbox.h.
Referenced by setFIR().
| int DevicePlutoSDRBox::m_lpfFIRRxGain |
digital lowpass FIR filter gain Rx side (dB)
Definition at line 68 of file deviceplutosdrbox.h.
Referenced by formatFIRHeader(), and setFIR().
| int DevicePlutoSDRBox::m_lpfFIRTxGain |
digital lowpass FIR filter gain Tx side (dB)
Definition at line 69 of file deviceplutosdrbox.h.
Referenced by formatFIRHeader(), and setFIR().
|
private |
Definition at line 125 of file deviceplutosdrbox.h.
Referenced by createRxBuffer(), deleteRxBuffer(), rxBufferEnd(), rxBufferFirst(), rxBufferRefill(), and rxBufferStep().
|
private |
Definition at line 129 of file deviceplutosdrbox.h.
Referenced by fetchTemp().
|
private |
Definition at line 126 of file deviceplutosdrbox.h.
Referenced by createTxBuffer(), deleteTxBuffer(), txBufferEnd(), txBufferFirst(), txBufferPush(), and txBufferStep().
|
private |
Definition at line 127 of file deviceplutosdrbox.h.
Referenced by DevicePlutoSDRBox(), openRx(), and openTx().
|
private |
Definition at line 128 of file deviceplutosdrbox.h.
Referenced by getXO(), and setLOPPMTenths().
1.8.13