update doxygen with last cahnges

This commit is contained in:
deeaitch committed 2026-10-05 19:08:54 -04:00
1 parent 03dc8f2a13
commit 0067cb4ddd
15 files changed
+700 -683

No files matched your search

+6 -2
View File
@@ -441,8 +441,12 @@ Decoder Layer</h1>
<h2><a class="anchor" id="autotoc_md47"></a>
Raw value representation and precision</h2>
<p><code><a class="el" href="structDecodedSignalValue.html#a95db4f7f93b5f311e8f272833e45055e">DecodedSignalValue::rawValue</a></code> is a C++17 <code>std::variant&lt;std::int64_t, std::uint64_t&gt;</code>. For a valid signal, signed definitions produce the <code>int64_t</code> alternative and unsigned definitions produce the <code>uint64_t</code> alternative. Raw values remain exact across their full 64-bit ranges. Check <code>valid</code> before using the value; an invalid result's default value is not decoded data.</p>
<p>Use <code>std::get</code> when the numeric type is known, or <code>std::visit</code> to handle both:</p>
<div class="fragment"><div class="line">std::visit([] (<span class="keyword">auto</span> raw) { std::cout &lt;&lt; raw; }, decodedSignal.rawValue);</div>
<p>Use <code>std::get</code> when the numeric type is known, or <code>std::get_if</code> to handle both:</p>
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (<span class="keyword">const</span> <span class="keyword">auto</span> *value = std::get_if&lt;std::int64_t&gt;(&amp;decodedSignal.rawValue)) {</div>
<div class="line"> std::cout &lt;&lt; *value;</div>
<div class="line">} <span class="keywordflow">else</span> {</div>
<div class="line"> std::cout &lt;&lt; std::get&lt;std::uint64_t&gt;(decodedSignal.rawValue);</div>
<div class="line">}</div>
</div><!-- fragment --><p>This replaces the previous <code>int64_t</code> field: consumers that read or print <code>rawValue</code> directly must handle the variant.</p>
<p>Physical conversion uses the active numeric type: <code>physicalValue = static_cast&lt;double&gt;(raw) * factor + offset</code>. <code>physicalValue</code> remains a <code>double</code> and is approximate for large integers. On usual IEEE 754 binary64 implementations, integers are exactly representable through 2^53; above that, some integers round to the same floating-point value. For example, unsigned <code>UINT64_MAX</code> remains exact in <code>rawValue</code>, but converts to approximately 18446744073709551616 in binary64 before scaling. Use <code>rawValue</code> whenever exact integer values are required.</p>
<hr />