gr_flat_flowgraph.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2006,2007 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_GR_FLAT_FLOWGRAPH_H
00024 #define INCLUDED_GR_FLAT_FLOWGRAPH_H
00025 
00026 #include <gr_flowgraph.h>
00027 #include <gr_block.h>
00028 
00029 // 32Kbyte buffer size between blocks
00030 #define GR_FIXED_BUFFER_SIZE (32*(1L<<10))
00031 
00032 // Create a shared pointer to a heap allocated gr_flat_flowgraph
00033 // (types defined in gr_runtime_types.h)
00034 gr_flat_flowgraph_sptr gr_make_flat_flowgraph();
00035 
00042 class gr_flat_flowgraph : public gr_flowgraph
00043 {
00044 public:
00045   friend gr_flat_flowgraph_sptr gr_make_flat_flowgraph();
00046 
00047   // Destruct an arbitrary gr_flat_flowgraph
00048   ~gr_flat_flowgraph();
00049 
00050   // Wire gr_blocks together in new flat_flowgraph
00051   void setup_connections();
00052 
00053   // Merge applicable connections from existing flat flowgraph
00054   void merge_connections(gr_flat_flowgraph_sptr sfg);
00055 
00056 private:
00057   gr_flat_flowgraph();
00058 
00059   static const unsigned int s_fixed_buffer_size = GR_FIXED_BUFFER_SIZE;
00060   gr_block_detail_sptr allocate_block_detail(gr_basic_block_sptr block, 
00061                                              gr_block_detail_sptr old_detail=gr_block_detail_sptr());
00062   gr_buffer_sptr allocate_buffer(gr_basic_block_sptr block, int port);
00063   void connect_block_inputs(gr_basic_block_sptr block);
00064 };
00065 
00066 #endif /* INCLUDED_GR_FLAT_FLOWGRAPH_H */

Generated on Wed Jun 11 10:17:26 2008 for GNU Radio 3.1.2 by  doxygen 1.5.6