GNU Radio Manual and C++ API Reference  v3.9.2.0-89-gb7c7001e
The Free & Open Software Radio Ecosystem
crc32.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2005,2011,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_DIGITAL_CRC32_H
12 #define INCLUDED_DIGITAL_CRC32_H
13 
14 #include <gnuradio/digital/api.h>
15 #include <gnuradio/types.h>
16 #include <string>
17 
18 namespace gr {
19 namespace digital {
20 
21 /*!
22  * \brief update running CRC-32
23  * \ingroup packet_operators_blk
24  *
25  * \details
26  * Update a running CRC with the bytes buf[0..len-1] The CRC
27  * should be initialized to all 1's, and the transmitted value is
28  * the 1's complement of the final running CRC. The resulting CRC
29  * should be transmitted in big endian order.
30  */
31 DIGITAL_API unsigned int
32 update_crc32(unsigned int crc, const unsigned char* buf, size_t len);
33 
34 DIGITAL_API unsigned int update_crc32(unsigned int crc, const std::string buf);
35 
36 DIGITAL_API unsigned int crc32(const unsigned char* buf, size_t len);
37 
38 DIGITAL_API unsigned int crc32(const std::string buf);
39 
40 } /* namespace digital */
41 } /* namespace gr */
42 
43 #endif /* INCLUDED_CRC32_H */
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:18
DIGITAL_API unsigned int update_crc32(unsigned int crc, const unsigned char *buf, size_t len)
update running CRC-32
DIGITAL_API unsigned int crc32(const unsigned char *buf, size_t len)
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:29