GNU Radio Manual and C++ API Reference  3.7.7
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dvb_bch_bb_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2015 Free Software Foundation, Inc.
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_DTV_DVB_BCH_BB_IMPL_H
22 #define INCLUDED_DTV_DVB_BCH_BB_IMPL_H
23 
25 #include "dvb_defines.h"
26 
27 namespace gr {
28  namespace dtv {
29 
30  class dvb_bch_bb_impl : public dvb_bch_bb
31  {
32  private:
33  unsigned int kbch;
34  unsigned int nbch;
35  unsigned int bch_code;
36  unsigned int m_poly_n_8[4];
37  unsigned int m_poly_n_10[5];
38  unsigned int m_poly_n_12[6];
39  unsigned int m_poly_s_12[6];
40  int poly_mult(const int*, int, const int*, int, int*);
41  void poly_pack(const int*, unsigned int*, int);
42  void poly_reverse(int*, int*, int);
43  inline void reg_4_shift(unsigned int*);
44  inline void reg_5_shift(unsigned int*);
45  inline void reg_6_shift(unsigned int*);
46  void bch_poly_build_tables(void);
47 
48  public:
51 
52  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
53 
54  int general_work(int noutput_items,
55  gr_vector_int &ninput_items,
56  gr_vector_const_void_star &input_items,
57  gr_vector_void_star &output_items);
58  };
59 
60  } // namespace dtv
61 } // namespace gr
62 
63 #endif /* INCLUDED_DTV_DVB_BCH_BB_IMPL_H */
64 
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
compute output items from input items
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
Estimate input requirements given output request.
dvb_bch_bb_impl(dvb_standard_t standard, dvb_framesize_t framesize, dvb_code_rate_t rate)
std::vector< const void * > gr_vector_const_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:38
Encodes a BCH ((Bose, Chaudhuri, Hocquenghem) FEC.
Definition: dvb_bch_bb.h:40
std::vector< void * > gr_vector_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:37
std::vector< int > gr_vector_int
Definition: gnuradio-runtime/include/gnuradio/types.h:33
Include this header to use the message passing features.
Definition: logger.h:129
dvb_standard_t
Definition: dvb_config.h:26
Definition: dvb_bch_bb_impl.h:30
dvb_framesize_t
Definition: dvb_config.h:75
dvb_code_rate_t
Definition: dvb_config.h:31