GNU Radio 3.4.2 C++ API
atsci_fs_correlator.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2002 Free Software Foundation, Inc.
00004  * 
00005  * This file is part of GNU Radio
00006  * 
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 3, or (at your option)
00010  * any later version.
00011  * 
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 #ifndef _ATSC_FS_CORRELATOR_H_
00023 #define _ATSC_FS_CORRELATOR_H_
00024 
00025 /*!
00026  * \brief abstract base class for ATSC field sync correlator
00027  *
00028  * Processes input samples one at a time looking for
00029  * an occurence of either the field sync 1 or field sync 2 pattern.
00030  *
00031  * For each sample processed, an output sample and an output tag are produced.
00032  * The output samples are identical to the input samples but are delayed by
00033  * a number of samples given by \p delay().  The output tag associated with
00034  * the the given output sample indicates whether this sample is the beginning
00035  * of one of the field syncs or is an ordinary sample.  The tags are defined in
00036  * atsci_sync_tag.h.
00037  *
00038  * For ease of use, the field sync patterns are defined to begin with the
00039  * first symbol of the 4 symbol data segment sync pattern that immediately
00040  * proceeds the actual PN 511 code.  This makes it easier for downstream code
00041  * to determine the location of data segment syncs merely by counting.  They'll
00042  * occur every 832 samples assuming everything is working.
00043  */
00044 
00045 class atsci_fs_correlator {
00046 
00047 public:
00048 
00049   // CREATORS
00050   atsci_fs_correlator ();
00051   virtual ~atsci_fs_correlator () = 0;
00052 
00053   // MANIPULATORS
00054   virtual void reset () = 0;
00055   virtual void filter (float input_sample, float *output_sample, float *output_tag) = 0;
00056 
00057   // ACCESSORS
00058 
00059   //! return delay in samples from input to output
00060   virtual int delay () const = 0;
00061 };
00062  
00063 #endif /* _ATSC_FS_CORRELATOR_H_ */