Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 6e7a2755bd78c9deedab199b86e675f3 > files > 3750

gnuradio-doc-3.2.2-9.fc14.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GNU Radio 3.2.2 C++ API: gr_block.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">GNU Radio 3.2.2 C++ API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('gr__block_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<h1>gr_block.h</h1>  </div>
</div>
<div class="contents">
<a href="gr__block_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- c++ -*- */</span>
<a name="l00002"></a>00002 <span class="comment">/*</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright 2004,2007 Free Software Foundation, Inc.</span>
<a name="l00004"></a>00004 <span class="comment"> * </span>
<a name="l00005"></a>00005 <span class="comment"> * This file is part of GNU Radio</span>
<a name="l00006"></a>00006 <span class="comment"> * </span>
<a name="l00007"></a>00007 <span class="comment"> * GNU Radio is free software; you can redistribute it and/or modify</span>
<a name="l00008"></a>00008 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
<a name="l00009"></a>00009 <span class="comment"> * the Free Software Foundation; either version 3, or (at your option)</span>
<a name="l00010"></a>00010 <span class="comment"> * any later version.</span>
<a name="l00011"></a>00011 <span class="comment"> * </span>
<a name="l00012"></a>00012 <span class="comment"> * GNU Radio is distributed in the hope that it will be useful,</span>
<a name="l00013"></a>00013 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00014"></a>00014 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00015"></a>00015 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00016"></a>00016 <span class="comment"> * </span>
<a name="l00017"></a>00017 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00018"></a>00018 <span class="comment"> * along with GNU Radio; see the file COPYING.  If not, write to</span>
<a name="l00019"></a>00019 <span class="comment"> * the Free Software Foundation, Inc., 51 Franklin Street,</span>
<a name="l00020"></a>00020 <span class="comment"> * Boston, MA 02110-1301, USA.</span>
<a name="l00021"></a>00021 <span class="comment"> */</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef INCLUDED_GR_BLOCK_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define INCLUDED_GR_BLOCK_H</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;<a class="code" href="gr__basic__block_8h.html">gr_basic_block.h</a>&gt;</span>
<a name="l00027"></a>00027 <span class="comment"></span>
<a name="l00028"></a>00028 <span class="comment">/*!</span>
<a name="l00029"></a>00029 <span class="comment"> * \brief The abstract base class for all &#39;terminal&#39; processing blocks.</span>
<a name="l00030"></a>00030 <span class="comment"> * \ingroup base_blk</span>
<a name="l00031"></a>00031 <span class="comment"> *</span>
<a name="l00032"></a>00032 <span class="comment"> * A signal processing flow is constructed by creating a tree of </span>
<a name="l00033"></a>00033 <span class="comment"> * hierarchical blocks, which at any level may also contain terminal nodes</span>
<a name="l00034"></a>00034 <span class="comment"> * that actually implement signal processing functions. This is the base</span>
<a name="l00035"></a>00035 <span class="comment"> * class for all such leaf nodes.</span>
<a name="l00036"></a>00036 <span class="comment"> </span>
<a name="l00037"></a>00037 <span class="comment"> * Blocks have a set of input streams and output streams.  The</span>
<a name="l00038"></a>00038 <span class="comment"> * input_signature and output_signature define the number of input</span>
<a name="l00039"></a>00039 <span class="comment"> * streams and output streams respectively, and the type of the data</span>
<a name="l00040"></a>00040 <span class="comment"> * items in each stream.</span>
<a name="l00041"></a>00041 <span class="comment"> *</span>
<a name="l00042"></a>00042 <span class="comment"> * Although blocks may consume data on each input stream at a</span>
<a name="l00043"></a>00043 <span class="comment"> * different rate, all outputs streams must produce data at the same</span>
<a name="l00044"></a>00044 <span class="comment"> * rate.  That rate may be different from any of the input rates.</span>
<a name="l00045"></a>00045 <span class="comment"> *</span>
<a name="l00046"></a>00046 <span class="comment"> * User derived blocks override two methods, forecast and general_work,</span>
<a name="l00047"></a>00047 <span class="comment"> * to implement their signal processing behavior. forecast is called</span>
<a name="l00048"></a>00048 <span class="comment"> * by the system scheduler to determine how many items are required on</span>
<a name="l00049"></a>00049 <span class="comment"> * each input stream in order to produce a given number of output</span>
<a name="l00050"></a>00050 <span class="comment"> * items.</span>
<a name="l00051"></a>00051 <span class="comment"> *</span>
<a name="l00052"></a>00052 <span class="comment"> * general_work is called to perform the signal processing in the block.</span>
<a name="l00053"></a>00053 <span class="comment"> * It reads the input items and writes the output items.</span>
<a name="l00054"></a>00054 <span class="comment"> */</span>
<a name="l00055"></a>00055 
<a name="l00056"></a><a class="code" href="classgr__block.html">00056</a> <span class="keyword">class </span><a class="code" href="classgr__block.html" title="The abstract base class for all &amp;#39;terminal&amp;#39; processing blocks.A signal processing flow is cons...">gr_block</a> : <span class="keyword">public</span> <a class="code" href="classgr__basic__block.html" title="The abstract base class for all signal processing blocks.Basic blocks are the bare abstraction of an ...">gr_basic_block</a> {
<a name="l00057"></a>00057 
<a name="l00058"></a>00058  <span class="keyword">public</span>:
<a name="l00059"></a>00059   
<a name="l00060"></a>00060   <span class="keyword">virtual</span> <a class="code" href="classgr__block.html#a19133eeffa5f8e6743342f375551ad0c">~gr_block</a> ();
<a name="l00061"></a>00061 <span class="comment"></span>
<a name="l00062"></a>00062 <span class="comment">  /*!</span>
<a name="l00063"></a>00063 <span class="comment">   * Assume block computes y_i = f(x_i, x_i-1, x_i-2, x_i-3...)</span>
<a name="l00064"></a>00064 <span class="comment">   * History is the number of x_i&#39;s that are examined to produce one y_i.</span>
<a name="l00065"></a>00065 <span class="comment">   * This comes in handy for FIR filters, where we use history to</span>
<a name="l00066"></a>00066 <span class="comment">   * ensure that our input contains the appropriate &quot;history&quot; for the</span>
<a name="l00067"></a>00067 <span class="comment">   * filter.   History should be equal to the number of filter taps.</span>
<a name="l00068"></a>00068 <span class="comment">   */</span>
<a name="l00069"></a><a class="code" href="classgr__block.html#ad3b305a663f4b5b5c4e17070d00f05d9">00069</a>   <span class="keywordtype">unsigned</span> <a class="code" href="classgr__block.html#ad3b305a663f4b5b5c4e17070d00f05d9">history</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_history; }
<a name="l00070"></a><a class="code" href="classgr__block.html#a7c1c85a2d47f72255efd821a6f98f7ba">00070</a>   <span class="keywordtype">void</span>  <a class="code" href="classgr__block.html#a7c1c85a2d47f72255efd821a6f98f7ba">set_history</a> (<span class="keywordtype">unsigned</span> <a class="code" href="classgr__block.html#ad3b305a663f4b5b5c4e17070d00f05d9">history</a>) { d_history = <a class="code" href="classgr__block.html#ad3b305a663f4b5b5c4e17070d00f05d9">history</a>; }
<a name="l00071"></a>00071   <span class="comment"></span>
<a name="l00072"></a>00072 <span class="comment">  /*!</span>
<a name="l00073"></a>00073 <span class="comment">   * \brief return true if this block has a fixed input to output rate</span>
<a name="l00074"></a>00074 <span class="comment">   *</span>
<a name="l00075"></a>00075 <span class="comment">   * If true, then fixed_rate_in_to_out and fixed_rate_out_to_in may be called.</span>
<a name="l00076"></a>00076 <span class="comment">   */</span>
<a name="l00077"></a><a class="code" href="classgr__block.html#ab4eeb29440f674815ab3b44b4fb0c34d">00077</a>   <span class="keywordtype">bool</span> <a class="code" href="classgr__block.html#ab4eeb29440f674815ab3b44b4fb0c34d" title="return true if this block has a fixed input to output rate">fixed_rate</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_fixed_rate; }
<a name="l00078"></a>00078 
<a name="l00079"></a>00079   <span class="comment">// ----------------------------------------------------------------</span>
<a name="l00080"></a>00080   <span class="comment">//            override these to define your behavior</span>
<a name="l00081"></a>00081   <span class="comment">// ----------------------------------------------------------------</span>
<a name="l00082"></a>00082 <span class="comment"></span>
<a name="l00083"></a>00083 <span class="comment">  /*!</span>
<a name="l00084"></a>00084 <span class="comment">   * \brief  Estimate input requirements given output request</span>
<a name="l00085"></a>00085 <span class="comment">   *</span>
<a name="l00086"></a>00086 <span class="comment">   * \param noutput_items           number of output items to produce</span>
<a name="l00087"></a>00087 <span class="comment">   * \param ninput_items_required   number of input items required on each input stream</span>
<a name="l00088"></a>00088 <span class="comment">   *</span>
<a name="l00089"></a>00089 <span class="comment">   * Given a request to product \p noutput_items, estimate the number of</span>
<a name="l00090"></a>00090 <span class="comment">   * data items required on each input stream.  The estimate doesn&#39;t have</span>
<a name="l00091"></a>00091 <span class="comment">   * to be exact, but should be close.</span>
<a name="l00092"></a>00092 <span class="comment">   */</span>
<a name="l00093"></a>00093   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgr__block.html#aa1f2518b5c97126bb015adb9e2027f4a" title="Estimate input requirements given output request.">forecast</a> (<span class="keywordtype">int</span> noutput_items,
<a name="l00094"></a>00094                          <a class="code" href="classstd_1_1vector.html">gr_vector_int</a> &amp;ninput_items_required);
<a name="l00095"></a>00095 <span class="comment"></span>
<a name="l00096"></a>00096 <span class="comment">  /*!</span>
<a name="l00097"></a>00097 <span class="comment">   * \brief compute output items from input items</span>
<a name="l00098"></a>00098 <span class="comment">   *</span>
<a name="l00099"></a>00099 <span class="comment">   * \param noutput_items       number of output items to write on each output stream</span>
<a name="l00100"></a>00100 <span class="comment">   * \param ninput_items        number of input items available on each input stream</span>
<a name="l00101"></a>00101 <span class="comment">   * \param input_items         vector of pointers to the input items, one entry per input stream</span>
<a name="l00102"></a>00102 <span class="comment">   * \param output_items        vector of pointers to the output items, one entry per output stream</span>
<a name="l00103"></a>00103 <span class="comment">   *</span>
<a name="l00104"></a>00104 <span class="comment">   * \returns number of items actually written to each output stream, or -1 on EOF.</span>
<a name="l00105"></a>00105 <span class="comment">   * It is OK to return a value less than noutput_items.  -1 &lt;= return value &lt;= noutput_items</span>
<a name="l00106"></a>00106 <span class="comment">   *</span>
<a name="l00107"></a>00107 <span class="comment">   * general_work must call consume or consume_each to indicate how many items</span>
<a name="l00108"></a>00108 <span class="comment">   * were consumed on each input stream.</span>
<a name="l00109"></a>00109 <span class="comment">   */</span>
<a name="l00110"></a>00110   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classgr__block.html#a137b93d87dc83bbdb6369d33f4ea8197" title="compute output items from input items">general_work</a> (<span class="keywordtype">int</span> noutput_items,
<a name="l00111"></a>00111                             <a class="code" href="classstd_1_1vector.html">gr_vector_int</a> &amp;ninput_items,
<a name="l00112"></a>00112                             <a class="code" href="classstd_1_1vector.html">gr_vector_const_void_star</a> &amp;input_items,
<a name="l00113"></a>00113                             <a class="code" href="classstd_1_1vector.html">gr_vector_void_star</a> &amp;output_items) = 0;
<a name="l00114"></a>00114 <span class="comment"></span>
<a name="l00115"></a>00115 <span class="comment">  /*!</span>
<a name="l00116"></a>00116 <span class="comment">   * \brief Called to enable drivers, etc for i/o devices.</span>
<a name="l00117"></a>00117 <span class="comment">   *</span>
<a name="l00118"></a>00118 <span class="comment">   * This allows a block to enable an associated driver to begin</span>
<a name="l00119"></a>00119 <span class="comment">   * transfering data just before we start to execute the scheduler.</span>
<a name="l00120"></a>00120 <span class="comment">   * The end result is that this reduces latency in the pipeline when</span>
<a name="l00121"></a>00121 <span class="comment">   * dealing with audio devices, usrps, etc.</span>
<a name="l00122"></a>00122 <span class="comment">   */</span>
<a name="l00123"></a>00123   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classgr__block.html#a49ea94a86f3199f23563bb837633ea1f" title="Called to enable drivers, etc for i/o devices.">start</a>();
<a name="l00124"></a>00124 <span class="comment"></span>
<a name="l00125"></a>00125 <span class="comment">  /*!</span>
<a name="l00126"></a>00126 <span class="comment">   * \brief Called to disable drivers, etc for i/o devices.</span>
<a name="l00127"></a>00127 <span class="comment">   */</span>
<a name="l00128"></a>00128   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classgr__block.html#a53c2c89c037e4e393b75414d605e36b1" title="Called to disable drivers, etc for i/o devices.">stop</a>();
<a name="l00129"></a>00129 
<a name="l00130"></a>00130   <span class="comment">// ----------------------------------------------------------------</span>
<a name="l00131"></a>00131 <span class="comment"></span>
<a name="l00132"></a>00132 <span class="comment">  /*!</span>
<a name="l00133"></a>00133 <span class="comment">   * \brief Constrain the noutput_items argument passed to forecast and general_work</span>
<a name="l00134"></a>00134 <span class="comment">   *</span>
<a name="l00135"></a>00135 <span class="comment">   * set_output_multiple causes the scheduler to ensure that the noutput_items</span>
<a name="l00136"></a>00136 <span class="comment">   * argument passed to forecast and general_work will be an integer multiple</span>
<a name="l00137"></a>00137 <span class="comment">   * of \param multiple  The default value of output multiple is 1.</span>
<a name="l00138"></a>00138 <span class="comment">   */</span>
<a name="l00139"></a>00139   <span class="keywordtype">void</span> <a class="code" href="classgr__block.html#a14e8b799f920e52afb93fac413b1a729" title="Constrain the noutput_items argument passed to forecast and general_work.">set_output_multiple</a> (<span class="keywordtype">int</span> multiple);
<a name="l00140"></a><a class="code" href="classgr__block.html#ade8590e9cba9ccfe1b870be46b1416c2">00140</a>   <span class="keywordtype">int</span>  <a class="code" href="classgr__block.html#ade8590e9cba9ccfe1b870be46b1416c2">output_multiple</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_output_multiple; }
<a name="l00141"></a>00141 <span class="comment"></span>
<a name="l00142"></a>00142 <span class="comment">  /*!</span>
<a name="l00143"></a>00143 <span class="comment">   * \brief Tell the scheduler \p how_many_items of input stream \p which_input were consumed.</span>
<a name="l00144"></a>00144 <span class="comment">   */</span>
<a name="l00145"></a>00145   <span class="keywordtype">void</span> <a class="code" href="classgr__block.html#ac76b4c53af762a819bca003d5b5cb4d1" title="Tell the scheduler how_many_items of input stream which_input were consumed.">consume</a> (<span class="keywordtype">int</span> which_input, <span class="keywordtype">int</span> how_many_items);
<a name="l00146"></a>00146 <span class="comment"></span>
<a name="l00147"></a>00147 <span class="comment">  /*!</span>
<a name="l00148"></a>00148 <span class="comment">   * \brief Tell the scheduler \p how_many_items were consumed on each input stream.</span>
<a name="l00149"></a>00149 <span class="comment">   */</span>
<a name="l00150"></a>00150   <span class="keywordtype">void</span> <a class="code" href="classgr__block.html#a64e9a2096975841b72ff3c1662d27df9" title="Tell the scheduler how_many_items were consumed on each input stream.">consume_each</a> (<span class="keywordtype">int</span> how_many_items);
<a name="l00151"></a>00151 <span class="comment"></span>
<a name="l00152"></a>00152 <span class="comment">  /*!</span>
<a name="l00153"></a>00153 <span class="comment">   * \brief Set the approximate output rate / input rate</span>
<a name="l00154"></a>00154 <span class="comment">   *</span>
<a name="l00155"></a>00155 <span class="comment">   * Provide a hint to the buffer allocator and scheduler.</span>
<a name="l00156"></a>00156 <span class="comment">   * The default relative_rate is 1.0</span>
<a name="l00157"></a>00157 <span class="comment">   *</span>
<a name="l00158"></a>00158 <span class="comment">   * decimators have relative_rates &lt; 1.0</span>
<a name="l00159"></a>00159 <span class="comment">   * interpolators have relative_rates &gt; 1.0</span>
<a name="l00160"></a>00160 <span class="comment">   */</span>
<a name="l00161"></a>00161   <span class="keywordtype">void</span>  <a class="code" href="classgr__block.html#ab9dc7e6d30692bbfa65fc7c4eef6fc9d" title="Set the approximate output rate / input rate.">set_relative_rate</a> (<span class="keywordtype">double</span> <a class="code" href="classgr__block.html#aa9df8c4d3fb92bde98900831546f8b97" title="return the approximate output rate / input rate">relative_rate</a>);
<a name="l00162"></a>00162 <span class="comment"></span>
<a name="l00163"></a>00163 <span class="comment">  /*!</span>
<a name="l00164"></a>00164 <span class="comment">   * \brief return the approximate output rate / input rate</span>
<a name="l00165"></a>00165 <span class="comment">   */</span>
<a name="l00166"></a><a class="code" href="classgr__block.html#aa9df8c4d3fb92bde98900831546f8b97">00166</a>   <span class="keywordtype">double</span> <a class="code" href="classgr__block.html#aa9df8c4d3fb92bde98900831546f8b97" title="return the approximate output rate / input rate">relative_rate</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_relative_rate; }
<a name="l00167"></a>00167 
<a name="l00168"></a>00168   <span class="comment">/*</span>
<a name="l00169"></a>00169 <span class="comment">   * The following two methods provide special case info to the</span>
<a name="l00170"></a>00170 <span class="comment">   * scheduler in the event that a block has a fixed input to output</span>
<a name="l00171"></a>00171 <span class="comment">   * ratio.  gr_sync_block, gr_sync_decimator and gr_sync_interpolator</span>
<a name="l00172"></a>00172 <span class="comment">   * override these.  If you&#39;re fixed rate, subclass one of those.</span>
<a name="l00173"></a>00173 <span class="comment">   */</span><span class="comment"></span>
<a name="l00174"></a>00174 <span class="comment">  /*!</span>
<a name="l00175"></a>00175 <span class="comment">   * \brief Given ninput samples, return number of output samples that will be produced.</span>
<a name="l00176"></a>00176 <span class="comment">   * N.B. this is only defined if fixed_rate returns true.</span>
<a name="l00177"></a>00177 <span class="comment">   * Generally speaking, you don&#39;t need to override this.</span>
<a name="l00178"></a>00178 <span class="comment">   */</span>
<a name="l00179"></a>00179   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classgr__block.html#a4f17bec4407904b31d45f0d8e78c4683" title="Given ninput samples, return number of output samples that will be produced. N.B. this is only define...">fixed_rate_ninput_to_noutput</a>(<span class="keywordtype">int</span> ninput);
<a name="l00180"></a>00180 <span class="comment"></span>
<a name="l00181"></a>00181 <span class="comment">  /*!</span>
<a name="l00182"></a>00182 <span class="comment">   * \brief Given noutput samples, return number of input samples required to produce noutput.</span>
<a name="l00183"></a>00183 <span class="comment">   * N.B. this is only defined if fixed_rate returns true.</span>
<a name="l00184"></a>00184 <span class="comment">   * Generally speaking, you don&#39;t need to override this.</span>
<a name="l00185"></a>00185 <span class="comment">   */</span>
<a name="l00186"></a>00186   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classgr__block.html#a196ae6a4f9a3d0abed3428d2b765a133" title="Given noutput samples, return number of input samples required to produce noutput. N.B. this is only defined if fixed_rate returns true. Generally speaking, you don&amp;#39;t need to override this.">fixed_rate_noutput_to_ninput</a>(<span class="keywordtype">int</span> noutput);
<a name="l00187"></a>00187 
<a name="l00188"></a>00188   <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00189"></a>00189 
<a name="l00190"></a>00190  <span class="keyword">private</span>:
<a name="l00191"></a>00191 
<a name="l00192"></a>00192   <span class="keywordtype">int</span>                   d_output_multiple;
<a name="l00193"></a>00193   <span class="keywordtype">double</span>                d_relative_rate;        <span class="comment">// approx output_rate / input_rate</span>
<a name="l00194"></a>00194   <a class="code" href="classboost_1_1shared__ptr.html">gr_block_detail_sptr</a>  d_detail;                   <span class="comment">// implementation details</span>
<a name="l00195"></a>00195   <span class="keywordtype">unsigned</span>              d_history;
<a name="l00196"></a>00196   <span class="keywordtype">bool</span>                  d_fixed_rate;
<a name="l00197"></a>00197     
<a name="l00198"></a>00198  <span class="keyword">protected</span>:
<a name="l00199"></a>00199 
<a name="l00200"></a>00200   <a class="code" href="classgr__block.html#a268510acce1f94c0a60c5273f4948641">gr_block</a> (<span class="keyword">const</span> std::string &amp;<a class="code" href="classgr__basic__block.html#aa12a20d8b8eab341da935530d29299d2">name</a>,
<a name="l00201"></a>00201             <a class="code" href="classboost_1_1shared__ptr.html" title="shared_ptr documentation stub">gr_io_signature_sptr</a> <a class="code" href="classgr__basic__block.html#a58f6d05e85931200f3771d3e50741281">input_signature</a>,
<a name="l00202"></a>00202             <a class="code" href="classboost_1_1shared__ptr.html" title="shared_ptr documentation stub">gr_io_signature_sptr</a> <a class="code" href="classgr__basic__block.html#add68b96f012dfe352700b4fd1c3a184a">output_signature</a>);
<a name="l00203"></a>00203 
<a name="l00204"></a><a class="code" href="classgr__block.html#a176a95343488a9a760c8edf8bb08db20">00204</a>   <span class="keywordtype">void</span> <a class="code" href="classgr__block.html#a176a95343488a9a760c8edf8bb08db20">set_fixed_rate</a>(<span class="keywordtype">bool</span> <a class="code" href="classgr__block.html#ab4eeb29440f674815ab3b44b4fb0c34d" title="return true if this block has a fixed input to output rate">fixed_rate</a>){ d_fixed_rate = <a class="code" href="classgr__block.html#ab4eeb29440f674815ab3b44b4fb0c34d" title="return true if this block has a fixed input to output rate">fixed_rate</a>; }
<a name="l00205"></a>00205 
<a name="l00206"></a>00206   <span class="comment">// These are really only for internal use, but leaving them public avoids</span>
<a name="l00207"></a>00207   <span class="comment">// having to work up an ever-varying list of friends</span>
<a name="l00208"></a>00208 
<a name="l00209"></a>00209  <span class="keyword">public</span>:
<a name="l00210"></a><a class="code" href="classgr__block.html#afb276858409ac55d62fca1c87d7d4083">00210</a>   <a class="code" href="classboost_1_1shared__ptr.html">gr_block_detail_sptr</a> <a class="code" href="classgr__block.html#afb276858409ac55d62fca1c87d7d4083">detail</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_detail; }
<a name="l00211"></a><a class="code" href="classgr__block.html#a26b61f2c2ca308c3bde82f01d3e9650b">00211</a>   <span class="keywordtype">void</span> <a class="code" href="classgr__block.html#a26b61f2c2ca308c3bde82f01d3e9650b">set_detail</a> (<a class="code" href="classboost_1_1shared__ptr.html">gr_block_detail_sptr</a> <a class="code" href="classgr__block.html#afb276858409ac55d62fca1c87d7d4083">detail</a>) { d_detail = <a class="code" href="classgr__block.html#afb276858409ac55d62fca1c87d7d4083">detail</a>; }
<a name="l00212"></a>00212 };
<a name="l00213"></a>00213 
<a name="l00214"></a><a class="code" href="gr__block_8h.html#abbe9231777a14816d919bc9c087c5539">00214</a> <span class="keyword">typedef</span> <a class="code" href="classstd_1_1vector.html">std::vector&lt;gr_block_sptr&gt;</a> <a class="code" href="gr__block_8h.html#abbe9231777a14816d919bc9c087c5539">gr_block_vector_t</a>;
<a name="l00215"></a><a class="code" href="gr__block_8h.html#a95fa0f96bae254b44c0e2bfa06ab79dc">00215</a> <span class="keyword">typedef</span> <a class="code" href="classstd_1_1vector.html" title="vector documentation stub">std::vector&lt;gr_block_sptr&gt;::iterator</a> <a class="code" href="gr__block_8h.html#a95fa0f96bae254b44c0e2bfa06ab79dc">gr_block_viter_t</a>;
<a name="l00216"></a>00216 
<a name="l00217"></a>00217 <span class="keyword">inline</span> <a class="code" href="classboost_1_1shared__ptr.html">gr_block_sptr</a> cast_to_block_sptr(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> p)
<a name="l00218"></a>00218 {
<a name="l00219"></a>00219   <span class="keywordflow">return</span> boost::dynamic_pointer_cast&lt;<a class="code" href="classgr__block.html" title="The abstract base class for all &amp;#39;terminal&amp;#39; processing blocks.A signal processing flow is cons...">gr_block</a>, <a class="code" href="classgr__basic__block.html" title="The abstract base class for all signal processing blocks.Basic blocks are the bare abstraction of an ...">gr_basic_block</a>&gt;(p);
<a name="l00220"></a>00220 }
<a name="l00221"></a>00221 
<a name="l00222"></a>00222 
<a name="l00223"></a>00223 std::ostream&amp;
<a name="l00224"></a>00224 <a class="code" href="gr__basic__block_8h.html#acb2f610728a7f3cbd51a9a2eb60f059e">operator &lt;&lt; </a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code" href="classgr__block.html" title="The abstract base class for all &amp;#39;terminal&amp;#39; processing blocks.A signal processing flow is cons...">gr_block</a> *m);
<a name="l00225"></a>00225 
<a name="l00226"></a>00226 <span class="preprocessor">#endif </span><span class="comment">/* INCLUDED_GR_BLOCK_H */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="gr__block_8h.html">gr_block.h</a>      </li>
      <li class="footer">Generated on Thu Feb 17 2011 for GNU Radio 3.2.2 C++ API by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
    </ul>
  </div>

</body>
</html>