Sophie

Sophie

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

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: usrp_source_base.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('usrp__source__base_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<h1>usrp_source_base.h</h1>  </div>
</div>
<div class="contents">
<a href="usrp__source__base_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,2008 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_USRP_SOURCE_BASE_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define INCLUDED_USRP_SOURCE_BASE_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="usrp__base_8h.html">usrp_base.h</a>&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;stdexcept&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;usrp_tune_result.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;usrp_dbid.h&gt;</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">class </span><a class="code" href="classusrp__standard__rx.html" title="The C++ interface the receive side of the USRPThis is the recommended interface to USRP receive funct...">usrp_standard_rx</a>;
<a name="l00032"></a>00032 <span class="comment"></span>
<a name="l00033"></a>00033 <span class="comment">/*!</span>
<a name="l00034"></a>00034 <span class="comment"> * \brief abstract interface to Universal Software Radio Peripheral Rx path (Rev 1)</span>
<a name="l00035"></a>00035 <span class="comment"> */</span>
<a name="l00036"></a><a class="code" href="classusrp__source__base.html">00036</a> <span class="keyword">class </span><a class="code" href="classusrp__source__base.html" title="abstract interface to Universal Software Radio Peripheral Rx path (Rev 1)">usrp_source_base</a> : <span class="keyword">public</span> <a class="code" href="classusrp__base.html" title="base class for GNU Radio interface to the USRP">usrp_base</a> {
<a name="l00037"></a>00037  <span class="keyword">private</span>:
<a name="l00038"></a>00038   <a class="code" href="classboost_1_1shared__ptr.html">boost::shared_ptr&lt;usrp_standard_rx&gt;</a>   d_usrp;
<a name="l00039"></a>00039   <span class="keywordtype">int</span>                    d_noverruns;
<a name="l00040"></a>00040   
<a name="l00041"></a>00041  <span class="keyword">protected</span>:
<a name="l00042"></a>00042   <a class="code" href="classusrp__source__base.html#a28c4a821b6315a782605124dc1bb607c">usrp_source_base</a> (<span class="keyword">const</span> std::string &amp;<a class="code" href="classgr__basic__block.html#aa12a20d8b8eab341da935530d29299d2">name</a>,
<a name="l00043"></a>00043                      <a class="code" href="classboost_1_1shared__ptr.html">gr_io_signature_sptr</a> <a class="code" href="classgr__basic__block.html#add68b96f012dfe352700b4fd1c3a184a">output_signature</a>,
<a name="l00044"></a>00044                      <span class="keywordtype">int</span> which_board,
<a name="l00045"></a>00045                      <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a441058246c1ad083fe711c932e6f1762">decim_rate</a>,
<a name="l00046"></a>00046                      <span class="keywordtype">int</span> nchan,
<a name="l00047"></a>00047                      <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#ac7362b99ce0a8f02b11a09a963b2ec89">mux</a>,
<a name="l00048"></a>00048                      <span class="keywordtype">int</span> mode,
<a name="l00049"></a>00049                      <span class="keywordtype">int</span> fusb_block_size,
<a name="l00050"></a>00050                      <span class="keywordtype">int</span> fusb_nblocks,
<a name="l00051"></a>00051                      <span class="keyword">const</span> std::string fpga_filename,
<a name="l00052"></a>00052                      <span class="keyword">const</span> std::string firmware_filename
<a name="l00053"></a>00053                      ) <span class="keywordflow">throw</span> (std::runtime_error);
<a name="l00054"></a>00054 <span class="comment"></span>
<a name="l00055"></a>00055 <span class="comment">  /*!</span>
<a name="l00056"></a>00056 <span class="comment">   * \brief return number of usrp input bytes required to produce noutput items.</span>
<a name="l00057"></a>00057 <span class="comment">   */</span>
<a name="l00058"></a>00058   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a90f5535f66ab25e1e512d868270fa653" title="return number of usrp input bytes required to produce noutput items.">ninput_bytes_reqd_for_noutput_items</a> (<span class="keywordtype">int</span> noutput_items) = 0;
<a name="l00059"></a>00059 <span class="comment"></span>
<a name="l00060"></a>00060 <span class="comment">  /*!</span>
<a name="l00061"></a>00061 <span class="comment">   * \brief number of bytes in a low-level sample</span>
<a name="l00062"></a>00062 <span class="comment">   */</span>
<a name="l00063"></a>00063   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a5364da97e19b26b4a19cd0fcd7f6a25a" title="number of bytes in a low-level sample">sizeof_basic_sample</a>() <span class="keyword">const</span>;
<a name="l00064"></a>00064 <span class="comment"></span>
<a name="l00065"></a>00065 <span class="comment">  /*!</span>
<a name="l00066"></a>00066 <span class="comment">   * \brief convert between native usrp format and output item format</span>
<a name="l00067"></a>00067 <span class="comment">   *</span>
<a name="l00068"></a>00068 <span class="comment">   * \param[out] output_items           stream(s) of output items</span>
<a name="l00069"></a>00069 <span class="comment">   * \param[in] output_index            starting index in output_items</span>
<a name="l00070"></a>00070 <span class="comment">   * \param[in] output_items_available  number of empty items available at item[index]</span>
<a name="l00071"></a>00071 <span class="comment">   * \param[out] output_items_produced  number of items produced by copy</span>
<a name="l00072"></a>00072 <span class="comment">   * \param[in] usrp_buffer             source buffer</span>
<a name="l00073"></a>00073 <span class="comment">   * \param[in] usrp_buffer_length      number of bytes available in \p usrp_buffer</span>
<a name="l00074"></a>00074 <span class="comment">   * \param[out] bytes_read             number of bytes read from \p usrp_buffer</span>
<a name="l00075"></a>00075 <span class="comment">   *</span>
<a name="l00076"></a>00076 <span class="comment">   * The copy must consume all bytes available.  That is, \p bytes_read must equal</span>
<a name="l00077"></a>00077 <span class="comment">   * \p usrp_buffer_length.</span>
<a name="l00078"></a>00078 <span class="comment">   */</span>
<a name="l00079"></a>00079   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classusrp__source__base.html#a5192b3690b953a7d10b8ba2ab5807450" title="convert between native usrp format and output item format">copy_from_usrp_buffer</a> (<a class="code" href="classstd_1_1vector.html">gr_vector_void_star</a> &amp;output_items,
<a name="l00080"></a>00080                                       <span class="keywordtype">int</span> output_index,
<a name="l00081"></a>00081                                       <span class="keywordtype">int</span> output_items_available,
<a name="l00082"></a>00082                                       <span class="keywordtype">int</span> &amp;output_items_produced,
<a name="l00083"></a>00083                                       <span class="keyword">const</span> <span class="keywordtype">void</span> *usrp_buffer,
<a name="l00084"></a>00084                                       <span class="keywordtype">int</span> usrp_buffer_length,
<a name="l00085"></a>00085                                       <span class="keywordtype">int</span> &amp;bytes_read) = 0;
<a name="l00086"></a>00086 
<a name="l00087"></a>00087  <span class="keyword">public</span>:
<a name="l00088"></a>00088   <a class="code" href="classusrp__source__base.html#ac2622b160d30d0a6a6a80b667fbf8b77">~usrp_source_base</a> ();
<a name="l00089"></a>00089 
<a name="l00090"></a>00090   <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#aa8347a551c680f519197b44bd4df43ed" title="just like gr_block::general_work, only this arranges to call consume_each for you">work</a> (<span class="keywordtype">int</span> noutput_items,
<a name="l00091"></a>00091             <a class="code" href="classstd_1_1vector.html">gr_vector_const_void_star</a> &amp;input_items,
<a name="l00092"></a>00092             <a class="code" href="classstd_1_1vector.html">gr_vector_void_star</a> &amp;output_items);
<a name="l00093"></a>00093 <span class="comment"></span>
<a name="l00094"></a>00094 <span class="comment">  /*!</span>
<a name="l00095"></a>00095 <span class="comment">   * \brief Set decimator rate.  \p rate must be EVEN and in [8, 256].</span>
<a name="l00096"></a>00096 <span class="comment">   *</span>
<a name="l00097"></a>00097 <span class="comment">   * The final complex sample rate across the USB is</span>
<a name="l00098"></a>00098 <span class="comment">   *   adc_freq () / decim_rate ()</span>
<a name="l00099"></a>00099 <span class="comment">   */</span>
<a name="l00100"></a>00100   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#af45ffcf4a8ff755f121a438f563dd12d" title="Set decimator rate. rate must be EVEN and in [8, 256].">set_decim_rate</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rate);
<a name="l00101"></a>00101   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#adf8529d74696b7476e78bb0ef7b630af">set_nchannels</a> (<span class="keywordtype">int</span> nchan);
<a name="l00102"></a>00102   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#ac387c377b7294ad88825c4aa7e183bce">set_mux</a> (<span class="keywordtype">int</span> mux);
<a name="l00103"></a>00103   <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a204c69d2d553d457659603a162206798">determine_rx_mux_value</a>(<a class="code" href="structusrp__subdev__spec.html" title="specify a daughterboard and subdevice on a daughterboard.">usrp_subdev_spec</a> ss);
<a name="l00104"></a>00104   <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a204c69d2d553d457659603a162206798">determine_rx_mux_value</a>(<a class="code" href="structusrp__subdev__spec.html" title="specify a daughterboard and subdevice on a daughterboard.">usrp_subdev_spec</a> ss_a, <a class="code" href="structusrp__subdev__spec.html" title="specify a daughterboard and subdevice on a daughterboard.">usrp_subdev_spec</a> ss_b);
<a name="l00105"></a>00105 <span class="comment"></span>
<a name="l00106"></a>00106 <span class="comment">  /*!</span>
<a name="l00107"></a>00107 <span class="comment">   * \brief set the center frequency of the digital down converter.</span>
<a name="l00108"></a>00108 <span class="comment">   *</span>
<a name="l00109"></a>00109 <span class="comment">   * \p channel must be 0.  \p freq is the center frequency in Hz.</span>
<a name="l00110"></a>00110 <span class="comment">   * It must be in the range [-FIXME, FIXME].  The frequency specified is</span>
<a name="l00111"></a>00111 <span class="comment">   * quantized.  Use rx_freq to retrieve the actual value used.</span>
<a name="l00112"></a>00112 <span class="comment">   */</span>
<a name="l00113"></a>00113   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#a6de2210a0e87984e09a5943935c6e309" title="set the center frequency of the digital down converter.">set_rx_freq</a> (<span class="keywordtype">int</span> channel, <span class="keywordtype">double</span> freq);
<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 set fpga special modes</span>
<a name="l00117"></a>00117 <span class="comment">   */</span>
<a name="l00118"></a>00118   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#aeded12daa347c3cc5dad980865c83662" title="set fpga special modes">set_fpga_mode</a> (<span class="keywordtype">int</span> mode);
<a name="l00119"></a>00119 <span class="comment"></span>
<a name="l00120"></a>00120 <span class="comment">  /*!</span>
<a name="l00121"></a>00121 <span class="comment">   * \brief Set the digital down converter phase register.</span>
<a name="l00122"></a>00122 <span class="comment">   *</span>
<a name="l00123"></a>00123 <span class="comment">   * \param channel     which ddc channel [0, 3]</span>
<a name="l00124"></a>00124 <span class="comment">   * \param phase       32-bit integer phase value.</span>
<a name="l00125"></a>00125 <span class="comment">   */</span>
<a name="l00126"></a>00126   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#a2caa99dbd00173cbcd80e83706468015" title="Set the digital down converter phase register.">set_ddc_phase</a>(<span class="keywordtype">int</span> channel, <span class="keywordtype">int</span> phase);
<a name="l00127"></a>00127 
<a name="l00128"></a><a class="code" href="classusrp__source__base.html#a555cf6e1a2d7d4114c8cf0905367707a">00128</a>   <span class="keywordtype">long</span> <a class="code" href="classusrp__source__base.html#a555cf6e1a2d7d4114c8cf0905367707a">adc_rate</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classusrp__base.html#a4d9437597a0765bb108d4edb4a214a59" title="returns A/D or D/A converter rate in Hz">converter_rate</a>(); }   <span class="comment">// alias</span>
<a name="l00129"></a><a class="code" href="classusrp__source__base.html#a64a278b12f7eed5f6c3540477e0f8e3c">00129</a>   <span class="keywordtype">long</span> <a class="code" href="classusrp__source__base.html#a64a278b12f7eed5f6c3540477e0f8e3c">adc_freq</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classusrp__base.html#a4d9437597a0765bb108d4edb4a214a59" title="returns A/D or D/A converter rate in Hz">converter_rate</a>(); }   <span class="comment">// deprecated alias</span>
<a name="l00130"></a>00130 
<a name="l00131"></a>00131   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a441058246c1ad083fe711c932e6f1762">decim_rate</a> () <span class="keyword">const</span>;
<a name="l00132"></a>00132   <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a754d7f9ed066593a64539b6fbb37f0d6">nchannels</a> () <span class="keyword">const</span>;
<a name="l00133"></a>00133   <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#ac7362b99ce0a8f02b11a09a963b2ec89">mux</a> () <span class="keyword">const</span>;
<a name="l00134"></a>00134   <span class="keywordtype">double</span> <a class="code" href="classusrp__source__base.html#a273ac4ee3839cdffc3db51eeae8a40d6">rx_freq</a> (<span class="keywordtype">int</span> channel) <span class="keyword">const</span>;
<a name="l00135"></a><a class="code" href="classusrp__source__base.html#a4413cb06e3a6752074ecaf71364d7253">00135</a>   <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a4413cb06e3a6752074ecaf71364d7253">noverruns</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_noverruns; }
<a name="l00136"></a>00136 
<a name="l00137"></a>00137   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#a878f998738ed256caa2df56e90594cb8">has_rx_halfband</a>();
<a name="l00138"></a>00138   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#af02baef198591b322dbac19512af01d6">has_tx_halfband</a>();
<a name="l00139"></a>00139   <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a2ff361daed7a82cb48e3ac67d4ca1a37">nddcs</a>();
<a name="l00140"></a>00140   <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a115411030e5f6e6870693803f87ed6ad">nducs</a>();
<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 Called to enable drivers, etc for i/o devices.</span>
<a name="l00144"></a>00144 <span class="comment">   *</span>
<a name="l00145"></a>00145 <span class="comment">   * This allows a block to enable an associated driver to begin</span>
<a name="l00146"></a>00146 <span class="comment">   * transfering data just before we start to execute the scheduler.</span>
<a name="l00147"></a>00147 <span class="comment">   * The end result is that this reduces latency in the pipeline when</span>
<a name="l00148"></a>00148 <span class="comment">   * dealing with audio devices, usrps, etc.</span>
<a name="l00149"></a>00149 <span class="comment">   */</span>
<a name="l00150"></a>00150   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#a9153e851aed832d42ad878efe0f90cd4" title="Called to enable drivers, etc for i/o devices.">start</a>();
<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 Called to disable drivers, etc for i/o devices.</span>
<a name="l00154"></a>00154 <span class="comment">   */</span>
<a name="l00155"></a>00155   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#a8bafa0648c4e3194ac7ecccafdaca49c" title="Called to disable drivers, etc for i/o devices.">stop</a>();
<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 Specify Rx data format.</span>
<a name="l00159"></a>00159 <span class="comment">   *</span>
<a name="l00160"></a>00160 <span class="comment">   * \param format      format specifier</span>
<a name="l00161"></a>00161 <span class="comment">   *</span>
<a name="l00162"></a>00162 <span class="comment">   * Rx data format control register</span>
<a name="l00163"></a>00163 <span class="comment">   *</span>
<a name="l00164"></a>00164 <span class="comment">   *     3                   2                   1                       </span>
<a name="l00165"></a>00165 <span class="comment">   *   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0</span>
<a name="l00166"></a>00166 <span class="comment">   *  +-----------------------------------------+-+-+---------+-------+</span>
<a name="l00167"></a>00167 <span class="comment">   *  |          Reserved (Must be zero)        |B|Q|  WIDTH  | SHIFT |</span>
<a name="l00168"></a>00168 <span class="comment">   *  +-----------------------------------------+-+-+---------+-------+</span>
<a name="l00169"></a>00169 <span class="comment">   *</span>
<a name="l00170"></a>00170 <span class="comment">   *  SHIFT specifies arithmetic right shift [0, 15]</span>
<a name="l00171"></a>00171 <span class="comment">   *  WIDTH specifies bit-width of I &amp; Q samples across the USB [1, 16] (not all valid)</span>
<a name="l00172"></a>00172 <span class="comment">   *  Q     if set deliver both I &amp; Q, else just I</span>
<a name="l00173"></a>00173 <span class="comment">   *  B     if set bypass half-band filter.</span>
<a name="l00174"></a>00174 <span class="comment">   *</span>
<a name="l00175"></a>00175 <span class="comment">   * Right now the acceptable values are:</span>
<a name="l00176"></a>00176 <span class="comment">   *</span>
<a name="l00177"></a>00177 <span class="comment">   *   B  Q  WIDTH  SHIFT</span>
<a name="l00178"></a>00178 <span class="comment">   *   0  1    16     0</span>
<a name="l00179"></a>00179 <span class="comment">   *   0  1     8     8</span>
<a name="l00180"></a>00180 <span class="comment">   *</span>
<a name="l00181"></a>00181 <span class="comment">   * More valid combos to come.</span>
<a name="l00182"></a>00182 <span class="comment">   *</span>
<a name="l00183"></a>00183 <span class="comment">   * Default value is 0x00000300  16-bits, 0 shift, deliver both I &amp; Q.</span>
<a name="l00184"></a>00184 <span class="comment">   */</span>
<a name="l00185"></a>00185   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#ab265ce89e374bdad42686f73dc2184bc" title="Specify Rx data format.">set_format</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a2556fb2f86f9bec67a2804c1465edc3b" title="return current format">format</a>);
<a name="l00186"></a>00186 <span class="comment"></span>
<a name="l00187"></a>00187 <span class="comment">  /*!</span>
<a name="l00188"></a>00188 <span class="comment">   * \brief return current format</span>
<a name="l00189"></a>00189 <span class="comment">   */</span>
<a name="l00190"></a>00190   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a2556fb2f86f9bec67a2804c1465edc3b" title="return current format">format</a> () <span class="keyword">const</span>;
<a name="l00191"></a>00191 
<a name="l00192"></a>00192   <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a964a927824f15d419894e5902fdc8b4e">make_format</a>(<span class="keywordtype">int</span> width=16, <span class="keywordtype">int</span> shift=0,
<a name="l00193"></a>00193                                   <span class="keywordtype">bool</span> want_q=<span class="keyword">true</span>, <span class="keywordtype">bool</span> bypass_halfband=<span class="keyword">false</span>);
<a name="l00194"></a>00194   <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a7420d719e7a79e041ca96de6405de942">format_width</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a2556fb2f86f9bec67a2804c1465edc3b" title="return current format">format</a>);
<a name="l00195"></a>00195   <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#afd154a23d2b034e96f7798fbab6126d9">format_shift</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a2556fb2f86f9bec67a2804c1465edc3b" title="return current format">format</a>);
<a name="l00196"></a>00196   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#a4c8cfa9b257534ca78eef5638799d514">format_want_q</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a2556fb2f86f9bec67a2804c1465edc3b" title="return current format">format</a>);
<a name="l00197"></a>00197   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#a3dc3b86e858454f9146b4084abaa4b21">format_bypass_halfband</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classusrp__source__base.html#a2556fb2f86f9bec67a2804c1465edc3b" title="return current format">format</a>);
<a name="l00198"></a>00198 <span class="comment"></span>
<a name="l00199"></a>00199 <span class="comment">  /*!</span>
<a name="l00200"></a>00200 <span class="comment">   * \brief High-level &quot;tune&quot; method.  Works for the single channel case.</span>
<a name="l00201"></a>00201 <span class="comment">   *</span>
<a name="l00202"></a>00202 <span class="comment">   * This method adjusts both the daughterboard LO and the DDC so that</span>
<a name="l00203"></a>00203 <span class="comment">   * target_freq ends up at DC in the complex baseband samples.</span>
<a name="l00204"></a>00204 <span class="comment">   *</span>
<a name="l00205"></a>00205 <span class="comment">   * \param chan  which DDC channel we&#39;re controlling (almost always 0).</span>
<a name="l00206"></a>00206 <span class="comment">   * \param db    the daughterboard we&#39;re controlling.</span>
<a name="l00207"></a>00207 <span class="comment">   * \param target_freq the RF frequency we want at DC in the complex baseband.</span>
<a name="l00208"></a>00208 <span class="comment">   * \param[out] result details how the hardware was configured.</span>
<a name="l00209"></a>00209 <span class="comment">   *</span>
<a name="l00210"></a>00210 <span class="comment">   * \returns true iff everything was successful.</span>
<a name="l00211"></a>00211 <span class="comment">   */</span>
<a name="l00212"></a>00212   <span class="keywordtype">bool</span> <a class="code" href="classusrp__source__base.html#ab34de658c4b8fc9bb6cf327b3a8438e5" title="High-level &amp;quot;tune&amp;quot; method. Works for the single channel case.">tune</a>(<span class="keywordtype">int</span> chan, <a class="code" href="classboost_1_1shared__ptr.html" title="shared_ptr documentation stub">db_base_sptr</a> <a class="code" href="classusrp__base.html#adc92a29a1a00b5239170aab7d22be47a">db</a>, <span class="keywordtype">double</span> target_freq, <a class="code" href="classusrp__tune__result.html">usrp_tune_result</a> *result);
<a name="l00213"></a>00213 <span class="comment"></span>
<a name="l00214"></a>00214 <span class="comment">  /*!</span>
<a name="l00215"></a>00215 <span class="comment">   * \brief Select suitable Rx daughterboard</span>
<a name="l00216"></a>00216 <span class="comment">   */</span>
<a name="l00217"></a>00217   <a class="code" href="structusrp__subdev__spec.html" title="specify a daughterboard and subdevice on a daughterboard.">usrp_subdev_spec</a> <a class="code" href="classusrp__source__base.html#a5f086837d51cbe21f32de20ac44021f0" title="Select suitable Rx daughterboard.">pick_rx_subdevice</a>();
<a name="l00218"></a>00218 };
<a name="l00219"></a>00219 
<a name="l00220"></a>00220 <span class="preprocessor">#endif </span><span class="comment">/* INCLUDED_USRP_SOURCE_BASE_H */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="usrp__source__base_8h.html">usrp_source_base.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>