GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
gr-trellis/include/gnuradio/trellis/encoder.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004,2012,2018 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 ENCODER_H
12 #define ENCODER_H
13 
14 #include <gnuradio/sync_block.h>
15 #include <gnuradio/trellis/api.h>
16 #include <gnuradio/trellis/fsm.h>
17 #include <cstdint>
18 
19 namespace gr {
20 namespace trellis {
21 
22 /*!
23  * \brief Convolutional encoder.
24  * \ingroup trellis_coding_blk
25  */
26 template <class IN_T, class OUT_T>
27 class TRELLIS_API encoder : virtual public sync_block
28 {
29 public:
30  typedef std::shared_ptr<encoder<IN_T, OUT_T>> sptr;
31 
32  static sptr make(const fsm& FSM, int ST, int K = 0);
33 
34  virtual fsm FSM() const = 0;
35  virtual int ST() const = 0;
36  virtual int K() const = 0;
37  virtual void set_FSM(const fsm& FSM) = 0;
38  virtual void set_ST(int ST) = 0;
39  virtual void set_K(int K) = 0;
40 };
47 
48 } /* namespace trellis */
49 } /* namespace gr */
50 
51 #endif /* ENCODER_H */
synchronous 1:1 input to output with history
Definition: sync_block.h:26
Convolutional encoder.
Definition: gr-trellis/include/gnuradio/trellis/encoder.h:28
virtual void set_FSM(const fsm &FSM)=0
virtual void set_K(int K)=0
virtual int ST() const =0
virtual int K() const =0
static sptr make(const fsm &FSM, int ST, int K=0)
virtual void set_ST(int ST)=0
virtual fsm FSM() const =0
std::shared_ptr< encoder< IN_T, OUT_T > > sptr
Definition: gr-trellis/include/gnuradio/trellis/encoder.h:30
Finite State Machine Specification class.
Definition: fsm.h:33
#define TRELLIS_API
Definition: gr-trellis/include/gnuradio/trellis/api.h:18
encoder< std::uint8_t, std::uint8_t > encoder_bb
Definition: gr-trellis/include/gnuradio/trellis/encoder.h:41
encoder< std::uint8_t, std::int32_t > encoder_bi
Definition: gr-trellis/include/gnuradio/trellis/encoder.h:43
encoder< std::int32_t, std::int32_t > encoder_ii
Definition: gr-trellis/include/gnuradio/trellis/encoder.h:46
encoder< std::uint8_t, std::int16_t > encoder_bs
Definition: gr-trellis/include/gnuradio/trellis/encoder.h:42
encoder< std::int16_t, std::int16_t > encoder_ss
Definition: gr-trellis/include/gnuradio/trellis/encoder.h:44
encoder< std::int16_t, std::int32_t > encoder_si
Definition: gr-trellis/include/gnuradio/trellis/encoder.h:45
GNU Radio logging wrapper.
Definition: basic_block.h:29