gr-baz Package

baz_delay.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2007,2013 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
10 * any later version.
11 *
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 */
22
23/*
24 * gr-baz by Balint Seeber (http://spench.net/contact)
25 * Information, documentation & samples: http://wiki.spench.net/wiki/gr-baz
26 */
27
28#ifndef INCLUDED_BAZ_DELAY_H
29#define INCLUDED_BAZ_DELAY_H
30
31#include <gnuradio/sync_block.h>
32#include <boost/thread.hpp>
33
34 class BAZ_API baz_delay;
35 typedef boost::shared_ptr<baz_delay> baz_delay_sptr;
36
37 BAZ_API baz_delay_sptr baz_make_delay (size_t itemsize, int delay);
38
39/*!
40 * \brief delay the input by a certain number of samples
41 * \ingroup misc_blk
42 */
43 class BAZ_API baz_delay : public gr::block
44{
45 friend BAZ_API baz_delay_sptr baz_make_delay (size_t itemsize, int delay);
46
47 baz_delay (size_t itemsize, int delay);
48
49 boost::mutex d_mutex;
50 size_t d_itemsize;
51 int d_delay;
52 int d_new_delay;
53 bool d_update;
54
55 public:
56 int delay () const { return d_delay; }
57 void set_delay (int delay);
58
59 void forecast(int noutput_items, gr_vector_int &ninput_items_required);
60 int general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
61};
62
63#endif
BAZ_API
#define BAZ_API
Definition api.h:19
baz_make_delay
BAZ_API baz_delay_sptr baz_make_delay(size_t itemsize, int delay)
baz_delay
class BAZ_API baz_delay
Definition baz_delay.h:34
baz_delay
delay the input by a certain number of samples
Definition baz_delay.h:44
baz_delay::baz_make_delay
friend BAZ_API baz_delay_sptr baz_make_delay(size_t itemsize, int delay)
baz_delay::delay
int delay() const
Definition baz_delay.h:56
baz_delay::forecast
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
baz_delay::set_delay
void set_delay(int delay)
baz_delay::general_work
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)