doc/doxygen/html/can__socket_8c.html
author etisserant
Tue, 02 Oct 2007 17:57:16 +0200
changeset 302 7ba4302a9999
parent 240 34654679f262
permissions -rw-r--r--
Many fixes in OD of DS401_Slave_GUI. Still very unstable. Work in progress
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CanFestival: drivers/can_socket/can_socket.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><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="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="dir_65dd258ff9b9ef4cd7bd0d22f5e58dba.html">drivers</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_46e557474a543d869f47f8b41f6c92ae.html">can_socket</a></div>
<h1>can_socket.c File Reference</h1><code>#include &lt;stdio.h&gt;</code><br>
<code>#include &lt;string.h&gt;</code><br>
<code>#include &lt;stdlib.h&gt;</code><br>
<code>#include &lt;stddef.h&gt;</code><br>
<code>#include &lt;errno.h&gt;</code><br>
<code>#include &quot;<a class="el" href="win32_2config_8h-source.html">config.h</a>&quot;</code><br>
<code>#include &lt;sys/socket.h&gt;</code><br>
<code>#include &lt;sys/ioctl.h&gt;</code><br>
<code>#include &quot;linux/can.h&quot;</code><br>
<code>#include &quot;linux/can/raw.h&quot;</code><br>
<code>#include &quot;net/if.h&quot;</code><br>
<code>#include &quot;<a class="el" href="can__driver_8h-source.html">can_driver.h</a>&quot;</code><br>

<p>
Include dependency graph for can_socket.c:<p><center><img src="can__socket_8c__incl.png" border="0" usemap="#drivers/can_socket/can_socket.c_map" alt=""></center>
<map name="drivers/can_socket/can_socket.c_map">
<area href="win32_2config_8h.html" shape="rect" coords="268,291,332,317" alt="">
<area href="can__driver_8h.html" shape="rect" coords="256,88,344,115" alt="">
<area href="win32_2applicfg_8h.html" shape="rect" coords="499,113,573,140" alt="">
<area href="can_8h.html" shape="rect" coords="401,139,449,165" alt="">
</map>

<p>
<a href="can__socket_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#17621bf583b5512955895eea23fbf605">PF_CAN</a>&nbsp;&nbsp;&nbsp;29</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#4b444c39ffe73d7265a8fd1f9574359a">AF_CAN</a>&nbsp;&nbsp;&nbsp;PF_CAN</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#89884954a188d907256419c1ff3312b9">CAN_IFNAME</a>&nbsp;&nbsp;&nbsp;&quot;can%s&quot;</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#4eaf4f417b909f1f45be28cada2c290a">CAN_SOCKET</a>&nbsp;&nbsp;&nbsp;socket</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#9b4deca58f52eefbbde4f8accefd154d">CAN_CLOSE</a>&nbsp;&nbsp;&nbsp;close</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#da8034e638199b5aac1db8434caa10cc">CAN_RECV</a>&nbsp;&nbsp;&nbsp;recv</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#12cff95e04c908461730b70fbffd53a7">CAN_SEND</a>&nbsp;&nbsp;&nbsp;send</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#7663ba5c0f4cf14506c929080b712100">CAN_BIND</a>&nbsp;&nbsp;&nbsp;bind</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#133b8d3a55193dcd23c7b3b6e8f733e2">CAN_IOCTL</a>&nbsp;&nbsp;&nbsp;ioctl</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#1aab66d04679810c59d88bb5b3ba706f">CAN_ERRNO</a>(err)&nbsp;&nbsp;&nbsp;errno</td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#b0b7065be05f6d53009b7bd46626e2c0">canReceive_driver</a> (<a class="el" href="win32_2applicfg_8h.html#324227f7b01d51ee83a883174769ac8f">CAN_HANDLE</a> fd0, <a class="el" href="structMessage.html">Message</a> *m)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#36327c9e0ec6d284b346963a321e3c2b">canSend_driver</a> (<a class="el" href="win32_2applicfg_8h.html#324227f7b01d51ee83a883174769ac8f">CAN_HANDLE</a> fd0, <a class="el" href="structMessage.html">Message</a> *m)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="win32_2applicfg_8h.html#324227f7b01d51ee83a883174769ac8f">CAN_HANDLE</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#a91c5884b47322592815c82427be3fac">canOpen_driver</a> (<a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> *board)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#d2f4803f3a623c82a4c3e92d4e75e5a5">canClose_driver</a> (<a class="el" href="win32_2applicfg_8h.html#324227f7b01d51ee83a883174769ac8f">CAN_HANDLE</a> fd0)</td></tr>

