GNU Radio 3.7.1 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2007,2011,2012 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 along 00018 * with this program; if not, write to the Free Software Foundation, Inc., 00019 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00020 */ 00021 00022 #ifndef INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_H 00023 #define INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_H 00024 00025 #include <gnuradio/digital/api.h> 00026 #include <gnuradio/block.h> 00027 #include <vector> 00028 00029 namespace gr { 00030 namespace digital { 00031 00032 /*! 00033 * \brief insert "pre-modulated" preamble symbols before each payload. 00034 * \ingroup ofdm_blk 00035 * \ingroup synchronizers_blk 00036 * 00037 * \details 00038 * <pre> 00039 * input 1: stream of vectors of gr_complex [fft_length] 00040 * These are the modulated symbols of the payload. 00041 * 00042 * input 2: stream of char. The LSB indicates whether the corresponding 00043 * symbol on input 1 is the first symbol of the payload or not. 00044 * It's a 1 if the corresponding symbol is the first symbol, 00045 * otherwise 0. 00046 * 00047 * N.B., this implies that there must be at least 1 symbol in the payload. 00048 * 00049 * output 1: stream of vectors of gr_complex [fft_length] 00050 * These include the preamble symbols and the payload symbols. 00051 * 00052 * output 2: stream of char. The LSB indicates whether the corresponding 00053 * symbol on input 1 is the first symbol of a packet (i.e., the 00054 * first symbol of the preamble.) It's a 1 if the corresponding 00055 * symbol is the first symbol, otherwise 0. 00056 * </pre> 00057 */ 00058 class DIGITAL_API ofdm_insert_preamble : virtual public block 00059 { 00060 public: 00061 // gr::digital::ofdm_insert_preamble::sptr 00062 typedef boost::shared_ptr<ofdm_insert_preamble> sptr; 00063 00064 /*! 00065 * Make an OFDM preamble inserter block. 00066 * 00067 * \param fft_length length of each symbol in samples. 00068 * \param preamble vector of symbols that represent the pre-modulated preamble. 00069 */ 00070 static sptr make(int fft_length, 00071 const std::vector<std::vector<gr_complex> > &preamble); 00072 00073 virtual void enter_preamble() = 0; 00074 }; 00075 00076 } /* namespace digital */ 00077 } /* namespace gr */ 00078 00079 #endif /* INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_H */