GNU Radio Manual and C++ API Reference
3.9.1.0
The Free & Open Software Radio Ecosystem
tagged_stream_to_pdu.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2013,2014 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
#ifndef INCLUDED_BLOCKS_TAGGED_STREAM_TO_PDU_H
12
#define INCLUDED_BLOCKS_TAGGED_STREAM_TO_PDU_H
13
14
#include <
gnuradio/blocks/api.h
>
15
#include <
gnuradio/blocks/pdu.h
>
16
#include <
gnuradio/tagged_stream_block.h
>
17
18
namespace
gr
{
19
namespace
blocks {
20
21
/*!
22
* \brief Turns received stream data and tags into PDUs and sends
23
* them through a message port.
24
* \ingroup message_tools_blk
25
*
26
* The sent message is a PMT-pair (created by pmt::cons()). The
27
* first element is a dictionary containing all the tags. The
28
* second is a vector containing the actual data.
29
*/
30
class
BLOCKS_API
tagged_stream_to_pdu
:
virtual
public
tagged_stream_block
31
{
32
public
:
33
// gr::blocks::tagged_stream_to_pdu::sptr
34
typedef
std::shared_ptr<tagged_stream_to_pdu>
sptr
;
35
36
/*!
37
* \brief Construct a tagged_stream_to_pdu block
38
* \param type PDU type of pdu::vector_type
39
* \param lengthtagname The name of the tag that specifies
40
* how long the packet is.
41
*/
42
static
sptr
make(
pdu::vector_type
type,
43
const
std::string& lengthtagname =
"packet_len"
);
44
};
45
46
}
/* namespace blocks */
47
}
/* namespace gr */
48
49
#endif
/* INCLUDED_BLOCKS_TAGGED_STREAM_TO_PDU_H */
gr::blocks::pdu::vector_type
vector_type
Definition:
pdu.h:22
api.h
BLOCKS_API
#define BLOCKS_API
Definition:
gr-blocks/include/gnuradio/blocks/api.h:18
tagged_stream_block.h
gr::blocks::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:30
pdu.h
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
gr::tagged_stream_block
Block that operates on PDUs in form of tagged streams.
Definition:
tagged_stream_block.h:25
gr::blocks::tagged_stream_to_pdu::sptr
std::shared_ptr< tagged_stream_to_pdu > sptr
Definition:
tagged_stream_to_pdu.h:34
gr-blocks
include
gnuradio
blocks
tagged_stream_to_pdu.h
Generated by
1.8.17