Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 2aa62c5bbb658df1fece777472a7bcf2 > files > 869

barry-devel-docs-0.17-0.3.20100730git.fc14.noarch.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>Barry: Barry::SocketZero Class Reference</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.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceBarry.html">Barry</a>::<a class="el" href="classBarry_1_1SocketZero.html">SocketZero</a>
  </div>
</div>
<div class="contents">
<h1>Barry::SocketZero Class Reference</h1><!-- doxytag: class="Barry::SocketZero" --><div class="dynheader">
Collaboration diagram for Barry::SocketZero:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1SocketZero__coll__graph.png" border="0" usemap="#Barry_1_1SocketZero_coll__map" alt="Collaboration graph"/></div>
<map name="Barry_1_1SocketZero_coll__map" id="Barry_1_1SocketZero_coll__map">
<area shape="rect" id="node2" href="classUsb_1_1Device.html" title="Usb::Device" alt="" coords="5,203,101,234"/><area shape="rect" id="node4" href="classBarry_1_1SocketRoutingQueue.html" title="Barry::SocketRoutingQueue" alt="" coords="136,321,325,351"/><area shape="rect" id="node9" href="classBarry_1_1DataQueue.html" title="This class provides a thread aware fifo queue for Data objects, providing memory..." alt="" coords="392,203,523,234"/><area shape="rect" id="node13" href="classBarry_1_1Data.html" title="Barry::Data" alt="" coords="412,6,503,37"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classBarry_1_1SocketZero-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SocketHandle&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1SocketZero.html#a0b69a799052f54bd18522270fb4ce11a">Open</a> (uint16_t socket, const char *password=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a logical socket on the device.  <a href="#a0b69a799052f54bd18522270fb4ce11a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1SocketZero.html#ae45eba51f98adf2dc0b109b21c87c624">Close</a> (<a class="el" href="classBarry_1_1Socket.html">Socket</a> &amp;socket)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a non-default socket (i.e.  <a href="#ae45eba51f98adf2dc0b109b21c87c624"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1SocketZero.html#af255c7c76d9fe4e4c258a07c22ff1651">ClearHalt</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clears the USB Halt bit on both the read and write endpoints.  <a href="#af255c7c76d9fe4e4c258a07c22ff1651"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1SocketZero.html#a8380cdc71e1f119c958e7d5a1ac12f99">SequencePacket</a> (const <a class="el" href="classBarry_1_1Data.html">Data</a> &amp;data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if this is a sequence packet that should be ignored.  <a href="#a8380cdc71e1f119c958e7d5a1ac12f99"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>

<p>Definition at line <a class="el" href="socket_8h_source.html#l00046">46</a> of file <a class="el" href="socket_8h_source.html">socket.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af255c7c76d9fe4e4c258a07c22ff1651"></a><!-- doxytag: member="Barry::SocketZero::ClearHalt" ref="af255c7c76d9fe4e4c258a07c22ff1651" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Barry::SocketZero::ClearHalt </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clears the USB Halt bit on both the read and write endpoints. </p>

<p>Definition at line <a class="el" href="socket_8cc_source.html#l00603">603</a> of file <a class="el" href="socket_8cc_source.html">socket.cc</a>.</p>

</div>
</div>
<a class="anchor" id="ae45eba51f98adf2dc0b109b21c87c624"></a><!-- doxytag: member="Barry::SocketZero::Close" ref="ae45eba51f98adf2dc0b109b21c87c624" args="(Socket &amp;socket)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Barry::SocketZero::Close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classBarry_1_1Socket.html">Socket</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>socket</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Closes a non-default socket (i.e. </p>
<p>non-zero socket number)</p>
<p>The packet sequence is just like <a class="el" href="classBarry_1_1SocketZero.html#a0b69a799052f54bd18522270fb4ce11a" title="Open a logical socket on the device.">Open()</a>, except the command is CLOSE_SOCKET.</p>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classBarry_1_1Error.html" title="The base class for any future derived exceptions.">Barry::Error</a></em>&nbsp;</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="socket_8cc_source.html#l00526">526</a> of file <a class="el" href="socket_8cc_source.html">socket.cc</a>.</p>

