gr-baz Package
baz_keep_one_in_n.h
Go to the documentation of this file.
1 
2 /* -*- c++ -*- */
3 /*
4  * Copyright 2012 Free Software Foundation, Inc.
5  *
6  * This file is part of GNU Radio
7  *
8  * GNU Radio is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3, or (at your option)
11  * any later version.
12  *
13  * GNU Radio is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with GNU Radio; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 51 Franklin Street,
21  * Boston, MA 02110-1301, USA.
22  */
23 
24 #ifndef INCLUDED_BAZ_KEEP_ONE_IN_N_H
25 #define INCLUDED_BAZ_KEEP_ONE_IN_N_H
26 
27 #include <gnuradio/block.h>
28 
29 namespace gr {
30  namespace baz {
31 
32  /*!
33  * \brief decimate a stream, keeping one item out of every \p n.
34  * \ingroup stream_operators_blk
35  */
36  class BAZ_API keep_one_in_n : virtual public block
37  {
38  public:
39 
40  // gr::blocks::keep_one_in_n::sptr
41  typedef boost::shared_ptr<keep_one_in_n> sptr;
42 
43  /*!
44  * Make a keep one in n block.
45  *
46  * \param itemsize stream itemsize
47  * \param n block size in items
48  */
49  static sptr make(size_t itemsize, int n, bool verbose = false);
50 
51  virtual void set_n(int n) = 0;
52  };
53 
54  } /* namespace baz */
55 } /* namespace gr */
56 
57 #endif /* INCLUDED_BAZ_KEEP_ONE_IN_N_H */
decimate a stream, keeping one item out of every n.
Definition: baz_keep_one_in_n.h:36
Definition: baz_additive_scrambler_bb.h:28
#define BAZ_API
Definition: config.h:8
boost::shared_ptr< keep_one_in_n > sptr
Definition: baz_keep_one_in_n.h:41