GNU Radio 3.7.1 C++ API
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
53
*/
54
static
sptr
make(
bool
check=
false
,
const
std::string& lengthtagname=
"packet_len"
);
55
};
56
57
}
// namespace digital
58
}
// namespace gr
59
60
#endif
/* INCLUDED_DIGITAL_CRC32_BB_H */
61
gr-digital
include
gnuradio
digital
crc32_bb.h
Generated on Wed Oct 2 2013 01:55:46 for GNU Radio 3.7.1 C++ API by
1.8.4