GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
crc32_async_bb.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2014 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
12#ifndef INCLUDED_DIGITAL_CRC32_ASYNC_BB_H
13#define INCLUDED_DIGITAL_CRC32_ASYNC_BB_H
14
15#include <gnuradio/block.h>
17
18namespace gr {
19namespace digital {
20
21/*!
22 * \brief Byte-stream CRC block for async messages
23 * \ingroup packet_operators_blk
24 * \ingroup deprecated_blk
25 *
26 * \details
27 *
28 * Processes packets (as async PDU messages) for CRC32. The \p
29 * check parameter determines if the block acts to check and strip
30 * the CRC or to calculate and append the CRC32.
31 *
32 * The input PDU is expected to be a message of packet bytes.
33 *
34 * When using check mode, if the CRC passes, the output is a
35 * payload of the message with the CRC stripped, so the output
36 * will be 4 bytes smaller than the input.
37 *
38 * When using calculate mode (check == false), then the CRC is
39 * calculated on the PDU and appended to it. The output is then 4
40 * bytes longer than the input.
41 *
42 * This block implements the CRC32 using the standard generator 0x04C11DB7.
43 */
44class DIGITAL_API crc32_async_bb : virtual public block
45{
46public:
47 typedef std::shared_ptr<crc32_async_bb> sptr;
48
49 /*!
50 * \param check Set to true if you want to check CRC, false to create CRC.
51 */
52 static sptr make(bool check = false);
53};
54
55} // namespace digital
56} // namespace gr
57
58#endif /* INCLUDED_DIGITAL_CRC32_ASYNC_BB_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
Byte-stream CRC block for async messages.
Definition: crc32_async_bb.h:45
static sptr make(bool check=false)
std::shared_ptr< crc32_async_bb > sptr
Definition: crc32_async_bb.h:47
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29