File: func-ref-comedi-command-test.html

package info (click to toggle)
comedilib 0.11.0-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 8,388 kB
  • sloc: xml: 19,779; ansic: 14,719; sh: 4,583; cpp: 2,195; ruby: 1,658; perl: 700; makefile: 604; yacc: 439; lex: 86; python: 17
file content (50 lines) | stat: -rw-r--r-- 5,249 bytes parent folder | download | duplicates (3)
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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>comedi_command_test</title><link rel="stylesheet" type="text/css" href="comedilib.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Comedi"><link rel="up" href="functionreference.html#idm3568" title="5.4.2. Asynchronous commands"><link rel="prev" href="func-ref-comedi-command.html" title="comedi_command"><link rel="next" href="func-ref-comedi-get-buffer-contents.html" title="comedi_get_buffer_contents"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">comedi_command_test</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="func-ref-comedi-command.html">Prev</a> </td><th width="60%" align="center">5.4.2. Asynchronous commands</th><td width="20%" align="right"> <a accesskey="n" href="func-ref-comedi-get-buffer-contents.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="func-ref-comedi-command-test"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>comedi_command_test — test streaming input/output configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;comedilib.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">comedi_command_test</b>(</code></td><td>comedi_t * <var class="pdparam">device</var>, </td></tr><tr><td> </td><td>comedi_cmd * <var class="pdparam">command</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm3667"></a><h2>
      Description
    </h2><p>
The function <code class="function">comedi_command_test</code> tests the command structure pointed
to by the parameter <em class="parameter"><code>command</code></em> and returns an
integer describing the
testing stages that were successfully passed.  In addition, if elements
of the <span class="type">comedi_cmd</span> structure are invalid, they may be modified.  Source
elements are modified to remove invalid source triggers.  Argument
elements are adjusted or rounded to the nearest valid value.
    </p></div><div class="refsect1"><a name="idm3673"></a><h2>
      Return value
    </h2><p>
The meanings of the return value are as follows:
</p><p>
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="literal">0</code> indicates a valid command.</p></li><li class="listitem"><p>
			<code class="literal">1</code> indicates that one of the
		<em class="structfield"><code>…_src</code></em>
			members of the command contained an
			unsupported trigger.  The bits corresponding to the unsupported
			triggers are zeroed.
		</p></li><li class="listitem"><p>
			<code class="literal">2</code> indicates that the particular combination
			of <em class="structfield"><code>…_src</code></em> settings is not supported by the driver, or that
			one of the <em class="structfield"><code>…_src</code></em> members has the bit corresponding to
			multiple trigger sources set at the same time.
		</p></li><li class="listitem"><p>
			<code class="literal">3</code> indicates that one of the
		<em class="structfield"><code>…_arg</code></em> members
			of the command is set outside the range of allowable values.
			For instance, an argument for a
		<code class="constant">TRIG_TIMER</code> source which
			exceeds the board's maximum speed.  The invalid
		<em class="structfield"><code>…_arg</code></em>
			members will be adjusted to valid values.
		</p></li><li class="listitem"><p>
			<code class="literal">4</code> indicates that one of the
		<em class="structfield"><code>…_arg</code></em> members
			required adjustment.  For instance, the argument of a
			<code class="constant">TRIG_TIMER</code> source may have been rounded to the nearest
			timing period supported by the board.
		</p></li><li class="listitem"><p>
			<code class="literal">5</code> indicates that some aspect of the
			command's <em class="structfield"><code>chanlist</code></em> is unsupported by the board.  For example,
			some analog input boards require that all channels in the chanlist
			use the same input range.
		</p></li></ul></div><p>
On failure, <code class="literal">-1</code> is returned.
</p><p>
    </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="func-ref-comedi-command.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="functionreference.html#idm3568">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="func-ref-comedi-get-buffer-contents.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">comedi_command </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> comedi_get_buffer_contents</td></tr></table></div></body></html>