GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ldpc_gen_mtrx_encoder.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
7  * by the Free Software Foundation; either version 3, or (at your
8  * option) 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_FEC_LDPC_GEN_MTRX_ENCODER_H
22 #define INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_H
23 
24 #include <gnuradio/fec/api.h>
27 
28 namespace gr {
29  namespace fec {
30  namespace code {
31 
32  /*!
33  * \brief LDPC generator matrix encoder
34  * \ingroup error_coding_blk
35  *
36  * \details
37  * A standard encoder class. This method is discussed in many
38  * textbooks; one is: Turbo Coding for Satellite and Wireless
39  * Communications by Soleymani, Gao, and Vilaipornsawai.
40  * Given a generator matrix in systematic form,
41  * \f$\mathbf{G}=\left[\mathbf{I}_{k}|\mathbf{P}\right]\f$,
42  * where \f$\mathbf{I}_{k}\f$ is the identity matrix and
43  * \f$\mathbf{P}\f$ is the parity submatrix, the information
44  * word \f$\bar{s}\f$ is encoded into a codeword
45  * \f$\overline{x}\f$ via:
46  * \f[\overline{x}=\mathbf{G}^{T}\bar{s}\f]
47  */
49  {
50  public:
51  /*!
52  * \brief Build an encoding FEC API object.
53  * \param G_obj The ldpc_G_matrix object to use for
54  * encoding.
55  */
56  static generic_encoder::sptr make(const code::ldpc_G_matrix::sptr G_obj);
57 
58  /*!
59  * \brief Sets the uncoded frame size to \p frame_size.
60  * \details
61  * Sets the uncoded frame size to \p frame_size. If \p
62  * frame_size is greater than the value given to the
63  * constructor, the frame size will be capped by that initial
64  * value and this function will return false. Otherwise, it
65  * returns true.
66  */
67  virtual bool set_frame_size(unsigned int frame_size) = 0;
68 
69  //! Returns the coding rate of this encoder.
70  virtual double rate() = 0;
71  };
72  } /* namespace code */
73  } /* namespace fec */
74 } /* namespace gr */
75 
76 #endif /* INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_H */
Include this header to use the message passing features.
Definition: logger.h:131
Definition: generic_encoder.h:34
boost::shared_ptr< generic_encoder > sptr
Definition: generic_encoder.h:49
#define FEC_API
Definition: gr-fec/include/gnuradio/fec/api.h:30
LDPC generator matrix encoder.
Definition: ldpc_gen_mtrx_encoder.h:48
boost::shared_ptr< ldpc_G_matrix > sptr
Definition: ldpc_G_matrix.h:58