GNU Radio 3.7.3 C++ API
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  * GNU Radio is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  *
11  * GNU Radio is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with GNU Radio; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef INCLUDED_TAGGED_STREAM_MUX_H
23 #define INCLUDED_TAGGED_STREAM_MUX_H
24 
25 #include <gnuradio/blocks/api.h>
27 
28 namespace gr {
29  namespace blocks {
30 
31  /*!
32  * \brief Combines tagged streams.
33  * \ingroup stream_operators_blk
34  *
35  * \details
36  * Takes N streams as input. Each stream is tagged with packet lengths.
37  * Packets are output sequentially from each input stream.
38  *
39  * The output signal has a new length tag, which is the sum of all
40  * individual length tags. The old length tags are discarded.
41  *
42  * All other tags are propagated as expected, i.e. they stay associated
43  * with the same input item.
44  * There are cases when this behaviour is undesirable. One special case
45  * is when a tag at the first element (the head item) of one input port
46  * must stay on the head item of the output port. To achieve this,
47  * set \p tag_preserve_head_pos to the port that will receive these special
48  * tags.
49  */
51  {
52  public:
54 
55  /*!
56  * Make a tagged stream mux block.
57  *
58  * \param itemsize Items size (number of bytes per item)
59  * \param lengthtagname Length tag key
60  * \param tag_preserve_head_pos Preserves the head position of tags on this input port
61  */
62  static sptr make(size_t itemsize, const std::string &lengthtagname, unsigned int tag_preserve_head_pos=0);
63  };
64 
65  } // namespace blocks
66 } // namespace gr
67 
68 #endif /* INCLUDED_TAGGED_STREAM_MUX_H */
69 
Block that operates on PDUs in form of tagged streamsOverride work to provide the signal processing i...
Definition: tagged_stream_block.h:37
Combines tagged streams.
Definition: tagged_stream_mux.h:50
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:30
boost::shared_ptr< tagged_stream_mux > sptr
Definition: tagged_stream_mux.h:53
BLOCKS_API size_t itemsize(vector_type type)