Yate
RadioReadBufs Class Reference

RadioInterface read buffers. More...

#include <yateradio.h>

Inheritance diagram for RadioReadBufs:
GenObject

Public Member Functions

 RadioReadBufs (unsigned int len=0, unsigned int validThres=0)
 
void reset (unsigned int len, unsigned int validThres)
 
unsigned int bufSamples () const
 
bool full (RadioBufDesc &buf) const
 
bool valid (RadioBufDesc &buf) const
 
Stringdump (String &buf)
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
virtual void * getObject (const String &name) const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Public Attributes

RadioBufDesc crt
 
RadioBufDesc aux
 
RadioBufDesc extra
 

Protected Attributes

unsigned int m_bufSamples
 
unsigned int m_validMin
 

Additional Inherited Members

- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

Detailed Description

RadioInterface read buffers.

Keeps buffers used by RadioInterface::read()

Constructor & Destructor Documentation

◆ RadioReadBufs()

RadioReadBufs ( unsigned int len = 0,
unsigned int validThres = 0 )
inline

Constructor

Parameters
lenSingle buffer length (in sample periods)
validThresOptional threshold for valid samples. Used when read timestamp data is in the future and a portion of the buffer need to be reset. If valid samples are below threshold data won't be set or copied

Member Function Documentation

◆ bufSamples()

unsigned int bufSamples ( ) const
inline

Retrieve the length of a single buffer

Returns
Buffer length (in sample periods)

◆ dump()

String & dump ( String & buf)

Dump data for debug purposes

Parameters
bufDestination buffer
Returns
Destination buffer reference

◆ full()

bool full ( RadioBufDesc & buf) const
inline

Check if a given buffer is full (offset is at least buffer length)

Parameters
bufBuffer to check
Returns
True if the given buffer is full, false otherwise

◆ reset()

void reset ( unsigned int len,
unsigned int validThres )
inline

Reset buffers

Parameters
lenSingle buffer length (in sample periods)
validThresOptional threshold for valid samples

◆ valid()

bool valid ( RadioBufDesc & buf) const
inline

Check if a given is valid (have enough valid samples)

Parameters
bufBuffer to check
Returns
True if the given buffer is valid, false otherwise

References RadioBufDesc::validSamples().


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