GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
repeat.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2012 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_BLOCKS_REPEAT_H
12#define INCLUDED_BLOCKS_REPEAT_H
13
14#include <gnuradio/blocks/api.h>
16
17namespace gr {
18namespace blocks {
19
20/*!
21 * \brief repeat each input \p repeat times
22 * \ingroup stream_operators_blk
23 *
24 * Message Ports:
25 * * interpolation (in):
26 * Takes a pmt_pair(pmt::mp("interpolation"), pmt_long interp), setting the
27 * interpolation to interp.
28 */
29class BLOCKS_API repeat : virtual public sync_interpolator
30{
31public:
32 // gr::blocks::repeat::sptr
33 typedef std::shared_ptr<repeat> sptr;
34
35 /*!
36 * Make a repeat block.
37 *
38 * \param itemsize stream itemsize
39 * \param repeat number of times to repeat the input
40 */
41 static sptr make(size_t itemsize, int repeat);
42
43 /*!
44 * \brief Return current interpolation
45 */
46 virtual int interpolation() const = 0;
47
48 /*!
49 * \brief sets the interpolation
50 *
51 * Call this method in a callback to adjust the interpolation at run time.
52 *
53 * \param interp interpolation to be set
54 */
55 virtual void set_interpolation(int interp) = 0;
56};
57
58} /* namespace blocks */
59} /* namespace gr */
60
61#endif /* INCLUDED_BLOCKS_REPEAT_H */
repeat each input repeat times
Definition: repeat.h:30
std::shared_ptr< repeat > sptr
Definition: repeat.h:33
virtual void set_interpolation(int interp)=0
sets the interpolation
virtual int interpolation() const =0
Return current interpolation.
static sptr make(size_t itemsize, int repeat)
synchronous 1:N input to output with history
Definition: sync_interpolator.h:26
#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