11 #ifndef INCLUDED_DIGITAL_CRC_H
12 #define INCLUDED_DIGITAL_CRC_H
45 crc(
unsigned num_bits,
47 uint64_t initial_value,
50 bool result_reflected);
59 uint64_t
compute(
const uint8_t* data, std::size_t len);
66 uint64_t
compute(std::vector<uint8_t>
const& data)
68 return compute(data.data(), data.size());
72 std::array<uint64_t, 256> d_table;
75 uint64_t d_initial_value;
77 bool d_input_reflected;
78 bool d_result_reflected;
80 uint64_t reflect(uint64_t word)
const;
Calculates a CRC.
Definition: crc.h:33
uint64_t compute(std::vector< uint8_t > const &data)
Computes a CRC.
Definition: crc.h:66
uint64_t compute(const uint8_t *data, std::size_t len)
Computes a 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.
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29