GNU Radio Manual and C++ API Reference  3.7.7
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
atsc_trellis_encoder_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2015 Free Software Foundation, Inc.
4  *
5  * This is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * This software is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this software; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_DTV_ATSC_TRELLIS_ENCODER_IMPL_H
22 #define INCLUDED_DTV_ATSC_TRELLIS_ENCODER_IMPL_H
23 
26 #include "atsc_types.h"
27 
28 namespace gr {
29  namespace dtv {
30 
32  {
33  private:
34  bool debug;
35 
36  static const int NCODERS = 12;
37  static const int SEGMENT_SIZE = ATSC_MPEG_RS_ENCODED_LENGTH;
38  static const int INPUT_SIZE = (SEGMENT_SIZE * 12);
39  static const int OUTPUT_SIZE = (ATSC_DATA_SEGMENT_LENGTH * 12);
40 
41  void reset();
42  void encode(atsc_data_segment out[NCODERS], const atsc_mpeg_packet_rs_encoded in[NCODERS]);
43  void encode_helper(unsigned char output[OUTPUT_SIZE], const unsigned char input[INPUT_SIZE]);
44 
45  atsc_basic_trellis_encoder enc[NCODERS];
46 
47  public:
50 
51  int work(int noutput_items,
52  gr_vector_const_void_star &input_items,
53  gr_vector_void_star &output_items);
54  };
55 
56  } // namespace dtv
57 } // namespace gr
58 
59 #endif /* INCLUDED_DTV_ATSC_TRELLIS_ENCODER_IMPL_H */
Definition: atsc_types.h:206
Definition: atsc_basic_trellis_encoder.h:39
std::vector< const void * > gr_vector_const_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:38
Definition: atsc_trellis_encoder_impl.h:31
static const int ATSC_DATA_SEGMENT_LENGTH
Definition: atsc_consts.h:41
std::vector< void * > gr_vector_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:37
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
just like gr::block::general_work, only this arranges to call consume_each for you ...
Include this header to use the message passing features.
Definition: logger.h:129
static const int ATSC_MPEG_RS_ENCODED_LENGTH
Definition: atsc_consts.h:34
contains 832 3 bit symbols. The low 3 bits in the byte hold the symbol.
Definition: atsc_types.h:226
<+description of block+>
Definition: atsc_trellis_encoder.h:35