GNU Radio Manual and C++ API Reference
3.9.1.0
The Free & Open Software Radio Ecosystem
repetition_decoder.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2014 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio
6
*
7
* SPDX-License-Identifier: GPL-3.0-or-later
8
*
9
*/
10
11
#ifndef INCLUDED_FEC_REPETITION_DECODER_H
12
#define INCLUDED_FEC_REPETITION_DECODER_H
13
14
#include <
gnuradio/fec/api.h
>
15
#include <
gnuradio/fec/generic_decoder.h
>
16
#include <map>
17
#include <string>
18
19
namespace
gr
{
20
namespace
fec {
21
namespace
code {
22
23
/*!
24
* \brief Repetition Decoding class.
25
* \ingroup error_coding_blk
26
*
27
* \details
28
* A repetition decoder class. This takes a majority vote,
29
* biased by the \p ap_prob rate, and decides if the number of 1
30
* bits > ap_prob, it is a 1; else, it is a 0.
31
*/
32
class
FEC_API
repetition_decoder
:
virtual
public
generic_decoder
33
{
34
public
:
35
/*!
36
* Build a repetition decoding FEC API object.
37
*
38
* \param frame_size Number of bits per frame. If using in the
39
* tagged stream style, this is the maximum allowable
40
* number of bits per frame.
41
* \param rep Repetition rate; encoder rate is rep bits out
42
* for each input bit.
43
* \param ap_prob The a priori probability that a bit is a 1
44
* (generally, unless otherwise known, assume to be
45
* 0.5).
46
*/
47
static
generic_decoder::sptr
make(
int
frame_size,
int
rep,
float
ap_prob = 0.5);
48
49
/*!
50
* Sets the uncoded frame size to \p frame_size. If \p
51
* frame_size is greater than the value given to the
52
* constructor, the frame size will be capped by that initial
53
* value and this function will return false. Otherwise, it
54
* returns true.
55
*/
56
bool
set_frame_size(
unsigned
int
frame_size)
override
= 0;
57
58
/*!
59
* Returns the coding rate of this encoder (it will always be 1).
60
*/
61
double
rate()
override
= 0;
62
};
63
64
}
/* namespace code */
65
}
/* namespace fec */
66
}
/* namespace gr */
67
68
#endif
/* INCLUDED_FEC_REPETITION_DECODER_H */
api.h
gr::fec::code::repetition_decoder
Repetition Decoding class.
Definition:
repetition_decoder.h:32
FEC_API
#define FEC_API
Definition:
gr-fec/include/gnuradio/fec/api.h:18
gr::fec::generic_decoder::sptr
std::shared_ptr< generic_decoder > sptr
Definition:
generic_decoder.h:63
generic_decoder.h
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
gr::fec::generic_decoder
Parent class for FECAPI objects.
Definition:
generic_decoder.h:48
gr-fec
include
gnuradio
fec
repetition_decoder.h
Generated by
1.8.17