</div>
</div>
<a class="anchor" id="a0b69a799052f54bd18522270fb4ce11a"></a><!-- doxytag: member="Barry::SocketZero::Open" ref="a0b69a799052f54bd18522270fb4ce11a" args="(uint16_t socket, const char *password=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SocketHandle Barry::SocketZero::Open </td>
          <td>(</td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>socket</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Open a logical socket on the device. </p>
<p>Both the socket number and the flag are based on the response to the SELECT_MODE command. See Controller::SelectMode() for more info on this.</p>
<p>The packet sequence is normal for most socket operations.</p>
<ul>
<li>Down: command packet with OPEN_SOCKET</li>
<li>Up: optional sequence handshake packet</li>
<li>Up: command response, which repeats the socket and flag data as confirmation</li>
</ul>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classBarry_1_1Error.html" title="The base class for any future derived exceptions.">Barry::Error</a></em>&nbsp;</td><td>Thrown on protocol error.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classBarry_1_1BadPassword.html" title="A bad or unknown password when talking to the device.">Barry::BadPassword</a></em>&nbsp;</td><td>Thrown on invalid password, or not enough retries left on device. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="socket_8cc_source.html#l00439">439</a> of file <a class="el" href="socket_8cc_source.html">socket.cc</a>.</p>

<p>References <a class="el" href="packet_8cc_source.html#l00050">Barry::Packet::Command()</a>.</p>

<p>Referenced by <a class="el" href="m__mode__base_8cc_source.html#l00096">Barry::Mode::Mode::RetryPassword()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1SocketZero_a0b69a799052f54bd18522270fb4ce11a_cgraph.png" border="0" usemap="#classBarry_1_1SocketZero_a0b69a799052f54bd18522270fb4ce11a_cgraph_map" alt=""></div>
<map name="classBarry_1_1SocketZero_a0b69a799052f54bd18522270fb4ce11a_cgraph_map" id="classBarry_1_1SocketZero_a0b69a799052f54bd18522270fb4ce11a_cgraph">
<area shape="rect" id="node3" href="classBarry_1_1Packet.html#a764cefd38c2dc1970fccabc01044687d" title="Returns the command value of the receive packet." alt="" coords="228,5,401,35"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1SocketZero_a0b69a799052f54bd18522270fb4ce11a_icgraph.png" border="0" usemap="#classBarry_1_1SocketZero_a0b69a799052f54bd18522270fb4ce11a_icgraph_map" alt=""></div>
<map name="classBarry_1_1SocketZero_a0b69a799052f54bd18522270fb4ce11a_icgraph_map" id="classBarry_1_1SocketZero_a0b69a799052f54bd18522270fb4ce11a_icgraph">
<area shape="rect" id="node3" href="classBarry_1_1Mode_1_1Mode.html#acc4f959c1a8473562219bd0a265b004c" title="Retry a failed password attempt from the first call to Open()." alt="" coords="228,5,465,35"/><area shape="rect" id="node5" href="classBarry_1_1Mode_1_1Mode.html#a1110243f16be2b647ed9810da27abe11" title="Select device mode." alt="" coords="516,5,695,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a8380cdc71e1f119c958e7d5a1ac12f99"></a><!-- doxytag: member="Barry::SocketZero::SequencePacket" ref="a8380cdc71e1f119c958e7d5a1ac12f99" args="(const Data &amp;data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Barry::SocketZero::SequencePacket </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classBarry_1_1Data.html">Data</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>data</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if this is a sequence packet that should be ignored. </p>
<p>This function is used in SocketZero::RawReceive() in order to determine whether to keep reading or not. By default, this function checks whether the packet is a sequence packet or not, and returns true if so. Also, if it is a sequence packet, it checks the validity of the sequence number.</p>
<p>If sequence packets become important in the future, this function could be changed to call a user-defined callback, in order to handle these things out of band. </p>

<p>Definition at line <a class="el" href="socket_8cc_source.html#l00345">345</a> of file <a class="el" href="socket_8cc_source.html">socket.cc</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="socket_8h_source.html">socket.h</a></li>
<li><a class="el" href="socket_8cc_source.html">socket.cc</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>