MRPT  2.0.4
crc.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <cstddef>
12 #include <cstdint>
13 #include <vector>
14 
15 namespace mrpt::system
16 {
17 /** \addtogroup mrpt_crc CRC functions
18  * Header: `#include <mrpt/system/crc.h>`.
19  * Library: \ref mrpt_system_grp
20  * \ingroup mrpt_system_grp
21  * @{ */
22 
23 /** Computes the CRC16 checksum of a block of data. */
24 uint16_t compute_CRC16(
25  const std::vector<uint8_t>& data, const uint16_t gen_pol = 0x8005);
26 /** \overload */
27 uint16_t compute_CRC16(
28  const uint8_t* data, const size_t len, const uint16_t gen_pol = 0x8005);
29 /** Computes the CRC32 checksum of a block of data. */
30 uint32_t compute_CRC32(
31  const std::vector<uint8_t>& data, const uint32_t gen_pol = 0xEDB88320L);
32 /** \overload */
33 uint32_t compute_CRC32(
34  const uint8_t* data, const size_t len,
35  const uint32_t gen_pol = 0xEDB88320L);
36 /** @} */
37 } // namespace mrpt::system
uint32_t compute_CRC32(const std::vector< uint8_t > &data, const uint32_t gen_pol=0xEDB88320L)
Computes the CRC32 checksum of a block of data.
Definition: crc.cpp:22
uint16_t compute_CRC16(const std::vector< uint8_t > &data, const uint16_t gen_pol=0x8005)
Computes the CRC16 checksum of a block of data.
Definition: crc.cpp:15
static struct FontData data
Definition: gltext.cpp:144



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020