GNU Radio's DAB Package
puncture_bb_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2017 Moritz Luca Schmid, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT).
4  *
5  * This is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * This software is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this software; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_DAB_PUNCTURE_BB_IMPL_H
22 #define INCLUDED_DAB_PUNCTURE_BB_IMPL_H
23 
24 #include <grdab/puncture_bb.h>
25 
26 namespace gr {
27  namespace dab {
28 /*! \brief puncturing of a stream sequence
29  *
30  * puncturing of a stream sequence according to the puncturing_vector (writing a stream element at a '1' and skip element at a '0')
31  *
32  * @param puncturing_vector vector with puncturing sequence, length of puncturing_vector is length of a input stream sequence
33  *
34  */
35  class puncture_bb_impl : public puncture_bb {
36  private:
37  unsigned int ones(const std::vector<unsigned char> &puncturing_vector);
38 
39  std::vector<unsigned char> d_puncturing_vector;
40  unsigned int d_vlen_in;
41  unsigned int d_vlen_out;
42 
43  public:
44  puncture_bb_impl(const std::vector<unsigned char> &puncturing_vector);
45 
47 
48  // Where all the action really happens
49  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
50 
51  int general_work(int noutput_items,
52  gr_vector_int &ninput_items,
53  gr_vector_const_void_star &input_items,
54  gr_vector_void_star &output_items);
55  };
56 
57  } // namespace dab
58 } // namespace gr
59 
60 #endif /* INCLUDED_DAB_PUNCTURE_BB_IMPL_H */
61 
puncture_bb.h
gr::dab::puncture_bb_impl
puncturing of a stream sequence
Definition: puncture_bb_impl.h:35
gr::dab::puncture_bb_impl::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)
gr::dab::puncture_bb
puncturing of a stream sequence
Definition: puncture_bb.h:34
gr::dab::puncture_bb_impl::forecast
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
gr
Definition: complex_to_interleaved_float_vcf.h:28
gr::dab::puncture_bb_impl::~puncture_bb_impl
~puncture_bb_impl()
gr::dab::puncture_bb_impl::puncture_bb_impl
puncture_bb_impl(const std::vector< unsigned char > &puncturing_vector)