GNU Radio C++ API Reference: delay.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
delay.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2007,2012-2013 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_DELAY_H
12#define INCLUDED_BLOCKS_DELAY_H
13
14#include <gnuradio/block.h>
15#include <gnuradio/blocks/api.h>
16
17namespace gr {
18namespace blocks {
19
20/*!
21 * \brief delay the input by a certain number of samples
22 * \ingroup misc_blk
23 *
24 * Positive delays insert zero items at the beginning of the stream.
25 * Negative delays discard items from the stream.
26 *
27 * You cannot initialize this block with a negative delay,
28 * however. That leads to a causality issue with the buffers when
29 * they are initialized. If you need to negetively delay one path,
30 * then put the positive delay on the other path instead.
31 */
32 class BLOCKS_API delay : virtual public block
33{
34public:
35 // gr::blocks::delay::sptr
36 typedef std::shared_ptr<delay> sptr;
37
38 /*!
39 * \brief Make a delay block.
40 * \param itemsize size of the data items.
41 * \param delay number of samples to delay stream (>= 0).
42 */
43 static sptr make(size_t itemsize, int delay);
44
45 virtual int dly() const = 0;
46
47 /*!
48 * \brief Reset the delay.
49 * \param d change the delay value. This can be a positive or
50 * negative value.
51 */
52 virtual void set_dly(int d) = 0;
53};
54
55} /* namespace blocks */
56} /* namespace gr */
57
58#endif /* INCLUDED_BLOCKS_DELAY_H */
gr::block::block
block(void)
Definition gnuradio-runtime/include/gnuradio/block.h:806
gr::blocks::delay
delay the input by a certain number of samples
Definition delay.h:33
gr::blocks::delay::sptr
std::shared_ptr< delay > sptr
Definition delay.h:36
gr::blocks::delay::dly
virtual int dly() const =0
gr::blocks::delay::set_dly
virtual void set_dly(int d)=0
Reset the delay.
gr::blocks::delay::make
static sptr make(size_t itemsize, int delay)
Make a delay block.
block.h
api.h
BLOCKS_API
#define BLOCKS_API
Definition gr-blocks/include/gnuradio/blocks/api.h:18
gr::blocks
Definition abs_blk.h:20
gr
GNU Radio logging wrapper.
Definition basic_block.h:29