Loading...
Searching...
No Matches
ldpc_decoder.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2015 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_LDPC_DECODER_H
#define INCLUDED_LDPC_DECODER_H
typedef float INPUT_DATATYPE;
typedef unsigned char OUTPUT_DATATYPE;
#include <gnuradio/fec/decoder.h>
#include <map>
#include <string>
#include <vector>
#include <gnuradio/fec/alist.h>
#include <gnuradio/fec/awgn_bp.h>
#include <gnuradio/fec/cldpc.h>
namespace gr {
namespace fec {
#define MAXLOG 1e7
class FEC_API ldpc_decoder : public generic_decoder
{
private:
// private constructor
ldpc_decoder(std::string alist_file, int max_iterations);
// plug into the generic fec api
int get_history() override;
float get_shift() override;
const char* get_conversion();
void generic_work(const void* inBuffer, void* outbuffer) override;
float d_iterations;
int d_input_size, d_output_size;
double d_rate;
alist d_list;
cldpc d_code;
awgn_bp d_spa;
public:
~ldpc_decoder() override;
double rate() override;
bool set_frame_size(unsigned int frame_size) override;
static generic_decoder::sptr make(std::string alist_file, int max_iterations = 50);
int get_output_size() override;
int get_input_size() override;
int get_input_item_size() override;
int get_output_item_size() override;
float get_iterations() override { return d_iterations; }
};
} // namespace fec
} // namespace gr
#endif /* INCLUDED_LDPC_DECODER_H */
alist.h
awgn_bp.h
alist
Definition alist.h:33
awgn_bp
Definition awgn_bp.h:34
cldpc
Definition cldpc.h:23
gr::fec::generic_decoder::generic_decoder
generic_decoder(void)
Definition generic_decoder.h:64
gr::fec::generic_decoder::sptr
std::shared_ptr< generic_decoder > sptr
Definition generic_decoder.h:62
gr::fec::ldpc_decoder::~ldpc_decoder
~ldpc_decoder() override
gr::fec::ldpc_decoder::make
static generic_decoder::sptr make(std::string alist_file, int max_iterations=50)
gr::fec::ldpc_decoder::rate
double rate() override
gr::fec::ldpc_decoder::set_frame_size
bool set_frame_size(unsigned int frame_size) override
gr::fec::ldpc_decoder::get_input_item_size
int get_input_item_size() override
gr::fec::ldpc_decoder::get_iterations
float get_iterations() override
Definition ldpc_decoder.h:63
gr::fec::ldpc_decoder::get_output_item_size
int get_output_item_size() override
gr::fec::ldpc_decoder::get_input_size
int get_input_size() override
gr::fec::ldpc_decoder::get_output_size
int get_output_size() override
cldpc.h
decoder.h
FEC_API
#define FEC_API
Definition gr-fec/include/gnuradio/fec/api.h:18
INPUT_DATATYPE
float INPUT_DATATYPE
Definition ldpc_decoder.h:14
OUTPUT_DATATYPE
unsigned char OUTPUT_DATATYPE
Definition ldpc_decoder.h:15
gr
GNU Radio logging wrapper.
Definition basic_block.h:29