root / gnuradio-core / src / lib / general / gr_ofdm_sampler.h @ ebb0f56d
History | View | Annotate | Download (1.9 kB)
| 1 | 43819f0f | jcorgan | /* -*- c++ -*- */
|
|---|---|---|---|
| 2 | 43819f0f | jcorgan | /*
|
| 3 | 43819f0f | jcorgan | * Copyright 2007 Free Software Foundation, Inc. |
| 4 | 43819f0f | jcorgan | * |
| 5 | 43819f0f | jcorgan | * This file is part of GNU Radio |
| 6 | 43819f0f | jcorgan | * |
| 7 | 43819f0f | jcorgan | * GNU Radio is free software; you can redistribute it and/or modify |
| 8 | 43819f0f | jcorgan | * it under the terms of the GNU General Public License as published by |
| 9 | 937b719d | eb | * the Free Software Foundation; either version 3, or (at your option) |
| 10 | 43819f0f | jcorgan | * any later version. |
| 11 | 43819f0f | jcorgan | * |
| 12 | 43819f0f | jcorgan | * GNU Radio is distributed in the hope that it will be useful, |
| 13 | 43819f0f | jcorgan | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | 43819f0f | jcorgan | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | 43819f0f | jcorgan | * GNU General Public License for more details. |
| 16 | 43819f0f | jcorgan | * |
| 17 | 43819f0f | jcorgan | * You should have received a copy of the GNU General Public License |
| 18 | 43819f0f | jcorgan | * along with GNU Radio; see the file COPYING. If not, write to |
| 19 | 43819f0f | jcorgan | * the Free Software Foundation, Inc., 51 Franklin Street, |
| 20 | 43819f0f | jcorgan | * Boston, MA 02110-1301, USA. |
| 21 | 43819f0f | jcorgan | */ |
| 22 | 43819f0f | jcorgan | |
| 23 | 43819f0f | jcorgan | #ifndef INCLUDED_GR_OFDM_SAMPLER_H
|
| 24 | 43819f0f | jcorgan | #define INCLUDED_GR_OFDM_SAMPLER_H
|
| 25 | 43819f0f | jcorgan | |
| 26 | 43819f0f | jcorgan | #include <gr_sync_block.h> |
| 27 | 43819f0f | jcorgan | |
| 28 | 43819f0f | jcorgan | class gr_ofdm_sampler; |
| 29 | 43819f0f | jcorgan | typedef boost::shared_ptr<gr_ofdm_sampler> gr_ofdm_sampler_sptr;
|
| 30 | 43819f0f | jcorgan | |
| 31 | 43819f0f | jcorgan | gr_ofdm_sampler_sptr gr_make_ofdm_sampler (unsigned int fft_length, |
| 32 | 2869e858 | trondeau | unsigned int symbol_length, |
| 33 | ce0a5f5d | trondeau | unsigned int timeout=1000); |
| 34 | 43819f0f | jcorgan | |
| 35 | 43819f0f | jcorgan | /*!
|
| 36 | cda71d95 | eb | * \brief does the rest of the OFDM stuff |
| 37 | 5a4b9ba9 | eb | * \ingroup ofdm_blk |
| 38 | 43819f0f | jcorgan | */ |
| 39 | 43819f0f | jcorgan | class gr_ofdm_sampler : public gr_block |
| 40 | 43819f0f | jcorgan | {
|
| 41 | 43819f0f | jcorgan | friend gr_ofdm_sampler_sptr gr_make_ofdm_sampler (unsigned int fft_length, |
| 42 | 2869e858 | trondeau | unsigned int symbol_length, |
| 43 | 2869e858 | trondeau | unsigned int timeout); |
| 44 | 43819f0f | jcorgan | |
| 45 | 43819f0f | jcorgan | gr_ofdm_sampler (unsigned int fft_length, |
| 46 | 2869e858 | trondeau | unsigned int symbol_length, |
| 47 | 2869e858 | trondeau | unsigned int timeout); |
| 48 | 43819f0f | jcorgan | |
| 49 | 43819f0f | jcorgan | private:
|
| 50 | 2869e858 | trondeau | enum state_t {STATE_NO_SIG, STATE_PREAMBLE, STATE_FRAME};
|
| 51 | 2869e858 | trondeau | |
| 52 | 2869e858 | trondeau | state_t d_state; |
| 53 | 2869e858 | trondeau | unsigned int d_timeout_max; |
| 54 | 2869e858 | trondeau | unsigned int d_timeout; |
| 55 | 43819f0f | jcorgan | unsigned int d_fft_length; |
| 56 | 43819f0f | jcorgan | unsigned int d_symbol_length; |
| 57 | 43819f0f | jcorgan | |
| 58 | 43819f0f | jcorgan | public:
|
| 59 | 43819f0f | jcorgan | void forecast (int noutput_items, gr_vector_int &ninput_items_required); |
| 60 | 43819f0f | jcorgan | |
| 61 | 43819f0f | jcorgan | int general_work (int noutput_items, |
| 62 | 43819f0f | jcorgan | gr_vector_int &ninput_items, |
| 63 | 43819f0f | jcorgan | gr_vector_const_void_star &input_items, |
| 64 | 43819f0f | jcorgan | gr_vector_void_star &output_items); |
| 65 | 43819f0f | jcorgan | }; |
| 66 | 43819f0f | jcorgan | |
| 67 | 43819f0f | jcorgan | #endif |