GNU Radio Manual and C++ API Reference
3.8.1.0
The Free & Open Software Radio Ecosystem
protocol_formatter_async.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2015-2016 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_PROTOCOL_FORMATTER_ASYNC_H
25
#define INCLUDED_DIGITAL_PROTOCOL_FORMATTER_ASYNC_H
26
27
#include <
gnuradio/block.h
>
28
#include <
gnuradio/digital/api.h
>
29
#include <
gnuradio/digital/header_format_base.h
>
30
31
namespace
gr
{
32
namespace
digital {
33
34
/*!
35
* \brief Uses a header format object to append a header onto a
36
* PDU.
37
*
38
* \ingroup packet_operators_blk
39
*
40
* \details
41
* This block takes in PDUs and creates a header, generally for
42
* MAC-level processing. Each received PDU is assumed to be its
43
* own frame, so any fragmentation would be done upstream in or
44
* before the flowgraph.
45
*
46
* The header that is created and transmitted out of the 'header'
47
* message port as a PDU. The header is based entirely on the \p
48
* format object, which is an object derived from the
49
* header_format_base class. All of these packet header format
50
* objects operate the same: they take in the payload data as well
51
* as possible extra metadata info about the PDU; the format
52
* object then returns the output PDU as a PMT argument along
53
* with any changes to the metadata info PMT.
54
*
55
* For different packet header formatting needs, we can define new
56
* classes that inherit from the header_format_base block
57
* and which overload the header_format_base::format
58
* function.
59
*
60
* \sa header_format_base
61
* \sa header_format_default
62
* \sa header_format_counter
63
*
64
* This block only uses asynchronous message passing interfaces to
65
* receiver and emit PDUs. The message ports are:
66
*
67
* \li in: receives PDUs for the frame payload
68
* \li header: the header formatted for the given frame
69
* \li payload: the payload
70
*/
71
class
DIGITAL_API
protocol_formatter_async
:
virtual
public
block
72
{
73
public
:
74
typedef
boost::shared_ptr<protocol_formatter_async>
sptr
;
75
76
/*!
77
* Make a packet header block using a given \p format.
78
*
79
* \param format The format object to use when creating the
80
* header for the packet.
81
*/
82
static
sptr
make(
const
header_format_base::sptr
& format);
83
};
84
85
}
// namespace digital
86
}
// namespace gr
87
88
#endif
/* INCLUDED_DIGITAL_PROTOCOL_FORMATTER_ASYNC_H */
gr::digital::header_format_base::sptr
boost::shared_ptr< header_format_base > sptr
Definition:
header_format_base.h:127
block.h
gr::digital::protocol_formatter_async::sptr
boost::shared_ptr< protocol_formatter_async > sptr
Definition:
protocol_formatter_async.h:74
DIGITAL_API
#define DIGITAL_API
Definition:
gr-digital/include/gnuradio/digital/api.h:30
gr::block
The abstract base class for all 'terminal' processing blocks.
Definition:
block.h:71
api.h
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:43
header_format_base.h
gr::digital::protocol_formatter_async
Uses a header format object to append a header onto a PDU.
Definition:
protocol_formatter_async.h:71
gr-digital
include
gnuradio
digital
protocol_formatter_async.h
Generated by
1.8.16