RadioLibSmol/class_radio_lib_conv_code.html
2025-01-16 17:28:36 +00:00

218 lines
12 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>RadioLib: RadioLibConvCode Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">RadioLib
</div>
<div id="projectbrief">Universal wireless communication library for Arduino</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('class_radio_lib_conv_code.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_radio_lib_conv_code-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">RadioLibConvCode Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Class to perform convolutional coding with variable rates. Only 1/2 and 1/3 rate is currently supported.
<a href="class_radio_lib_conv_code.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_f_e_c_8h_source.html">FEC.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4fbe7c4e90969f0be10b8484b405df78" id="r_a4fbe7c4e90969f0be10b8484b405df78"><td class="memItemLeft" align="right" valign="top"><a id="a4fbe7c4e90969f0be10b8484b405df78" name="a4fbe7c4e90969f0be10b8484b405df78"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>RadioLibConvCode</b> ()</td></tr>
<tr class="memdesc:a4fbe7c4e90969f0be10b8484b405df78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <br /></td></tr>
<tr class="separator:a4fbe7c4e90969f0be10b8484b405df78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af350f0a8b4d01e54e9d7eac9056c56c3" id="r_af350f0a8b4d01e54e9d7eac9056c56c3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_radio_lib_conv_code.html#af350f0a8b4d01e54e9d7eac9056c56c3">begin</a> (uint8_t rt)</td></tr>
<tr class="memdesc:af350f0a8b4d01e54e9d7eac9056c56c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization method. <br /></td></tr>
<tr class="separator:af350f0a8b4d01e54e9d7eac9056c56c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64c324098fab2c5521b3f4e965503ca8" id="r_a64c324098fab2c5521b3f4e965503ca8"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_radio_lib_conv_code.html#a64c324098fab2c5521b3f4e965503ca8">encode</a> (const uint8_t *in, size_t in_bits, uint8_t *out, size_t *out_bits=NULL)</td></tr>
<tr class="memdesc:a64c324098fab2c5521b3f4e965503ca8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encoding method. <br /></td></tr>
<tr class="separator:a64c324098fab2c5521b3f4e965503ca8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class to perform convolutional coding with variable rates. Only 1/2 and 1/3 rate is currently supported. </p>
<p>Convolutional coder implementation in this class is adapted from Semtech's LR-FHSS demo: <a href="https://github.com/Lora-net/SWDM001/tree/master/lib/sx126x_driver">https://github.com/Lora-net/SWDM001/tree/master/lib/sx126x_driver</a></p>
<p>Its <a class="el" href="class_s_x126x.html" title="Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...">SX126x</a> driver is distributed under the Clear BSD License, and to comply with its terms, it is reproduced below.</p>
<p>The Clear BSD License Copyright Semtech Corporation 2021. All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Semtech corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</p>
<p>NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="af350f0a8b4d01e54e9d7eac9056c56c3" name="af350f0a8b4d01e54e9d7eac9056c56c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af350f0a8b4d01e54e9d7eac9056c56c3">&#9670;&#160;</a></span>begin()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RadioLibConvCode::begin </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rt</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialization method. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">rt</td><td>Encoding rate denominator (1/x). Only 1/2 and 1/3 encoding is currently supported. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a64c324098fab2c5521b3f4e965503ca8" name="a64c324098fab2c5521b3f4e965503ca8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64c324098fab2c5521b3f4e965503ca8">&#9670;&#160;</a></span>encode()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int16_t RadioLibConvCode::encode </td>
<td>(</td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>in_bits</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>out</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t *&#160;</td>
<td class="paramname"><em>out_bits</em> = <code>NULL</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Encoding method. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>Input buffer (a byte array). </td></tr>
<tr><td class="paramname">in_bits</td><td>Input length in bits. </td></tr>
<tr><td class="paramname">out</td><td>Output buffer (a byte array). It is up to the caller to ensure the buffer is large enough to fit the encoded data! </td></tr>
<tr><td class="paramname">out_bits</td><td>Pointer to a variable to save the number of encoded bits. Ignored if set to NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__status__codes.html">Status Codes</a> </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/utils/<a class="el" href="_f_e_c_8h_source.html">FEC.h</a></li>
<li>src/utils/<b>FEC.cpp</b></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="class_radio_lib_conv_code.html">RadioLibConvCode</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>