GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
crc32_bb.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013 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_BB_H
13 #define INCLUDED_DIGITAL_CRC32_BB_H
14 
15 #include <gnuradio/digital/api.h>
17 
18 namespace gr {
19 namespace digital {
20 
21 /*!
22  * \brief Byte-stream CRC block
23  * \ingroup packet_operators_blk
24  *
25  * \details
26  * Input: stream of bytes, which form a packet. The first byte of the packet
27  * has a tag with key "length" and the value being the number of bytes in the
28  * packet.
29  *
30  * Output: The same bytes as incoming, but trailing a CRC32 of the packet.
31  * The tag is re-set to the new length.
32  */
34 {
35 public:
36  typedef std::shared_ptr<crc32_bb> sptr;
37 
38  /*!
39  * \param check Set to true if you want to check CRC, false to create CRC.
40  * \param lengthtagname Length tag key for the tagged stream.
41  * \param packed If the data is packed or unpacked bits (default=true).
42  */
43  static sptr make(bool check = false,
44  const std::string& lengthtagname = "packet_len",
45  bool packed = true);
46 };
47 
48 } // namespace digital
49 } // namespace gr
50 
51 #endif /* INCLUDED_DIGITAL_CRC32_BB_H */
Byte-stream CRC block.
Definition: crc32_bb.h:34
std::shared_ptr< crc32_bb > sptr
Definition: crc32_bb.h:36
static sptr make(bool check=false, const std::string &lengthtagname="packet_len", bool packed=true)
Block that operates on PDUs in form of tagged streams.
Definition: tagged_stream_block.h:26
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29