Loading...
Searching...
No Matches
ldpc_gen_mtrx_encoder.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2015 Free Software Foundation, Inc.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_H
#define INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_H
#include <gnuradio/fec/api.h>
#include <gnuradio/fec/generic_encoder.h>
#include <gnuradio/fec/ldpc_G_matrix.h>
namespace gr {
namespace fec {
namespace code {
/*!
* \brief LDPC generator matrix encoder
* \ingroup error_coding_blk
*
* \details
* A standard encoder class. This method is discussed in many
* textbooks; one is: Turbo Coding for Satellite and Wireless
* Communications by Soleymani, Gao, and Vilaipornsawai.
* Given a generator matrix in systematic form,
* \f$\mathbf{G}=\left[\mathbf{I}_{k}|\mathbf{P}\right]\f$,
* where \f$\mathbf{I}_{k}\f$ is the identity matrix and
* \f$\mathbf{P}\f$ is the parity submatrix, the information
* word \f$\bar{s}\f$ is encoded into a codeword
* \f$\overline{x}\f$ via:
* \f[\overline{x}=\mathbf{G}^{T}\bar{s}\f]
*/
class FEC_API ldpc_gen_mtrx_encoder : virtual public generic_encoder
{
public:
/*!
* \brief Build an encoding FEC API object.
* \param G_obj The ldpc_G_matrix object to use for
* encoding.
*/
static generic_encoder::sptr make(const code::ldpc_G_matrix::sptr G_obj);
/*!
* \brief Sets the uncoded frame size to \p frame_size.
* \details
* 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.
*/
bool set_frame_size(unsigned int frame_size) override = 0;
//! Returns the coding rate of this encoder.
double rate() override = 0;
};
} /* namespace code */
} /* namespace fec */
} /* namespace gr */
#endif /* INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_H */
gr::fec::code::ldpc_G_matrix::sptr
std::shared_ptr< ldpc_G_matrix > sptr
Definition ldpc_G_matrix.h:46
gr::fec::code::ldpc_gen_mtrx_encoder
LDPC generator matrix encoder.
Definition ldpc_gen_mtrx_encoder.h:37
gr::fec::code::ldpc_gen_mtrx_encoder::set_frame_size
bool set_frame_size(unsigned int frame_size) override=0
Sets the uncoded frame size to frame_size.
gr::fec::code::ldpc_gen_mtrx_encoder::make
static generic_encoder::sptr make(const code::ldpc_G_matrix::sptr G_obj)
Build an encoding FEC API object.
gr::fec::code::ldpc_gen_mtrx_encoder::rate
double rate() override=0
Returns the coding rate of this encoder.
gr::fec::generic_encoder::sptr
std::shared_ptr< generic_encoder > sptr
Definition generic_encoder.h:37
gr::fec::generic_encoder::generic_encoder
generic_encoder(void)
Definition generic_encoder.h:119
generic_encoder.h
api.h
FEC_API
#define FEC_API
Definition gr-fec/include/gnuradio/fec/api.h:18
ldpc_G_matrix.h
gr::fec::code
Definition cc_decoder.h:22
gr::fec
Definition async_decoder.h:20
gr
GNU Radio logging wrapper.
Definition basic_block.h:29