GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
tagged_stream_multiply_length.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /* Copyright 2013 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_MULTIPLY_LENGTH_H
23 #define INCLUDED_TAGGED_STREAM_MULTIPLY_LENGTH_H
24 
25 #include <gnuradio/blocks/api.h>
27 
28 namespace gr {
29  namespace blocks {
30 
31  /*!
32  * \brief Allows scaling of a tagged stream length tag
33  * \ingroup stream_operators_blk
34  *
35  * \details
36  * Searches for a specific tagged stream length tag and multiplies
37  * that length by a constant - for constant rate change blocks
38  * in a tagged stream
39  */
41  {
42  public:
43  typedef boost::shared_ptr<tagged_stream_multiply_length> sptr;
44  virtual void set_scalar(double scalar) = 0;
45 
46  /*!
47  * Make a tagged stream multiply_length block.
48  *
49  * \param itemsize Items size (number of bytes per item)
50  * \param lengthtagname Length tag key
51  * \param scalar value to scale length tag values by
52  */
53  static sptr make(size_t itemsize, const std::string &lengthtagname, double scalar);
54  };
55 
56  } // namespace blocks
57 } // namespace gr
58 
59 #endif /* INCLUDED_TAGGED_STREAM_MULTIPLY_LENGTH_H */
60 
Include this header to use the message passing features.
Definition: logger.h:131
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:30
boost::shared_ptr< tagged_stream_multiply_length > sptr
Definition: tagged_stream_multiply_length.h:43
The abstract base class for all 'terminal' processing blocks.A signal processing flow is constructed ...
Definition: block.h:60
Allows scaling of a tagged stream length tag.
Definition: tagged_stream_multiply_length.h:40
BLOCKS_API size_t itemsize(vector_type type)