GNU Radio Manual and C++ API Reference  3.8.1.0
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  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 
24 #ifndef INCLUDED_DIGITAL_CRC32_BB_H
25 #define INCLUDED_DIGITAL_CRC32_BB_H
26 
27 #include <gnuradio/digital/api.h>
29 
30 namespace gr {
31 namespace digital {
32 
33 /*!
34  * \brief Byte-stream CRC block
35  * \ingroup packet_operators_blk
36  *
37  * \details
38  * Input: stream of bytes, which form a packet. The first byte of the packet
39  * has a tag with key "length" and the value being the number of bytes in the
40  * packet.
41  *
42  * Output: The same bytes as incoming, but trailing a CRC32 of the packet.
43  * The tag is re-set to the new length.
44  */
46 {
47 public:
48  typedef boost::shared_ptr<crc32_bb> sptr;
49 
50  /*!
51  * \param check Set to true if you want to check CRC, false to create CRC.
52  * \param lengthtagname Length tag key for the tagged stream.
53  * \param packed If the data is packed or unpacked bits (default=true).
54  */
55  static sptr make(bool check = false,
56  const std::string& lengthtagname = "packet_len",
57  bool packed = true);
58 };
59 
60 } // namespace digital
61 } // namespace gr
62 
63 #endif /* INCLUDED_DIGITAL_CRC32_BB_H */
Block that operates on PDUs in form of tagged streamsOverride work to provide the signal processing i...
Definition: tagged_stream_block.h:37
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
boost::shared_ptr< crc32_bb > sptr
Definition: crc32_bb.h:48
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
Byte-stream CRC block.
Definition: crc32_bb.h:45