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 SCCC_ENCODER_IMPL_H 24 #define SCCC_ENCODER_IMPL_H 25 26 #include <gnuradio/trellis/sccc_encoder.h> 27 28 namespace gr { 29 namespace trellis { 30 31 template <class IN_T, class OUT_T> 32 class sccc_encoder_impl : public sccc_encoder<IN_T, OUT_T> 33 { 34 private: 35 fsm d_FSMo; 36 int d_STo; 37 fsm d_FSMi; 38 int d_STi; 39 interleaver d_INTERLEAVER; 40 int d_blocklength; 41 std::vector<int> d_buffer; 42 43 public: 44 sccc_encoder_impl(const fsm& FSMo, 45 int STo, 46 const fsm& FSMi, 47 int STi, 48 const interleaver& INTERLEAVER, 49 int blocklength); 50 ~sccc_encoder_impl(); 51 FSMo()52 fsm FSMo() const { return d_FSMo; } STo()53 int STo() const { return d_STo; } FSMi()54 fsm FSMi() const { return d_FSMi; } STi()55 int STi() const { return d_STi; } INTERLEAVER()56 interleaver INTERLEAVER() const { return d_INTERLEAVER; } blocklength()57 int blocklength() const { return d_blocklength; } 58 59 int work(int noutput_items, 60 gr_vector_const_void_star& input_items, 61 gr_vector_void_star& output_items); 62 }; 63 64 } /* namespace trellis */ 65 } /* namespace gr */ 66 67 #endif /* SCCC_ENCODER_IMPL_H */ 68