GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
dummy_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_DUMMY_DECODER_H
12 #define INCLUDED_FEC_DUMMY_DECODER_H
13 
14 #include <gnuradio/fec/api.h>
16 #include <map>
17 #include <string>
18 
19 namespace gr {
20 namespace fec {
21 namespace code {
22 
23 /*!
24  * \brief Dummy Decoding class.
25  * \ingroup error_coding_blk
26  *
27  * \details
28  * A dummy decoder class that simply passes the input to the
29  * output. It is meant to allow us to easily use the FEC API
30  * encoder and decoder blocks in an application with no coding.
31  */
32 class FEC_API dummy_decoder : virtual public generic_decoder
33 {
34 public:
35  /*!
36  * Build a dummy 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  */
42  static generic_decoder::sptr make(int frame_size);
43 
44  /*!
45  * Sets the uncoded frame size to \p frame_size. If \p
46  * frame_size is greater than the value given to the
47  * constructor, the frame size will be capped by that initial
48  * value and this function will return false. Otherwise, it
49  * returns true.
50  */
51  bool set_frame_size(unsigned int frame_size) override = 0;
52 
53  /*!
54  * Returns the coding rate of this encoder (it will always be 1).
55  */
56  double rate() override = 0;
57 };
58 
59 } /* namespace code */
60 } /* namespace fec */
61 } /* namespace gr */
62 
63 #endif /* INCLUDED_FEC_DUMMY_DECODER_H */
Dummy Decoding class.
Definition: dummy_decoder.h:33
static generic_decoder::sptr make(int frame_size)
bool set_frame_size(unsigned int frame_size) override=0
double rate() override=0
Parent class for FECAPI objects.
Definition: generic_decoder.h:48
std::shared_ptr< generic_decoder > sptr
Definition: generic_decoder.h:62
#define FEC_API
Definition: gr-fec/include/gnuradio/fec/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29