Loading...
Searching...
No Matches
tagged_stream_to_pdu.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2013,2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_PDU_TAGGED_STREAM_TO_PDU_H
#define INCLUDED_PDU_TAGGED_STREAM_TO_PDU_H
#include <gnuradio/pdu.h>
#include <gnuradio/pdu/api.h>
#include <gnuradio/tagged_stream_block.h>
namespace gr {
namespace pdu {
/*!
* \brief Turns received stream data and tags into PDUs and sends
* them through a message port.
* \ingroup message_tools_blk
*
* The sent message is a PMT-pair (created by pmt::cons()). The
* first element is a dictionary containing all the tags. The
* second is a vector containing the actual data.
*/
class PDU_API tagged_stream_to_pdu : virtual public tagged_stream_block
{
public:
// gr::pdu::tagged_stream_to_pdu::sptr
typedef std::shared_ptr<tagged_stream_to_pdu> sptr;
/*!
* \brief Construct a tagged_stream_to_pdu block
* \param type PDU type of gr::types::vector_type
* \param lengthtagname The name of the tag that specifies
* how long the packet is.
*/
static sptr make(gr::types::vector_type type,
const std::string& lengthtagname = "packet_len");
};
} /* namespace pdu */
} /* namespace gr */
#endif /* INCLUDED_PDU_TAGGED_STREAM_TO_PDU_H */
gr::pdu::tagged_stream_to_pdu
Turns received stream data and tags into PDUs and sends them through a message port.
Definition tagged_stream_to_pdu.h:31
gr::pdu::tagged_stream_to_pdu::sptr
std::shared_ptr< tagged_stream_to_pdu > sptr
Definition tagged_stream_to_pdu.h:34
gr::pdu::tagged_stream_to_pdu::make
static sptr make(gr::types::vector_type type, const std::string &lengthtagname="packet_len")
Construct a tagged_stream_to_pdu block.
gr::tagged_stream_block
Block that operates on PDUs in form of tagged streams.
Definition tagged_stream_block.h:26
api.h
PDU_API
#define PDU_API
Definition gr-pdu/include/gnuradio/pdu/api.h:18
gr::msgport_names::pdu
GR_RUNTIME_API const pmt::pmt_t pdu()
gr::types::vector_type
vector_type
Definition pdu.h:44
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
pdu.h
tagged_stream_block.h