GNU Radio Manual and C++ API Reference
3.9.1.0
The Free & Open Software Radio Ecosystem
tagged_stream_mux.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_TAGGED_STREAM_MUX_H
11
#define INCLUDED_TAGGED_STREAM_MUX_H
12
13
#include <
gnuradio/blocks/api.h
>
14
#include <
gnuradio/tagged_stream_block.h
>
15
16
namespace
gr
{
17
namespace
blocks {
18
19
/*!
20
* \brief Combines tagged streams.
21
* \ingroup stream_operators_blk
22
*
23
* \details
24
* Takes N streams as input. Each stream is tagged with packet lengths.
25
* Packets are output sequentially from each input stream.
26
*
27
* The output signal has a new length tag, which is the sum of all
28
* individual length tags. The old length tags are discarded.
29
*
30
* All other tags are propagated as expected, i.e. they stay associated
31
* with the same input item.
32
* There are cases when this behaviour is undesirable. One special case
33
* is when a tag at the first element (the head item) of one input port
34
* must stay on the head item of the output port. To achieve this,
35
* set \p tag_preserve_head_pos to the port that will receive these special
36
* tags.
37
*/
38
class
BLOCKS_API
tagged_stream_mux
:
virtual
public
tagged_stream_block
39
{
40
public
:
41
typedef
std::shared_ptr<tagged_stream_mux>
sptr
;
42
43
/*!
44
* Make a tagged stream mux block.
45
*
46
* \param itemsize Items size (number of bytes per item)
47
* \param lengthtagname Length tag key
48
* \param tag_preserve_head_pos Preserves the head position of tags on this input port
49
*/
50
static
sptr
make(
size_t
itemsize
,
51
const
std::string& lengthtagname,
52
unsigned
int
tag_preserve_head_pos = 0);
53
};
54
55
}
// namespace blocks
56
}
// namespace gr
57
58
#endif
/* INCLUDED_TAGGED_STREAM_MUX_H */
api.h
gr::blocks::pdu::itemsize
BLOCKS_API size_t itemsize(vector_type type)
gr::blocks::tagged_stream_mux::sptr
std::shared_ptr< tagged_stream_mux > sptr
Definition:
tagged_stream_mux.h:41
BLOCKS_API
#define BLOCKS_API
Definition:
gr-blocks/include/gnuradio/blocks/api.h:18
tagged_stream_block.h
gr::blocks::tagged_stream_mux
Combines tagged streams.
Definition:
tagged_stream_mux.h:38
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
include
gnuradio
blocks
tagged_stream_mux.h
Generated by
1.8.17