3 * Copyright 2002 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 3, 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., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
22 #ifndef _ATSC_FS_CORRELATOR_H_
23 #define _ATSC_FS_CORRELATOR_H_
26 * \brief abstract base class for ATSC field sync correlator
28 * Processes input samples one at a time looking for
29 * an occurence of either the field sync 1 or field sync 2 pattern.
31 * For each sample processed, an output sample and an output tag are produced.
32 * The output samples are identical to the input samples but are delayed by
33 * a number of samples given by \p delay(). The output tag associated with
34 * the the given output sample indicates whether this sample is the beginning
35 * of one of the field syncs or is an ordinary sample. The tags are defined in
38 * For ease of use, the field sync patterns are defined to begin with the
39 * first symbol of the 4 symbol data segment sync pattern that immediately
40 * proceeds the actual PN 511 code. This makes it easier for downstream code
41 * to determine the location of data segment syncs merely by counting. They'll
42 * occur every 832 samples assuming everything is working.
45 class atsci_fs_correlator {
50 atsci_fs_correlator ();
51 virtual ~atsci_fs_correlator () = 0;
54 virtual void reset () = 0;
55 virtual void filter (float input_sample, float *output_sample, float *output_tag) = 0;
59 //! return delay in samples from input to output
60 virtual int delay () const = 0;
63 #endif /* _ATSC_FS_CORRELATOR_H_ */