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.
Public Member Functions | Public Attributes | List of all members
leansdr::pipewriter< T > Struct Template Reference

#include <framework.h>

Public Member Functions

 pipewriter (pipebuf< T > &_buf, unsigned long min_write=1)
 
long writable ()
 
T * wr ()
 
void written (unsigned long n)
 
void write (const T &e)
 

Public Attributes

pipebuf< T > & buf
 

Detailed Description

template<typename T>
struct leansdr::pipewriter< T >

Definition at line 286 of file framework.h.

Constructor & Destructor Documentation

◆ pipewriter()

template<typename T>
leansdr::pipewriter< T >::pipewriter ( pipebuf< T > &  _buf,
unsigned long  min_write = 1 
)
inline

Definition at line 290 of file framework.h.

290  : buf(_buf)
291  {
292  if (min_write > buf.min_write)
293  buf.min_write = min_write;
294  }
pipebuf< T > & buf
Definition: framework.h:288

Member Function Documentation

◆ wr()

template<typename T>
T* leansdr::pipewriter< T >::wr ( )
inline

◆ writable()

template<typename T>
long leansdr::pipewriter< T >::writable ( )
inline

◆ write()

template<typename T>
void leansdr::pipewriter< T >::write ( const T &  e)
inline

Definition at line 319 of file framework.h.

Referenced by leansdr::opt_write(), and leansdr::viterbi_sync::run().

320  {
321  *wr() = e;
322  written(1);
323  }
void written(unsigned long n)
Definition: framework.h:308
+ Here is the caller graph for this function:

◆ written()

template<typename T>
void leansdr::pipewriter< T >::written ( unsigned long  n)
inline

Definition at line 308 of file framework.h.

Referenced by leansdr::s2_fecdec_helper< SOFTBIT, SOFTBYTE >::receive_frame(), leansdr::etr192_descrambler::run(), leansdr::simple_agc< T >::run(), leansdr::s2_interleaver::run(), leansdr::s2_deinterleaver< SOFTSYMB, SOFTBYTE >::run(), leansdr::s2_fecenc::run(), leansdr::s2_fecdec< SOFTBIT, SOFTBYTE >::run(), leansdr::s2_framer::run(), and leansdr::s2_deframer::run_bbframe().

309  {
310  if (buf.wr + n > buf.end)
311  {
312  fprintf(stderr, "Bug: overflow to %s\n", buf.name);
313  }
314 
315  buf.wr += n;
316  buf.total_written += n;
317  }
pipebuf< T > & buf
Definition: framework.h:288
+ Here is the caller graph for this function:

Member Data Documentation

◆ buf

template<typename T>
pipebuf<T>& leansdr::pipewriter< T >::buf

Definition at line 288 of file framework.h.


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