GNU Radio Manual and C++ API Reference
3.9.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
* SPDX-License-Identifier: GPL-3.0-or-later
8
*
9
*/
10
11
12
#ifndef INCLUDED_DIGITAL_PROTOCOL_FORMATTER_ASYNC_H
13
#define INCLUDED_DIGITAL_PROTOCOL_FORMATTER_ASYNC_H
14
15
#include <
gnuradio/block.h
>
16
#include <
gnuradio/digital/api.h
>
17
#include <
gnuradio/digital/header_format_base.h
>
18
19
namespace
gr
{
20
namespace
digital {
21
22
/*!
23
* \brief Uses a header format object to append a header onto a
24
* PDU.
25
*
26
* \ingroup packet_operators_blk
27
*
28
* \details
29
* This block takes in PDUs and creates a header, generally for
30
* MAC-level processing. Each received PDU is assumed to be its
31
* own frame, so any fragmentation would be done upstream in or
32
* before the flowgraph.
33
*
34
* The header that is created and transmitted out of the 'header'
35
* message port as a PDU. The header is based entirely on the \p
36
* format object, which is an object derived from the
37
* header_format_base class. All of these packet header format
38
* objects operate the same: they take in the payload data as well
39
* as possible extra metadata info about the PDU; the format
40
* object then returns the output PDU as a PMT argument along
41
* with any changes to the metadata info PMT.
42
*
43
* For different packet header formatting needs, we can define new
44
* classes that inherit from the header_format_base block
45
* and which overload the header_format_base::format
46
* function.
47
*
48
* \sa header_format_base
49
* \sa header_format_default
50
* \sa header_format_counter
51
*
52
* This block only uses asynchronous message passing interfaces to
53
* receiver and emit PDUs. The message ports are:
54
*
55
* \li in: receives PDUs for the frame payload
56
* \li header: the header formatted for the given frame
57
* \li payload: the payload
58
*/
59
class
DIGITAL_API
protocol_formatter_async
:
virtual
public
block
60
{
61
public
:
62
typedef
std::shared_ptr<protocol_formatter_async>
sptr
;
63
64
/*!
65
* Make a packet header block using a given \p format.
66
*
67
* \param format The format object to use when creating the
68
* header for the packet.
69
*/
70
static
sptr
make(
const
header_format_base::sptr
& format);
71
};
72
73
}
// namespace digital
74
}
// namespace gr
75
76
#endif
/* INCLUDED_DIGITAL_PROTOCOL_FORMATTER_ASYNC_H */
block.h
gr::digital::protocol_formatter_async::sptr
std::shared_ptr< protocol_formatter_async > sptr
Definition:
protocol_formatter_async.h:62
DIGITAL_API
#define DIGITAL_API
Definition:
gr-digital/include/gnuradio/digital/api.h:18
gr::digital::header_format_base::sptr
std::shared_ptr< header_format_base > sptr
Definition:
header_format_base.h:114
gr::block
The abstract base class for all 'terminal' processing blocks.
Definition:
block.h:59
api.h
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
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:59
gr-digital
include
gnuradio
digital
protocol_formatter_async.h
Generated by
1.8.17