gr::digital::crc
gnuradio/digital/crc.h
std::array< uint64_t, 256 > std::array<uint64_t, 256> gr::digital::crc::d_table d_table gr::digital::crc::d_table
unsigned unsigned gr::digital::crc::d_num_bits d_num_bits gr::digital::crc::d_num_bits
uint64_t uint64_t gr::digital::crc::d_mask d_mask gr::digital::crc::d_mask
uint64_t uint64_t gr::digital::crc::d_initial_value d_initial_value gr::digital::crc::d_initial_value
uint64_t uint64_t gr::digital::crc::d_final_xor d_final_xor gr::digital::crc::d_final_xor
bool bool gr::digital::crc::d_input_reflected d_input_reflected gr::digital::crc::d_input_reflected
bool bool gr::digital::crc::d_result_reflected d_result_reflected gr::digital::crc::d_result_reflected
gr::digital::crc::crc
(unsigned num_bits, uint64_t poly, uint64_t initial_value, uint64_t final_xor, bool input_reflected, bool result_reflected)
crc
gr::digital::crc::crc
unsigned num_bits
uint64_t poly
uint64_t initial_value
uint64_t final_xor
bool input_reflected
bool result_reflected

Construct a CRC calculator instance.

num_bits

CRC size in bits

poly

CRC polynomial, in MSB-first notation

initial_value

Initial register value

final_xor

Final XOR value

input_reflected

true if the input is LSB-first, false if not

result_reflected

true if the output is LSB-first, false if not

gr::digital::crc::~crc
()
~crc
gr::digital::crc::~crc
uint64_t uint64_t gr::digital::crc::compute (const uint8_t *data, std::size_t len) compute gr::digital::crc::compute const uint8_t * data std::size_t len

Computes a CRC.

data

the input data for the CRC calculation

len

the length in bytes of the data

compute
uint64_t uint64_t gr::digital::crc::compute (std::vector< uint8_t > const &data) compute gr::digital::crc::compute std::vector< uint8_t > const & data

Computes a CRC.

data

the input data for the CRC calculation

compute
uint64_t uint64_t gr::digital::crc::reflect (uint64_t word) const reflect gr::digital::crc::reflect uint64_t word

Calculates a CRC.

This class calculates a CRC with configurable parameters. A table-driven byte-by-byte approach is used in the CRC computation.

- gr::digital::crc
  compute
- gr::digital::crc
  compute
- gr::digital::crc
  crc
- gr::digital::crc
  d_final_xor
- gr::digital::crc
  d_initial_value
- gr::digital::crc
  d_input_reflected
- gr::digital::crc
  d_mask
- gr::digital::crc
  d_num_bits
- gr::digital::crc
  d_result_reflected
- gr::digital::crc
  d_table
- gr::digital::crc
  reflect
- gr::digital::crc
  ~crc