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 Types | Public Member Functions | Private Attributes | List of all members
leansdr::dvb_convol Struct Reference

#include <dvb.h>

+ Inheritance diagram for leansdr::dvb_convol:
+ Collaboration diagram for leansdr::dvb_convol:

Public Types

typedef u8 uncoded_byte
 
typedef u8 hardsymbol
 

Public Member Functions

 dvb_convol (scheduler *sch, pipebuf< uncoded_byte > &_in, pipebuf< hardsymbol > &_out, code_rate fec, int bits_per_symbol)
 
void run ()
 
- Public Member Functions inherited from leansdr::runnable
 runnable (scheduler *_sch, const char *name)
 
- Public Member Functions inherited from leansdr::runnable_common
 runnable_common (const char *_name)
 
virtual ~runnable_common ()
 
virtual void shutdown ()
 

Private Attributes

pipereader< uncoded_bytein
 
pipewriter< hardsymbolout
 
convol_multipoly< uint16_t, 16 > convol
 

Additional Inherited Members

- Public Attributes inherited from leansdr::runnable_common
const char * name
 
- Protected Attributes inherited from leansdr::runnable
schedulersch
 

Detailed Description

Definition at line 666 of file dvb.h.

Member Typedef Documentation

◆ hardsymbol

Definition at line 669 of file dvb.h.

◆ uncoded_byte

Definition at line 668 of file dvb.h.

Constructor & Destructor Documentation

◆ dvb_convol()

leansdr::dvb_convol::dvb_convol ( scheduler sch,
pipebuf< uncoded_byte > &  _in,
pipebuf< hardsymbol > &  _out,
code_rate  fec,
int  bits_per_symbol 
)
inline

Definition at line 671 of file dvb.h.

References leansdr::fail().

675  : runnable(sch, "dvb_convol"),
676  in(_in),
677  out(_out, 64) // BPSK 7/8: 7 bytes in, 64 symbols out
678  {
679  fec_spec *fs = &fec_specs[fec];
680 
681  if (!fs->bits_in)
682  fail("Unexpected FEC");
683 
684  convol.bits_in = fs->bits_in;
685  convol.bits_out = fs->bits_out;
686  convol.polys = fs->polys;
687  convol.bps = bits_per_symbol;
688 
689  // FEC must output a whole number of IQ symbols
690  if (convol.bits_out % convol.bps)
691  fail("Code rate not suitable for this constellation");
692  }
convol_multipoly< uint16_t, 16 > convol
Definition: dvb.h:709
pipereader< uncoded_byte > in
Definition: dvb.h:707
runnable(scheduler *_sch, const char *name)
Definition: framework.h:193
pipewriter< hardsymbol > out
Definition: dvb.h:708
void fail(const char *s)
Definition: framework.cpp:11
scheduler * sch
Definition: framework.h:199
+ Here is the call graph for this function:

Member Function Documentation

◆ run()

void leansdr::dvb_convol::run ( )
inlinevirtual

Reimplemented from leansdr::runnable_common.

Definition at line 694 of file dvb.h.

References leansdr::deconvol_sync< Tbyte, BYTE_ERASED >::sync_t::in, leansdr::min(), and leansdr::deconvol_sync< Tbyte, BYTE_ERASED >::sync_t::out.

695  {
696  int count = min(in.readable(), out.writable() * convol.bps / convol.bits_out * convol.bits_in / 8);
697  // Process in multiples of the puncturing period and of 8 bits.
698  int chunk = convol.bits_in;
699  count = (count / chunk) * chunk;
700  convol.encode(in.rd(), out.wr(), count);
701  in.read(count);
702  int nout = count * 8 / convol.bits_in * convol.bits_out / convol.bps;
703  out.written(nout);
704  }
convol_multipoly< uint16_t, 16 > convol
Definition: dvb.h:709
pipereader< uncoded_byte > in
Definition: dvb.h:707
void encode(const uncoded_byte *pin, hardsymbol *pout, int count)
pipewriter< hardsymbol > out
Definition: dvb.h:708
void written(unsigned long n)
Definition: framework.h:308
void read(unsigned long n)
Definition: framework.h:367
T min(const T &x, const T &y)
Definition: framework.h:440
+ Here is the call graph for this function:

Member Data Documentation

◆ convol

convol_multipoly<uint16_t, 16> leansdr::dvb_convol::convol
private

Definition at line 709 of file dvb.h.

◆ in

pipereader<uncoded_byte> leansdr::dvb_convol::in
private

Definition at line 707 of file dvb.h.

◆ out

pipewriter<hardsymbol> leansdr::dvb_convol::out
private

Definition at line 708 of file dvb.h.


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