Calculates a CRC.
More...
#include <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. More...
|
| |
| | ~crc () |
| |
| uint64_t | compute (const uint8_t *data, std::size_t len) |
| | Computes a CRC. More...
|
| |
| uint64_t | compute (const std::vector< uint8_t > data) |
| | Computes a CRC. More...
|
| |
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::satellites::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::satellites::crc::~crc |
( |
| ) |
|
◆ compute() [1/2]
| uint64_t gr::satellites::crc::compute |
( |
const std::vector< uint8_t > |
data | ) |
|
|
inline |
Computes a CRC.
- Parameters
-
| data | the input data for the CRC calculation |
◆ compute() [2/2]
| uint64_t gr::satellites::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 |
The documentation for this class was generated from the following file: