COMMS
Template library intended to help with implementation of communication protocols.
Classes | Typedefs
comms::protocol::checksum Namespace Reference

Namespace that contains definition of checksum calculator classes which can be used with comms::protocol::ChecksumLayer transport layer class. More...

Detailed Description

Namespace that contains definition of checksum calculator classes which can be used with comms::protocol::ChecksumLayer transport layer class.

Classes

class  BasicSum
 Summary of all bytes checksum calculator. More...
 
class  BasicXor
 Exclusive OR (XOR) of all bytes checksum calculator. More...
 
class  Crc
 Calculate CRC values of all the bytes in the sequence. More...
 

Typedefs

using Crc_16 = Crc< std::uint16_t, 0x8005, 0, 0, true, true >
 Alias to Crc checksum calculator for standard CRC-16. More...
 
using Crc_32 = Crc< std::uint32_t, 0x04c11db7, 0xffffffff, 0xffffffff, true, true >
 Alias to Crc checksum calculator for standard CRC-32. More...
 
using Crc_CCITT = Crc< std::uint16_t, 0x1021, 0xffff >
 Alias to Crc checksum calculator for CRC-CCITT. More...
 

Typedef Documentation

◆ Crc_16

using comms::protocol::checksum::Crc_16 = typedef Crc<std::uint16_t, 0x8005, 0, 0, true, true>

Alias to Crc checksum calculator for standard CRC-16.

Defines:

  • Result type is std::uint16_t
  • Polynomial is 0x8005
  • Initial value is 0x0000
  • Final XOR value is 0x0000
  • Using reflection
  • Using reflection for final value

◆ Crc_32

using comms::protocol::checksum::Crc_32 = typedef Crc<std::uint32_t, 0x04c11db7, 0xffffffff, 0xffffffff, true, true>

Alias to Crc checksum calculator for standard CRC-32.

Defines:

  • Result type is std::uint32_t
  • Polynomial is 0x04c11db7
  • Initial value is 0xffffffff
  • Final XOR value is 0xffffffff
  • Using reflection
  • Using reflection for final value

◆ Crc_CCITT

using comms::protocol::checksum::Crc_CCITT = typedef Crc<std::uint16_t, 0x1021, 0xffff>

Alias to Crc checksum calculator for CRC-CCITT.

Defines:

  • Result type is std::uint16_t
  • Polynomial is 0x1021
  • Initial value is 0xffff
  • Final XOR value is 0x0000
  • NOT using reflection
  • NOT using reflection for final value