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::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS > Struct Template Reference

#include <convolutional.h>

Public Types

typedef u8 hardsymbol
 
typedef u8 decoded_byte
 

Public Member Functions

u8 SYMVAL (const hardsymbol *s)
 
u8 SYMVAL (const softsymbol *s)
 
 deconvol_poly ()
 
int run (const Tin *pin, const u8 remap[], decoded_byte *pout, int nb)
 

Private Attributes

Thist hist
 

Detailed Description

template<typename Tin, typename Thist, Thist POLY_DECONVOL, Thist POLY_ERRORS>
struct leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >

Definition at line 36 of file convolutional.h.

Member Typedef Documentation

◆ decoded_byte

template<typename Tin , typename Thist , Thist POLY_DECONVOL, Thist POLY_ERRORS>
typedef u8 leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >::decoded_byte

Definition at line 44 of file convolutional.h.

◆ hardsymbol

template<typename Tin , typename Thist , Thist POLY_DECONVOL, Thist POLY_ERRORS>
typedef u8 leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >::hardsymbol

Definition at line 38 of file convolutional.h.

Constructor & Destructor Documentation

◆ deconvol_poly()

template<typename Tin , typename Thist , Thist POLY_DECONVOL, Thist POLY_ERRORS>
leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >::deconvol_poly ( )
inline

Definition at line 46 of file convolutional.h.

46 : hist(0) {}

Member Function Documentation

◆ run()

template<typename Tin , typename Thist , Thist POLY_DECONVOL, Thist POLY_ERRORS>
int leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >::run ( const Tin *  pin,
const u8  remap[],
decoded_byte pout,
int  nb 
)
inline

Definition at line 51 of file convolutional.h.

References leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >::hist, leansdr::parity(), and leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >::SYMVAL().

52  {
53  int nerrors = 0;
54  int halfway = nb / 2;
55 
56  for (; nb--; ++pout)
57  {
58  decoded_byte byte = 0;
59 
60  for (int bit = 8; bit--; ++pin)
61  {
62  hist = (hist << 2) | remap[SYMVAL(pin)];
63  byte = (byte << 1) | parity(hist & POLY_DECONVOL);
64  if (nb < halfway)
65  nerrors += parity(hist & POLY_ERRORS);
66  }
67 
68  *pout = byte;
69  }
70 
71  return nerrors;
72  }
unsigned char parity(uint8_t x)
Definition: math.cpp:27
u8 SYMVAL(const hardsymbol *s)
Definition: convolutional.h:41
+ Here is the call graph for this function:

◆ SYMVAL() [1/2]

template<typename Tin , typename Thist , Thist POLY_DECONVOL, Thist POLY_ERRORS>
u8 leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >::SYMVAL ( const hardsymbol s)
inline

Definition at line 41 of file convolutional.h.

Referenced by leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >::run(), and leansdr::deconvol_poly2< Tin, uint32_t, uint64_t, 0x3ba, 0x38f70 >::run().

41 { return *s; }
+ Here is the caller graph for this function:

◆ SYMVAL() [2/2]

template<typename Tin , typename Thist , Thist POLY_DECONVOL, Thist POLY_ERRORS>
u8 leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >::SYMVAL ( const softsymbol s)
inline

Definition at line 42 of file convolutional.h.

References leansdr::softsymbol::symbol.

42 { return s->symbol; }

Member Data Documentation

◆ hist

template<typename Tin , typename Thist , Thist POLY_DECONVOL, Thist POLY_ERRORS>
Thist leansdr::deconvol_poly< Tin, Thist, POLY_DECONVOL, POLY_ERRORS >::hist
private

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