GNU Radio's DVBS2RX Package
gf_util.h File Reference
#include "gf.h"
#include <array>
#include <stdexcept>
#include <vector>
Include dependency graph for gf_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gr
 Fixed-length double-ended queue with contiguous volk-aligned elements.
 
namespace  gr::dvbs2rx
 

Typedefs

typedef std::vector< unsigned char > gr::dvbs2rx::u8_vector_t
 
typedef unsigned char * gr::dvbs2rx::u8_ptr_t
 
typedef const unsigned char * gr::dvbs2rx::u8_cptr_t
 

Functions

template<typename T >
gr::dvbs2rx::bitmask (int n_bits)
 Get bitmask for the least significant bits of a type T.
 
template<>
bitset256_t gr::dvbs2rx::bitmask (int n_bits)
 
template<typename T >
uint8_t gr::dvbs2rx::get_byte (const T &value, uint32_t byte_index)
 Get the byte at a given index of a type T value.
 
template<>
uint8_t gr::dvbs2rx::get_byte (const bitset256_t &value, uint32_t byte_index)
 
template<typename T >
uint8_t gr::dvbs2rx::get_msby (const T &value, uint32_t lsb_index)
 Get the most significant byte of a given value.
 
template<>
uint8_t gr::dvbs2rx::get_msby (const bitset256_t &value, uint32_t lsb_index)
 
template<typename T >
u8_vector_t gr::dvbs2rx::to_u8_vector (T val, size_t n_bytes=sizeof(T))
 Convert type to u8 vector in network byte order (big-endian)
 
template<typename T >
gr::dvbs2rx::from_u8_array (u8_cptr_t in, size_t size)
 Convert u8 array in network byte order (big-endian) to type.
 
template<typename T >
gr::dvbs2rx::from_u8_vector (const u8_vector_t &vec)
 Convert u8 vector in network byte order (big-endian) to type.
 
template<typename T >
std::array< T, 256 > gr::dvbs2rx::build_gf2_poly_rem_lut (const gf2_poly< T > &x)
 Build LUT to assist with GF(2) polynomial remainder computation.
 
template<typename T >
gf2_poly< T > gr::dvbs2rx::gf2_poly_rem (u8_cptr_t y, const int y_size, const gf2_poly< T > &x, const std::array< T, 256 > &x_lut)
 Compute the remainder "y % x" of GF2 polynomials y and x using a LUT.
 
template<typename T >
gf2_poly< T > gr::dvbs2rx::gf2_poly_rem (const u8_vector_t &y, const gf2_poly< T > &x, const std::array< T, 256 > &x_lut)