Sophie

Sophie

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

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_test.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__test_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<h1>gr_test.h</h1>  </div>
</div>
<div class="contents">
<a href="gr__test_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 2006 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_TEST_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define INCLUDED_GR_TEST_H</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;gr_block.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;<a class="code" href="gr__test__types_8h.html">gr_test_types.h</a>&quot;</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">class </span><a class="code" href="classgr__test.html" title="Test class for testing runtime system (setting up buffers and such.)This block does not do any useful...">gr_test</a>;
<a name="l00031"></a>00031 <span class="keyword">typedef</span> <a class="code" href="classboost_1_1shared__ptr.html" title="shared_ptr documentation stub">boost::shared_ptr&lt;gr_test&gt;</a> <a class="code" href="classboost_1_1shared__ptr.html" title="shared_ptr documentation stub">gr_test_sptr</a>;
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="comment">// public constructor</span>
<a name="l00034"></a>00034 <a class="code" href="classboost_1_1shared__ptr.html" title="shared_ptr documentation stub">gr_test_sptr</a> <a class="code" href="gr__test_8h.html#a1dc1e7a3e1d2623985815a4c0875f132">gr_make_test</a> (<span class="keyword">const</span> std::string &amp;<a class="code" href="classgr__basic__block.html#aa12a20d8b8eab341da935530d29299d2">name</a>=std::string(<span class="stringliteral">&quot;gr_test&quot;</span>),
<a name="l00035"></a>00035         <span class="keywordtype">int</span> min_inputs=1, <span class="keywordtype">int</span> max_inputs=1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sizeof_input_item=1,
<a name="l00036"></a>00036         <span class="keywordtype">int</span> min_outputs=1, <span class="keywordtype">int</span> max_outputs=1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sizeof_output_item=1,
<a name="l00037"></a>00037         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classgr__block.html#ad3b305a663f4b5b5c4e17070d00f05d9">history</a>=1,<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classgr__block.html#ade8590e9cba9ccfe1b870be46b1416c2">output_multiple</a>=1,<span class="keywordtype">double</span> <a class="code" href="classgr__block.html#aa9df8c4d3fb92bde98900831546f8b97" title="return the approximate output rate / input rate">relative_rate</a>=1.0,
<a name="l00038"></a>00038         <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">true</span>,<a class="code" href="gr__test__types_8h.html#a7e11c1089ad4d0f3c0d4c0cea0281fa6">gr_consume_type_t</a> cons_type=<a class="code" href="gr__test__types_8h.html#a7e11c1089ad4d0f3c0d4c0cea0281fa6a4091f414fb071161bd0fa54c6879695d">CONSUME_NOUTPUT_ITEMS</a>, <a class="code" href="gr__test__types_8h.html#afc8b997c194075e5d0d5cb793e829329">gr_produce_type_t</a> prod_type=<a class="code" href="gr__test__types_8h.html#afc8b997c194075e5d0d5cb793e829329acc1c979665b05a7393265cb8b834a82b">PRODUCE_NOUTPUT_ITEMS</a>);
<a name="l00039"></a>00039 <span class="comment"></span>
<a name="l00040"></a>00040 <span class="comment">/*!</span>
<a name="l00041"></a>00041 <span class="comment"> * \brief Test class for testing runtime system (setting up buffers and such.)</span>
<a name="l00042"></a>00042 <span class="comment"> * \ingroup misc</span>
<a name="l00043"></a>00043 <span class="comment"> *</span>
<a name="l00044"></a>00044 <span class="comment"> * This block does not do any usefull actual data processing.</span>
<a name="l00045"></a>00045 <span class="comment"> * It just exposes setting all standard block parameters using the contructor or public methods.</span>
<a name="l00046"></a>00046 <span class="comment"> *</span>
<a name="l00047"></a>00047 <span class="comment"> * This block can be usefull when testing the runtime system.</span>
<a name="l00048"></a>00048 <span class="comment"> * You can force this block to have a large history, decimation </span>
<a name="l00049"></a>00049 <span class="comment"> * factor and/or large output_multiple.</span>
<a name="l00050"></a>00050 <span class="comment"> * The runtime system should detect this and create large enough buffers</span>
<a name="l00051"></a>00051 <span class="comment"> * all through the signal chain.</span>
<a name="l00052"></a>00052 <span class="comment"> */</span>
<a name="l00053"></a><a class="code" href="classgr__test.html">00053</a> <span class="keyword">class </span><a class="code" href="classgr__test.html" title="Test class for testing runtime system (setting up buffers and such.)This block does not do any useful...">gr_test</a> : <span class="keyword">public</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> {
<a name="l00054"></a>00054 
<a name="l00055"></a>00055  <span class="keyword">public</span>:
<a name="l00056"></a>00056   
<a name="l00057"></a><a class="code" href="classgr__test.html#a63e7ef2d796c5e4afc570b163c8ccd61">00057</a>   <a class="code" href="classgr__test.html#a63e7ef2d796c5e4afc570b163c8ccd61">~gr_test</a> (){}
<a name="l00058"></a>00058   
<a name="l00059"></a>00059 <span class="keywordtype">int</span> <a class="code" href="classgr__test.html#a871aa0cd617be4a13e5cb036bdb55cd7" title="compute output items from input items">general_work</a> (<span class="keywordtype">int</span> noutput_items,
<a name="l00060"></a>00060                             <a class="code" href="classstd_1_1vector.html">gr_vector_int</a> &amp;ninput_items,
<a name="l00061"></a>00061                             <a class="code" href="classstd_1_1vector.html">gr_vector_const_void_star</a> &amp;input_items,
<a name="l00062"></a>00062                             <a class="code" href="classstd_1_1vector.html">gr_vector_void_star</a> &amp;output_items);
<a name="l00063"></a>00063   <span class="comment">// ----------------------------------------------------------------</span>
<a name="l00064"></a>00064   <span class="comment">//            override these to define your behavior</span>
<a name="l00065"></a>00065   <span class="comment">// ----------------------------------------------------------------</span>
<a name="l00066"></a>00066 <span class="comment"></span>
<a name="l00067"></a>00067 <span class="comment">  /*!</span>
<a name="l00068"></a>00068 <span class="comment">   * \brief  Estimate input requirements given output request</span>
<a name="l00069"></a>00069 <span class="comment">   *</span>
<a name="l00070"></a>00070 <span class="comment">   * \param noutput_items           number of output items to produce</span>
<a name="l00071"></a>00071 <span class="comment">   * \param ninput_items_required   number of input items required on each input stream</span>
<a name="l00072"></a>00072 <span class="comment">   *</span>
<a name="l00073"></a>00073 <span class="comment">   * Given a request to product \p noutput_items, estimate the number of</span>
<a name="l00074"></a>00074 <span class="comment">   * data items required on each input stream.  The estimate doesn&#39;t have</span>
<a name="l00075"></a>00075 <span class="comment">   * to be exact, but should be close.</span>
<a name="l00076"></a>00076 <span class="comment">   */</span>
<a name="l00077"></a><a class="code" href="classgr__test.html#a066f8bfd35652cf2f9394bee8e61dc50">00077</a>    <span class="keywordtype">void</span> <a class="code" href="classgr__test.html#a066f8bfd35652cf2f9394bee8e61dc50" title="Estimate input requirements given output request.">forecast</a> (<span class="keywordtype">int</span> noutput_items,
<a name="l00078"></a>00078                          <a class="code" href="classstd_1_1vector.html">gr_vector_int</a> &amp;ninput_items_required)
<a name="l00079"></a>00079    {
<a name="l00080"></a>00080      <span class="keywordtype">unsigned</span> ninputs = ninput_items_required.size ();
<a name="l00081"></a>00081      <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; i &lt; ninputs; i++)
<a name="l00082"></a>00082        ninput_items_required[i] = (<span class="keywordtype">int</span>)((double)noutput_items / <a class="code" href="classgr__block.html#aa9df8c4d3fb92bde98900831546f8b97" title="return the approximate output rate / input rate">relative_rate</a>()) + (<span class="keywordtype">int</span>)<a class="code" href="classgr__block.html#ad3b305a663f4b5b5c4e17070d00f05d9">history</a>();
<a name="l00083"></a>00083    }
<a name="l00084"></a>00084 
<a name="l00085"></a>00085 <span class="comment"></span>
<a name="l00086"></a>00086 <span class="comment">  /*!</span>
<a name="l00087"></a>00087 <span class="comment">   * \brief Force check topology to return true or false.</span>
<a name="l00088"></a>00088 <span class="comment">   *</span>
<a name="l00089"></a>00089 <span class="comment">   * \param check_topology      value to return when check_topology is called (true or false)</span>
<a name="l00090"></a>00090 <span class="comment">   * default check_topology returns true</span>
<a name="l00091"></a>00091 <span class="comment">   *</span>
<a name="l00092"></a>00092 <span class="comment">   */</span>
<a name="l00093"></a><a class="code" href="classgr__test.html#a5d96333a3756b37fe54a6a3f88866b64">00093</a>    <span class="keywordtype">void</span> <a class="code" href="classgr__test.html#a5d96333a3756b37fe54a6a3f88866b64" title="Force check topology to return true or false.">set_check_topology</a> (<span class="keywordtype">bool</span> <a class="code" href="classgr__test.html#ac9924b05718346c0cf3d231f2a82474b" title="Confirm that ninputs and noutputs is an acceptable combination.">check_topology</a>){ <a class="code" href="classgr__test.html#ae073453777b26e35d98165c888f73b54">d_check_topology</a>=<a class="code" href="classgr__test.html#ac9924b05718346c0cf3d231f2a82474b" title="Confirm that ninputs and noutputs is an acceptable combination.">check_topology</a>;}
<a name="l00094"></a>00094 <span class="comment"></span>
<a name="l00095"></a>00095 <span class="comment">  /*!</span>
<a name="l00096"></a>00096 <span class="comment">   * \brief Confirm that ninputs and noutputs is an acceptable combination.</span>
<a name="l00097"></a>00097 <span class="comment">   *</span>
<a name="l00098"></a>00098 <span class="comment">   * \param ninputs     number of input streams connected</span>
<a name="l00099"></a>00099 <span class="comment">   * \param noutputs    number of output streams connected</span>
<a name="l00100"></a>00100 <span class="comment">   *</span>
<a name="l00101"></a>00101 <span class="comment">   * \returns true if this is a valid configuration for this block.</span>
<a name="l00102"></a>00102 <span class="comment">   *</span>
<a name="l00103"></a>00103 <span class="comment">   * This function is called by the runtime system whenever the</span>
<a name="l00104"></a>00104 <span class="comment">   * topology changes.  Most classes do not need to override this.</span>
<a name="l00105"></a>00105 <span class="comment">   * This check is in addition to the constraints specified by the input</span>
<a name="l00106"></a>00106 <span class="comment">   * and output gr_io_signatures.</span>
<a name="l00107"></a>00107 <span class="comment">   */</span>
<a name="l00108"></a><a class="code" href="classgr__test.html#ac9924b05718346c0cf3d231f2a82474b">00108</a>   <span class="keywordtype">bool</span> <a class="code" href="classgr__test.html#ac9924b05718346c0cf3d231f2a82474b" title="Confirm that ninputs and noutputs is an acceptable combination.">check_topology</a> (<span class="keywordtype">int</span> ninputs, <span class="keywordtype">int</span> noutputs) { <span class="keywordflow">return</span> <a class="code" href="classgr__test.html#ae073453777b26e35d98165c888f73b54">d_check_topology</a>;}
<a name="l00109"></a>00109 
<a name="l00110"></a>00110   <span class="comment">// ----------------------------------------------------------------</span>
<a name="l00111"></a>00111   <span class="comment">/*</span>
<a name="l00112"></a>00112 <span class="comment">   * The following two methods provide special case info to the</span>
<a name="l00113"></a>00113 <span class="comment">   * scheduler in the event that a block has a fixed input to output</span>
<a name="l00114"></a>00114 <span class="comment">   * ratio.  gr_sync_block, gr_sync_decimator and gr_sync_interpolator</span>
<a name="l00115"></a>00115 <span class="comment">   * override these.  If you&#39;re fixed rate, subclass one of those.</span>
<a name="l00116"></a>00116 <span class="comment">   */</span><span class="comment"></span>
<a name="l00117"></a>00117 <span class="comment">  /*!</span>
<a name="l00118"></a>00118 <span class="comment">   * \brief Given ninput samples, return number of output samples that will be produced.</span>
<a name="l00119"></a>00119 <span class="comment">   * N.B. this is only defined if fixed_rate returns true.</span>
<a name="l00120"></a>00120 <span class="comment">   * Generally speaking, you don&#39;t need to override this.</span>
<a name="l00121"></a>00121 <span class="comment">   */</span>
<a name="l00122"></a><a class="code" href="classgr__test.html#abd560ba788790b052bcdf55c40fe203b">00122</a>   <span class="keywordtype">int</span> <a class="code" href="classgr__test.html#abd560ba788790b052bcdf55c40fe203b" 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) { <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)((double)ninput/<a class="code" href="classgr__block.html#aa9df8c4d3fb92bde98900831546f8b97" title="return the approximate output rate / input rate">relative_rate</a>()); }
<a name="l00123"></a>00123 <span class="comment"></span>
<a name="l00124"></a>00124 <span class="comment">  /*!</span>
<a name="l00125"></a>00125 <span class="comment">   * \brief Given noutput samples, return number of input samples required to produce noutput.</span>
<a name="l00126"></a>00126 <span class="comment">   * N.B. this is only defined if fixed_rate returns true.</span>
<a name="l00127"></a>00127 <span class="comment">   */</span>
<a name="l00128"></a><a class="code" href="classgr__test.html#abb33a7036cbb39bcfeacf22c6352b50b">00128</a>   <span class="keywordtype">int</span> <a class="code" href="classgr__test.html#abb33a7036cbb39bcfeacf22c6352b50b" title="Given noutput samples, return number of input samples required to produce noutput. N.B. this is only defined if fixed_rate returns true.">fixed_rate_noutput_to_ninput</a>(<span class="keywordtype">int</span> noutput)  { <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)((double)noutput*<a class="code" href="classgr__block.html#aa9df8c4d3fb92bde98900831546f8b97" title="return the approximate output rate / input rate">relative_rate</a>()); }
<a name="l00129"></a>00129 <span class="comment"></span>
<a name="l00130"></a>00130 <span class="comment">  /*!</span>
<a name="l00131"></a>00131 <span class="comment">   * \brief Set if fixed rate should return true.</span>
<a name="l00132"></a>00132 <span class="comment">   * N.B. This is normally a private method but we make it available here as public.</span>
<a name="l00133"></a>00133 <span class="comment">   */</span>
<a name="l00134"></a><a class="code" href="classgr__test.html#a7aa4753ba5e757786726f7dd29118199">00134</a>   <span class="keywordtype">void</span> <a class="code" href="classgr__test.html#a7aa4753ba5e757786726f7dd29118199" title="Set if fixed rate should return true. N.B. This is normally a private method but we make it available...">set_fixed_rate_public</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>){ <a class="code" href="classgr__block.html#a176a95343488a9a760c8edf8bb08db20">set_fixed_rate</a>(fixed_rate);}
<a name="l00135"></a>00135 <span class="comment"></span>
<a name="l00136"></a>00136 <span class="comment">  /*!</span>
<a name="l00137"></a>00137 <span class="comment">   * \brief Set the consume pattern.</span>
<a name="l00138"></a>00138 <span class="comment">   *</span>
<a name="l00139"></a>00139 <span class="comment">   * \param cons_type   which consume pattern to use</span>
<a name="l00140"></a>00140 <span class="comment">   */</span>
<a name="l00141"></a><a class="code" href="classgr__test.html#a0134531834988f75b8c7f64968005516">00141</a>   <span class="keywordtype">void</span> <a class="code" href="classgr__test.html#a0134531834988f75b8c7f64968005516" title="Set the consume pattern.">set_consume_type</a> (<a class="code" href="gr__test__types_8h.html#a7e11c1089ad4d0f3c0d4c0cea0281fa6">gr_consume_type_t</a> cons_type) { <a class="code" href="classgr__test.html#ac2dcb99dc170b465b063624d2082a792">d_consume_type</a>=cons_type;}
<a name="l00142"></a>00142 <span class="comment"></span>
<a name="l00143"></a>00143 <span class="comment">  /*!</span>
<a name="l00144"></a>00144 <span class="comment">   * \brief Set the consume limit.</span>
<a name="l00145"></a>00145 <span class="comment">   *</span>
<a name="l00146"></a>00146 <span class="comment">   * \param limit       min or maximum items to consume (depending on consume_type)</span>
<a name="l00147"></a>00147 <span class="comment">   */</span>
<a name="l00148"></a><a class="code" href="classgr__test.html#a866d8cbba629307e5e976339048c0234">00148</a>   <span class="keywordtype">void</span> <a class="code" href="classgr__test.html#a866d8cbba629307e5e976339048c0234" title="Set the consume limit.">set_consume_limit</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> limit) { <a class="code" href="classgr__test.html#a80c41a7a262059c6c7b7b3b77bb3203d">d_min_consume</a>=limit; <a class="code" href="classgr__test.html#ae069b12d1c283923f1d64176d49a2a88">d_max_consume</a>=limit;}
<a name="l00149"></a>00149 <span class="comment"></span>
<a name="l00150"></a>00150 <span class="comment">  /*!</span>
<a name="l00151"></a>00151 <span class="comment">   * \brief Set the produce pattern.</span>
<a name="l00152"></a>00152 <span class="comment">   *</span>
<a name="l00153"></a>00153 <span class="comment">   * \param prod_type   which produce pattern to use</span>
<a name="l00154"></a>00154 <span class="comment">   */</span>
<a name="l00155"></a><a class="code" href="classgr__test.html#a607096450cf5b6e967f35b5e82d918e0">00155</a>   <span class="keywordtype">void</span> <a class="code" href="classgr__test.html#a607096450cf5b6e967f35b5e82d918e0" title="Set the produce pattern.">set_produce_type</a> (<a class="code" href="gr__test__types_8h.html#afc8b997c194075e5d0d5cb793e829329">gr_produce_type_t</a> prod_type) { <a class="code" href="classgr__test.html#a51d2a008941c2ff0e0bad38b66a57f87">d_produce_type</a>=prod_type;}
<a name="l00156"></a>00156 <span class="comment"></span>
<a name="l00157"></a>00157 <span class="comment">  /*!</span>
<a name="l00158"></a>00158 <span class="comment">   * \brief Set the produce limit.</span>
<a name="l00159"></a>00159 <span class="comment">   *</span>
<a name="l00160"></a>00160 <span class="comment">   * \param limit       min or maximum items to produce (depending on produce_type)</span>
<a name="l00161"></a>00161 <span class="comment">   */</span>
<a name="l00162"></a><a class="code" href="classgr__test.html#ae47866bc4ef06e4cca54d7a015b4532e">00162</a>   <span class="keywordtype">void</span> <a class="code" href="classgr__test.html#ae47866bc4ef06e4cca54d7a015b4532e" title="Set the produce limit.">set_produce_limit</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> limit) { <a class="code" href="classgr__test.html#ab413d9a967b53cd273e84eacc0392e05">d_min_produce</a>=limit; <a class="code" href="classgr__test.html#a595d614900bcb35deaaa932823cf1adc">d_max_produce</a>=limit;}
<a name="l00163"></a>00163 
<a name="l00164"></a>00164   <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00165"></a>00165 
<a name="l00166"></a>00166 
<a name="l00167"></a>00167   
<a name="l00168"></a>00168  <span class="keyword">protected</span>:
<a name="l00169"></a><a class="code" href="classgr__test.html#aa3c203116c6bc15fdf7b1c5750562627">00169</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classgr__test.html#aa3c203116c6bc15fdf7b1c5750562627">d_sizeof_input_item</a>;
<a name="l00170"></a><a class="code" href="classgr__test.html#a861e0e31303892e9acffa5a3be04f9aa">00170</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classgr__test.html#a861e0e31303892e9acffa5a3be04f9aa">d_sizeof_output_item</a>;
<a name="l00171"></a><a class="code" href="classgr__test.html#ae073453777b26e35d98165c888f73b54">00171</a>   <span class="keywordtype">bool</span> <a class="code" href="classgr__test.html#ae073453777b26e35d98165c888f73b54">d_check_topology</a>;
<a name="l00172"></a><a class="code" href="classgr__test.html#a7ac1f9d9aa0cc701f08da9b4211e5346">00172</a>   <span class="keywordtype">char</span> <a class="code" href="classgr__test.html#a7ac1f9d9aa0cc701f08da9b4211e5346">d_temp</a>;
<a name="l00173"></a><a class="code" href="classgr__test.html#ac2dcb99dc170b465b063624d2082a792">00173</a>   <a class="code" href="gr__test__types_8h.html#a7e11c1089ad4d0f3c0d4c0cea0281fa6">gr_consume_type_t</a> <a class="code" href="classgr__test.html#ac2dcb99dc170b465b063624d2082a792">d_consume_type</a>;
<a name="l00174"></a><a class="code" href="classgr__test.html#a80c41a7a262059c6c7b7b3b77bb3203d">00174</a>   <span class="keywordtype">int</span> <a class="code" href="classgr__test.html#a80c41a7a262059c6c7b7b3b77bb3203d">d_min_consume</a>;
<a name="l00175"></a><a class="code" href="classgr__test.html#ae069b12d1c283923f1d64176d49a2a88">00175</a>   <span class="keywordtype">int</span> <a class="code" href="classgr__test.html#ae069b12d1c283923f1d64176d49a2a88">d_max_consume</a>;
<a name="l00176"></a><a class="code" href="classgr__test.html#a51d2a008941c2ff0e0bad38b66a57f87">00176</a>   <a class="code" href="gr__test__types_8h.html#afc8b997c194075e5d0d5cb793e829329">gr_produce_type_t</a> <a class="code" href="classgr__test.html#a51d2a008941c2ff0e0bad38b66a57f87">d_produce_type</a>;
<a name="l00177"></a><a class="code" href="classgr__test.html#ab413d9a967b53cd273e84eacc0392e05">00177</a>   <span class="keywordtype">int</span> <a class="code" href="classgr__test.html#ab413d9a967b53cd273e84eacc0392e05">d_min_produce</a>;
<a name="l00178"></a><a class="code" href="classgr__test.html#a595d614900bcb35deaaa932823cf1adc">00178</a>   <span class="keywordtype">int</span> <a class="code" href="classgr__test.html#a595d614900bcb35deaaa932823cf1adc">d_max_produce</a>;
<a name="l00179"></a>00179   <a class="code" href="classgr__test.html#a0de0cde25f060628652711db1fa75909">gr_test</a> (<span class="keyword">const</span> std::string &amp;<a class="code" href="classgr__basic__block.html#aa12a20d8b8eab341da935530d29299d2">name</a>,<span class="keywordtype">int</span> min_inputs, <span class="keywordtype">int</span> max_inputs, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sizeof_input_item,
<a name="l00180"></a>00180                                    <span class="keywordtype">int</span> min_outputs, <span class="keywordtype">int</span> max_outputs, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sizeof_output_item,
<a name="l00181"></a>00181                                    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classgr__block.html#ad3b305a663f4b5b5c4e17070d00f05d9">history</a>,<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classgr__block.html#ade8590e9cba9ccfe1b870be46b1416c2">output_multiple</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="l00182"></a>00182                                    <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>,<a class="code" href="gr__test__types_8h.html#a7e11c1089ad4d0f3c0d4c0cea0281fa6">gr_consume_type_t</a> cons_type, <a class="code" href="gr__test__types_8h.html#afc8b997c194075e5d0d5cb793e829329">gr_produce_type_t</a> prod_type);
<a name="l00183"></a>00183 
<a name="l00184"></a>00184 
<a name="l00185"></a>00185 
<a name="l00186"></a>00186   <span class="keyword">friend</span> <a class="code" href="classboost_1_1shared__ptr.html" title="shared_ptr documentation stub">gr_test_sptr</a> <a class="code" href="classgr__test.html#a51e81abce2488c724ba9a90d805933b1">gr_make_test</a> (<span class="keyword">const</span> std::string &amp;<a class="code" href="classgr__basic__block.html#aa12a20d8b8eab341da935530d29299d2">name</a>,<span class="keywordtype">int</span> min_inputs, <span class="keywordtype">int</span> max_inputs, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sizeof_input_item,
<a name="l00187"></a>00187                                    <span class="keywordtype">int</span> min_outputs, <span class="keywordtype">int</span> max_outputs, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sizeof_output_item,
<a name="l00188"></a>00188                                    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classgr__block.html#ad3b305a663f4b5b5c4e17070d00f05d9">history</a>,<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classgr__block.html#ade8590e9cba9ccfe1b870be46b1416c2">output_multiple</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="l00189"></a>00189                                    <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>,<a class="code" href="gr__test__types_8h.html#a7e11c1089ad4d0f3c0d4c0cea0281fa6">gr_consume_type_t</a> cons_type, <a class="code" href="gr__test__types_8h.html#afc8b997c194075e5d0d5cb793e829329">gr_produce_type_t</a> prod_type);
<a name="l00190"></a>00190 };
<a name="l00191"></a>00191 
<a name="l00192"></a>00192 
<a name="l00193"></a>00193 
<a name="l00194"></a>00194 <span class="preprocessor">#endif </span><span class="comment">/* INCLUDED_GR_TEST_H */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="gr__test_8h.html">gr_test.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>