Calculates a CRC.
More...
#include <gnuradio/digital/crc.h>
|
| | 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.
|
| |
| | ~crc () |
| |
| uint64_t | compute (const uint8_t *data, std::size_t len) |
| | Computes a CRC.
|
| |
| uint64_t | compute (std::vector< uint8_t > const &data) |
| | Computes a CRC.
|
| |
Calculates a CRC.
This class calculates a CRC with configurable parameters. A table-driven byte-by-byte approach is used in the CRC computation.
◆ 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.
- Parameters
-
| 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 |
◆ ~crc()
| gr::digital::crc::~crc |
( |
| ) |
|
◆ compute() [1/2]
| uint64_t gr::digital::crc::compute |
( |
const uint8_t * | data, |
|
|
std::size_t | len ) |
Computes a CRC.
- Parameters
-
| data | the input data for the CRC calculation |
| len | the length in bytes of the data |
Referenced by compute().
◆ compute() [2/2]
| uint64_t gr::digital::crc::compute |
( |
std::vector< uint8_t > const & | data | ) |
|
|
inline |
Computes a CRC.
- Parameters
-
| data | the input data for the CRC calculation |
References compute().
The documentation for this class was generated from the following file: