GNU Radio Manual and C++ API Reference  3.7.5.1
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
atsc_fs_checker_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014 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_DTV_ATSC_FS_CHECKER_IMPL_H
24 #define INCLUDED_DTV_ATSC_FS_CHECKER_IMPL_H
25 
27 #include "atsc_syminfo_impl.h"
28 
29 namespace gr {
30  namespace dtv {
31 
33  {
34  private:
35  static const int SRSIZE = 1024; // must be power of two
36  int d_index; // points at oldest sample
37  float d_sample_sr[SRSIZE]; // sample shift register
38  atsc::syminfo d_tag_sr[SRSIZE]; // tag shift register
39  unsigned char d_bit_sr[SRSIZE]; // binary decision shift register
40  int d_field_num;
41  int d_segment_num;
42 
43  static const int OFFSET_511 = 4; // offset to second PN 63 pattern
44  static const int LENGTH_511 = 511; // length of PN 63 pattern
45  static const int OFFSET_2ND_63 = 578; // offset to second PN 63 pattern
46  static const int LENGTH_2ND_63 = 63; // length of PN 63 pattern
47 
48  inline static int wrap (int index){ return index & (SRSIZE - 1); }
49  inline static int incr (int index){ return wrap (index + 1); }
50  inline static int decr (int index){ return wrap (index - 1); }
51 
52  public:
55 
56  void reset();
57 
58  virtual int general_work(int noutput_items,
59  gr_vector_int &ninput_items,
60  gr_vector_const_void_star &input_items,
61  gr_vector_void_star &output_items);
62  };
63 
64  } /* namespace dtv */
65 } /* namespace gr */
66 
67 #endif /* INCLUDED_DTV_ATSC_FS_CHECKER_IMPL_H */
virtual int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
compute output items from input items
std::vector< const void * > gr_vector_const_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:38
ATSC Receiver FS_CHECKER.
Definition: atsc_fs_checker.h:37
std::vector< void * > gr_vector_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:37
std::vector< int > gr_vector_int
Definition: gnuradio-runtime/include/gnuradio/types.h:33
Definition: atsc_fs_checker_impl.h:32
Definition: atsc_syminfo_impl.h:32