GNU Radio 3.6.5 C++ API

digital_chunks_to_symbols_bc.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2004,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 // WARNING: this file is machine generated. Edits will be overwritten
00024 
00025 #ifndef INCLUDED_DIGITAL_DIGITAL_CHUNKS_TO_SYMBOLS_BC_H
00026 #define INCLUDED_DIGITAL_DIGITAL_CHUNKS_TO_SYMBOLS_BC_H
00027 
00028 #include <digital_api.h>
00029 #include <gr_sync_interpolator.h>
00030 
00031 class digital_chunks_to_symbols_bc;
00032 typedef boost::shared_ptr<digital_chunks_to_symbols_bc> digital_chunks_to_symbols_bc_sptr;
00033 
00034 DIGITAL_API digital_chunks_to_symbols_bc_sptr
00035 digital_make_chunks_to_symbols_bc (const std::vector<gr_complex> &symbol_table, const int D = 1);
00036 
00037 /*!
00038  * \brief Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex constellation points in D dimensions (D = 1 by default)
00039  * \ingroup symbol_coding_blk
00040  *
00041  * \details
00042  * input: stream of unsigned char; output: stream of gr_complex
00043  *
00044  * out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1
00045  *
00046  * The combination of gr_packed_to_unpacked_XX followed by
00047  * gr_chunks_to_symbols_XY handles the general case of mapping
00048  * from a stream of bytes or shorts into arbitrary float
00049  * or complex symbols.
00050  *
00051  * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb,
00052  * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss,
00053  * \sa digital_chunks_to_symbols_bf, digital_chunks_to_symbols_bc.
00054  * \sa digital_chunks_to_symbols_sf, digital_chunks_to_symbols_sc.
00055  */
00056 
00057 class DIGITAL_API digital_chunks_to_symbols_bc : public gr_sync_interpolator
00058 {
00059   friend DIGITAL_API digital_chunks_to_symbols_bc_sptr digital_make_chunks_to_symbols_bc
00060     (const std::vector<gr_complex> &symbol_table, const int D);
00061 
00062   int d_D;
00063   std::vector<gr_complex> d_symbol_table;
00064   digital_chunks_to_symbols_bc (const std::vector<gr_complex> &symbol_table, const int D = 1);
00065 
00066  public:
00067   int D () const { return d_D; }
00068   std::vector<gr_complex> symbol_table () const { return d_symbol_table; }
00069   int work (int noutput_items,
00070             gr_vector_const_void_star &input_items,
00071             gr_vector_void_star &output_items);
00072 
00073   bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
00074 };
00075 
00076 #endif