/usr/share/doc/libcomedi-dev/html/func-ref-comedi-get-softcal-converter.html is in libcomedi-dev 0.10.2-4+b3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>comedi_get_softcal_converter</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#idm4106" title="5.4.3. Calibration"><link rel="prev" href="func-ref-comedi-get-hardcal-converter.html" title="comedi_get_hardcal_converter"><link rel="next" href="func-ref-comedi-parse-calibration-file.html" title="comedi_parse_calibration_file"></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_get_softcal_converter</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="func-ref-comedi-get-hardcal-converter.html">Prev</a> </td><th width="60%" align="center">5.4.3. Calibration</th><td width="20%" align="right"> <a accesskey="n" href="func-ref-comedi-parse-calibration-file.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="func-ref-comedi-get-softcal-converter"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>comedi_get_softcal_converter — get converter for software-calibrated subdevice</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include <comedilib.h></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_get_softcal_converter</b>(</code></td><td>unsigned <var class="pdparam">subdevice</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">channel</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">range</var>, </td></tr><tr><td> </td><td>enum comedi_conversion_direction <var class="pdparam">direction</var>, </td></tr><tr><td> </td><td>const comedi_calibration_t * <var class="pdparam">parsed_calibration</var>, </td></tr><tr><td> </td><td>comedi_polynomial_t * <var class="pdparam">converter</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm4400"></a><h2>
Status
</h2><p>
alpha
</p></div><div class="refsect1"><a name="idm4403"></a><h2>
Description
</h2><p>
The function <code class="function">comedi_get_softcal_converter</code> initializes
the <span class="type">comedi_polynomial_t</span> pointed to by
<em class="parameter"><code>converter</code></em> so it can be
passed to either
<code class="function"><a class="link" href="func-ref-comedi-to-physical.html" title="comedi_to_physical">comedi_to_physical</a></code>
or <code class="function"><a class="link" href="func-ref-comedi-from-physical.html" title="comedi_from_physical">comedi_from_physical</a></code>.
The <span class="type">comedi_polynomial_t</span> pointed to by
<em class="parameter"><code>converter</code></em>
can then be used to
convert data for the specified <em class="parameter"><code>subdevice</code></em>,
<em class="parameter"><code>channel</code></em>, and
<em class="parameter"><code>range</code></em>.
The <em class="parameter"><code>direction</code></em>
parameter specifies whether <em class="parameter"><code>converter</code></em>
will be passed to <code class="function">comedi_to_physical</code>
or <code class="function">comedi_from_physical</code>.
The <em class="parameter"><code>parsed_calibration</code></em> parameter
points to the
software calibration values for your device, and may be obtained by calling
<code class="function"><a class="link" href="func-ref-comedi-parse-calibration-file.html" title="comedi_parse_calibration_file">comedi_parse_calibration_file</a></code>
on a calibration file generated by the
<span class="command"><strong>comedi_soft_calibrate</strong></span> program.
</p><p>
This function is only useful for boards that perform their calibrations in software on the host
computer. A subdevice will advertise the fact that it depends on a software calibration
with the <code class="constant">SDF_SOFT_CALIBRATED</code> subdevice flag.
</p><p>
Whether or not the result of this function actually depends on the
<em class="parameter"><code>channel</code></em>
parameter is
hardware dependent. For example, the calibration of a multiplexed analog input will typically
not depend on the channel, only the range. Analog outputs will typically use different calibrations
for each output channel.
</p><p>
Software calibrations are implemented as polynomials (up to third order). Since the inverse
of a polynomial of order higher than one can't be represented exactly as another polynomial, you
may not be able to get converters for the <span class="quote">“<span class="quote">reverse</span>”</span> direction. For example, you may be
able to get a converter for an analog input in the
<code class="constant">COMEDI_TO_PHYSICAL</code> direction, but not
in the <code class="constant">COMEDI_FROM_PHYSICAL</code> direction.
</p></div><div class="refsect1"><a name="idm4434"></a><h2>
Return value
</h2><p>
Returns <code class="literal">0</code> on success, <code class="literal">-1</code> on failure.
</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-get-hardcal-converter.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="functionreference.html#idm4106">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="func-ref-comedi-parse-calibration-file.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">comedi_get_hardcal_converter </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> comedi_parse_calibration_file</td></tr></table></div></body></html>
|