GNU Radio's DVBS2RX Package
crc.h File Reference
#include <array>
#include <cstdint>
#include <vector>
Include dependency graph for crc.h:

Go to the source code of this file.

Namespaces

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

Macros

#define BITS_AFTER_MSB(T)   ((sizeof(T) - 1) * 8)
 
#define MSB_MASK(T)    (static_cast<T>(1) << (sizeof(T) * 8 - 1))
 

Functions

template<typename T >
std::array< T, 256 > gr::dvbs2rx::build_crc_lut (const T &gen_poly_no_msb)
 Build the CRC computation look-up table (LUT)
 
template<typename T >
gr::dvbs2rx::calc_crc (const std::vector< uint8_t > &in_bytes, const std::array< T, 256 > &crc_lut)
 Compute the CRC of a sequence of input bytes.
 

Macro Definition Documentation

◆ BITS_AFTER_MSB

#define BITS_AFTER_MSB ( T)    ((sizeof(T) - 1) * 8)

◆ MSB_MASK

#define MSB_MASK ( T)     (static_cast<T>(1) << (sizeof(T) * 8 - 1))