</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="4b444c39ffe73d7265a8fd1f9574359a"></a><!-- doxytag: member="can_socket.c::AF_CAN" ref="4b444c39ffe73d7265a8fd1f9574359a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AF_CAN&nbsp;&nbsp;&nbsp;PF_CAN          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00048">48</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
Referenced by <a class="el" href="can__socket_8c-source.html#l00150">canOpen_driver()</a>.
</div>
</div><p>
<a class="anchor" name="7663ba5c0f4cf14506c929080b712100"></a><!-- doxytag: member="can_socket.c::CAN_BIND" ref="7663ba5c0f4cf14506c929080b712100" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAN_BIND&nbsp;&nbsp;&nbsp;bind          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00055">55</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
Referenced by <a class="el" href="can__socket_8c-source.html#l00150">canOpen_driver()</a>.
</div>
</div><p>
<a class="anchor" name="9b4deca58f52eefbbde4f8accefd154d"></a><!-- doxytag: member="can_socket.c::CAN_CLOSE" ref="9b4deca58f52eefbbde4f8accefd154d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAN_CLOSE&nbsp;&nbsp;&nbsp;close          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00052">52</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
Referenced by <a class="el" href="can__socket_8c-source.html#l00228">canClose_driver()</a>, and <a class="el" href="can__socket_8c-source.html#l00150">canOpen_driver()</a>.
</div>
</div><p>
<a class="anchor" name="1aab66d04679810c59d88bb5b3ba706f"></a><!-- doxytag: member="can_socket.c::CAN_ERRNO" ref="1aab66d04679810c59d88bb5b3ba706f" args="(err)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAN_ERRNO          </td>
          <td>(</td>
          <td class="paramtype">err&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%">&nbsp;&nbsp;&nbsp;errno</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00057">57</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
Referenced by <a class="el" href="can__socket_8c-source.html#l00150">canOpen_driver()</a>, <a class="el" href="can__socket_8c-source.html#l00064">canReceive_driver()</a>, and <a class="el" href="can__socket_8c-source.html#l00090">canSend_driver()</a>.
</div>
</div><p>
<a class="anchor" name="89884954a188d907256419c1ff3312b9"></a><!-- doxytag: member="can_socket.c::CAN_IFNAME" ref="89884954a188d907256419c1ff3312b9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAN_IFNAME&nbsp;&nbsp;&nbsp;&quot;can%s&quot;          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00050">50</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
Referenced by <a class="el" href="can__socket_8c-source.html#l00150">canOpen_driver()</a>.
</div>
</div><p>
<a class="anchor" name="133b8d3a55193dcd23c7b3b6e8f733e2"></a><!-- doxytag: member="can_socket.c::CAN_IOCTL" ref="133b8d3a55193dcd23c7b3b6e8f733e2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAN_IOCTL&nbsp;&nbsp;&nbsp;ioctl          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00056">56</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
Referenced by <a class="el" href="can__socket_8c-source.html#l00150">canOpen_driver()</a>.
</div>
</div><p>
<a class="anchor" name="da8034e638199b5aac1db8434caa10cc"></a><!-- doxytag: member="can_socket.c::CAN_RECV" ref="da8034e638199b5aac1db8434caa10cc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAN_RECV&nbsp;&nbsp;&nbsp;recv          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00053">53</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
Referenced by <a class="el" href="can__socket_8c-source.html#l00064">canReceive_driver()</a>.
</div>
</div><p>
<a class="anchor" name="12cff95e04c908461730b70fbffd53a7"></a><!-- doxytag: member="can_socket.c::CAN_SEND" ref="12cff95e04c908461730b70fbffd53a7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAN_SEND&nbsp;&nbsp;&nbsp;send          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00054">54</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
Referenced by <a class="el" href="can__socket_8c-source.html#l00090">canSend_driver()</a>.
</div>
</div><p>
<a class="anchor" name="4eaf4f417b909f1f45be28cada2c290a"></a><!-- doxytag: member="can_socket.c::CAN_SOCKET" ref="4eaf4f417b909f1f45be28cada2c290a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAN_SOCKET&nbsp;&nbsp;&nbsp;socket          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00051">51</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
Referenced by <a class="el" href="can__socket_8c-source.html#l00150">canOpen_driver()</a>.
</div>
</div><p>
<a class="anchor" name="17621bf583b5512955895eea23fbf605"></a><!-- doxytag: member="can_socket.c::PF_CAN" ref="17621bf583b5512955895eea23fbf605" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PF_CAN&nbsp;&nbsp;&nbsp;29          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00047">47</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
Referenced by <a class="el" href="can__socket_8c-source.html#l00150">canOpen_driver()</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="d2f4803f3a623c82a4c3e92d4e75e5a5"></a><!-- doxytag: member="can_socket.c::canClose_driver" ref="d2f4803f3a623c82a4c3e92d4e75e5a5" args="(CAN_HANDLE fd0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int canClose_driver           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#324227f7b01d51ee83a883174769ac8f">CAN_HANDLE</a>&nbsp;</td>
          <td class="paramname"> <em>fd0</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00228">228</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
References <a class="el" href="can__socket_8c-source.html#l00052">CAN_CLOSE</a>.
</div>
</div><p>
<a class="anchor" name="a91c5884b47322592815c82427be3fac"></a><!-- doxytag: member="can_socket.c::canOpen_driver" ref="a91c5884b47322592815c82427be3fac" args="(s_BOARD *board)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="win32_2applicfg_8h.html#324227f7b01d51ee83a883174769ac8f">CAN_HANDLE</a> canOpen_driver           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> *&nbsp;</td>
          <td class="paramname"> <em>board</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00150">150</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
References <a class="el" href="can__socket_8c-source.html#l00048">AF_CAN</a>, <a class="el" href="can__driver_8h-source.html#l00035">struct_s_BOARD::baudrate</a>, <a class="el" href="can__driver_8h-source.html#l00034">struct_s_BOARD::busname</a>, <a class="el" href="can__socket_8c-source.html#l00055">CAN_BIND</a>, <a class="el" href="can__socket_8c-source.html#l00052">CAN_CLOSE</a>, <a class="el" href="can__socket_8c-source.html#l00057">CAN_ERRNO</a>, <a class="el" href="can__socket_8c-source.html#l00050">CAN_IFNAME</a>, <a class="el" href="can__socket_8c-source.html#l00056">CAN_IOCTL</a>, <a class="el" href="can__socket_8c-source.html#l00051">CAN_SOCKET</a>, and <a class="el" href="can__socket_8c-source.html#l00047">PF_CAN</a>.
</div>
</div><p>
<a class="anchor" name="b0b7065be05f6d53009b7bd46626e2c0"></a><!-- doxytag: member="can_socket.c::canReceive_driver" ref="b0b7065be05f6d53009b7bd46626e2c0" args="(CAN_HANDLE fd0, Message *m)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UNS8 canReceive_driver           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#324227f7b01d51ee83a883174769ac8f">CAN_HANDLE</a>&nbsp;</td>
          <td class="paramname"> <em>fd0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMessage.html">Message</a> *&nbsp;</td>
          <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00064">64</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
References <a class="el" href="can__socket_8c-source.html#l00057">CAN_ERRNO</a>, <a class="el" href="can__socket_8c-source.html#l00053">CAN_RECV</a>, <a class="el" href="can_8h-source.html#l00042">Message::cob_id</a>, <a class="el" href="can_8h-source.html#l00046">Message::data</a>, <a class="el" href="can_8h-source.html#l00045">Message::len</a>, <a class="el" href="can_8h-source.html#l00043">Message::rtr</a>, and <a class="el" href="can_8h-source.html#l00036">SHORT_CAN::w</a>.
</div>
</div><p>
<a class="anchor" name="36327c9e0ec6d284b346963a321e3c2b"></a><!-- doxytag: member="can_socket.c::canSend_driver" ref="36327c9e0ec6d284b346963a321e3c2b" args="(CAN_HANDLE fd0, Message *m)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UNS8 canSend_driver           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#324227f7b01d51ee83a883174769ac8f">CAN_HANDLE</a>&nbsp;</td>
          <td class="paramname"> <em>fd0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMessage.html">Message</a> *&nbsp;</td>
          <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="can__socket_8c-source.html#l00090">90</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>.
<p>
References <a class="el" href="can__socket_8c-source.html#l00057">CAN_ERRNO</a>, <a class="el" href="can__socket_8c-source.html#l00054">CAN_SEND</a>, <a class="el" href="can_8h-source.html#l00042">Message::cob_id</a>, <a class="el" href="can_8h-source.html#l00046">Message::data</a>, <a class="el" href="can_8h-source.html#l00045">Message::len</a>, <a class="el" href="can_8h-source.html#l00043">Message::rtr</a>, and <a class="el" href="can_8h-source.html#l00036">SHORT_CAN::w</a>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 2 19:10:17 2007 for CanFestival by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>