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