diff options
author | tracierenea <tracie.perez@mavs.uta.edu> | 2014-06-30 16:17:18 -0500 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2015-10-15 10:40:21 -0400 |
commit | 3d3ab6009246e2348c46acc692eb0147b82af0ea (patch) | |
tree | c18da3c033c7d6949f96746bd81da818db18f147 /gr-fec/include | |
parent | 6f0cc2616674c3a0bb77cf657724f23a8260dae5 (diff) |
fec: LDPC: Adding LDPC encoder variable.
Diffstat (limited to 'gr-fec/include')
-rw-r--r-- | gr-fec/include/gnuradio/fec/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gr-fec/include/gnuradio/fec/ldpc_R_U_encoder.h | 71 |
2 files changed, 72 insertions, 0 deletions
diff --git a/gr-fec/include/gnuradio/fec/CMakeLists.txt b/gr-fec/include/gnuradio/fec/CMakeLists.txt index 93143e4ed5..861c4c2beb 100644 --- a/gr-fec/include/gnuradio/fec/CMakeLists.txt +++ b/gr-fec/include/gnuradio/fec/CMakeLists.txt @@ -54,6 +54,7 @@ install(FILES polar_decoder_common.h ldpc_par_chk_mtrx.h ldpc_bit_flip_decoder.h + ldpc_R_U_encoder.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec COMPONENT "fec_devel" ) diff --git a/gr-fec/include/gnuradio/fec/ldpc_R_U_encoder.h b/gr-fec/include/gnuradio/fec/ldpc_R_U_encoder.h new file mode 100644 index 0000000000..90378d56c1 --- /dev/null +++ b/gr-fec/include/gnuradio/fec/ldpc_R_U_encoder.h @@ -0,0 +1,71 @@ +/* -*- c++ -*- */ +/* + * Copyright 2013-2014 Free Software Foundation, Inc. + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 3, or (at your + * option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifndef INCLUDED_FEC_LDPC_R_U_ENCODER_H +#define INCLUDED_FEC_LDPC_R_U_ENCODER_H + +#include <gnuradio/fec/api.h> +#include <gnuradio/fec/generic_encoder.h> +#include <gnuradio/fec/ldpc_par_chk_mtrx.h> + +namespace gr { + namespace fec { + namespace code { + + /*! + * \brief LDPC Generic Encoder (method by Richardson & Urbanke) + * \ingroup error_coding_blk + * + * \details + * A generic LDPC encoder class. This encoding method is + * described by Richardson and Urbanke in Appendix A of their + * book Modern Coding Theory (ISBN 978-0-521-85229-6). + */ + class FEC_API ldpc_R_U_encoder : virtual public generic_encoder + { + public: + /*! + * Build an encoding FEC API object. + * + * \param H_obj The LDPC parity check matrix object to use + * for encoding. This is the same matrix used for + * decoding. + */ + static generic_encoder::sptr make(ldpc_par_chk_mtrx *H_obj); + + /*! + * Sets the uncoded frame size to \p frame_size. If \p + * frame_size is greater than the value given to the + * constructor, the frame size will be capped by that initial + * value and this function will return false. Otherwise, it + * returns true. + */ + virtual bool set_frame_size(unsigned int frame_size) = 0; + + /*! + * Returns the coding rate of this encoder. + */ + virtual double rate() = 0; + }; + } /* namespace code */ + } /* namespace fec */ +} /* namespace gr */ + +#endif /* INCLUDED_FEC_LDPC_R_U_ENCODER_H */
\ No newline at end of file |