GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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  */
45  class DIGITAL_API crc32_bb : virtual public tagged_stream_block
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, const std::string& lengthtagname="packet_len", bool packed=true);
56  };
57 
58  } // namespace digital
59 } // namespace gr
60 
61 #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
Include this header to use the message passing features.
Definition: logger.h:131
Byte-stream CRC block.
Definition: crc32_bb.h:45