COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
Crc.h
Go to the documentation of this file.
1//
2// Copyright 2015 - 2025 (C). Alex Robenko. All rights reserved.
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
10
11#pragma once
12
14
15namespace comms
16{
17
18namespace protocol
19{
20
21namespace checksum
22{
23
26template <
27 typename TResult,
28 TResult TPoly,
29 TResult TInit = 0,
30 TResult TFin = 0,
31 bool TReflect = false,
32 bool TReflectRem = false
33>
35
39
43
47
48} // namespace checksum
49
50} // namespace protocol
51
52} // namespace comms
53
54
55
Calculate CRC values of all the bytes in the sequence.
Definition Crc.h:270
Contains definition of comms::frame::checksum::Crc.
Crc< std::uint16_t, 0x1021, 0xffff > Crc_CCITT
Alias to Crc checksum calculator for CRC-CCITT.
Definition Crc.h:381
Crc< std::uint16_t, 0x8005, 0, 0, true, true > Crc_16
Alias to Crc checksum calculator for standard CRC-16.
Definition Crc.h:391
Crc< std::uint32_t, 0x04c11db7, 0xffffffff, 0xffffffff, true, true > Crc_32
Alias to Crc checksum calculator for standard CRC-32.
Definition Crc.h:401
Main namespace for all classes / functions of COMMS library.