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
>
28
#include <
gnuradio/tagged_stream_block.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
,
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 */
tagged_stream_block.h
gr::digital::crc32_bb
Byte-stream CRC block.
Definition:
crc32_bb.h:45
DIGITAL_API
#define DIGITAL_API
Definition:
gr-digital/include/gnuradio/digital/api.h:30
api.h
gr::digital::crc32_bb::sptr
boost::shared_ptr< crc32_bb > sptr
Definition:
crc32_bb.h:48
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:43
gr::tagged_stream_block
Block that operates on PDUs in form of tagged streams.
Definition:
tagged_stream_block.h:37
gr-digital
include
gnuradio
digital
crc32_bb.h
Generated by
1.8.16