GNU Radio C++ API Reference
3.10.12.0
The Free & Open Software Radio Ecosystem
Loading...
Searching...
No Matches
packet_headerparser_b.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
* SPDX-License-Identifier: GPL-3.0-or-later
7
*
8
*/
9
10
#ifndef INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_H
11
#define INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_H
12
13
#include <
gnuradio/digital/api.h
>
14
#include <
gnuradio/digital/packet_header_default.h
>
15
#include <
gnuradio/sync_block.h
>
16
17
namespace
gr
{
18
namespace
digital {
19
20
/*!
21
* \brief Post header metadata as a PMT
22
* \ingroup packet_operators_blk
23
*
24
* \details
25
* In a sense, this is the inverse block to packet_headergenerator_bb.
26
* The difference is, the parsed header is not output as a stream,
27
* but as a PMT dictionary, which is published to message port with
28
* the id "header_data".
29
*
30
* The dictionary consists of the tags created by the header formatter
31
* object. You should be able to use the exact same formatter object
32
* as used on the Tx side in the packet_headergenerator_bb.
33
*
34
* If only a header length is given, this block uses the default header
35
* format.
36
*/
37
class
DIGITAL_API
packet_headerparser_b
:
virtual
public
sync_block
38
{
39
public
:
40
typedef
std::shared_ptr<packet_headerparser_b>
sptr
;
41
42
/*!
43
* \param header_formatter Header object. This should be the same as used for
44
* packet_headergenerator_bb.
45
*/
46
static
sptr
make
(
const
gr::digital::packet_header_default::sptr
& header_formatter);
47
48
/*!
49
* \param header_len Number of bytes per header
50
* \param len_tag_key Length Tag Key
51
*/
52
static
sptr
make
(
long
header_len,
const
std::string& len_tag_key);
53
};
54
55
}
// namespace digital
56
}
// namespace gr
57
58
#endif
/* INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_H */
gr::digital::packet_header_default::sptr
std::shared_ptr< packet_header_default > sptr
Definition
packet_header_default.h:40
gr::digital::packet_headerparser_b
Post header metadata as a PMT.
Definition
packet_headerparser_b.h:38
gr::digital::packet_headerparser_b::make
static sptr make(const gr::digital::packet_header_default::sptr &header_formatter)
gr::digital::packet_headerparser_b::make
static sptr make(long header_len, const std::string &len_tag_key)
gr::digital::packet_headerparser_b::sptr
std::shared_ptr< packet_headerparser_b > sptr
Definition
packet_headerparser_b.h:40
gr::sync_block
synchronous 1:1 input to output with history
Definition
sync_block.h:26
api.h
DIGITAL_API
#define DIGITAL_API
Definition
gr-digital/include/gnuradio/digital/api.h:18
gr
GNU Radio logging wrapper.
Definition
basic_block.h:29
packet_header_default.h
sync_block.h
gr-digital
include
gnuradio
digital
packet_headerparser_b.h
Generated by
1.9.8