GNU Radio Manual and C++ API Reference
3.9.1.0
The Free & Open Software Radio Ecosystem
repetition_encoder.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_ENCODER_H
12
#define INCLUDED_FEC_REPETITION_ENCODER_H
13
14
#include <
gnuradio/fec/api.h
>
15
#include <
gnuradio/fec/encoder.h
>
16
#include <map>
17
#include <string>
18
19
namespace
gr
{
20
namespace
fec {
21
namespace
code {
22
23
/*!
24
* \brief Repetition Encoding class.
25
* \ingroup error_coding_blk
26
*
27
* \details
28
* A repetition encoder class that repeats each input bit \p rep
29
* times. To decode, take a majority vote over the number of
30
* repetitions.
31
*/
32
class
FEC_API
repetition_encoder
:
virtual
public
generic_encoder
33
{
34
public
:
35
/*!
36
* Build a repetition encoding 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
*/
44
static
generic_encoder::sptr
make(
int
frame_size,
int
rep);
45
46
/*!
47
* Sets the uncoded frame size to \p frame_size. If \p
48
* frame_size is greater than the value given to the
49
* constructor, the frame size will be capped by that initial
50
* value and this function will return false. Otherwise, it
51
* returns true.
52
*/
53
bool
set_frame_size(
unsigned
int
frame_size)
override
= 0;
54
55
/*!
56
* Returns the coding rate of this encoder.
57
*/
58
double
rate()
override
= 0;
59
};
60
61
}
/* namespace code */
62
}
/* namespace fec */
63
}
/* namespace gr */
64
65
#endif
/* INCLUDED_FEC_REPETITION_ENCODER_H */
api.h
gr::fec::generic_encoder::sptr
std::shared_ptr< generic_encoder > sptr
Definition:
generic_encoder.h:37
FEC_API
#define FEC_API
Definition:
gr-fec/include/gnuradio/fec/api.h:18
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
gr::fec::code::repetition_encoder
Repetition Encoding class.
Definition:
repetition_encoder.h:32
encoder.h
gr::fec::generic_encoder
Definition:
generic_encoder.h:22
gr-fec
include
gnuradio
fec
repetition_encoder.h
Generated by
1.8.17