GNU Radio 3.6.5 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* Copyright 2012 Free Software Foundation, Inc. 00003 * 00004 * This file is part of GNU Radio 00005 * 00006 * GNU Radio is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 3, or (at your option) 00009 * any later version. 00010 * 00011 * GNU Radio is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with GNU Radio; see the file COPYING. If not, write to 00018 * the Free Software Foundation, Inc., 51 Franklin Street, 00019 * Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef INCLUDED_TAGGED_STREAM_MUX_H 00023 #define INCLUDED_TAGGED_STREAM_MUX_H 00024 00025 #include <blocks/api.h> 00026 #include <gr_tagged_stream_block.h> 00027 00028 namespace gr { 00029 namespace blocks { 00030 00031 /*! 00032 * \brief Combines tagged streams. 00033 * \ingroup stream_operators_blk 00034 * 00035 * \details 00036 * Takes N streams as input. Each stream is tagged with packet lengths. 00037 * Packets are output sequentially from each input stream. 00038 * 00039 * The output signal has a new length tag, which is the sum of all 00040 * individual length tags. The old length tags are discarded. 00041 * 00042 * All other tags are propagated as expected, i.e. they stay associated 00043 * with the same input item. 00044 */ 00045 class BLOCKS_API tagged_stream_mux : virtual public gr_tagged_stream_block 00046 { 00047 public: 00048 typedef boost::shared_ptr<tagged_stream_mux> sptr; 00049 00050 /*! 00051 * Make a tagged stream mux block. 00052 * 00053 * \param itemsize Items size (number of bytes per item) 00054 * \param lengthtagname Length tag key 00055 */ 00056 static sptr make(size_t itemsize, const std::string &lengthtagname); 00057 }; 00058 00059 } // namespace blocks 00060 } // namespace gr 00061 00062 #endif /* INCLUDED_TAGGED_STREAM_MUX_H */ 00063