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 <remotedatareadqueue.h>
Public Member Functions | |
RemoteDataReadQueue () | |
~RemoteDataReadQueue () | |
void | push (RemoteDataBlock *dataBlock) |
push block on the queue More... | |
RemoteDataBlock * | pop () |
Pop block from the queue. More... | |
void | readSample (Sample &s, bool scaleForTx=false) |
Read sample from queue possibly scaling to Tx size. More... | |
uint32_t | length () const |
Returns queue length. More... | |
uint32_t | size () const |
Returns queue size (max length) More... | |
void | setSize (uint32_t size) |
Sets the queue size (max length) More... | |
uint32_t | readSampleCount () const |
Returns the absolute number of samples read. More... | |
Static Public Attributes | |
static const uint32_t | MinimumMaxSize = 10 |
Private Member Functions | |
void | convertDataToSample (Sample &s, uint32_t blockIndex, uint32_t sampleIndex, bool scaleForTx) |
Private Attributes | |
QQueue< RemoteDataBlock * > | m_dataReadQueue |
RemoteDataBlock * | m_dataBlock |
uint32_t | m_maxSize |
uint32_t | m_blockIndex |
uint32_t | m_sampleIndex |
uint32_t | m_sampleCount |
use a counter capped below 2^31 as it is going to be converted to an int in the web interface More... | |
bool | m_full |
full condition was hit More... | |
Definition at line 35 of file remotedatareadqueue.h.
RemoteDataReadQueue::RemoteDataReadQueue | ( | ) |
Definition at line 30 of file remotedatareadqueue.cpp.
RemoteDataReadQueue::~RemoteDataReadQueue | ( | ) |
Definition at line 39 of file remotedatareadqueue.cpp.
References pop().
|
inlineprivate |
Definition at line 60 of file remotedatareadqueue.h.
References RemoteProtectedBlock::buf, RemoteSuperBlock::m_header, RemoteSuperBlock::m_protectedBlock, RemoteHeader::m_sampleBits, RemoteHeader::m_sampleBytes, RemoteDataBlock::m_superBlocks, SDR_RX_SAMP_SZ, SDR_TX_SAMP_SZ, Sample::setImag(), and Sample::setReal().
Referenced by readSample().
|
inline |
Returns queue length.
Definition at line 44 of file remotedatareadqueue.h.
Referenced by RemoteSource::handleMessage(), push(), readSample(), and RemoteSource::webapiFormatChannelReport().
RemoteDataBlock * RemoteDataReadQueue::pop | ( | ) |
Pop block from the queue.
Definition at line 69 of file remotedatareadqueue.cpp.
References m_blockIndex, m_dataReadQueue, and m_sampleIndex.
Referenced by ~RemoteDataReadQueue().
void RemoteDataReadQueue::push | ( | RemoteDataBlock * | dataBlock | ) |
push block on the queue
Definition at line 50 of file remotedatareadqueue.cpp.
References length(), m_dataReadQueue, m_full, and m_maxSize.
void RemoteDataReadQueue::readSample | ( | Sample & | s, |
bool | scaleForTx = false |
||
) |
Read sample from queue possibly scaling to Tx size.
Definition at line 91 of file remotedatareadqueue.cpp.
References convertDataToSample(), length(), m_blockIndex, m_dataBlock, m_dataReadQueue, RemoteSuperBlock::m_header, m_maxSize, RemoteHeader::m_sampleBytes, m_sampleCount, m_sampleIndex, and RemoteDataBlock::m_superBlocks.
Referenced by RemoteSource::pull().
|
inline |
Returns the absolute number of samples read.
Definition at line 47 of file remotedatareadqueue.h.
Referenced by RemoteSource::handleMessage(), and RemoteSource::webapiFormatChannelReport().
void RemoteDataReadQueue::setSize | ( | uint32_t | size | ) |
Sets the queue size (max length)
Definition at line 84 of file remotedatareadqueue.cpp.
References m_maxSize, MinimumMaxSize, and size().
|
inline |
Returns queue size (max length)
Definition at line 45 of file remotedatareadqueue.h.
Referenced by RemoteSource::handleMessage(), setSize(), and RemoteSource::webapiFormatChannelReport().
|
private |
Definition at line 55 of file remotedatareadqueue.h.
Referenced by pop(), and readSample().
|
private |
Definition at line 53 of file remotedatareadqueue.h.
Referenced by readSample().
|
private |
Definition at line 52 of file remotedatareadqueue.h.
Referenced by pop(), push(), and readSample().
|
private |
|
private |
Definition at line 54 of file remotedatareadqueue.h.
Referenced by push(), readSample(), and setSize().
|
private |
use a counter capped below 2^31 as it is going to be converted to an int in the web interface
Definition at line 57 of file remotedatareadqueue.h.
Referenced by readSample().
|
private |
Definition at line 56 of file remotedatareadqueue.h.
Referenced by pop(), and readSample().
|
static |
Definition at line 49 of file remotedatareadqueue.h.
Referenced by setSize().