GNU Radio Manual and C++ API Reference
3.7.5
The Free & Open Software Radio Ecosystem
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
packet_headergenerator_bb.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/* Copyright 2012 Free Software Foundation, Inc.
3
*
4
* This file is part of GNU Radio
5
*
6
* GNU Radio is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 3, or (at your option)
9
* any later version.
10
*
11
* GNU Radio is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with GNU Radio; see the file COPYING. If not, write to
18
* the Free Software Foundation, Inc., 51 Franklin Street,
19
* Boston, MA 02110-1301, USA.
20
*/
21
22
#ifndef INCLUDED_PACKET_HEADERGENERATOR_BB_H
23
#define INCLUDED_PACKET_HEADERGENERATOR_BB_H
24
25
#include <
gnuradio/digital/api.h
>
26
#include <
gnuradio/tagged_stream_block.h
>
27
#include <
gnuradio/digital/packet_header_default.h
>
28
29
namespace
gr {
30
namespace
digital {
31
32
/*!
33
* \brief Generates a header for a tagged, streamed packet.
34
* \ingroup packet_operators_blk
35
*
36
* \details
37
* Input: A tagged stream. This is consumed entirely, it is not appended
38
* to the output stream.
39
* Output: An tagged stream containing the header. The details on the header
40
* are set in a header formatter object (of type packet_header_default
41
* or a subclass thereof). If only a number of bits is specified, a
42
* default header is generated (see packet_header_default).
43
*/
44
class
DIGITAL_API
packet_headergenerator_bb
:
virtual
public
tagged_stream_block
45
{
46
public
:
47
typedef
boost::shared_ptr<packet_headergenerator_bb>
sptr
;
48
49
/* \param header_formatter A header formatter object.
50
* \param len_tag_key Length tag key. Note that for header generation,
51
* it is irrelevant which tag names are set in the
52
* formatter object, only this value is relevant!
53
*/
54
static
sptr
make(
55
const
packet_header_default::sptr
&header_formatter,
56
const
std::string &len_tag_key=
"packet_len"
57
);
58
59
/* \param header_len If this value is given, a packet_header_default
60
* object is used to generate the header. This is
61
* the number of bits per header.
62
* \param len_tag_key Length tag key.
63
*/
64
static
sptr
make(
65
long
header_len,
66
const
std::string &len_tag_key =
"packet_len"
);
67
};
68
69
}
// namespace digital
70
}
// namespace gr
71
72
#endif
/* INCLUDED_PACKET_HEADERGENERATOR_BB_H */
73
gr-digital
include
gnuradio
digital
packet_headergenerator_bb.h
Generated on Fri Oct 3 2014 00:33:51 for GNU Radio Manual and C++ API Reference by
1.8.1.2