SoDaRadio-5.0.3-master:8901fb5
Public Member Functions | Private Attributes | List of all members
SoDa::SoDaBuf Class Reference

The Buffer Class. More...

#include <SoDaBase.hxx>

Inheritance diagram for SoDa::SoDaBuf:
SoDa::MBoxMessage

Public Member Functions

 SoDaBuf (unsigned int _size)
 constructor: Allocate a complex/real buffer of complex data values More...
 
bool copy (SoDaBuf *src)
 
unsigned int getComplexLen ()
 Return the number of complex float values in this buffer. More...
 
unsigned int getComplexMaxLen ()
 Return the maximum number of complex float values that this buffer can hold. More...
 
unsigned int getFloatLen ()
 Return the number of float values in this buffer. More...
 
unsigned int getFloatMaxLen ()
 Return the maximum number of float values that this buffer can hold. More...
 
bool setComplexLen (unsigned int nl)
 set the length of the buffer (in number of complex floats.) More...
 
bool setFloatLen (unsigned int nl)
 set the length of the buffer (in number of floats.) More...
 
std::complex< float > * getComplexBuf ()
 Return a pointer to the storage buffer of complex floats. More...
 
float * getFloatBuf ()
 Return a pointer to the storage buffer of floats. More...
 
- Public Member Functions inherited from SoDa::MBoxMessage
 MBoxMessage ()
 
void setReaderCount (unsigned int rc)
 
bool readyToDie ()
 
bool decReaderCount ()
 
bool free (std::queue< MBoxMessage *> &free_list)
 
void setMBoxTag (void *tag)
 
bool checkMBoxTag (void *tag)
 

Private Attributes

std::complex< float > * dat
 the storage array (complex version) Storage is common to both types More...
 
float * fdat
 the storage array (REAL version) Storage is common to both types More...
 
unsigned int maxflen
 the maximum length in terms of real floats More...
 
unsigned int flen
 the current length of the buffer in REAL fp values More...
 
unsigned int maxlen
 the maximum length in terms of complex floats More...
 
unsigned int len
 the current length of the buffer in complex fp values More...
 

Detailed Description

The Buffer Class.

This is used to carry blocks of complex or real single precision floating point samples on the message ring. A SoDaBuf can carry either complex or real values so that buffers for either use can be allocated from the same storage pool.

Definition at line 72 of file SoDaBase.hxx.

Constructor & Destructor Documentation

◆ SoDaBuf()

SoDa::SoDaBuf::SoDaBuf ( unsigned int  _size)
inline

constructor: Allocate a complex/real buffer of complex data values

Parameters
_sizethe maximum number of single presion complex values the buffer can hold.

Definition at line 79 of file SoDaBase.hxx.

References dat, fdat, flen, len, maxflen, and maxlen.

Member Function Documentation

◆ copy()

bool SoDa::SoDaBuf::copy ( SoDaBuf src)
inline

Definition at line 89 of file SoDaBase.hxx.

References fdat, flen, and maxlen.

Referenced by SoDa::USRPRX::run().

◆ getComplexBuf()

std::complex<float>* SoDa::SoDaBuf::getComplexBuf ( )
inline

Return a pointer to the storage buffer of complex floats.

Definition at line 133 of file SoDaBase.hxx.

References dat.

Referenced by SoDa::BaseBandRX::demodulate(), SoDa::BaseBandRX::demodulateWBFM(), SoDa::USRPRX::doMixer(), SoDa::BaseBandTX::modulateAM(), SoDa::USRPRX::run(), SoDa::USRPTX::run(), and SoDa::UI::sendFFT().

◆ getComplexLen()

unsigned int SoDa::SoDaBuf::getComplexLen ( )
inline

Return the number of complex float values in this buffer.

Definition at line 101 of file SoDaBase.hxx.

References len.

Referenced by SoDa::BaseBandTX::modulateAM(), SoDa::USRPTX::run(), and SoDa::UI::sendFFT().

◆ getComplexMaxLen()

unsigned int SoDa::SoDaBuf::getComplexMaxLen ( )
inline

Return the maximum number of complex float values that this buffer can hold.

Definition at line 103 of file SoDaBase.hxx.

References maxlen.

Referenced by SoDa::CWGenerator::appendToOut(), SoDa::CWGenerator::clearBuffer(), SoDa::CWGenerator::CWGenerator(), SoDa::USRPRX::doMixer(), and SoDa::CWGenerator::flushBuffer().

◆ getFloatBuf()

float* SoDa::SoDaBuf::getFloatBuf ( )
inline

Return a pointer to the storage buffer of floats.

Definition at line 137 of file SoDaBase.hxx.

References fdat.

Referenced by SoDa::CWGenerator::appendToOut(), SoDa::CWGenerator::flushBuffer(), and SoDa::USRPTX::run().

◆ getFloatLen()

unsigned int SoDa::SoDaBuf::getFloatLen ( )
inline

Return the number of float values in this buffer.

Definition at line 106 of file SoDaBase.hxx.

References flen.

◆ getFloatMaxLen()

unsigned int SoDa::SoDaBuf::getFloatMaxLen ( )
inline

Return the maximum number of float values that this buffer can hold.

Definition at line 108 of file SoDaBase.hxx.

References maxflen.

◆ setComplexLen()

bool SoDa::SoDaBuf::setComplexLen ( unsigned int  nl)
inline

set the length of the buffer (in number of complex floats.)

Parameters
nlnew length

Definition at line 114 of file SoDaBase.hxx.

References len, and maxlen.

◆ setFloatLen()

bool SoDa::SoDaBuf::setFloatLen ( unsigned int  nl)
inline

set the length of the buffer (in number of floats.)

Parameters
nlnew length

Definition at line 124 of file SoDaBase.hxx.

References flen, and maxflen.

Referenced by SoDa::CWGenerator::clearBuffer().

Member Data Documentation

◆ dat

std::complex<float>* SoDa::SoDaBuf::dat
private

the storage array (complex version) Storage is common to both types

Definition at line 140 of file SoDaBase.hxx.

Referenced by getComplexBuf(), and SoDaBuf().

◆ fdat

float* SoDa::SoDaBuf::fdat
private

the storage array (REAL version) Storage is common to both types

Definition at line 141 of file SoDaBase.hxx.

Referenced by copy(), getFloatBuf(), and SoDaBuf().

◆ flen

unsigned int SoDa::SoDaBuf::flen
private

the current length of the buffer in REAL fp values

Definition at line 143 of file SoDaBase.hxx.

Referenced by copy(), getFloatLen(), setFloatLen(), and SoDaBuf().

◆ len

unsigned int SoDa::SoDaBuf::len
private

the current length of the buffer in complex fp values

Definition at line 145 of file SoDaBase.hxx.

Referenced by getComplexLen(), setComplexLen(), and SoDaBuf().

◆ maxflen

unsigned int SoDa::SoDaBuf::maxflen
private

the maximum length in terms of real floats

Definition at line 142 of file SoDaBase.hxx.

Referenced by getFloatMaxLen(), setFloatLen(), and SoDaBuf().

◆ maxlen

unsigned int SoDa::SoDaBuf::maxlen
private

the maximum length in terms of complex floats

Definition at line 144 of file SoDaBase.hxx.

Referenced by copy(), getComplexMaxLen(), setComplexLen(), and SoDaBuf().


The documentation for this class was generated from the following file: