3 * Copyright 2006 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
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)
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.
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.
23 #ifndef INCLUDED_ENCODER_CONVOLUTIONAL_IC8_IC8_H
24 #define INCLUDED_ENCODER_CONVOLUTIONAL_IC8_IC8_H
26 #include "encoder_convolutional.h"
29 * class encoder_convolutional_ic8_ic8 : public encoder_convolutional
31 * Encode the incoming streams using a convolutional encoder,
32 * "feedforward" or feedback. Optional termination, data
33 * streaming, and starting and ending memory states.
35 * input is "ic8": streams of char, one stream per input as defined by the
36 * instantiated code, using all 8 bits in the char.
38 * FIXME: need to have inputs for MSB or LSB first input and output.
40 * output is "ic8": streams of char, one stream per output as defined by the
41 * instantiated code, using all 8 bits in the char.
44 class encoder_convolutional_ic8_ic8 : public encoder_convolutional
47 encoder_convolutional_ic8_ic8
51 const std::vector<int> &code_generators,
52 bool do_termination = true,
53 int start_memory_state = 0,
54 int end_memory_state = 0)
55 : encoder_convolutional (frame_size_bits,
63 encoder_convolutional_ic8_ic8
67 const std::vector<int> &code_generators,
68 const std::vector<int> &code_feedback,
69 bool do_termination = true,
70 int start_memory_state = 0,
71 int end_memory_state = 0)
72 : encoder_convolutional (frame_size_bits,
81 virtual ~encoder_convolutional_ic8_ic8 () {};
83 virtual size_t compute_n_input_bits (size_t n_output_bits);
84 virtual size_t compute_n_output_bits (size_t n_input_bits);
87 virtual char get_next_bit__input (const char** in_buf,
89 virtual char get_next_bit__term (size_t code_input_n);
90 virtual void output_bit (char t_out_bit, char** out_buf,
91 size_t t_output_stream);
92 virtual void increment_io_indices (bool while_encoding);
93 virtual void update_memory_post_encode ();
96 #endif /* INCLUDED_ENCODER_CONVOLUTIONAL_IC8_IC8_H */