GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
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  * SPDX-License-Identifier: GPL-3.0-or-later
7  *
8  */
9 
10 #ifndef INCLUDED_TAGGED_STREAM_MULTIPLY_LENGTH_H
11 #define INCLUDED_TAGGED_STREAM_MULTIPLY_LENGTH_H
12 
13 #include <gnuradio/blocks/api.h>
15 
16 namespace gr {
17 namespace blocks {
18 
19 /*!
20  * \brief Allows scaling of a tagged stream length tag
21  * \ingroup stream_operators_blk
22  *
23  * \details
24  * Searches for a specific tagged stream length tag and multiplies
25  * that length by a constant - for constant rate change blocks
26  * in a tagged stream
27  */
29 {
30 public:
31  typedef std::shared_ptr<tagged_stream_multiply_length> sptr;
32  virtual void set_scalar(double scalar) = 0;
33 
34  /*!
35  * Make a tagged stream multiply_length block.
36  *
37  * \param itemsize Items size (number of bytes per item)
38  * \param lengthtagname Length tag key
39  * \param scalar value to scale length tag values by
40  */
41  static sptr make(size_t itemsize, const std::string& lengthtagname, double scalar);
42 };
43 
44 } // namespace blocks
45 } // namespace gr
46 
47 #endif /* INCLUDED_TAGGED_STREAM_MULTIPLY_LENGTH_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
Allows scaling of a tagged stream length tag.
Definition: tagged_stream_multiply_length.h:29
virtual void set_scalar(double scalar)=0
static sptr make(size_t itemsize, const std::string &lengthtagname, double scalar)
std::shared_ptr< tagged_stream_multiply_length > sptr
Definition: tagged_stream_multiply_length.h:31
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GR_RUNTIME_API size_t itemsize(types::vector_type type)
GNU Radio logging wrapper.
Definition: basic_block.h:29