Loading...
Searching...
No Matches
packet_headerparser_b.h
Go to the documentation of this file.
/* -*- c++ -*- */
/* Copyright 2012 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_H
#define INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_H
#include <gnuradio/digital/api.h>
#include <gnuradio/digital/packet_header_default.h>
#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
/*!
* \brief Post header metadata as a PMT
* \ingroup packet_operators_blk
*
* \details
* In a sense, this is the inverse block to packet_headergenerator_bb.
* The difference is, the parsed header is not output as a stream,
* but as a PMT dictionary, which is published to message port with
* the id "header_data".
*
* The dictionary consists of the tags created by the header formatter
* object. You should be able to use the exact same formatter object
* as used on the Tx side in the packet_headergenerator_bb.
*
* If only a header length is given, this block uses the default header
* format.
*/
class DIGITAL_API packet_headerparser_b : virtual public sync_block
{
public:
typedef std::shared_ptr<packet_headerparser_b> sptr;
/*!
* \param header_formatter Header object. This should be the same as used for
* packet_headergenerator_bb.
*/
static sptr make(const gr::digital::packet_header_default::sptr& header_formatter);
/*!
* \param header_len Number of bytes per header
* \param len_tag_key Length Tag Key
*/
static sptr make(long header_len, const std::string& len_tag_key);
};
} // namespace digital
} // namespace gr
#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::sync_block
sync_block(void)
Definition sync_block.h:28
api.h
DIGITAL_API
#define DIGITAL_API
Definition gr-digital/include/gnuradio/digital/api.h:18
gr::digital
Definition adaptive_algorithm.h:22
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
packet_header_default.h
sync_block.h