Houston, we have a trunk.
[debian/gnuradio] / gr-error-correcting-codes / src / lib / gr_streams_encode_convolutional.i
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2006 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 2, 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., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 GR_SWIG_BLOCK_MAGIC(gr,streams_encode_convolutional);
24
25 // Rename second constructor
26 %rename(streams_encode_convolutional_feedback) gr_make_streams_encode_convolutional_feedback;
27
28 // support vectors of these ... for use in the convolutional decoder
29 // as well as Turbo Codes (both encoder and decoder).
30
31 namespace std {
32   %template(x_vector_gr_streams_encode_convolutional_sptr) vector<gr_streams_encode_convolutional_sptr>;
33 };
34
35 gr_streams_encode_convolutional_sptr
36 gr_make_streams_encode_convolutional
37 (int block_size_bits,
38  int n_code_inputs,
39  int n_code_outputs,
40  const std::vector<int> &code_generator,
41  bool do_termination = true,
42  int start_memory_state = 0,
43  int end_memory_state = 0);
44
45 gr_streams_encode_convolutional_sptr
46 gr_make_streams_encode_convolutional_feedback
47 (int block_size_bits,
48  int n_code_inputs,
49  int n_code_outputs,
50  const std::vector<int> &code_generator,
51  const std::vector<int> &code_feedback,
52  bool do_termination = true,
53  int start_memory_state = 0,
54  int end_memory_state = 0);
55
56 class gr_streams_encode_convolutional : public gr_block
57 {
58 private:
59   gr_streams_encode_convolutional
60   (int block_size_bits,
61    int n_code_inputs,
62    int n_code_outputs,
63    const std::vector<int> &code_generator,
64    bool do_termination,
65    int start_memory_state,
66    int end_memory_state);
67
68   gr_streams_encode_convolutional
69   (int block_size_bits,
70    int n_code_inputs,
71    int n_code_outputs,
72    const std::vector<int> &code_generator,
73    const std::vector<int> &code_feedback,
74    bool do_termination,
75    int start_memory_state,
76    int end_memory_state);
77 };