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 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321
|
<!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: Synchronous 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>Synchronous 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 Synchronous acquisition API:</div>
<div class="dynsection">
<center><table><tr><td><img src="group__sync2__lib.png" border="0" alt="" usemap="#group____sync2____lib_map">
<map name="group____sync2____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__sync2__lib.html#ge8323c4bc097ef7ce50e8ccafc599881">a4l_sync_write</a> (<a class="el" href="structa4l__descriptor.html">a4l_desc_t</a> *dsc, unsigned int idx_subd, unsigned int chan_desc, unsigned int ns_delay, void *buf, size_t nbyte)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Perform a synchronous acquisition write operation. <a href="#ge8323c4bc097ef7ce50e8ccafc599881"></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__sync2__lib.html#g0e21a27f85ceed1ec3186608f92d47f4">a4l_sync_read</a> (<a class="el" href="structa4l__descriptor.html">a4l_desc_t</a> *dsc, unsigned int idx_subd, unsigned int chan_desc, unsigned int ns_delay, void *buf, size_t nbyte)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Perform a synchronous acquisition read operation. <a href="#g0e21a27f85ceed1ec3186608f92d47f4"></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__sync2__lib.html#gda79039a312c5cab36653c9edda98a3c">a4l_sync_dio</a> (<a class="el" href="structa4l__descriptor.html">a4l_desc_t</a> *dsc, unsigned int idx_subd, void *mask, void *buf)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Perform a synchronous acquisition digital acquisition. <a href="#gda79039a312c5cab36653c9edda98a3c"></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__sync2__lib.html#ge8d9cab2fc7224b71e2c303fc536c8af">a4l_config_subd</a> (<a class="el" href="structa4l__descriptor.html">a4l_desc_t</a> *dsc, unsigned int idx_subd, unsigned int type,...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Configure a subdevice. <a href="#ge8d9cab2fc7224b71e2c303fc536c8af"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ge8d9cab2fc7224b71e2c303fc536c8af"></a><!-- doxytag: member="sync.c::a4l_config_subd" ref="ge8d9cab2fc7224b71e2c303fc536c8af" args="(a4l_desc_t *dsc, unsigned int idx_subd, unsigned int type,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int a4l_config_subd </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">unsigned int </td>
<td class="paramname"> <em>idx_subd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"> <em>...</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Configure a subdevice.
<p>
<a class="el" href="group__sync2__lib.html#ge8d9cab2fc7224b71e2c303fc536c8af" title="Configure a subdevice.">a4l_config_subd()</a> takes a variable count of arguments. According to the configuration type, some additional argument is necessary:<ul>
<li>A4L_INSN_CONFIG_DIO_INPUT: the channel index (unsigned int)</li><li>A4L_INSN_CONFIG_DIO_OUTPUT: the channel index (unsigned int)</li><li>A4L_INSN_CONFIG_DIO_QUERY: the returned DIO polarity (unsigned int *)</li></ul>
<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>idx_subd</em> </td><td>Index of the concerned subdevice </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>type</em> </td><td>Configuration parameter</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success. Otherwise:</dd></dl>
<ul>
<li>-EINVAL is returned if some argument is missing or wrong (Please, type "dmesg" for more info)</li><li>-ENOSYS is returned if the configuration parameter is not supported </li></ul>
<p>References <a class="el" href="instruction_8h-source.html#l00060">A4L_INSN_CONFIG</a>, <a class="el" href="sync_8c-source.html#l00087">a4l_snd_insn()</a>, <a class="el" href="command_8h-source.html#l00133">CHAN</a>, <a class="el" href="instruction_8h-source.html#l00175">a4l_instruction::chan_desc</a>, and <a class="el" href="instruction_8h-source.html#l00177">a4l_instruction::data_size</a>.</p>
</div>
</div><p>
<a class="anchor" name="gda79039a312c5cab36653c9edda98a3c"></a><!-- doxytag: member="sync.c::a4l_sync_dio" ref="gda79039a312c5cab36653c9edda98a3c" args="(a4l_desc_t *dsc, unsigned int idx_subd, void *mask, void *buf)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int a4l_sync_dio </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">unsigned int </td>
<td class="paramname"> <em>idx_subd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>mask</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>buf</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Perform a synchronous acquisition digital acquisition.
<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>idx_subd</em> </td><td>Index of the concerned subdevice </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>mask</em> </td><td>Write mask which indicates which bit(s) must be modified </td></tr>
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>buf</em> </td><td>Input / output buffer</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 (Please, type "dmesg" for more info)</li><li>-EFAULT is returned if a user <-> kernel transfer went wrong</li><li>-ENOMEM is returned if the system is out of memory</li><li>-ENOSYS is returned if the driver does not provide any handler "instruction bits" </li></ul>
<p>References <a class="el" href="descriptor_8c-source.html#l00393">a4l_get_subdinfo()</a>, <a class="el" href="instruction_8h-source.html#l00055">A4L_INSN_BITS</a>, <a class="el" href="range_8c-source.html#l00121">a4l_sizeof_subd()</a>, <a class="el" href="sync_8c-source.html#l00087">a4l_snd_insn()</a>, and <a class="el" href="instruction_8h-source.html#l00177">a4l_instruction::data_size</a>.</p>
</div>
</div><p>
<a class="anchor" name="g0e21a27f85ceed1ec3186608f92d47f4"></a><!-- doxytag: member="sync.c::a4l_sync_read" ref="g0e21a27f85ceed1ec3186608f92d47f4" args="(a4l_desc_t *dsc, unsigned int idx_subd, unsigned int chan_desc, unsigned int ns_delay, void *buf, size_t nbyte)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int a4l_sync_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">unsigned int </td>
<td class="paramname"> <em>idx_subd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>chan_desc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>ns_delay</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><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Perform a synchronous acquisition read operation.
<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>idx_subd</em> </td><td>Index of the concerned subdevice </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>chan_desc</em> </td><td>Channel descriptor (channel, range and reference) </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>ns_delay</em> </td><td>Optional delay (in nanoseconds) to wait between the setting of the input channel and sample(s) acquisition(s). </td></tr>
<tr><td valign="top"><tt>[in]</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>
</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 (Please, type "dmesg" for more info)</li><li>-EFAULT is returned if a user <-> kernel transfer went wrong</li><li>-ENOMEM is returned if the system is out of memory </li></ul>
<p>References <a class="el" href="instruction_8h-source.html#l00047">A4L_INSN_READ</a>, <a class="el" href="instruction_8h-source.html#l00070">A4L_INSN_WAIT</a>, <a class="el" href="sync_8c-source.html#l00087">a4l_snd_insn()</a>, <a class="el" href="sync_8c-source.html#l00061">a4l_snd_insnlist()</a>, <a class="el" href="instruction_8h-source.html#l00179">a4l_instruction::data</a>, and <a class="el" href="instruction_8h-source.html#l00177">a4l_instruction::data_size</a>.</p>
</div>
</div><p>
<a class="anchor" name="ge8323c4bc097ef7ce50e8ccafc599881"></a><!-- doxytag: member="sync.c::a4l_sync_write" ref="ge8323c4bc097ef7ce50e8ccafc599881" args="(a4l_desc_t *dsc, unsigned int idx_subd, unsigned int chan_desc, unsigned int ns_delay, void *buf, size_t nbyte)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int a4l_sync_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">unsigned int </td>
<td class="paramname"> <em>idx_subd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>chan_desc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>ns_delay</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><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Perform a synchronous acquisition write operation.
<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>idx_subd</em> </td><td>Index of the concerned subdevice </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>chan_desc</em> </td><td>Channel descriptor (channel, range and reference) </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>ns_delay</em> </td><td>Optional delay (in nanoseconds) to wait between the setting of the input channel and sample(s) acquisition(s). </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>buf</em> </td><td>Output 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>
</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 (Please, type "dmesg" for more info)</li><li>-EFAULT is returned if a user <-> kernel transfer went wrong</li><li>-ENOMEM is returned if the system is out of memory </li></ul>
<p>References <a class="el" href="instruction_8h-source.html#l00070">A4L_INSN_WAIT</a>, <a class="el" href="instruction_8h-source.html#l00051">A4L_INSN_WRITE</a>, <a class="el" href="sync_8c-source.html#l00087">a4l_snd_insn()</a>, <a class="el" href="sync_8c-source.html#l00061">a4l_snd_insnlist()</a>, <a class="el" href="instruction_8h-source.html#l00179">a4l_instruction::data</a>, and <a class="el" href="instruction_8h-source.html#l00177">a4l_instruction::data_size</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>
|