GNU Radio C++ API Reference: crc32_bb.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
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>
16#include <gnuradio/tagged_stream_block.h>
17
18namespace gr {
19namespace 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 */
33 class DIGITAL_API crc32_bb : virtual public tagged_stream_block
34{
35public:
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 */
gr::digital::crc32_bb
Byte-stream CRC block.
Definition crc32_bb.h:34
gr::digital::crc32_bb::sptr
std::shared_ptr< crc32_bb > sptr
Definition crc32_bb.h:36
gr::digital::crc32_bb::make
static sptr make(bool check=false, const std::string &lengthtagname="packet_len", bool packed=true)
gr::tagged_stream_block::tagged_stream_block
tagged_stream_block(void)
Definition tagged_stream_block.h:35
api.h
DIGITAL_API
#define DIGITAL_API
Definition gr-digital/include/gnuradio/digital/api.h:18
gr::digital
Definition adaptive_algorithm.h:22
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
tagged_stream_block.h