GNU Radio Manual and C++ API Reference
3.9.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
* 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
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
*/
33
class
DIGITAL_API
crc32_bb
:
virtual
public
tagged_stream_block
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 */
tagged_stream_block.h
gr::digital::crc32_bb::sptr
std::shared_ptr< crc32_bb > sptr
Definition:
crc32_bb.h:36
gr::digital::crc32_bb
Byte-stream CRC block.
Definition:
crc32_bb.h:33
DIGITAL_API
#define DIGITAL_API
Definition:
gr-digital/include/gnuradio/digital/api.h:18
api.h
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
gr::tagged_stream_block
Block that operates on PDUs in form of tagged streams.
Definition:
tagged_stream_block.h:25
gr-digital
include
gnuradio
digital
crc32_bb.h
Generated by
1.8.17