GNU Radio Manual and C++ API Reference 3.8.5.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
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 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
10 * any later version.
11 *
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef ENCODER_H
24#define ENCODER_H
25
26#include <gnuradio/sync_block.h>
29#include <cstdint>
30
31namespace gr {
32namespace trellis {
33
34/*!
35 * \brief Convolutional encoder.
36 * \ingroup trellis_coding_blk
37 */
38template <class IN_T, class OUT_T>
39class TRELLIS_API encoder : virtual public sync_block
40{
41public:
42 typedef boost::shared_ptr<encoder<IN_T, OUT_T>> sptr;
43
44 static sptr make(const fsm& FSM, int ST);
45
46 static sptr make(const fsm& FSM, int ST, int K);
47
48 virtual fsm FSM() const = 0;
49 virtual int ST() const = 0;
50 virtual int K() const = 0;
51 virtual void set_FSM(const fsm& FSM) = 0;
52 virtual void set_ST(int ST) = 0;
53 virtual void set_K(int K) = 0;
54};
61
62} /* namespace trellis */
63} /* namespace gr */
64
65#endif /* ENCODER_H */
synchronous 1:1 input to output with history
Definition sync_block.h:38
Convolutional encoder.
Definition gr-trellis/include/gnuradio/trellis/encoder.h:40
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)
virtual void set_ST(int ST)=0
boost::shared_ptr< encoder< IN_T, OUT_T > > sptr
Definition gr-trellis/include/gnuradio/trellis/encoder.h:42
virtual fsm FSM() const =0
static sptr make(const fsm &FSM, int ST, int K)
Finite State Machine Specification class.
Definition fsm.h:45
#define TRELLIS_API
Definition gr-trellis/include/gnuradio/trellis/api.h:30
encoder< std::uint8_t, std::uint8_t > encoder_bb
Definition gr-trellis/include/gnuradio/trellis/encoder.h:55
encoder< std::uint8_t, std::int32_t > encoder_bi
Definition gr-trellis/include/gnuradio/trellis/encoder.h:57
encoder< std::int32_t, std::int32_t > encoder_ii
Definition gr-trellis/include/gnuradio/trellis/encoder.h:60
encoder< std::uint8_t, std::int16_t > encoder_bs
Definition gr-trellis/include/gnuradio/trellis/encoder.h:56
encoder< std::int16_t, std::int16_t > encoder_ss
Definition gr-trellis/include/gnuradio/trellis/encoder.h:58
encoder< std::int16_t, std::int32_t > encoder_si
Definition gr-trellis/include/gnuradio/trellis/encoder.h:59
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition basic_block.h:46