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 - 2026 (C). Alex Robenko. All rights reserved.
3//
4// SPDX-License-Identifier: MPL-2.0
5//
6// This Source Code Form is subject to the terms of the Mozilla Public
7// License, v. 2.0. If a copy of the MPL was not distributed with this
8// file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
12
13#pragma once
14
16
17namespace comms
18{
19
20namespace protocol
21{
22
23namespace checksum
24{
25
28template <
29 typename TResult,
30 TResult TPoly,
31 TResult TInit = 0,
32 TResult TFin = 0,
33 bool TReflect = false,
34 bool TReflectRem = false
35>
37
41
45
49
50} // namespace checksum
51
52} // namespace protocol
53
54} // namespace comms
55
Calculate CRC values of all the bytes in the sequence.
Definition Crc.h:272
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:383
Crc< std::uint16_t, 0x8005, 0, 0, true, true > Crc_16
Alias to Crc checksum calculator for standard CRC-16.
Definition Crc.h:393
Crc< std::uint32_t, 0x04c11db7, 0xffffffff, 0xffffffff, true, true > Crc_32
Alias to Crc checksum calculator for standard CRC-32.
Definition Crc.h:403
Main namespace for all classes / functions of COMMS library.