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 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 00023 #ifndef INCLUDED_DIGITAL_OFDM_FRAME_SINK_H 00024 #define INCLUDED_DIGITAL_OFDM_FRAME_SINK_H 00025 00026 #include <gnuradio/digital/api.h> 00027 #include <gnuradio/sync_block.h> 00028 #include <gnuradio/msg_queue.h> 00029 00030 namespace gr { 00031 namespace digital { 00032 00033 /*! 00034 * \brief Takes an OFDM symbol in, demaps it into bits of 0's and 00035 * 1's, packs them into packets, and sends to to a message queue 00036 * sink. 00037 * \ingroup ofdm_blk 00038 * 00039 * \details 00040 * NOTE: The mod input parameter simply chooses a pre-defined 00041 * demapper/slicer. Eventually, we want to be able to pass in a 00042 * reference to an object to do the demapping and slicing for a 00043 * given modulation type. 00044 */ 00045 class DIGITAL_API ofdm_frame_sink : virtual public sync_block 00046 { 00047 public: 00048 // gr::digital::ofdm_frame_sink::sptr 00049 typedef boost::shared_ptr<ofdm_frame_sink> sptr; 00050 00051 /*! 00052 * Make an OFDM frame sink block. 00053 * 00054 * \param sym_position vector of OFDM carrier symbols in complex space 00055 * \param sym_value_out vector of bit mapped from the complex symbol space 00056 * \param target_queue message queue for the packets to go into 00057 * \param occupied_tones The number of subcarriers with data in the received symbol 00058 * \param phase_gain gain of the phase tracking loop 00059 * \param freq_gain gain of the frequency tracking loop 00060 */ 00061 static sptr make(const std::vector<gr_complex> &sym_position, 00062 const std::vector<char> &sym_value_out, 00063 msg_queue::sptr target_queue, 00064 int occupied_tones, 00065 float phase_gain=0.25, float freq_gain=0.25*0.25/4); 00066 }; 00067 00068 } /* namespace digital */ 00069 } /* namespace gr */ 00070 00071 #endif /* INCLUDED_GR_OFDM_FRAME_SINK_H */