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 | Private Attributes | List of all members
leansdr::interleaver Struct Reference

#include <dvb.h>

+ Inheritance diagram for leansdr::interleaver:
+ Collaboration diagram for leansdr::interleaver:

Public Member Functions

 interleaver (scheduler *sch, pipebuf< rspacket< u8 >> &_in, pipebuf< u8 > &_out)
 
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< rspacket< u8 > > in
 
pipewriter< u8out
 

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 1100 of file dvb.h.

Constructor & Destructor Documentation

◆ interleaver()

leansdr::interleaver::interleaver ( scheduler sch,
pipebuf< rspacket< u8 >> &  _in,
pipebuf< u8 > &  _out 
)
inline

Definition at line 1102 of file dvb.h.

1104  : runnable(sch, "interleaver"),
1105  in(_in),
1106  out(_out, SIZE_RSPACKET)
1107  {
1108  }
pipewriter< u8 > out
Definition: dvb.h:1130
runnable(scheduler *_sch, const char *name)
Definition: framework.h:193
pipereader< rspacket< u8 > > in
Definition: dvb.h:1129
scheduler * sch
Definition: framework.h:199

Member Function Documentation

◆ run()

void leansdr::interleaver::run ( )
inlinevirtual

Reimplemented from leansdr::runnable_common.

Definition at line 1110 of file dvb.h.

References leansdr::rspacket< Tbyte >::data, i, leansdr::deconvol_sync< Tbyte, BYTE_ERASED >::sync_t::in, and leansdr::deconvol_sync< Tbyte, BYTE_ERASED >::sync_t::out.

1111  {
1112  while (in.readable() >= 12 && out.writable() >= SIZE_RSPACKET)
1113  {
1114  rspacket<u8> *pin = in.rd();
1115  u8 *pout = out.wr();
1116  int delay = 0;
1117 
1118  for (int i = 0; i < SIZE_RSPACKET; ++i, ++pout, delay = (delay + 1) % 12)
1119  {
1120  *pout = pin[11 - delay].data[i];
1121  }
1122 
1123  in.read(1);
1124  out.written(SIZE_RSPACKET);
1125  }
1126  }
pipewriter< u8 > out
Definition: dvb.h:1130
unsigned char u8
Definition: framework.h:453
pipereader< rspacket< u8 > > in
Definition: dvb.h:1129
int32_t i
Definition: decimators.h:244
void written(unsigned long n)
Definition: framework.h:308

Member Data Documentation

◆ in

pipereader<rspacket<u8> > leansdr::interleaver::in
private

Definition at line 1129 of file dvb.h.

◆ out

pipewriter<u8> leansdr::interleaver::out
private

Definition at line 1130 of file dvb.h.


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