GNU Radio 3.6.2 C++ API
trellis_siso_combined_f.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004 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 INCLUDED_TRELLIS_SISO_COMBINED_F_H
24 #define INCLUDED_TRELLIS_SISO_COMBINED_F_H
25 
26 #include <trellis_api.h>
27 #include "fsm.h"
28 #include "siso_type.h"
29 #include "calc_metric.h"
30 #include "core_algorithms.h"
31 #include <gr_block.h>
32 
35 
37  const fsm &FSM, // underlying FSM
38  int K, // block size in trellis steps
39  int S0, // initial state (put -1 if not specified)
40  int SK, // final state (put -1 if not specified)
41  bool POSTI, // true if you want a-posteriori info about the input symbols to be mux-ed in the output
42  bool POSTO, // true if you want a-posteriori info about the output symbols to be mux-ed in the output
43  trellis_siso_type_t d_SISO_TYPE, // perform "min-sum" or "sum-product" combining
44  int D,
45  const std::vector<float> &TABLE,
47 );
48 
49 /*!
50  * \ingroup coding_blk
51  */
53 {
54  fsm d_FSM;
55  int d_K;
56  int d_S0;
57  int d_SK;
58  bool d_POSTI;
59  bool d_POSTO;
60  trellis_siso_type_t d_SISO_TYPE;
61  int d_D;
62  std::vector<float> d_TABLE;
63  trellis_metric_type_t d_TYPE;
64  //std::vector<float> d_alpha;
65  //std::vector<float> d_beta;
66 
68  const fsm &FSM,
69  int K,
70  int S0,
71  int SK,
72  bool POSTI,
73  bool POSTO,
74  trellis_siso_type_t d_SISO_TYPE,
75  int D,
76  const std::vector<float> &TABLE,
78 
79 
81  const fsm &FSM,
82  int K,
83  int S0,
84  int SK,
85  bool POSTI,
86  bool POSTO,
87  trellis_siso_type_t d_SISO_TYPE,
88  int D,
89  const std::vector<float> &TABLE,
91 
92 
93 public:
94  fsm FSM () const { return d_FSM; }
95  int K () const { return d_K; }
96  int S0 () const { return d_S0; }
97  int SK () const { return d_SK; }
98  bool POSTI () const { return d_POSTI; }
99  bool POSTO () const { return d_POSTO; }
100  trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; }
101  int D () const { return d_D; }
102  std::vector<float> TABLE () const { return d_TABLE; }
103  trellis_metric_type_t TYPE () const { return d_TYPE; }
104  void forecast (int noutput_items,
105  gr_vector_int &ninput_items_required);
106  int general_work (int noutput_items,
107  gr_vector_int &ninput_items,
108  gr_vector_const_void_star &input_items,
109  gr_vector_void_star &output_items);
110 };
111 
112 #endif