Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > e1990170655e25252b23301d6cebc16d > files > 1004

usrp-doc-3.3.0-8mdv2010.1.i586.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>Universal Software Radio Peripheral: fusb_darwin.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>fusb_darwin.h</h1><a href="fusb__darwin_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,2009,2010 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 _FUSB_DARWIN_H_</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define _FUSB_DARWIN_H_</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;usb.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;<a class="code" href="fusb_8h.html">fusb.h</a>&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;IOKit/IOCFBundle.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;IOKit/IOCFPlugIn.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;IOKit/usb/IOUSBLib.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;IOKit/IOKitLib.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &quot;<a class="code" href="circular__linked__list_8h.html">circular_linked_list.h</a>&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="circular__buffer_8h.html">circular_buffer.h</a>&quot;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="comment">// for MacOS X 10.4.[0-3]</span>
<a name="l00036"></a><a class="code" href="fusb__darwin_8h.html#ab20603f7900e18ac518c5684661b9f58">00036</a> <span class="preprocessor">#define usb_interface_t IOUSBInterfaceInterface220</span>
<a name="l00037"></a><a class="code" href="fusb__darwin_8h.html#ad0310d745330ad5ee62942d02f77f38a">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID220</span>
<a name="l00038"></a><a class="code" href="fusb__darwin_8h.html#aead0c247302c6be65a9ff59d22fe313b">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define InterfaceVersion 220</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00040"></a>00040 <span class="comment">// for MacOS X 10.3.[0-9] and 10.4.[0-3]</span>
<a name="l00041"></a><a class="code" href="fusb__darwin_8h.html#a52434bb39d2aca48100c2efbbda280bc">00041</a> <span class="preprocessor">#define usb_device_t    IOUSBDeviceInterface197</span>
<a name="l00042"></a><a class="code" href="fusb__darwin_8h.html#a75f09143cdfbb715d528365f9582504e">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define DeviceInterfaceID kIOUSBDeviceInterfaceID197</span>
<a name="l00043"></a><a class="code" href="fusb__darwin_8h.html#ad787f3194daacd4416c95d004aa58fc8">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define DeviceVersion 197</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a>00045 <span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00046"></a><a class="code" href="structusb__dev__handle.html">00046</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structusb__dev__handle.html">usb_dev_handle</a> {
<a name="l00047"></a><a class="code" href="structusb__dev__handle.html#a950bc8d46963caa443fb27cf2ee2b811">00047</a>   <span class="keywordtype">int</span> <a class="code" href="structusb__dev__handle.html#a950bc8d46963caa443fb27cf2ee2b811">fd</a>;
<a name="l00048"></a>00048 
<a name="l00049"></a><a class="code" href="structusb__dev__handle.html#a1e6baaed3dc1558ff34555200dd32a17">00049</a>   <span class="keyword">struct </span>usb_bus *<a class="code" href="structusb__dev__handle.html#a1e6baaed3dc1558ff34555200dd32a17">bus</a>;
<a name="l00050"></a><a class="code" href="structusb__dev__handle.html#a5557c3388ca9582e186b9ec20bdd480d">00050</a>   <span class="keyword">struct </span>usb_device *<a class="code" href="structusb__dev__handle.html#a5557c3388ca9582e186b9ec20bdd480d">device</a>;
<a name="l00051"></a>00051 
<a name="l00052"></a><a class="code" href="structusb__dev__handle.html#aad569349383a9fc8ac71d5bcce7909de">00052</a>   <span class="keywordtype">int</span> <a class="code" href="structusb__dev__handle.html#aad569349383a9fc8ac71d5bcce7909de">config</a>;
<a name="l00053"></a><a class="code" href="structusb__dev__handle.html#a2b7e997cdb4735e3b2c1fc58b81cee03">00053</a>   <span class="keywordtype">int</span> <a class="code" href="structusb__dev__handle.html#a2b7e997cdb4735e3b2c1fc58b81cee03">interface</a>;
<a name="l00054"></a><a class="code" href="structusb__dev__handle.html#a822bc050950231b58e041f33a28d349c">00054</a>   <span class="keywordtype">int</span> <a class="code" href="structusb__dev__handle.html#a822bc050950231b58e041f33a28d349c">altsetting</a>;
<a name="l00055"></a>00055 
<a name="l00056"></a>00056   <span class="comment">/* Added by RMT so implementations can store other per-open-device data */</span>
<a name="l00057"></a><a class="code" href="structusb__dev__handle.html#ab08f2af9083159ae86648eae05b52c01">00057</a>   <span class="keywordtype">void</span> *<a class="code" href="structusb__dev__handle.html#ab08f2af9083159ae86648eae05b52c01">impl_info</a>;
<a name="l00058"></a>00058 } <a class="code" href="structusb__dev__handle.html">usb_dev_handle</a>;
<a name="l00059"></a>00059 
<a name="l00060"></a>00060 <span class="comment">/* Darwin/OS X impl does not use fd field, instead it uses this */</span>
<a name="l00061"></a><a class="code" href="structdarwin__dev__handle.html">00061</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structdarwin__dev__handle.html">darwin_dev_handle</a> {
<a name="l00062"></a><a class="code" href="structdarwin__dev__handle.html#adf2931b2cf862a2d3d7a40d33a8a56f1">00062</a>   <a class="code" href="fusb__darwin_8h.html#a52434bb39d2aca48100c2efbbda280bc">usb_device_t</a>** <a class="code" href="structdarwin__dev__handle.html#adf2931b2cf862a2d3d7a40d33a8a56f1">device</a>;
<a name="l00063"></a><a class="code" href="structdarwin__dev__handle.html#a24033b6bf2283cebd863675951365439">00063</a>   <a class="code" href="fusb__darwin_8h.html#ab20603f7900e18ac518c5684661b9f58">usb_interface_t</a>** <a class="code" href="structdarwin__dev__handle.html#a24033b6bf2283cebd863675951365439">interface</a>;
<a name="l00064"></a><a class="code" href="structdarwin__dev__handle.html#a4514111f63826c88fb4e0a96afcff810">00064</a>   <span class="keywordtype">int</span> <a class="code" href="structdarwin__dev__handle.html#a4514111f63826c88fb4e0a96afcff810">open</a>;
<a name="l00065"></a>00065 } <a class="code" href="structdarwin__dev__handle.html">darwin_dev_handle</a>;
<a name="l00066"></a>00066 
<a name="l00067"></a><a class="code" href="fusb__darwin_8h.html#a33b766964215f52ef3eeae1397a3d244">00067</a> <span class="keyword">typedef</span> IOReturn <a class="code" href="fusb__darwin_8h.html#a33b766964215f52ef3eeae1397a3d244">io_return_t</a>;
<a name="l00068"></a><a class="code" href="fusb__darwin_8h.html#a37164a39b8252b4fb1a299aeeb08cb33">00068</a> <span class="keyword">typedef</span> IOCFPlugInInterface *<a class="code" href="fusb__darwin_8h.html#a37164a39b8252b4fb1a299aeeb08cb33">io_cf_plugin_ref_t</a>;
<a name="l00069"></a>00069 
<a name="l00070"></a>00070 <span class="keyword">static</span> <span class="keywordtype">int</span> ep_to_pipeRef (<a class="code" href="structdarwin__dev__handle.html">darwin_dev_handle</a>* device, <span class="keywordtype">int</span> ep);
<a name="l00071"></a>00071 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="fusb__darwin_8h.html#ae3f6d70c719c77e228ccc905331d7784">usb_debug</a>;
<a name="l00072"></a>00072 }
<a name="l00073"></a>00073 
<a name="l00074"></a><a class="code" href="classs__buffer.html">00074</a> <span class="keyword">class </span><a class="code" href="classs__buffer.html">s_buffer</a>
<a name="l00075"></a>00075 {
<a name="l00076"></a>00076 <span class="keyword">private</span>:
<a name="l00077"></a>00077   <span class="keywordtype">char</span>* d_buffer;
<a name="l00078"></a>00078   <span class="keywordtype">size_t</span> d_n_used, d_n_alloc;
<a name="l00079"></a>00079 
<a name="l00080"></a>00080 <span class="keyword">public</span>:
<a name="l00081"></a><a class="code" href="classs__buffer.html#ad77967f73d331d08028dd4c6ca7ce051">00081</a>   <span class="keyword">inline</span> <a class="code" href="classs__buffer.html#ad77967f73d331d08028dd4c6ca7ce051">s_buffer</a> (<span class="keywordtype">size_t</span> <a class="code" href="classs__buffer.html#a2b38085d51047076ab3b8e6bf90f56e0">n_alloc</a> = 0) {
<a name="l00082"></a>00082     d_n_used = 0;
<a name="l00083"></a>00083     d_n_alloc = <a class="code" href="classs__buffer.html#a2b38085d51047076ab3b8e6bf90f56e0">n_alloc</a>;
<a name="l00084"></a>00084     <span class="keywordflow">if</span> (<a class="code" href="classs__buffer.html#a2b38085d51047076ab3b8e6bf90f56e0">n_alloc</a>) {
<a name="l00085"></a>00085       d_buffer = (<span class="keywordtype">char</span>*) <span class="keyword">new</span> <span class="keywordtype">char</span> [<a class="code" href="classs__buffer.html#a2b38085d51047076ab3b8e6bf90f56e0">n_alloc</a>];
<a name="l00086"></a>00086     } <span class="keywordflow">else</span> {
<a name="l00087"></a>00087       d_buffer = 0;
<a name="l00088"></a>00088     }
<a name="l00089"></a>00089   };
<a name="l00090"></a><a class="code" href="classs__buffer.html#a73e9d6dc2c87bb0ff63e4cbf058f6944">00090</a>   <span class="keyword">inline</span> <a class="code" href="classs__buffer.html#a73e9d6dc2c87bb0ff63e4cbf058f6944">~s_buffer</a> () {
<a name="l00091"></a>00091     <span class="keywordflow">if</span> (d_n_alloc) {
<a name="l00092"></a>00092       <span class="keyword">delete</span> [] d_buffer;
<a name="l00093"></a>00093     }
<a name="l00094"></a>00094   };
<a name="l00095"></a><a class="code" href="classs__buffer.html#a9a7363a8a0ce0f66235c216e6584d8d9">00095</a>   <span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classs__buffer.html#a9a7363a8a0ce0f66235c216e6584d8d9">n_used</a> () { <span class="keywordflow">return</span> (d_n_used); };
<a name="l00096"></a><a class="code" href="classs__buffer.html#a460dac68a205ae299d672f55fb213e73">00096</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classs__buffer.html#a460dac68a205ae299d672f55fb213e73">n_used</a> (<span class="keywordtype">size_t</span> bufLen) {
<a name="l00097"></a>00097     d_n_used = (bufLen &gt; d_n_alloc) ? d_n_alloc : bufLen; };
<a name="l00098"></a><a class="code" href="classs__buffer.html#a2b38085d51047076ab3b8e6bf90f56e0">00098</a>   <span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classs__buffer.html#a2b38085d51047076ab3b8e6bf90f56e0">n_alloc</a> () { <span class="keywordflow">return</span> (d_n_alloc); };
<a name="l00099"></a><a class="code" href="classs__buffer.html#a9200cbab69c0e3c8f2a9e52042d9e9a7">00099</a>   <span class="keywordtype">void</span> <a class="code" href="classs__buffer.html#a9200cbab69c0e3c8f2a9e52042d9e9a7">buffer</a> (<span class="keywordtype">char</span>* l_buffer, <span class="keywordtype">size_t</span> bufLen) {
<a name="l00100"></a>00100     <span class="keywordflow">if</span> (bufLen &gt; d_n_alloc) {
<a name="l00101"></a>00101       std::cerr &lt;&lt; <span class="stringliteral">&quot;s_buffer::set: Copying only allocated bytes.&quot;</span> &lt;&lt; std::endl;
<a name="l00102"></a>00102       bufLen = d_n_alloc;
<a name="l00103"></a>00103     }
<a name="l00104"></a>00104     <span class="keywordflow">if</span> (!l_buffer) {
<a name="l00105"></a>00105       std::cerr &lt;&lt; <span class="stringliteral">&quot;s_buffer::set: NULL buffer.&quot;</span> &lt;&lt; std::endl;
<a name="l00106"></a>00106       <span class="keywordflow">return</span>;
<a name="l00107"></a>00107     }
<a name="l00108"></a>00108     bcopy (l_buffer, d_buffer, bufLen);
<a name="l00109"></a>00109     d_n_used = bufLen;
<a name="l00110"></a>00110   };
<a name="l00111"></a><a class="code" href="classs__buffer.html#a952abdac0f963242f30c63083f414044">00111</a>   <span class="keyword">inline</span> <span class="keywordtype">char</span>* <a class="code" href="classs__buffer.html#a952abdac0f963242f30c63083f414044">buffer</a> () { <span class="keywordflow">return</span> (d_buffer); };
<a name="l00112"></a><a class="code" href="classs__buffer.html#aa554e07718c3c8160b1e5de3f6a4ee97">00112</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classs__buffer.html#aa554e07718c3c8160b1e5de3f6a4ee97">reset</a> () {
<a name="l00113"></a>00113     bzero (d_buffer, d_n_alloc);
<a name="l00114"></a>00114     d_n_used = 0;
<a name="l00115"></a>00115   };
<a name="l00116"></a>00116 };
<a name="l00117"></a>00117 
<a name="l00118"></a><a class="code" href="fusb__darwin_8h.html#a091507347a914fd9aa4bd343f136c7a0">00118</a> <span class="keyword">typedef</span> <a class="code" href="classs__buffer.html">s_buffer</a>* <a class="code" href="classs__buffer.html">s_buffer_ptr</a>;
<a name="l00119"></a><a class="code" href="fusb__darwin_8h.html#ae5e012aa36c5aa632508a8a7a871a269">00119</a> <span class="keyword">typedef</span> <a class="code" href="classs__node.html">s_node&lt;s_buffer_ptr&gt;</a>* <a class="code" href="classs__node.html">s_node_ptr</a>;
<a name="l00120"></a><a class="code" href="fusb__darwin_8h.html#a0ad379ec681818f6ee2e5a507d129f8e">00120</a> <span class="keyword">typedef</span> <a class="code" href="classcircular__linked__list.html">circular_linked_list&lt;s_buffer_ptr&gt;</a>* <a class="code" href="classcircular__linked__list.html">s_queue_ptr</a>;
<a name="l00121"></a><a class="code" href="fusb__darwin_8h.html#a62cf7423e082faa54017f76a4fee983d">00121</a> <span class="keyword">typedef</span> <a class="code" href="classs__both.html">s_both&lt;s_buffer_ptr&gt;</a>* <a class="code" href="classs__both.html">s_both_ptr</a>;
<a name="l00122"></a>00122 
<a name="l00130"></a><a class="code" href="classfusb__devhandle__darwin.html">00130</a> <span class="keyword">class </span><a class="code" href="classfusb__devhandle__darwin.html" title="darwin implementation of fusb_devhandle">fusb_devhandle_darwin</a> : <span class="keyword">public</span> <a class="code" href="classfusb__devhandle.html" title="abstract usb device handle">fusb_devhandle</a>
<a name="l00131"></a>00131 {
<a name="l00132"></a>00132 <span class="keyword">public</span>:
<a name="l00133"></a>00133   <span class="comment">// CREATORS</span>
<a name="l00134"></a>00134   <a class="code" href="classfusb__devhandle__darwin.html#acb62c443d1c750169b3c912735cf6f29">fusb_devhandle_darwin</a> (<a class="code" href="structusb__dev__handle.html">usb_dev_handle</a>* udh);
<a name="l00135"></a>00135   <span class="keyword">virtual</span> <a class="code" href="classfusb__devhandle__darwin.html#a37275287d4abb4981d28d3458d75333c">~fusb_devhandle_darwin</a> ();
<a name="l00136"></a>00136 
<a name="l00137"></a>00137   <span class="comment">// MANIPULATORS</span>
<a name="l00138"></a>00138   <span class="keyword">virtual</span> <a class="code" href="classfusb__ephandle.html" title="abstract usb end point handle">fusb_ephandle</a>* <a class="code" href="classfusb__devhandle__darwin.html#a2edab16988958b0e7108d99e18e171df" title="return an ephandle of the correct subtype">make_ephandle</a> (<span class="keywordtype">int</span> endpoint, <span class="keywordtype">bool</span> input_p,
<a name="l00139"></a>00139                                         <span class="keywordtype">int</span> block_size = 0, <span class="keywordtype">int</span> nblocks = 0);
<a name="l00140"></a>00140 };
<a name="l00141"></a>00141 
<a name="l00149"></a><a class="code" href="classfusb__ephandle__darwin.html">00149</a> <span class="keyword">class </span><a class="code" href="classfusb__ephandle__darwin.html" title="darwin implementation of fusb_ephandle">fusb_ephandle_darwin</a> : <span class="keyword">public</span> <a class="code" href="classfusb__ephandle.html" title="abstract usb end point handle">fusb_ephandle</a>
<a name="l00150"></a>00150 {
<a name="l00151"></a>00151 <span class="keyword">private</span>:
<a name="l00152"></a>00152   <a class="code" href="classfusb__devhandle__darwin.html" title="darwin implementation of fusb_devhandle">fusb_devhandle_darwin</a>* d_devhandle;
<a name="l00153"></a>00153   gruel::thread* d_runThread;
<a name="l00154"></a>00154   gruel::mutex* d_runThreadRunning;
<a name="l00155"></a>00155 
<a name="l00156"></a>00156   CFRunLoopRef d_CFRunLoopRef;
<a name="l00157"></a>00157 
<a name="l00158"></a>00158   <span class="keyword">static</span> <span class="keywordtype">void</span> write_completed (<span class="keywordtype">void</span>* ret_io_size,
<a name="l00159"></a>00159                                <a class="code" href="fusb__darwin_8h.html#a33b766964215f52ef3eeae1397a3d244">io_return_t</a> result,
<a name="l00160"></a>00160                                <span class="keywordtype">void</span>* io_size);
<a name="l00161"></a>00161   <span class="keyword">static</span> <span class="keywordtype">void</span> read_completed (<span class="keywordtype">void</span>* ret_io_size,
<a name="l00162"></a>00162                               <a class="code" href="fusb__darwin_8h.html#a33b766964215f52ef3eeae1397a3d244">io_return_t</a> result,
<a name="l00163"></a>00163                               <span class="keywordtype">void</span>* io_size);
<a name="l00164"></a>00164   <span class="keyword">static</span> <span class="keywordtype">void</span> run_thread (<span class="keywordtype">void</span>* arg);
<a name="l00165"></a>00165   <span class="keyword">static</span> <span class="keywordtype">void</span> read_thread (<span class="keywordtype">void</span>* arg);
<a name="l00166"></a>00166 
<a name="l00167"></a>00167   <span class="keywordtype">void</span> read_issue (<a class="code" href="classs__both.html">s_both_ptr</a> l_both);
<a name="l00168"></a>00168 
<a name="l00169"></a>00169 <span class="keyword">public</span>:
<a name="l00170"></a>00170   <span class="comment">// variables, for now</span>
<a name="l00171"></a><a class="code" href="classfusb__ephandle__darwin.html#a6335642bc300216ff8e43a28453c9b6d">00171</a>   UInt8 <a class="code" href="classfusb__ephandle__darwin.html#a0fe61b67ad1e4cf8e1f867b5d7428a90">d_pipeRef</a>, <a class="code" href="classfusb__ephandle__darwin.html#a6335642bc300216ff8e43a28453c9b6d">d_transferType</a>;
<a name="l00172"></a><a class="code" href="classfusb__ephandle__darwin.html#a833a58e14de40f53f45df6ba213d2058">00172</a>   <a class="code" href="fusb__darwin_8h.html#ab20603f7900e18ac518c5684661b9f58">usb_interface_t</a>** <a class="code" href="classfusb__ephandle__darwin.html#a833a58e14de40f53f45df6ba213d2058">d_interfaceRef</a>;
<a name="l00173"></a><a class="code" href="classfusb__ephandle__darwin.html#a4c946cfbb61ca98f1c3afc5f14e693ec">00173</a>   <a class="code" href="fusb__darwin_8h.html#ab20603f7900e18ac518c5684661b9f58">usb_interface_t</a>* <a class="code" href="classfusb__ephandle__darwin.html#a4c946cfbb61ca98f1c3afc5f14e693ec">d_interface</a>;
<a name="l00174"></a><a class="code" href="classfusb__ephandle__darwin.html#a547ad950d744a4af1fcd1908bfc43135">00174</a>   <a class="code" href="classcircular__linked__list.html">s_queue_ptr</a> <a class="code" href="classfusb__ephandle__darwin.html#a547ad950d744a4af1fcd1908bfc43135">d_queue</a>;
<a name="l00175"></a><a class="code" href="classfusb__ephandle__darwin.html#a86826bf2951e9be5f28d38f0bc38ec7b">00175</a>   <a class="code" href="classcircular__buffer.html">circular_buffer&lt;char&gt;</a>* <a class="code" href="classfusb__ephandle__darwin.html#a86826bf2951e9be5f28d38f0bc38ec7b">d_buffer</a>;
<a name="l00176"></a><a class="code" href="classfusb__ephandle__darwin.html#abe51d11608df5388d3ea7d1a0ed125b3">00176</a>   <span class="keywordtype">size_t</span> <a class="code" href="classfusb__ephandle__darwin.html#abe51d11608df5388d3ea7d1a0ed125b3">d_bufLenBytes</a>;
<a name="l00177"></a><a class="code" href="classfusb__ephandle__darwin.html#a88814e7de36d423c025bdeb126e64f50">00177</a>   gruel::mutex* <a class="code" href="classfusb__ephandle__darwin.html#a88814e7de36d423c025bdeb126e64f50">d_readRunning</a>;
<a name="l00178"></a><a class="code" href="classfusb__ephandle__darwin.html#a42b7dff6eecba8b3157ad44298a8e827">00178</a>   gruel::mutex* <a class="code" href="classfusb__ephandle__darwin.html#a42b7dff6eecba8b3157ad44298a8e827">d_runBlock_mutex</a>;
<a name="l00179"></a><a class="code" href="classfusb__ephandle__darwin.html#ae796719c23f4ca218c8808ba1cf6db34">00179</a>   gruel::mutex* <a class="code" href="classfusb__ephandle__darwin.html#ae796719c23f4ca218c8808ba1cf6db34">d_readBlock_mutex</a>;
<a name="l00180"></a><a class="code" href="classfusb__ephandle__darwin.html#a86634b17d337747f9483db8ba51136fa">00180</a>   gruel::condition_variable* <a class="code" href="classfusb__ephandle__darwin.html#a86634b17d337747f9483db8ba51136fa">d_runBlock</a>;
<a name="l00181"></a><a class="code" href="classfusb__ephandle__darwin.html#acc9a054a9d2e8c8dae26c3f3af7a3039">00181</a>   gruel::condition_variable* <a class="code" href="classfusb__ephandle__darwin.html#acc9a054a9d2e8c8dae26c3f3af7a3039">d_readBlock</a>;
<a name="l00182"></a>00182 
<a name="l00183"></a>00183 <span class="comment">// CREATORS</span>
<a name="l00184"></a>00184 
<a name="l00185"></a>00185   <a class="code" href="classfusb__ephandle__darwin.html#a75115bc11f04aa7b71f5c834817dc667">fusb_ephandle_darwin</a> (<a class="code" href="classfusb__devhandle__darwin.html" title="darwin implementation of fusb_devhandle">fusb_devhandle_darwin</a> *dh, <span class="keywordtype">int</span> endpoint, <span class="keywordtype">bool</span> input_p,
<a name="l00186"></a>00186                          <span class="keywordtype">int</span> <a class="code" href="classfusb__ephandle.html#a969c00b4d8ef3c8ad6444eb92da7a61c" title="returns current block size.">block_size</a> = 0, <span class="keywordtype">int</span> nblocks = 0);
<a name="l00187"></a>00187   <span class="keyword">virtual</span> <a class="code" href="classfusb__ephandle__darwin.html#a7487f22bb9d633e00ed69fed86ce697b">~fusb_ephandle_darwin</a> ();
<a name="l00188"></a>00188 
<a name="l00189"></a>00189 <span class="comment">// MANIPULATORS</span>
<a name="l00190"></a>00190 
<a name="l00191"></a>00191   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classfusb__ephandle__darwin.html#aca1441ae1cd0cff2008c23db7cff9482" title="begin streaming i/o">start</a> ();        
<a name="l00192"></a>00192   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classfusb__ephandle__darwin.html#af1424a7d28d0fc927ecdd6a5c3c26ef0" title="stop streaming i/o">stop</a> ();         
<a name="l00193"></a>00193 
<a name="l00198"></a>00198   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classfusb__ephandle__darwin.html#ad703974c4df48763a1ec4d0d489237e3">write</a> (<span class="keyword">const</span> <span class="keywordtype">void</span>* buffer, <span class="keywordtype">int</span> nbytes);
<a name="l00199"></a>00199 
<a name="l00205"></a>00205   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classfusb__ephandle__darwin.html#a9f45fa5d5fd0c1dda8244da08f707862">read</a> (<span class="keywordtype">void</span>* buffer, <span class="keywordtype">int</span> nbytes);
<a name="l00206"></a>00206 
<a name="l00207"></a>00207   <span class="comment">/*</span>
<a name="l00208"></a>00208 <span class="comment">   * abort any pending IO transfers</span>
<a name="l00209"></a>00209 <span class="comment">   */</span>
<a name="l00210"></a>00210   <span class="keywordtype">void</span> <a class="code" href="classfusb__ephandle__darwin.html#aa5067d1f65048940bffdfdb7996ea8d3">abort</a> ();
<a name="l00211"></a>00211 
<a name="l00212"></a>00212   <span class="comment">/*</span>
<a name="l00213"></a>00213 <span class="comment">   * block until all outstanding writes have completed</span>
<a name="l00214"></a>00214 <span class="comment">   */</span>
<a name="l00215"></a>00215   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classfusb__ephandle__darwin.html#a456d75e85abf8c2d3e76c7bed03e9993">wait_for_completion</a> ();
<a name="l00216"></a>00216 };
<a name="l00217"></a>00217 
<a name="l00218"></a>00218 <span class="preprocessor">#endif </span><span class="comment">/* _FUSB_DARWIN_H_ */</span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Wed Dec 29 19:44:18 2010 for Universal Software Radio Peripheral by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>