File: func-ref-comedi-to-physical.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 (20 lines) | stat: -rw-r--r-- 3,611 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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>comedi_to_physical</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#idm2224" title="5.4.1. Core Functions"><link rel="prev" href="func-ref-comedi-to-phys.html" title="comedi_to_phys"><link rel="next" href="func-ref-comedi-unlock.html" title="comedi_unlock"></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_to_physical</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="func-ref-comedi-to-phys.html">Prev</a> </td><th width="60%" align="center">5.4.1. Core Functions</th><td width="20%" align="right"> <a accesskey="n" href="func-ref-comedi-unlock.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="func-ref-comedi-to-physical"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>comedi_to_physical — convert sample to physical units using polynomials</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">double <b class="fsfunc">comedi_to_physical</b>(</code></td><td>lsampl_t <var class="pdparam">data</var>, </td></tr><tr><td> </td><td>const comedi_polynomial_t * <var class="pdparam">conversion_polynomial</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm3516"></a><h2>
      Description
    </h2><p>
Converts <em class="parameter"><code>data</code></em> given in Comedi's integer
sample values (<span class="type">lsampl_t</span>, between <code class="literal">0</code> and
maxdata) into physical units (<span class="type">double</span>).  The
<em class="parameter"><code>conversion_polynomial</code></em>
parameter is obtained from either
<code class="function"><a class="link" href="func-ref-comedi-get-hardcal-converter.html" title="comedi_get_hardcal_converter">comedi_get_hardcal_converter</a></code> or
<code class="function"><a class="link" href="func-ref-comedi-get-softcal-converter.html" title="comedi_get_softcal_converter">comedi_get_softcal_converter</a></code>.
No range checking of the
input <em class="parameter"><code>data</code></em> is performed.  It is up to
you to check for <em class="parameter"><code>data</code></em> values of
0 or maxdata if you want to detect possibly out-of-range readings.
    </p></div><div class="refsect1"><a name="idm3530"></a><h2>
      Return value
    </h2><p>
Physical value corresponding to the input sample value.
</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-to-phys.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="functionreference.html#idm2224">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="func-ref-comedi-unlock.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">comedi_to_phys </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> comedi_unlock</td></tr></table></div></body></html>