Template Struct CRC::Table

Nested Relationships

This struct is a nested type of Class CRC.

Struct Documentation

template<typename CRCType, crcpp_uint16 CRCWidth>
struct Table

CRC lookup table. After construction, the CRC parameters are fixed.

Note

A CRC table can be used for multiple CRC calculations.

Public Functions

inline explicit Table(const Parameters<CRCType, CRCWidth> &parameters)

Constructs a CRC table from a set of CRC parameters.

Parameters:

params[in] CRC parameters

Template Parameters:
  • CRCType – Integer type for storing the CRC result

  • CRCWidth – Number of bits in the CRC

inline const Parameters<CRCType, CRCWidth> &GetParameters() const

Gets the CRC parameters used to construct the CRC table.

Template Parameters:
  • CRCType – Integer type for storing the CRC result

  • CRCWidth – Number of bits in the CRC

Returns:

CRC parameters

inline const CRCType *GetTable() const

Gets the CRC table.

Template Parameters:
  • CRCType – Integer type for storing the CRC result

  • CRCWidth – Number of bits in the CRC

Returns:

CRC table

inline CRCType operator[](unsigned char index) const

Gets an entry in the CRC table.

Parameters:

index[in] Index into the CRC table

Template Parameters:
  • CRCType – Integer type for storing the CRC result

  • CRCWidth – Number of bits in the CRC

Returns:

CRC table entry