1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Xenomai API: Asynchronous acquisition API</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.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<form action="search.php" method="get">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><label> <u>S</u>earch for </label></td>
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
</tr>
</table>
</form>
</li>
</ul>
</div>
</div>
<div class="contents">
<h1>Asynchronous acquisition API<br>
<small>
[<a class="el" href="group__level2__lib.html">Level 2 API</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Asynchronous acquisition API:</div>
<div class="dynsection">
<center><table><tr><td><img src="group__async2__lib.png" border="0" alt="" usemap="#group____async2____lib_map">
<map name="group____async2____lib_map">
<area shape="rect" href="group__level2__lib.html" title="Level 2 API" alt="" coords="5,5,96,32"></map></td></tr></table></center>
</div>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__async2__lib.html#gfb12b8f4eed71008a8b4225e3d90dcea">a4l_async_read</a> (<a class="el" href="structa4l__descriptor.html">a4l_desc_t</a> *dsc, void *buf, size_t nbyte, unsigned long ms_timeout)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Perform asynchronous read operation on the analog input subdevice. <a href="#gfb12b8f4eed71008a8b4225e3d90dcea"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__async2__lib.html#gd2ba21d06b77b8b25a80029484731ee6">a4l_async_write</a> (<a class="el" href="structa4l__descriptor.html">a4l_desc_t</a> *dsc, void *buf, size_t nbyte, unsigned long ms_timeout)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Perform asynchronous write operation on the analog input subdevice. <a href="#gd2ba21d06b77b8b25a80029484731ee6"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gfb12b8f4eed71008a8b4225e3d90dcea"></a><!-- doxytag: member="async.c::a4l_async_read" ref="gfb12b8f4eed71008a8b4225e3d90dcea" args="(a4l_desc_t *dsc, void *buf, size_t nbyte, unsigned long ms_timeout)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int a4l_async_read </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structa4l__descriptor.html">a4l_desc_t</a> * </td>
<td class="paramname"> <em>dsc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>nbyte</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long </td>
<td class="paramname"> <em>ms_timeout</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Perform asynchronous read operation on the analog input subdevice.
<p>
The function <a class="el" href="group__async2__lib.html#gfb12b8f4eed71008a8b4225e3d90dcea" title="Perform asynchronous read operation on the analog input subdevice.">a4l_async_read()</a> is only useful for acquisition configured through an Analogy command.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dsc</em> </td><td>Device descriptor filled by <a class="el" href="group__descriptor1__lib.html#g810401871fe8005ee0157c6910f94466" title="Open an Analogy device and basically fill the descriptor.">a4l_open()</a> (and optionally <a class="el" href="group__descriptor1__lib.html#g4899cdf9b31aa0cbe0d95bf3c2f2f981" title="Fill the descriptor with subdevices, channels and ranges data.">a4l_fill_desc()</a>) </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>buf</em> </td><td>Input buffer </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>nbyte</em> </td><td>Number of bytes to read </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>ms_timeout</em> </td><td>The number of miliseconds to wait for some data to be available. Passing A4L_INFINITE causes the caller to block indefinitely until some data is available. Passing A4L_NONBLOCK causes the function to return immediately without waiting for any available data</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes read, otherwise negative error code:</dd></dl>
<ul>
<li>-EINVAL is returned if some argument is missing or wrong, the descriptor should be checked; check also the kernel log</li><li>-ENOENT is returned if the device's reading subdevice is idle (no command was sent)</li><li>-EFAULT is returned if a user <-> kernel transfer went wrong</li><li>-EINTR is returned if calling task has been unblocked by a signal </li></ul>
<p>References <a class="el" href="async_8c-source.html#l00259">a4l_poll()</a>, <a class="el" href="sys_8c-source.html#l00098">a4l_sys_read()</a>, <a class="el" href="descriptor_8h-source.html#l00076">a4l_descriptor::fd</a>, and <a class="el" href="descriptor_8h-source.html#l00072">a4l_descriptor::idx_read_subd</a>.</p>
</div>
</div><p>
<a class="anchor" name="gd2ba21d06b77b8b25a80029484731ee6"></a><!-- doxytag: member="async.c::a4l_async_write" ref="gd2ba21d06b77b8b25a80029484731ee6" args="(a4l_desc_t *dsc, void *buf, size_t nbyte, unsigned long ms_timeout)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int a4l_async_write </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structa4l__descriptor.html">a4l_desc_t</a> * </td>
<td class="paramname"> <em>dsc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>nbyte</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long </td>
<td class="paramname"> <em>ms_timeout</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Perform asynchronous write operation on the analog input subdevice.
<p>
The function <a class="el" href="group__async2__lib.html#gd2ba21d06b77b8b25a80029484731ee6" title="Perform asynchronous write operation on the analog input subdevice.">a4l_async_write()</a> is only useful for acquisition configured through an Analogy command.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dsc</em> </td><td>Device descriptor filled by <a class="el" href="group__descriptor1__lib.html#g810401871fe8005ee0157c6910f94466" title="Open an Analogy device and basically fill the descriptor.">a4l_open()</a> (and optionally <a class="el" href="group__descriptor1__lib.html#g4899cdf9b31aa0cbe0d95bf3c2f2f981" title="Fill the descriptor with subdevices, channels and ranges data.">a4l_fill_desc()</a>) </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>buf</em> </td><td>Ouput buffer </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>nbyte</em> </td><td>Number of bytes to write </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>ms_timeout</em> </td><td>The number of miliseconds to wait for some free area to be available. Passing A4L_INFINITE causes the caller to block indefinitely until some data is available. Passing A4L_NONBLOCK causes the function to return immediately without waiting any available space to write data.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes written, otherwise negative error code:</dd></dl>
<ul>
<li>-EINVAL is returned if some argument is missing or wrong, the descriptor should be checked; check also the kernel log</li><li>-ENOENT is returned if the device's reading subdevice is idle (no command was sent)</li><li>-EFAULT is returned if a user <-> kernel transfer went wrong</li><li>-EINTR is returned if calling task has been unblocked by a signal </li></ul>
<p>References <a class="el" href="async_8c-source.html#l00259">a4l_poll()</a>, <a class="el" href="sys_8c-source.html#l00123">a4l_sys_write()</a>, <a class="el" href="descriptor_8h-source.html#l00076">a4l_descriptor::fd</a>, and <a class="el" href="descriptor_8h-source.html#l00074">a4l_descriptor::idx_write_subd</a>.</p>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Aug 2 12:48:39 2010 for Xenomai API by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
|