gr::satellites::crc Class Reference

Calculates a CRC. More...

`#include <crc.h>`

## Public Member Functions

| 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 (const std::vector< uint8_t > data)
| Computes a CRC.

## Detailed Description

Calculates a CRC.

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

## Constructor & Destructor Documentation

## 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 | ( |  | ) |

## Member Function Documentation

## 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

References compute().

## 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

Referenced by compute().

The documentation for this class was generated from the following file:

- crc.h