GNU Radio 3.5.1 C++ API
|
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_CHECKER_H_ 00023 #define _ATSC_FS_CHECKER_H_ 00024 00025 #include <atsc_api.h> 00026 #include <atsci_syminfo.h> 00027 00028 /*! 00029 * \brief abstract base class for ATSC field sync checker 00030 * 00031 * Processes input samples one at a time looking for 00032 * an occurence of either the field sync 1 or field sync 2 pattern. 00033 * 00034 * Note that unlike atsci_fs_correlator, this class uses the symbol_num in 00035 * input_tag to avoid having to test each symbol position. 00036 * 00037 * For each sample processed, an output sample and an output tag are produced. 00038 * The output samples are identical to the input samples but are delayed by 00039 * a number of samples given by \p delay(). The output tag associated with 00040 * the the given output sample indicates whether this sample is the beginning 00041 * of one of the field syncs or is an ordinary sample. The tags are defined in 00042 * atsci_sync_tag.h. 00043 * 00044 * For ease of use, the field sync patterns are defined to begin with the 00045 * first symbol of the 4 symbol data segment sync pattern that immediately 00046 * proceeds the actual PN 511 code. This makes it easier for downstream code 00047 * to determine the location of data segment syncs merely by counting. They'll 00048 * occur every 832 samples assuming everything is working. 00049 */ 00050 00051 class ATSC_API atsci_fs_checker { 00052 00053 public: 00054 00055 // CREATORS 00056 atsci_fs_checker (); 00057 virtual ~atsci_fs_checker () = 0; 00058 00059 // MANIPULATORS 00060 virtual void reset () = 0; 00061 virtual void filter (float input_sample, atsc::syminfo input_tag, 00062 float *output_sample, atsc::syminfo *output_tag) = 0; 00063 00064 // ACCESSORS 00065 00066 //! return delay in samples from input to output 00067 virtual int delay () const = 0; 00068 }; 00069 00070 #endif /* _ATSC_FS_CHECKER_H_ */