RadioLibSmol/_lo_ra_w_a_n_8h_source.html
2025-03-06 20:03:53 +00:00

1047 lines
195 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: src/protocols/LoRaWAN/LoRaWAN.h Source File</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>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</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('_lo_ra_w_a_n_8h_source.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="headertitle"><div class="title">LoRaWAN.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#if !defined(_RADIOLIB_LORAWAN_H) &amp;&amp; !RADIOLIB_EXCLUDE_LORAWAN</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define _RADIOLIB_LORAWAN_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &quot;../../TypeDef.h&quot;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;../PhysicalLayer/PhysicalLayer.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;../../utils/Cryptography.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// activation mode</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MODE_OTAA (0x07AA)</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MODE_ABP (0x0AB9)</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MODE_NONE (0x0000)</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">// operation mode</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#define RADIOLIB_LORAWAN_CLASS_A (0x0A)</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#define RADIOLIB_LORAWAN_CLASS_B (0x0B)</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#define RADIOLIB_LORAWAN_CLASS_C (0x0C)</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// preamble format</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#define RADIOLIB_LORAWAN_LORA_SYNC_WORD (0x34)</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#define RADIOLIB_LORAWAN_LORA_PREAMBLE_LEN (8)</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#define RADIOLIB_LORAWAN_GFSK_SYNC_WORD (0xC194C1)</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#define RADIOLIB_LORAWAN_GFSK_PREAMBLE_LEN (5)</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#define RADIOLIB_LORAWAN_LR_FHSS_SYNC_WORD (0x2C0F7995)</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// MAC header field encoding MSB LSB DESCRIPTION</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MHDR_MTYPE_JOIN_REQUEST (0x00 &lt;&lt; 5) </span><span class="comment">// 7 5 message type: join request</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MHDR_MTYPE_JOIN_ACCEPT (0x01 &lt;&lt; 5) </span><span class="comment">// 7 5 join accept</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MHDR_MTYPE_UNCONF_DATA_UP (0x02 &lt;&lt; 5) </span><span class="comment">// 7 5 unconfirmed data up</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MHDR_MTYPE_UNCONF_DATA_DOWN (0x03 &lt;&lt; 5) </span><span class="comment">// 7 5 unconfirmed data down</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MHDR_MTYPE_CONF_DATA_UP (0x04 &lt;&lt; 5) </span><span class="comment">// 7 5 confirmed data up</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MHDR_MTYPE_CONF_DATA_DOWN (0x05 &lt;&lt; 5) </span><span class="comment">// 7 5 confirmed data down</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MHDR_MTYPE_PROPRIETARY (0x07 &lt;&lt; 5) </span><span class="comment">// 7 5 proprietary</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MHDR_MTYPE_MASK (0x07 &lt;&lt; 5) </span><span class="comment">// 7 5 bitmask of all possible options</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MHDR_MAJOR_R1 (0x00 &lt;&lt; 0) </span><span class="comment">// 1 0 major version: LoRaWAN R1</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="comment">// frame control field encoding</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FCTRL_ADR_ENABLED (0x01 &lt;&lt; 7) </span><span class="comment">// 7 7 adaptive data rate: enabled</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FCTRL_ADR_DISABLED (0x00 &lt;&lt; 7) </span><span class="comment">// 7 7 disabled</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FCTRL_ADR_ACK_REQ (0x01 &lt;&lt; 6) </span><span class="comment">// 6 6 adaptive data rate ACK request</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FCTRL_ACK (0x01 &lt;&lt; 5) </span><span class="comment">// 5 5 confirmed message acknowledge</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FCTRL_FRAME_PENDING (0x01 &lt;&lt; 4) </span><span class="comment">// 4 4 downlink frame is pending</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">// fPort field</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FPORT_MAC_COMMAND (0x00 &lt;&lt; 0) </span><span class="comment">// 7 0 payload contains MAC commands only</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FPORT_PAYLOAD_MIN (0x01 &lt;&lt; 0) </span><span class="comment">// 7 0 start of user-allowed fPort range</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FPORT_PAYLOAD_MAX (0xDF &lt;&lt; 0) </span><span class="comment">// 7 0 end of user-allowed fPort range</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FPORT_TS009 (0xE0 &lt;&lt; 0) </span><span class="comment">// 7 0 fPort used for TS009 testing</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FPORT_TS011 (0xE2 &lt;&lt; 0) </span><span class="comment">// 7 0 fPort used for TS011 Forwarding</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FPORT_RESERVED (0xE0 &lt;&lt; 0) </span><span class="comment">// 7 0 fPort values equal to and larger than this are reserved</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment">// data rate encoding</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_MODEM (0x03 &lt;&lt; 6) </span><span class="comment">// 7 6 modem mask</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_LORA (0x00 &lt;&lt; 6) </span><span class="comment">// 7 6 use LoRa modem</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_FSK (0x01 &lt;&lt; 6) </span><span class="comment">// 7 6 use FSK modem</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_LR_FHSS (0x02 &lt;&lt; 6) </span><span class="comment">// 7 6 use LR-FHSS modem</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_SF (0x07 &lt;&lt; 3) </span><span class="comment">// 5 3 LoRa spreading factor mask</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_SF_12 (0x05 &lt;&lt; 3) </span><span class="comment">// 5 3 LoRa spreading factor: SF12</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_SF_11 (0x04 &lt;&lt; 3) </span><span class="comment">// 5 3 SF11</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_SF_10 (0x03 &lt;&lt; 3) </span><span class="comment">// 5 3 SF10</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_SF_9 (0x02 &lt;&lt; 3) </span><span class="comment">// 5 3 SF9</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_SF_8 (0x01 &lt;&lt; 3) </span><span class="comment">// 5 3 SF8</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_SF_7 (0x00 &lt;&lt; 3) </span><span class="comment">// 5 3 SF7</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_BW (0x03 &lt;&lt; 1) </span><span class="comment">// 2 1 bandwidth mask</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_BW_125_KHZ (0x00 &lt;&lt; 1) </span><span class="comment">// 2 1 125 kHz</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_BW_250_KHZ (0x01 &lt;&lt; 1) </span><span class="comment">// 2 1 250 kHz</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_BW_500_KHZ (0x02 &lt;&lt; 1) </span><span class="comment">// 2 1 LoRa bandwidth: 500 kHz</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_BW_137_KHZ (0x00 &lt;&lt; 1) </span><span class="comment">// 2 1 137 kHz</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_BW_336_KHZ (0x01 &lt;&lt; 1) </span><span class="comment">// 2 1 336 kHz</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_BW_1523_KHZ (0x02 &lt;&lt; 1) </span><span class="comment">// 2 1 LR-FHSS bandwidth: 1523 kHz</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_CR (0x01 &lt;&lt; 0) </span><span class="comment">// 0 0 coding rate mask</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_CR_1_3 (0x00 &lt;&lt; 0) </span><span class="comment">// 0 0 LR-FHSS coding rate: 1/3</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_CR_2_3 (0x01 &lt;&lt; 0) </span><span class="comment">// 0 0 2/3</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DATA_RATE_UNUSED (0xFF &lt;&lt; 0) </span><span class="comment">// 7 0 unused data rate</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment">// channels and channel plans</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="preprocessor">#define RADIOLIB_LORAWAN_UPLINK (0x00 &lt;&lt; 0)</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DOWNLINK (0x01 &lt;&lt; 0)</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DIR_RX2 (0x02 &lt;&lt; 0)</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="preprocessor">#define RADIOLIB_LORAWAN_BAND_DYNAMIC (0)</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="preprocessor">#define RADIOLIB_LORAWAN_BAND_FIXED (1)</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="preprocessor">#define RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES (15)</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="preprocessor">#define RADIOLIB_LORAWAN_CHANNEL_INDEX_NONE (0xFF &gt;&gt; 0)</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment">// recommended default settings</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="preprocessor">#define RADIOLIB_LORAWAN_RECEIVE_DELAY_1_MS (1000)</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><span class="preprocessor">#define RADIOLIB_LORAWAN_RECEIVE_DELAY_2_MS ((RADIOLIB_LORAWAN_RECEIVE_DELAY_1_MS) + 1000)</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="preprocessor">#define RADIOLIB_LORAWAN_RX1_DR_OFFSET (0)</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_DELAY_1_MS (5000)</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_DELAY_2_MS (6000)</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAX_FCNT_GAP (16384)</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="preprocessor">#define RADIOLIB_LORAWAN_ADR_ACK_LIMIT_EXP (0x06)</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="preprocessor">#define RADIOLIB_LORAWAN_ADR_ACK_DELAY_EXP (0x05)</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span><span class="preprocessor">#define RADIOLIB_LORAWAN_RETRANSMIT_TIMEOUT_MIN_MS (1000)</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="preprocessor">#define RADIOLIB_LORAWAN_RETRANSMIT_TIMEOUT_MAX_MS (3000)</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><span class="preprocessor">#define RADIOLIB_LORAWAN_POWER_STEP_SIZE_DBM (-2)</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="preprocessor">#define RADIOLIB_LORAWAN_REJOIN_MAX_COUNT_N (10) </span><span class="comment">// send rejoin request 16384 uplinks</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="preprocessor">#define RADIOLIB_LORAWAN_REJOIN_MAX_TIME_N (15) </span><span class="comment">// once every year, not actually implemented</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment">// join request message layout</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_REQUEST_LEN (23)</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_REQUEST_JOIN_EUI_POS (1)</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_REQUEST_DEV_EUI_POS (9)</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_REQUEST_DEV_NONCE_POS (17)</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_REQUEST_TYPE (0xFF)</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_REQUEST_TYPE_0 (0x00)</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_REQUEST_TYPE_1 (0x01)</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_REQUEST_TYPE_2 (0x02)</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="comment">// join accept message layout</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_MAX_LEN (33)</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_JOIN_NONCE_POS (1)</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_HOME_NET_ID_POS (4)</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_DEV_ADDR_POS (7)</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_DL_SETTINGS_POS (11)</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_RX_DELAY_POS (12)</span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_CFLIST_POS (13)</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_CFLIST_LEN (16)</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_CFLIST_TYPE_POS (RADIOLIB_LORAWAN_JOIN_ACCEPT_CFLIST_POS + RADIOLIB_LORAWAN_JOIN_ACCEPT_CFLIST_LEN - 1)</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="comment">// join accept key derivation layout</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_AES_JOIN_NONCE_POS (1) </span><span class="comment">// regular keys</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_AES_JOIN_EUI_POS (4)</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_AES_DEV_NONCE_POS (12)</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_AES_DEV_ADDR_POS (1) </span><span class="comment">// relay keys</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span><span class="comment">// join accept message variables</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_R_1_0 (0x00 &lt;&lt; 7) </span><span class="comment">// 7 7 LoRaWAN revision: 1.0</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_R_1_1 (0x01 &lt;&lt; 7) </span><span class="comment">// 7 7 1.1</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_F_NWK_S_INT_KEY (0x01)</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_APP_S_KEY (0x02)</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_S_NWK_S_INT_KEY (0x03)</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_NWK_S_ENC_KEY (0x04)</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_JS_ENC_KEY (0x05)</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_JS_INT_KEY (0x06)</span></div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_ROOT_WOR_S_KEY (0x01)</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_WOR_S_INT_KEY (0x01)</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span><span class="preprocessor">#define RADIOLIB_LORAWAN_JOIN_ACCEPT_WOR_S_ENC_KEY (0x02)</span></div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><span class="comment">// frame header layout</span></div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FHDR_LEN_START_OFFS (16)</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FHDR_DEV_ADDR_POS (RADIOLIB_LORAWAN_FHDR_LEN_START_OFFS + 1)</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FHDR_FCTRL_POS (RADIOLIB_LORAWAN_FHDR_LEN_START_OFFS + 5)</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FHDR_FCNT_POS (RADIOLIB_LORAWAN_FHDR_LEN_START_OFFS + 6)</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FHDR_FOPTS_POS (RADIOLIB_LORAWAN_FHDR_LEN_START_OFFS + 8)</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FHDR_FOPTS_LEN_MASK (0x0F)</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FHDR_FOPTS_MAX_LEN (15)</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FHDR_FPORT_POS(FOPTS) (RADIOLIB_LORAWAN_FHDR_LEN_START_OFFS + 8 + (FOPTS))</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FRAME_PAYLOAD_POS(FOPTS) (RADIOLIB_LORAWAN_FHDR_LEN_START_OFFS + 9 + (FOPTS))</span></div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FRAME_LEN(PAYLOAD, FOPTS) (16 + 13 + (PAYLOAD) + (FOPTS))</span></div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span><span class="comment">// payload encryption/MIC blocks common layout</span></div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span><span class="preprocessor">#define RADIOLIB_LORAWAN_BLOCK_MAGIC_POS (0)</span></div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span><span class="preprocessor">#define RADIOLIB_LORAWAN_BLOCK_CONF_FCNT_POS (1)</span></div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span><span class="preprocessor">#define RADIOLIB_LORAWAN_BLOCK_DIR_POS (5)</span></div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span><span class="preprocessor">#define RADIOLIB_LORAWAN_BLOCK_DEV_ADDR_POS (6)</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span><span class="preprocessor">#define RADIOLIB_LORAWAN_BLOCK_FCNT_POS (10)</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span><span class="comment">// payload encryption block layout</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span><span class="preprocessor">#define RADIOLIB_LORAWAN_ENC_BLOCK_MAGIC (0x01)</span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span><span class="preprocessor">#define RADIOLIB_LORAWAN_ENC_BLOCK_COUNTER_ID_POS (4)</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span><span class="preprocessor">#define RADIOLIB_LORAWAN_ENC_BLOCK_COUNTER_POS (15)</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><span class="comment">// payload MIC blocks layout</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MIC_BLOCK_MAGIC (0x49)</span></div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MIC_BLOCK_LEN_POS (15)</span></div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MIC_DATA_RATE_POS (3)</span></div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MIC_CH_INDEX_POS (4)</span></div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span><span class="comment">// maximum allowed dwell time on bands that implement dwell time limitations</span></div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DWELL_TIME (400)</span></div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span><span class="comment">// unused frame counter value</span></div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span><span class="preprocessor">#define RADIOLIB_LORAWAN_FCNT_NONE (0xFFFFFFFF)</span></div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> </div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span><span class="comment">// TR013 CSMA recommended values</span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DIFS_DEFAULT (2)</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span><span class="preprocessor">#define RADIOLIB_LORAWAN_BACKOFF_MAX_DEFAULT (6)</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAX_CHANGES_DEFAULT (4)</span></div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> </div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span><span class="comment">// MAC commands</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span><span class="preprocessor">#define RADIOLIB_LORAWAN_NUM_MAC_COMMANDS (23)</span></div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> </div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_RESET (0x01)</span></div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_LINK_CHECK (0x02)</span></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_LINK_ADR (0x03)</span></div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_DUTY_CYCLE (0x04)</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_RX_PARAM_SETUP (0x05)</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_DEV_STATUS (0x06)</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_NEW_CHANNEL (0x07)</span></div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_RX_TIMING_SETUP (0x08)</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_TX_PARAM_SETUP (0x09)</span></div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_DL_CHANNEL (0x0A)</span></div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_REKEY (0x0B)</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_ADR_PARAM_SETUP (0x0C)</span></div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_DEVICE_TIME (0x0D)</span></div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_FORCE_REJOIN (0x0E)</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_REJOIN_PARAM_SETUP (0x0F)</span></div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_PROPRIETARY (0x80)</span></div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span><span class="comment">// the length of internal MAC command queue - hopefully this is enough for most use cases</span></div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_COMMAND_QUEUE_SIZE (9)</span></div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> </div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span><span class="comment">// the maximum number of simultaneously available channels</span></div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span><span class="preprocessor">#define RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS (16)</span></div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> </div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span><span class="comment">// maximum MAC command sizes</span></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAX_MAC_COMMAND_LEN_DOWN (5)</span></div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAX_MAC_COMMAND_LEN_UP (2)</span></div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAX_NUM_ADR_COMMANDS (8)</span></div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> </div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAX_DOWNLINK_SIZE (250)</span></div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> </div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span><span class="comment">// threshold at which sleeping via user callback enabled, in ms</span></div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span><span class="preprocessor">#define RADIOLIB_LORAWAN_DELAY_SLEEP_THRESHOLD (50)</span></div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> </div>
<div class="foldopen" id="foldopen00220" data-start="{" data-end="};">
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_mac_command__t.html"> 220</a></span><span class="keyword">struct </span><a class="code hl_struct" href="struct_lo_ra_w_a_n_mac_command__t.html">LoRaWANMacCommand_t</a> {</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_mac_command__t.html#a79d26324cafccbae8b95927935e0d0dc"> 222</a></span> <span class="keyword">const</span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_mac_command__t.html#a79d26324cafccbae8b95927935e0d0dc">cid</a>;</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> </div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_mac_command__t.html#a07d546268f6ac9ae191a7cca4791de37"> 225</a></span> <span class="keyword">const</span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_mac_command__t.html#a07d546268f6ac9ae191a7cca4791de37">lenDn</a>;</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> </div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_mac_command__t.html#a89f71b4d17ad16089772ed070cc0949e"> 228</a></span> <span class="keyword">const</span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_mac_command__t.html#a89f71b4d17ad16089772ed070cc0949e">lenUp</a>;</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> </div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_mac_command__t.html#aa253350bc95c821bf42eaee170922355"> 231</a></span> <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="struct_lo_ra_w_a_n_mac_command__t.html#aa253350bc95c821bf42eaee170922355">persist</a>;</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> </div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_mac_command__t.html#a269530a63c3e2a66393fb10286a3b5b6"> 234</a></span> <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="struct_lo_ra_w_a_n_mac_command__t.html#a269530a63c3e2a66393fb10286a3b5b6">user</a>;</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span>};</div>
</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> </div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span><span class="preprocessor">#define RADIOLIB_LORAWAN_MAC_COMMAND_NONE { .cid = 0, .lenDn = 0, .lenUp = 0, .persist = false, .user = false }</span></div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> </div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span><span class="keyword">constexpr</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_mac_command__t.html">LoRaWANMacCommand_t</a> MacTable[RADIOLIB_LORAWAN_NUM_MAC_COMMANDS] = {</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> { RADIOLIB_LORAWAN_MAC_RESET, 1, 1, <span class="keyword">true</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> { RADIOLIB_LORAWAN_MAC_LINK_CHECK, 2, 0, <span class="keyword">false</span>, <span class="keyword">true</span> },</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> { RADIOLIB_LORAWAN_MAC_LINK_ADR, 4, 1, <span class="keyword">false</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> { RADIOLIB_LORAWAN_MAC_DUTY_CYCLE, 1, 0, <span class="keyword">false</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> { RADIOLIB_LORAWAN_MAC_RX_PARAM_SETUP, 4, 1, <span class="keyword">true</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> { RADIOLIB_LORAWAN_MAC_DEV_STATUS, 0, 2, <span class="keyword">false</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> { RADIOLIB_LORAWAN_MAC_NEW_CHANNEL, 5, 1, <span class="keyword">false</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> { RADIOLIB_LORAWAN_MAC_RX_TIMING_SETUP, 1, 0, <span class="keyword">true</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> { RADIOLIB_LORAWAN_MAC_TX_PARAM_SETUP, 1, 0, <span class="keyword">true</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> { RADIOLIB_LORAWAN_MAC_DL_CHANNEL, 4, 1, <span class="keyword">true</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> { RADIOLIB_LORAWAN_MAC_REKEY, 1, 1, <span class="keyword">true</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> { RADIOLIB_LORAWAN_MAC_ADR_PARAM_SETUP, 1, 0, <span class="keyword">false</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> { RADIOLIB_LORAWAN_MAC_DEVICE_TIME, 5, 0, <span class="keyword">false</span>, <span class="keyword">true</span> },</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> { RADIOLIB_LORAWAN_MAC_FORCE_REJOIN, 2, 0, <span class="keyword">false</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> { RADIOLIB_LORAWAN_MAC_REJOIN_PARAM_SETUP, 1, 1, <span class="keyword">false</span>, <span class="keyword">false</span> },</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> { RADIOLIB_LORAWAN_MAC_PROPRIETARY, 5, 0, <span class="keyword">false</span>, <span class="keyword">true</span> },</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span>};</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> </div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span><span class="preprocessor">#define RADIOLIB_LORAWAN_NONCES_VERSION_VAL (0x0001)</span></div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> </div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span><span class="keyword">enum</span> LoRaWANSchemeBase_t {</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> RADIOLIB_LORAWAN_NONCES_START = 0x00,</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> RADIOLIB_LORAWAN_NONCES_VERSION = RADIOLIB_LORAWAN_NONCES_START, <span class="comment">// 2 bytes</span></div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> RADIOLIB_LORAWAN_NONCES_MODE = RADIOLIB_LORAWAN_NONCES_VERSION + <span class="keyword">sizeof</span>(uint16_t), <span class="comment">// 2 bytes</span></div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> RADIOLIB_LORAWAN_NONCES_CLASS = RADIOLIB_LORAWAN_NONCES_MODE + <span class="keyword">sizeof</span>(uint16_t), <span class="comment">// 1 byte</span></div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> RADIOLIB_LORAWAN_NONCES_PLAN = RADIOLIB_LORAWAN_NONCES_CLASS + <span class="keyword">sizeof</span>(uint8_t), <span class="comment">// 1 byte</span></div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> RADIOLIB_LORAWAN_NONCES_CHECKSUM = RADIOLIB_LORAWAN_NONCES_PLAN + <span class="keyword">sizeof</span>(uint8_t), <span class="comment">// 2 bytes</span></div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> RADIOLIB_LORAWAN_NONCES_DEV_NONCE = RADIOLIB_LORAWAN_NONCES_CHECKSUM + <span class="keyword">sizeof</span>(uint16_t), <span class="comment">// 2 bytes</span></div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> RADIOLIB_LORAWAN_NONCES_JOIN_NONCE = RADIOLIB_LORAWAN_NONCES_DEV_NONCE + <span class="keyword">sizeof</span>(uint16_t), <span class="comment">// 3 bytes</span></div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> RADIOLIB_LORAWAN_NONCES_ACTIVE = RADIOLIB_LORAWAN_NONCES_JOIN_NONCE + 3, <span class="comment">// 1 byte</span></div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> RADIOLIB_LORAWAN_NONCES_SIGNATURE = RADIOLIB_LORAWAN_NONCES_ACTIVE + <span class="keyword">sizeof</span>(uint8_t), <span class="comment">// 2 bytes</span></div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> RADIOLIB_LORAWAN_NONCES_BUF_SIZE = RADIOLIB_LORAWAN_NONCES_SIGNATURE + <span class="keyword">sizeof</span>(uint16_t) <span class="comment">// Nonces buffer size</span></div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span>};</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> </div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span><span class="keyword">enum</span> LoRaWANSchemeSession_t {</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> RADIOLIB_LORAWAN_SESSION_START = 0x00,</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> RADIOLIB_LORAWAN_SESSION_NWK_SENC_KEY = RADIOLIB_LORAWAN_SESSION_START, <span class="comment">// 16 bytes</span></div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> RADIOLIB_LORAWAN_SESSION_APP_SKEY = RADIOLIB_LORAWAN_SESSION_NWK_SENC_KEY + RADIOLIB_AES128_KEY_SIZE, <span class="comment">// 16 bytes</span></div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> RADIOLIB_LORAWAN_SESSION_FNWK_SINT_KEY = RADIOLIB_LORAWAN_SESSION_APP_SKEY + RADIOLIB_AES128_KEY_SIZE, <span class="comment">// 16 bytes</span></div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> RADIOLIB_LORAWAN_SESSION_SNWK_SINT_KEY = RADIOLIB_LORAWAN_SESSION_FNWK_SINT_KEY + RADIOLIB_AES128_KEY_SIZE, <span class="comment">// 16 bytes</span></div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> RADIOLIB_LORAWAN_SESSION_DEV_ADDR = RADIOLIB_LORAWAN_SESSION_SNWK_SINT_KEY + RADIOLIB_AES128_KEY_SIZE, <span class="comment">// 4 bytes</span></div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> RADIOLIB_LORAWAN_SESSION_NONCES_SIGNATURE = RADIOLIB_LORAWAN_SESSION_DEV_ADDR + <span class="keyword">sizeof</span>(uint32_t), <span class="comment">// 2 bytes</span></div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> RADIOLIB_LORAWAN_SESSION_FCNT_UP = RADIOLIB_LORAWAN_SESSION_NONCES_SIGNATURE + <span class="keyword">sizeof</span>(uint16_t), <span class="comment">// 4 bytes</span></div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> RADIOLIB_LORAWAN_SESSION_N_FCNT_DOWN = RADIOLIB_LORAWAN_SESSION_FCNT_UP + <span class="keyword">sizeof</span>(uint32_t), <span class="comment">// 4 bytes</span></div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> RADIOLIB_LORAWAN_SESSION_A_FCNT_DOWN = RADIOLIB_LORAWAN_SESSION_N_FCNT_DOWN + <span class="keyword">sizeof</span>(uint32_t), <span class="comment">// 4 bytes</span></div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> RADIOLIB_LORAWAN_SESSION_ADR_FCNT = RADIOLIB_LORAWAN_SESSION_A_FCNT_DOWN + <span class="keyword">sizeof</span>(uint32_t), <span class="comment">// 4 bytes</span></div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> RADIOLIB_LORAWAN_SESSION_CONF_FCNT_UP = RADIOLIB_LORAWAN_SESSION_ADR_FCNT + <span class="keyword">sizeof</span>(uint32_t), <span class="comment">// 4 bytes</span></div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> RADIOLIB_LORAWAN_SESSION_CONF_FCNT_DOWN = RADIOLIB_LORAWAN_SESSION_CONF_FCNT_UP + <span class="keyword">sizeof</span>(uint32_t), <span class="comment">// 4 bytes</span></div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> RADIOLIB_LORAWAN_SESSION_RJ_COUNT0 = RADIOLIB_LORAWAN_SESSION_CONF_FCNT_DOWN + <span class="keyword">sizeof</span>(uint32_t), <span class="comment">// 2 bytes</span></div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> RADIOLIB_LORAWAN_SESSION_RJ_COUNT1 = RADIOLIB_LORAWAN_SESSION_RJ_COUNT0 + <span class="keyword">sizeof</span>(uint16_t), <span class="comment">// 2 bytes</span></div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> RADIOLIB_LORAWAN_SESSION_HOMENET_ID = RADIOLIB_LORAWAN_SESSION_RJ_COUNT1 + <span class="keyword">sizeof</span>(uint16_t), <span class="comment">// 4 bytes</span></div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> RADIOLIB_LORAWAN_SESSION_VERSION = RADIOLIB_LORAWAN_SESSION_HOMENET_ID + <span class="keyword">sizeof</span>(uint32_t), <span class="comment">// 1 byte</span></div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> RADIOLIB_LORAWAN_SESSION_LINK_ADR = RADIOLIB_LORAWAN_SESSION_VERSION + <span class="keyword">sizeof</span>(uint8_t), <span class="comment">// 14 bytes</span></div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> RADIOLIB_LORAWAN_SESSION_DUTY_CYCLE = RADIOLIB_LORAWAN_SESSION_LINK_ADR + 14, <span class="comment">// 1 byte</span></div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> RADIOLIB_LORAWAN_SESSION_RX_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_DUTY_CYCLE + 1, <span class="comment">// 4 bytes</span></div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> RADIOLIB_LORAWAN_SESSION_RX_TIMING_SETUP = RADIOLIB_LORAWAN_SESSION_RX_PARAM_SETUP + 4, <span class="comment">// 1 byte</span></div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> RADIOLIB_LORAWAN_SESSION_TX_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_RX_TIMING_SETUP + 1, <span class="comment">// 1 byte</span></div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> RADIOLIB_LORAWAN_SESSION_ADR_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_TX_PARAM_SETUP + 1, <span class="comment">// 1 byte</span></div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> RADIOLIB_LORAWAN_SESSION_REJOIN_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_ADR_PARAM_SETUP + 1, <span class="comment">// 1 byte</span></div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> RADIOLIB_LORAWAN_SESSION_UL_CHANNELS = RADIOLIB_LORAWAN_SESSION_REJOIN_PARAM_SETUP + 1, <span class="comment">// 16*5 bytes</span></div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> RADIOLIB_LORAWAN_SESSION_DL_CHANNELS = RADIOLIB_LORAWAN_SESSION_UL_CHANNELS + RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS*5, <span class="comment">// 16*4 bytes</span></div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> RADIOLIB_LORAWAN_SESSION_AVAILABLE_CHANNELS = RADIOLIB_LORAWAN_SESSION_DL_CHANNELS + RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS*4, <span class="comment">// 2 bytes</span></div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> RADIOLIB_LORAWAN_SESSION_MAC_QUEUE = RADIOLIB_LORAWAN_SESSION_AVAILABLE_CHANNELS + <span class="keyword">sizeof</span>(uint16_t), <span class="comment">// 15 bytes</span></div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> RADIOLIB_LORAWAN_SESSION_MAC_QUEUE_LEN = RADIOLIB_LORAWAN_SESSION_MAC_QUEUE + RADIOLIB_LORAWAN_FHDR_FOPTS_MAX_LEN, <span class="comment">// 1 byte</span></div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> RADIOLIB_LORAWAN_SESSION_SIGNATURE = RADIOLIB_LORAWAN_SESSION_MAC_QUEUE_LEN + <span class="keyword">sizeof</span>(uint8_t), <span class="comment">// 2 bytes</span></div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> RADIOLIB_LORAWAN_SESSION_BUF_SIZE = RADIOLIB_LORAWAN_SESSION_SIGNATURE + <span class="keyword">sizeof</span>(uint16_t) <span class="comment">// Session buffer size</span></div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span>};</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> </div>
<div class="foldopen" id="foldopen00313" data-start="{" data-end="};">
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel__t.html"> 313</a></span><span class="keyword">struct </span><a class="code hl_struct" href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a> {</div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel__t.html#acde186d519eca4dc43d053f2146b75a0"> 315</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel__t.html#acde186d519eca4dc43d053f2146b75a0">enabled</a>;</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> </div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel__t.html#a9fc4b7ec0b298df267cc2c39ef12cfa0"> 318</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel__t.html#a9fc4b7ec0b298df267cc2c39ef12cfa0">idx</a>;</div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> </div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel__t.html#a96620451b311ba0126b9575aec81ec2f"> 321</a></span> uint32_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel__t.html#a96620451b311ba0126b9575aec81ec2f">freq</a>;</div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> </div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel__t.html#abb028e93f3fe15ed6f95e5fcd8a62f53"> 324</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel__t.html#abb028e93f3fe15ed6f95e5fcd8a62f53">drMin</a>;</div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> </div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel__t.html#aeabadf186d7bc105f6d289e3a491412c"> 327</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel__t.html#aeabadf186d7bc105f6d289e3a491412c">drMax</a>;</div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> </div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel__t.html#a8332e2b32f822524c6a1ed04de3144bf"> 330</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel__t.html#a8332e2b32f822524c6a1ed04de3144bf">dr</a>;</div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> </div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel__t.html#a5d8fc9046c6351b3bc54825052c471dd"> 333</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel__t.html#a5d8fc9046c6351b3bc54825052c471dd">available</a>;</div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span>};</div>
</div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> </div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span><span class="comment">// alias for unused channel</span></div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span><span class="preprocessor">#define RADIOLIB_LORAWAN_CHANNEL_NONE { .enabled = false, .idx = RADIOLIB_LORAWAN_CHANNEL_INDEX_NONE, .freq = 0, \</span></div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span><span class="preprocessor"> .drMin = 0, .drMax = 0, .dr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED, .available = false }</span></div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> </div>
<div class="foldopen" id="foldopen00345" data-start="{" data-end="};">
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel_span__t.html"> 345</a></span><span class="keyword">struct </span><a class="code hl_struct" href="struct_lo_ra_w_a_n_channel_span__t.html">LoRaWANChannelSpan_t</a> {</div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel_span__t.html#a50f5701ae19b79a0c8c487673135b2f2"> 347</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel_span__t.html#a50f5701ae19b79a0c8c487673135b2f2">numChannels</a>;</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> </div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel_span__t.html#a1bfba15154185b75693542cd0547cb96"> 350</a></span> uint32_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel_span__t.html#a1bfba15154185b75693542cd0547cb96">freqStart</a>;</div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> </div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel_span__t.html#a958f8056a2611c7a503169457278541e"> 353</a></span> uint32_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel_span__t.html#a958f8056a2611c7a503169457278541e">freqStep</a>;</div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> </div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel_span__t.html#ab613b4ca3a2c99ef0aa53f8132f54535"> 356</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel_span__t.html#ab613b4ca3a2c99ef0aa53f8132f54535">drMin</a>;</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> </div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel_span__t.html#a914d2b6f54e9c8d2841acf1d0652fd79"> 359</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel_span__t.html#a914d2b6f54e9c8d2841acf1d0652fd79">drMax</a>;</div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> </div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_channel_span__t.html#a17203af63259911cba8b2ae05be25ff5"> 362</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_channel_span__t.html#a17203af63259911cba8b2ae05be25ff5">drJoinRequest</a>;</div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span>};</div>
</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> </div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span><span class="comment">// alias for unused channel span</span></div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span><span class="preprocessor">#define RADIOLIB_LORAWAN_CHANNEL_SPAN_NONE { .numChannels = 0, .freqStart = 0, .freqStep = 0, .drMin = 0, .drMax = 0, .drJoinRequest = RADIOLIB_LORAWAN_DATA_RATE_UNUSED }</span></div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> </div>
<div class="foldopen" id="foldopen00372" data-start="{" data-end="};">
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html"> 372</a></span><span class="keyword">struct </span><a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> {</div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#abb14a7c48ec89a944f441517b1d55986"> 374</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#abb14a7c48ec89a944f441517b1d55986">bandNum</a>;</div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> </div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#ad7ab17cc0b530fb99c3be39fd6411802"> 377</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#ad7ab17cc0b530fb99c3be39fd6411802">bandType</a>;</div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> </div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#a92195dec46b60a55913cd3af43f410f9"> 380</a></span> uint32_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#a92195dec46b60a55913cd3af43f410f9">freqMin</a>;</div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span> </div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#ac6b39e29fe554cd53349d80dfff1f479"> 383</a></span> uint32_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#ac6b39e29fe554cd53349d80dfff1f479">freqMax</a>;</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span> </div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#a9b8143ac9bbf3ed45e7cc80fc71ce055"> 386</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#a9b8143ac9bbf3ed45e7cc80fc71ce055">payloadLenMax</a>[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES];</div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> </div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#a43fdafd540c93348f9b4a8958e021a4c"> 389</a></span> int8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#a43fdafd540c93348f9b4a8958e021a4c">powerMax</a>;</div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> </div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#aa22d7d7670846b36d3104439d18e5f15"> 392</a></span> int8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#aa22d7d7670846b36d3104439d18e5f15">powerNumSteps</a>;</div>
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> </div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#a743d3a23aa5c58e156dff633b830ee4f"> 395</a></span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#a743d3a23aa5c58e156dff633b830ee4f">dutyCycle</a>;</div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> </div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#a8bd0d705d9c0dbe87d25e83cc54e922c"> 398</a></span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#a8bd0d705d9c0dbe87d25e83cc54e922c">dwellTimeUp</a>;</div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> </div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#aef289b63007a6e085c7c66f71209d84c"> 401</a></span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#aef289b63007a6e085c7c66f71209d84c">dwellTimeDn</a>;</div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> </div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#a4bbc7445702c32199f0bbd011d6f4da6"> 404</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#a4bbc7445702c32199f0bbd011d6f4da6">txParamSupported</a>;</div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> </div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#a9bd952022473cb08e067c763325d689c"> 407</a></span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a> <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#a9bd952022473cb08e067c763325d689c">txFreqs</a>[3];</div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> </div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#ae58f859a72e64aa4a6fe218ba7e21c10"> 410</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#ae58f859a72e64aa4a6fe218ba7e21c10">numTxSpans</a>;</div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> </div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#aa37a3cae13a68c2deb2968de26ad9bd3"> 413</a></span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel_span__t.html">LoRaWANChannelSpan_t</a> <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#aa37a3cae13a68c2deb2968de26ad9bd3">txSpans</a>[2];</div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> </div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#af8def1e0b5c3dc122557f71f5637a529"> 416</a></span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel_span__t.html">LoRaWANChannelSpan_t</a> <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#af8def1e0b5c3dc122557f71f5637a529">rx1Span</a>;</div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> </div>
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> uint8_t rx1DrTable[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES][8];</div>
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> </div>
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#ae3ed10eddc647a6f770121a1662a854f"> 421</a></span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a> <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#ae3ed10eddc647a6f770121a1662a854f">rx2</a>;</div>
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> </div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#a918f643c1fc6df722efd8f969c68cf7e"> 424</a></span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a> <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#a918f643c1fc6df722efd8f969c68cf7e">txWoR</a>[2];</div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> </div>
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#a709fdad617bd9138eef52bc7220c29f2"> 427</a></span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a> <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#a709fdad617bd9138eef52bc7220c29f2">txAck</a>[2];</div>
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span> </div>
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_band__t.html#a8b518a570756048dec56bec703a0b25b"> 430</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_band__t.html#a8b518a570756048dec56bec703a0b25b">dataRates</a>[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES];</div>
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span>};</div>
</div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> </div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span><span class="comment">// supported bands</span></div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> EU868;</div>
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> US915;</div>
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> EU433;</div>
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> AU915;</div>
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> CN470;</div>
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> AS923;</div>
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> AS923_2;</div>
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> AS923_3;</div>
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> AS923_4;</div>
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> KR920;</div>
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a> IN865;</div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> </div>
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"> 450</span><span class="keyword">enum</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band_num__t.html">LoRaWANBandNum_t</a> {</div>
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> BandEU868,</div>
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> BandUS915,</div>
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> BandEU433,</div>
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> BandAU915,</div>
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> BandCN470,</div>
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> BandAS923,</div>
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> BandAS923_2,</div>
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> BandAS923_3,</div>
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> BandAS923_4,</div>
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> BandKR920,</div>
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> BandIN865,</div>
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> BandLast</div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span>};</div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> </div>
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno"> 465</span><span class="comment">// provide easy access to the number of currently supported bands</span></div>
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"> 466</span><span class="preprocessor">#define RADIOLIB_LORAWAN_NUM_SUPPORTED_BANDS (BandLast - BandEU868)</span></div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> </div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span><span class="comment">// array of currently supported bands</span></div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a>* LoRaWANBands[];</div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"> 470</span> </div>
<div class="foldopen" id="foldopen00475" data-start="{" data-end="};">
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_join_event__t.html"> 475</a></span><span class="keyword">struct </span><a class="code hl_struct" href="struct_lo_ra_w_a_n_join_event__t.html">LoRaWANJoinEvent_t</a> {</div>
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_join_event__t.html#a5b233f8c9d2841b8db64df7f079ab0ee"> 477</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="struct_lo_ra_w_a_n_join_event__t.html#a5b233f8c9d2841b8db64df7f079ab0ee">newSession</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> </div>
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_join_event__t.html#abdb57ec1e16ea0d1822ba0a5632c9372"> 480</a></span> uint16_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_join_event__t.html#abdb57ec1e16ea0d1822ba0a5632c9372">devNonce</a> = 0;</div>
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span> </div>
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_join_event__t.html#a935bc95eb2c02242c61f192fa2c68d8b"> 483</a></span> uint32_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_join_event__t.html#a935bc95eb2c02242c61f192fa2c68d8b">joinNonce</a> = 0;</div>
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"> 484</span>};</div>
</div>
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> </div>
<div class="foldopen" id="foldopen00490" data-start="{" data-end="};">
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html"> 490</a></span><span class="keyword">struct </span><a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a> {</div>
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html#a698a1956ffafa152e7c2cada3a2a2805"> 492</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_event__t.html#a698a1956ffafa152e7c2cada3a2a2805">dir</a>;</div>
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> </div>
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html#a09079dc76b5367d23766e357d2ddb794"> 495</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="struct_lo_ra_w_a_n_event__t.html#a09079dc76b5367d23766e357d2ddb794">confirmed</a>;</div>
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> </div>
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html#a506755c4731be16d126bdef873c420f8"> 499</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="struct_lo_ra_w_a_n_event__t.html#a506755c4731be16d126bdef873c420f8">confirming</a>;</div>
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> </div>
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html#afe256fb2ed02e2ffdf0ae85f92951778"> 502</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="struct_lo_ra_w_a_n_event__t.html#afe256fb2ed02e2ffdf0ae85f92951778">frmPending</a>;</div>
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> </div>
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html#a56281d98efee007a0c03e6a6ae8a592b"> 505</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_event__t.html#a56281d98efee007a0c03e6a6ae8a592b">datarate</a>;</div>
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> </div>
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html#a01e1843dcd39911a0fbbb86cdca35d33"> 508</a></span> <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_lo_ra_w_a_n_event__t.html#a01e1843dcd39911a0fbbb86cdca35d33">freq</a>;</div>
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span> </div>
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html#a49eebe64d351bb2e91901ef8fae044ff"> 511</a></span> int16_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_event__t.html#a49eebe64d351bb2e91901ef8fae044ff">power</a>;</div>
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span> </div>
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html#a73ecb624afeda6ddb32c1007d3dcb846"> 514</a></span> uint32_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_event__t.html#a73ecb624afeda6ddb32c1007d3dcb846">fCnt</a>;</div>
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> </div>
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html#a14f360e64ae4a6090c04333567f1a513"> 517</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_event__t.html#a14f360e64ae4a6090c04333567f1a513">fPort</a>;</div>
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"> 518</span> </div>
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"><a class="line" href="struct_lo_ra_w_a_n_event__t.html#a6e46d7cf9c75ff511ad4d063692c16e7"> 520</a></span> uint8_t <a class="code hl_variable" href="struct_lo_ra_w_a_n_event__t.html#a6e46d7cf9c75ff511ad4d063692c16e7">nbTrans</a>;</div>
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"> 521</span>};</div>
</div>
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> </div>
<div class="foldopen" id="foldopen00527" data-start="{" data-end="};">
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno"><a class="line" href="class_lo_ra_w_a_n_node.html"> 527</a></span><span class="keyword">class </span><a class="code hl_class" href="class_lo_ra_w_a_n_node.html">LoRaWANNode</a> {</div>
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"> 528</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno"> 529</span> </div>
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> <a class="code hl_class" href="class_lo_ra_w_a_n_node.html">LoRaWANNode</a>(<a class="code hl_class" href="class_physical_layer.html">PhysicalLayer</a>* phy, <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a>* band, uint8_t subBand = 0);</div>
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> </div>
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno"> 542</span> uint8_t* <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a84004883006b4a498d4899874952445b">getBufferNonces</a>();</div>
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno"> 543</span> </div>
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"> 549</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#ad99e2fa4738648a6f3efe72ff785def2">setBufferNonces</a>(<span class="keyword">const</span> uint8_t* persistentBuffer);</div>
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span> </div>
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a0feeaed200d8f94ad94c3ed49f404847">clearSession</a>();</div>
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> </div>
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"> 560</span> uint8_t* <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a90369a4f2c4da11527872a7bbbf9ab06">getBufferSession</a>();</div>
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span> </div>
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"> 567</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#aedeb50c9ccb81e8092233d34e039cfa4">setBufferSession</a>(<span class="keyword">const</span> uint8_t* persistentBuffer);</div>
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno"> 568</span> </div>
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#ab2df20a240812f184786dda5ace171ef">beginOTAA</a>(uint64_t joinEUI, uint64_t devEUI, <span class="keyword">const</span> uint8_t* nwkKey, <span class="keyword">const</span> uint8_t* appKey);</div>
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span> </div>
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a43b259fd8804ef8d9d4922962e9ecae5">beginABP</a>(uint32_t addr, <span class="keyword">const</span> uint8_t* fNwkSIntKey, <span class="keyword">const</span> uint8_t* sNwkSIntKey, <span class="keyword">const</span> uint8_t* nwkSEncKey, <span class="keyword">const</span> uint8_t* appSKey);</div>
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"> 590</span> </div>
<div class="line"><a id="l00597" name="l00597"></a><span class="lineno"> 597</span> <span class="keyword">virtual</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#abd9e976eec64a3bd1ddf3331f2bc93cd">activateOTAA</a>(uint8_t initialDr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED, <a class="code hl_struct" href="struct_lo_ra_w_a_n_join_event__t.html">LoRaWANJoinEvent_t</a> *joinEvent = NULL);</div>
<div class="line"><a id="l00598" name="l00598"></a><span class="lineno"> 598</span> </div>
<div class="line"><a id="l00605" name="l00605"></a><span class="lineno"> 605</span> <span class="keyword">virtual</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a77483c51548e48a5dff4b707f7770e86">activateABP</a>(uint8_t initialDr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED);</div>
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno"> 606</span> </div>
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno"> 608</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a9a44677a1ef7db1216bc482139d6be8d">isActivated</a>();</div>
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno"> 609</span> </div>
<div class="line"><a id="l00610" name="l00610"></a><span class="lineno"> 610</span><span class="preprocessor"> #if defined(RADIOLIB_BUILD_ARDUINO)</span></div>
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno"> 623</span> <span class="keyword">virtual</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a11c2fbe631063da69355f8d74f4bf3b8">sendReceive</a>(<span class="keyword">const</span> String&amp; strUp, uint8_t fPort, String&amp; strDown, <span class="keywordtype">bool</span> isConfirmed = <span class="keyword">false</span>, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* eventUp = NULL, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* eventDown = NULL);</div>
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno"> 624</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno"> 625</span> </div>
<div class="line"><a id="l00637" name="l00637"></a><span class="lineno"> 637</span> <span class="keyword">virtual</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a11c2fbe631063da69355f8d74f4bf3b8">sendReceive</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* strUp, uint8_t fPort, <span class="keywordtype">bool</span> isConfirmed = <span class="keyword">false</span>, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* eventUp = NULL, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* eventDown = NULL);</div>
<div class="line"><a id="l00638" name="l00638"></a><span class="lineno"> 638</span> </div>
<div class="line"><a id="l00652" name="l00652"></a><span class="lineno"> 652</span> <span class="keyword">virtual</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a11c2fbe631063da69355f8d74f4bf3b8">sendReceive</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* strUp, uint8_t fPort, uint8_t* dataDown, <span class="keywordtype">size_t</span>* lenDown, <span class="keywordtype">bool</span> isConfirmed = <span class="keyword">false</span>, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* eventUp = NULL, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* eventDown = NULL);</div>
<div class="line"><a id="l00653" name="l00653"></a><span class="lineno"> 653</span> </div>
<div class="line"><a id="l00666" name="l00666"></a><span class="lineno"> 666</span> <span class="keyword">virtual</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a11c2fbe631063da69355f8d74f4bf3b8">sendReceive</a>(<span class="keyword">const</span> uint8_t* dataUp, <span class="keywordtype">size_t</span> lenUp, uint8_t fPort = 1, <span class="keywordtype">bool</span> isConfirmed = <span class="keyword">false</span>, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* eventUp = NULL, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* eventDown = NULL);</div>
<div class="line"><a id="l00667" name="l00667"></a><span class="lineno"> 667</span> </div>
<div class="line"><a id="l00682" name="l00682"></a><span class="lineno"> 682</span> <span class="keyword">virtual</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a11c2fbe631063da69355f8d74f4bf3b8">sendReceive</a>(<span class="keyword">const</span> uint8_t* dataUp, <span class="keywordtype">size_t</span> lenUp, uint8_t fPort, uint8_t* dataDown, <span class="keywordtype">size_t</span>* lenDown, <span class="keywordtype">bool</span> isConfirmed = <span class="keyword">false</span>, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* eventUp = NULL, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* eventDown = NULL);</div>
<div class="line"><a id="l00683" name="l00683"></a><span class="lineno"> 683</span> </div>
<div class="line"><a id="l00691" name="l00691"></a><span class="lineno"> 691</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#adef05650cf4eb92042ca5e2688c1e164">sendMacCommandReq</a>(uint8_t cid);</div>
<div class="line"><a id="l00692" name="l00692"></a><span class="lineno"> 692</span> </div>
<div class="line"><a id="l00701" name="l00701"></a><span class="lineno"> 701</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#adf038f331c1dc954dafc2668e7a31ca0">getMacLinkCheckAns</a>(uint8_t* margin, uint8_t* gwCnt);</div>
<div class="line"><a id="l00702" name="l00702"></a><span class="lineno"> 702</span> </div>
<div class="line"><a id="l00712" name="l00712"></a><span class="lineno"> 712</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a9e6e1ce4296364606ff8b10fb5f971de">getMacDeviceTimeAns</a>(uint32_t* gpsEpoch, uint8_t* fraction, <span class="keywordtype">bool</span> returnUnix = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00713" name="l00713"></a><span class="lineno"> 713</span> </div>
<div class="line"><a id="l00719" name="l00719"></a><span class="lineno"> 719</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a14e8a8a098df28ff5ee294f235500499">setDatarate</a>(uint8_t drUp);</div>
<div class="line"><a id="l00720" name="l00720"></a><span class="lineno"> 720</span> </div>
<div class="line"><a id="l00726" name="l00726"></a><span class="lineno"> 726</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a9af613f7d923e7bdcfdbd020132c6d4b">setTxPower</a>(int8_t txPower);</div>
<div class="line"><a id="l00727" name="l00727"></a><span class="lineno"> 727</span> </div>
<div class="line"><a id="l00734" name="l00734"></a><span class="lineno"> 734</span> int16_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#addfd8ac3d0bfe5a273e9ba10e51f8025">setRx2Dr</a>(uint8_t dr);</div>
<div class="line"><a id="l00735" name="l00735"></a><span class="lineno"> 735</span> </div>
<div class="line"><a id="l00740" name="l00740"></a><span class="lineno"> 740</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#ae222275f807f472083ea6100c23c75ff">setADR</a>(<span class="keywordtype">bool</span> enable = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00741" name="l00741"></a><span class="lineno"> 741</span> </div>
<div class="line"><a id="l00748" name="l00748"></a><span class="lineno"> 748</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a3d4bbd6d382496838954ab4ac1168b77">setDutyCycle</a>(<span class="keywordtype">bool</span> enable = <span class="keyword">true</span>, <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> msPerHour = 0);</div>
<div class="line"><a id="l00749" name="l00749"></a><span class="lineno"> 749</span> </div>
<div class="line"><a id="l00756" name="l00756"></a><span class="lineno"> 756</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a62bfe68f6fe63c2e408dccbff6a34a4f">setDwellTime</a>(<span class="keywordtype">bool</span> enable, <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> msPerUplink = 0);</div>
<div class="line"><a id="l00757" name="l00757"></a><span class="lineno"> 757</span> </div>
<div class="line"><a id="l00765" name="l00765"></a><span class="lineno"> 765</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a2d9a53560ebfbaf006eefd9761424d80">setCSMA</a>(<span class="keywordtype">bool</span> csmaEnabled, uint8_t maxChanges = 4, uint8_t backoffMax = 0, uint8_t difsSlots = 2);</div>
<div class="line"><a id="l00766" name="l00766"></a><span class="lineno"> 766</span> </div>
<div class="line"><a id="l00772" name="l00772"></a><span class="lineno"> 772</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a5449e301634dff1838a1b024b4067034">setDeviceStatus</a>(uint8_t battLevel);</div>
<div class="line"><a id="l00773" name="l00773"></a><span class="lineno"> 773</span> </div>
<div class="line"><a id="l00781" name="l00781"></a><span class="lineno"> 781</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a16c7ae2edfe324e11498b13aa042665f">scheduleTransmission</a>(<a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> tUplink);</div>
<div class="line"><a id="l00782" name="l00782"></a><span class="lineno"> 782</span> </div>
<div class="line"><a id="l00787" name="l00787"></a><span class="lineno"> 787</span> uint32_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#ad3217975ef9959ff83ce79dd80b0d777">getFCntUp</a>();</div>
<div class="line"><a id="l00788" name="l00788"></a><span class="lineno"> 788</span> </div>
<div class="line"><a id="l00793" name="l00793"></a><span class="lineno"> 793</span> uint32_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#aa7fabaa6efe9978c3674b1ab187446a1">getNFCntDown</a>();</div>
<div class="line"><a id="l00794" name="l00794"></a><span class="lineno"> 794</span> </div>
<div class="line"><a id="l00799" name="l00799"></a><span class="lineno"> 799</span> uint32_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a6785265f3311ff6bf296f82429c96701">getAFCntDown</a>();</div>
<div class="line"><a id="l00800" name="l00800"></a><span class="lineno"> 800</span> </div>
<div class="line"><a id="l00806" name="l00806"></a><span class="lineno"> 806</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#af4b3d07cd9bf4178d627204bae18b648">resetFCntDown</a>();</div>
<div class="line"><a id="l00807" name="l00807"></a><span class="lineno"> 807</span> </div>
<div class="line"><a id="l00812" name="l00812"></a><span class="lineno"> 812</span> uint32_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#aee0590cc9123ceac4c822eabed3150c6">getDevAddr</a>();</div>
<div class="line"><a id="l00813" name="l00813"></a><span class="lineno"> 813</span> </div>
<div class="line"><a id="l00818" name="l00818"></a><span class="lineno"> 818</span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a683b02b63867bb7de5df45c94d190305">getLastToA</a>();</div>
<div class="line"><a id="l00819" name="l00819"></a><span class="lineno"> 819</span> </div>
<div class="line"><a id="l00827" name="l00827"></a><span class="lineno"> 827</span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a5bb50904544f331806fd744ab5b99efa">dutyCycleInterval</a>(<a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> msPerHour, <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> airtime);</div>
<div class="line"><a id="l00828" name="l00828"></a><span class="lineno"> 828</span> </div>
<div class="line"><a id="l00830" name="l00830"></a><span class="lineno"> 830</span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a49e690c14858b46692e4ce9aa5a2566a">timeUntilUplink</a>();</div>
<div class="line"><a id="l00831" name="l00831"></a><span class="lineno"> 831</span> </div>
<div class="line"><a id="l00836" name="l00836"></a><span class="lineno"> 836</span> uint8_t <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#ab723160aa317cd84550d0da3a0f52811">getMaxPayloadLen</a>();</div>
<div class="line"><a id="l00837" name="l00837"></a><span class="lineno"> 837</span> </div>
<div class="line"><a id="l00839" name="l00839"></a><span class="lineno"><a class="line" href="class_lo_ra_w_a_n_node.html#a3aec67bd3fa7ec0f6e4bf6b86d971e9e"> 839</a></span> <span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="class_lo_ra_w_a_n_node.html#a3aec67bd3fa7ec0f6e4bf6b86d971e9e">SleepCb_t</a>)(<a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> ms);</div>
<div class="line"><a id="l00840" name="l00840"></a><span class="lineno"> 840</span> </div>
<div class="line"><a id="l00848" name="l00848"></a><span class="lineno"> 848</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_lo_ra_w_a_n_node.html#a11c5f0867a9a8d731e980f865caebd99">setSleepFunction</a>(<a class="code hl_typedef" href="class_lo_ra_w_a_n_node.html#a3aec67bd3fa7ec0f6e4bf6b86d971e9e">SleepCb_t</a> cb); </div>
<div class="line"><a id="l00849" name="l00849"></a><span class="lineno"> 849</span> </div>
<div class="line"><a id="l00854" name="l00854"></a><span class="lineno"><a class="line" href="class_lo_ra_w_a_n_node.html#a8226f4d0329d15da9ffc706e5781403a"> 854</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="class_lo_ra_w_a_n_node.html#a8226f4d0329d15da9ffc706e5781403a">TS009</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00855" name="l00855"></a><span class="lineno"> 855</span> </div>
<div class="line"><a id="l00868" name="l00868"></a><span class="lineno"><a class="line" href="class_lo_ra_w_a_n_node.html#a2176aa3d546e6b00e870a7e1e310c403"> 868</a></span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> <a class="code hl_variable" href="class_lo_ra_w_a_n_node.html#a2176aa3d546e6b00e870a7e1e310c403">scanGuard</a> = 5;</div>
<div class="line"><a id="l00869" name="l00869"></a><span class="lineno"> 869</span> </div>
<div class="line"><a id="l00870" name="l00870"></a><span class="lineno"> 870</span><span class="preprocessor">#if !RADIOLIB_GODMODE</span></div>
<div class="line"><a id="l00871" name="l00871"></a><span class="lineno"> 871</span> <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00872" name="l00872"></a><span class="lineno"> 872</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00873" name="l00873"></a><span class="lineno"> 873</span> <a class="code hl_class" href="class_physical_layer.html">PhysicalLayer</a>* phyLayer = NULL;</div>
<div class="line"><a id="l00874" name="l00874"></a><span class="lineno"> 874</span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a>* band = NULL;</div>
<div class="line"><a id="l00875" name="l00875"></a><span class="lineno"> 875</span> </div>
<div class="line"><a id="l00876" name="l00876"></a><span class="lineno"> 876</span> <span class="comment">// a buffer that holds all LW base parameters that should persist at all times!</span></div>
<div class="line"><a id="l00877" name="l00877"></a><span class="lineno"> 877</span> uint8_t bufferNonces[RADIOLIB_LORAWAN_NONCES_BUF_SIZE] = { 0 };</div>
<div class="line"><a id="l00878" name="l00878"></a><span class="lineno"> 878</span> </div>
<div class="line"><a id="l00879" name="l00879"></a><span class="lineno"> 879</span> <span class="comment">// a buffer that holds all LW session parameters that preferably persist, but can be afforded to get lost</span></div>
<div class="line"><a id="l00880" name="l00880"></a><span class="lineno"> 880</span> uint8_t bufferSession[RADIOLIB_LORAWAN_SESSION_BUF_SIZE] = { 0 };</div>
<div class="line"><a id="l00881" name="l00881"></a><span class="lineno"> 881</span> </div>
<div class="line"><a id="l00882" name="l00882"></a><span class="lineno"> 882</span> uint8_t fOptsUp[RADIOLIB_LORAWAN_FHDR_FOPTS_MAX_LEN] = { 0 };</div>
<div class="line"><a id="l00883" name="l00883"></a><span class="lineno"> 883</span> uint8_t fOptsDown[RADIOLIB_LORAWAN_FHDR_FOPTS_MAX_LEN] = { 0 };</div>
<div class="line"><a id="l00884" name="l00884"></a><span class="lineno"> 884</span> uint8_t fOptsUpLen = 0;</div>
<div class="line"><a id="l00885" name="l00885"></a><span class="lineno"> 885</span> uint8_t fOptsDownLen = 0;</div>
<div class="line"><a id="l00886" name="l00886"></a><span class="lineno"> 886</span> </div>
<div class="line"><a id="l00887" name="l00887"></a><span class="lineno"> 887</span> uint16_t lwMode = RADIOLIB_LORAWAN_MODE_NONE;</div>
<div class="line"><a id="l00888" name="l00888"></a><span class="lineno"> 888</span> uint8_t lwClass = RADIOLIB_LORAWAN_CLASS_A;</div>
<div class="line"><a id="l00889" name="l00889"></a><span class="lineno"> 889</span> <span class="keywordtype">bool</span> isActive = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00890" name="l00890"></a><span class="lineno"> 890</span> </div>
<div class="line"><a id="l00891" name="l00891"></a><span class="lineno"> 891</span> uint64_t joinEUI = 0;</div>
<div class="line"><a id="l00892" name="l00892"></a><span class="lineno"> 892</span> uint64_t devEUI = 0;</div>
<div class="line"><a id="l00893" name="l00893"></a><span class="lineno"> 893</span> uint8_t nwkKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };</div>
<div class="line"><a id="l00894" name="l00894"></a><span class="lineno"> 894</span> uint8_t appKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };</div>
<div class="line"><a id="l00895" name="l00895"></a><span class="lineno"> 895</span> </div>
<div class="line"><a id="l00896" name="l00896"></a><span class="lineno"> 896</span> <span class="comment">// the following is either provided by the network server (OTAA)</span></div>
<div class="line"><a id="l00897" name="l00897"></a><span class="lineno"> 897</span> <span class="comment">// or directly entered by the user (ABP)</span></div>
<div class="line"><a id="l00898" name="l00898"></a><span class="lineno"> 898</span> uint32_t devAddr = 0;</div>
<div class="line"><a id="l00899" name="l00899"></a><span class="lineno"> 899</span> uint8_t appSKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };</div>
<div class="line"><a id="l00900" name="l00900"></a><span class="lineno"> 900</span> uint8_t fNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };</div>
<div class="line"><a id="l00901" name="l00901"></a><span class="lineno"> 901</span> uint8_t sNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };</div>
<div class="line"><a id="l00902" name="l00902"></a><span class="lineno"> 902</span> uint8_t nwkSEncKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };</div>
<div class="line"><a id="l00903" name="l00903"></a><span class="lineno"> 903</span> uint8_t jSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };</div>
<div class="line"><a id="l00904" name="l00904"></a><span class="lineno"> 904</span> </div>
<div class="line"><a id="l00905" name="l00905"></a><span class="lineno"> 905</span> uint16_t keyCheckSum = 0;</div>
<div class="line"><a id="l00906" name="l00906"></a><span class="lineno"> 906</span> </div>
<div class="line"><a id="l00907" name="l00907"></a><span class="lineno"> 907</span> <span class="comment">// device-specific parameters, persistent through sessions</span></div>
<div class="line"><a id="l00908" name="l00908"></a><span class="lineno"> 908</span> uint16_t devNonce = 0;</div>
<div class="line"><a id="l00909" name="l00909"></a><span class="lineno"> 909</span> uint32_t joinNonce = 0;</div>
<div class="line"><a id="l00910" name="l00910"></a><span class="lineno"> 910</span> </div>
<div class="line"><a id="l00911" name="l00911"></a><span class="lineno"> 911</span> <span class="comment">// session-specific parameters</span></div>
<div class="line"><a id="l00912" name="l00912"></a><span class="lineno"> 912</span> uint32_t homeNetId = 0;</div>
<div class="line"><a id="l00913" name="l00913"></a><span class="lineno"> 913</span> uint8_t adrLimitExp = RADIOLIB_LORAWAN_ADR_ACK_LIMIT_EXP;</div>
<div class="line"><a id="l00914" name="l00914"></a><span class="lineno"> 914</span> uint8_t adrDelayExp = RADIOLIB_LORAWAN_ADR_ACK_DELAY_EXP;</div>
<div class="line"><a id="l00915" name="l00915"></a><span class="lineno"> 915</span> uint8_t nbTrans = 1; <span class="comment">// Number of allowed frame retransmissions</span></div>
<div class="line"><a id="l00916" name="l00916"></a><span class="lineno"> 916</span> uint8_t txPowerSteps = 0;</div>
<div class="line"><a id="l00917" name="l00917"></a><span class="lineno"> 917</span> uint8_t txPowerMax = 0;</div>
<div class="line"><a id="l00918" name="l00918"></a><span class="lineno"> 918</span> uint32_t fCntUp = 0;</div>
<div class="line"><a id="l00919" name="l00919"></a><span class="lineno"> 919</span> uint32_t aFCntDown = 0;</div>
<div class="line"><a id="l00920" name="l00920"></a><span class="lineno"> 920</span> uint32_t nFCntDown = 0;</div>
<div class="line"><a id="l00921" name="l00921"></a><span class="lineno"> 921</span> uint32_t confFCntUp = RADIOLIB_LORAWAN_FCNT_NONE;</div>
<div class="line"><a id="l00922" name="l00922"></a><span class="lineno"> 922</span> uint32_t confFCntDown = RADIOLIB_LORAWAN_FCNT_NONE;</div>
<div class="line"><a id="l00923" name="l00923"></a><span class="lineno"> 923</span> uint32_t adrFCnt = 0;</div>
<div class="line"><a id="l00924" name="l00924"></a><span class="lineno"> 924</span> </div>
<div class="line"><a id="l00925" name="l00925"></a><span class="lineno"> 925</span> <span class="comment">// ADR is enabled by default</span></div>
<div class="line"><a id="l00926" name="l00926"></a><span class="lineno"> 926</span> <span class="keywordtype">bool</span> adrEnabled = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00927" name="l00927"></a><span class="lineno"> 927</span> </div>
<div class="line"><a id="l00928" name="l00928"></a><span class="lineno"> 928</span> <span class="comment">// duty cycle is set upon initialization and activated in regions that impose this</span></div>
<div class="line"><a id="l00929" name="l00929"></a><span class="lineno"> 929</span> <span class="keywordtype">bool</span> dutyCycleEnabled = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00930" name="l00930"></a><span class="lineno"> 930</span> uint32_t dutyCycle = 0;</div>
<div class="line"><a id="l00931" name="l00931"></a><span class="lineno"> 931</span> </div>
<div class="line"><a id="l00932" name="l00932"></a><span class="lineno"> 932</span> <span class="comment">// dwell time is set upon initialization and activated in regions that impose this</span></div>
<div class="line"><a id="l00933" name="l00933"></a><span class="lineno"> 933</span> uint16_t dwellTimeUp = 0;</div>
<div class="line"><a id="l00934" name="l00934"></a><span class="lineno"> 934</span> uint16_t dwellTimeDn = 0;</div>
<div class="line"><a id="l00935" name="l00935"></a><span class="lineno"> 935</span> </div>
<div class="line"><a id="l00936" name="l00936"></a><span class="lineno"> 936</span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> tUplink = 0; <span class="comment">// scheduled uplink transmission time (internal clock)</span></div>
<div class="line"><a id="l00937" name="l00937"></a><span class="lineno"> 937</span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> tDownlink = 0; <span class="comment">// time at end of downlink reception</span></div>
<div class="line"><a id="l00938" name="l00938"></a><span class="lineno"> 938</span> </div>
<div class="line"><a id="l00939" name="l00939"></a><span class="lineno"> 939</span> <span class="comment">// enable/disable CSMA for LoRaWAN</span></div>
<div class="line"><a id="l00940" name="l00940"></a><span class="lineno"> 940</span> <span class="keywordtype">bool</span> csmaEnabled = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00941" name="l00941"></a><span class="lineno"> 941</span> </div>
<div class="line"><a id="l00942" name="l00942"></a><span class="lineno"> 942</span> <span class="comment">// maximum number of channel hops during CSMA</span></div>
<div class="line"><a id="l00943" name="l00943"></a><span class="lineno"> 943</span> uint8_t maxChanges = RADIOLIB_LORAWAN_MAX_CHANGES_DEFAULT;</div>
<div class="line"><a id="l00944" name="l00944"></a><span class="lineno"> 944</span> </div>
<div class="line"><a id="l00945" name="l00945"></a><span class="lineno"> 945</span> <span class="comment">// number of backoff slots to be checked after DIFS phase.</span></div>
<div class="line"><a id="l00946" name="l00946"></a><span class="lineno"> 946</span> <span class="comment">// A random BO avoids collisions in the case where two or more nodes start the CSMA</span></div>
<div class="line"><a id="l00947" name="l00947"></a><span class="lineno"> 947</span> <span class="comment">// process at the same time. </span></div>
<div class="line"><a id="l00948" name="l00948"></a><span class="lineno"> 948</span> uint8_t backoffMax = RADIOLIB_LORAWAN_BACKOFF_MAX_DEFAULT;</div>
<div class="line"><a id="l00949" name="l00949"></a><span class="lineno"> 949</span> </div>
<div class="line"><a id="l00950" name="l00950"></a><span class="lineno"> 950</span> <span class="comment">// number of CADs to estimate a clear CH</span></div>
<div class="line"><a id="l00951" name="l00951"></a><span class="lineno"> 951</span> uint8_t difsSlots = RADIOLIB_LORAWAN_DIFS_DEFAULT;</div>
<div class="line"><a id="l00952" name="l00952"></a><span class="lineno"> 952</span> </div>
<div class="line"><a id="l00953" name="l00953"></a><span class="lineno"> 953</span> <span class="comment">// available channel frequencies from list passed during OTA activation</span></div>
<div class="line"><a id="l00954" name="l00954"></a><span class="lineno"> 954</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a> channelPlan[2][RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS];</div>
<div class="line"><a id="l00955" name="l00955"></a><span class="lineno"> 955</span> </div>
<div class="line"><a id="l00956" name="l00956"></a><span class="lineno"> 956</span> <span class="comment">// currently configured channels for TX, RX1, RX2</span></div>
<div class="line"><a id="l00957" name="l00957"></a><span class="lineno"> 957</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a> channels[3] = { RADIOLIB_LORAWAN_CHANNEL_NONE, RADIOLIB_LORAWAN_CHANNEL_NONE,</div>
<div class="line"><a id="l00958" name="l00958"></a><span class="lineno"> 958</span> RADIOLIB_LORAWAN_CHANNEL_NONE };</div>
<div class="line"><a id="l00959" name="l00959"></a><span class="lineno"> 959</span> </div>
<div class="line"><a id="l00960" name="l00960"></a><span class="lineno"> 960</span> <span class="comment">// delays between the uplink and RX1/2 windows</span></div>
<div class="line"><a id="l00961" name="l00961"></a><span class="lineno"> 961</span> <span class="comment">// the first field is meaningless, but is used for offsetting for Rx windows 1 and 2</span></div>
<div class="line"><a id="l00962" name="l00962"></a><span class="lineno"> 962</span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> rxDelays[3] = { 0, RADIOLIB_LORAWAN_RECEIVE_DELAY_1_MS, RADIOLIB_LORAWAN_RECEIVE_DELAY_2_MS };</div>
<div class="line"><a id="l00963" name="l00963"></a><span class="lineno"> 963</span> </div>
<div class="line"><a id="l00964" name="l00964"></a><span class="lineno"> 964</span> <span class="comment">// offset between TX and RX1 (such that RX1 has equal or lower DR)</span></div>
<div class="line"><a id="l00965" name="l00965"></a><span class="lineno"> 965</span> uint8_t rx1DrOffset = 0;</div>
<div class="line"><a id="l00966" name="l00966"></a><span class="lineno"> 966</span> </div>
<div class="line"><a id="l00967" name="l00967"></a><span class="lineno"> 967</span> <span class="comment">// LoRaWAN revision (1.0 vs 1.1)</span></div>
<div class="line"><a id="l00968" name="l00968"></a><span class="lineno"> 968</span> uint8_t rev = 0;</div>
<div class="line"><a id="l00969" name="l00969"></a><span class="lineno"> 969</span> </div>
<div class="line"><a id="l00970" name="l00970"></a><span class="lineno"> 970</span> <span class="comment">// Time on Air of last uplink</span></div>
<div class="line"><a id="l00971" name="l00971"></a><span class="lineno"> 971</span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> lastToA = 0;</div>
<div class="line"><a id="l00972" name="l00972"></a><span class="lineno"> 972</span> </div>
<div class="line"><a id="l00973" name="l00973"></a><span class="lineno"> 973</span> <span class="comment">// timestamp to measure the RX1/2 delay (from uplink end)</span></div>
<div class="line"><a id="l00974" name="l00974"></a><span class="lineno"> 974</span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> rxDelayStart = 0;</div>
<div class="line"><a id="l00975" name="l00975"></a><span class="lineno"> 975</span> </div>
<div class="line"><a id="l00976" name="l00976"></a><span class="lineno"> 976</span> <span class="comment">// timestamp when the Rx1/2 windows were closed (timeout or uplink received)</span></div>
<div class="line"><a id="l00977" name="l00977"></a><span class="lineno"> 977</span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> rxDelayEnd = 0;</div>
<div class="line"><a id="l00978" name="l00978"></a><span class="lineno"> 978</span> </div>
<div class="line"><a id="l00979" name="l00979"></a><span class="lineno"> 979</span> <span class="comment">// device status - battery level</span></div>
<div class="line"><a id="l00980" name="l00980"></a><span class="lineno"> 980</span> uint8_t battLevel = 0xFF;</div>
<div class="line"><a id="l00981" name="l00981"></a><span class="lineno"> 981</span> </div>
<div class="line"><a id="l00982" name="l00982"></a><span class="lineno"> 982</span> <span class="comment">// indicates whether an uplink has MAC commands as payload</span></div>
<div class="line"><a id="l00983" name="l00983"></a><span class="lineno"> 983</span> <span class="keywordtype">bool</span> isMACPayload = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00984" name="l00984"></a><span class="lineno"> 984</span> </div>
<div class="line"><a id="l00985" name="l00985"></a><span class="lineno"> 985</span> <span class="comment">// save the selected sub-band in case this must be restored in ADR control</span></div>
<div class="line"><a id="l00986" name="l00986"></a><span class="lineno"> 986</span> uint8_t subBand = 0;</div>
<div class="line"><a id="l00987" name="l00987"></a><span class="lineno"> 987</span> </div>
<div class="line"><a id="l00988" name="l00988"></a><span class="lineno"> 988</span> <span class="comment">// allow port 226 for devices implementing TS011</span></div>
<div class="line"><a id="l00989" name="l00989"></a><span class="lineno"> 989</span> <span class="keywordtype">bool</span> TS011 = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00990" name="l00990"></a><span class="lineno"> 990</span> </div>
<div class="line"><a id="l00991" name="l00991"></a><span class="lineno"> 991</span> <a class="code hl_typedef" href="class_lo_ra_w_a_n_node.html#a3aec67bd3fa7ec0f6e4bf6b86d971e9e">SleepCb_t</a> sleepCb = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00992" name="l00992"></a><span class="lineno"> 992</span> </div>
<div class="line"><a id="l00993" name="l00993"></a><span class="lineno"> 993</span> <span class="comment">// this will reset the device credentials, so the device starts completely new</span></div>
<div class="line"><a id="l00994" name="l00994"></a><span class="lineno"> 994</span> <span class="keywordtype">void</span> clearNonces();</div>
<div class="line"><a id="l00995" name="l00995"></a><span class="lineno"> 995</span> </div>
<div class="line"><a id="l00996" name="l00996"></a><span class="lineno"> 996</span> <span class="comment">// start a fresh session using default parameters</span></div>
<div class="line"><a id="l00997" name="l00997"></a><span class="lineno"> 997</span> <span class="keywordtype">void</span> createSession(uint16_t lwMode, uint8_t initialDr);</div>
<div class="line"><a id="l00998" name="l00998"></a><span class="lineno"> 998</span> </div>
<div class="line"><a id="l00999" name="l00999"></a><span class="lineno"> 999</span> <span class="comment">// setup Join-Request payload</span></div>
<div class="line"><a id="l01000" name="l01000"></a><span class="lineno"> 1000</span> <span class="keywordtype">void</span> composeJoinRequest(uint8_t* joinRequestMsg);</div>
<div class="line"><a id="l01001" name="l01001"></a><span class="lineno"> 1001</span> </div>
<div class="line"><a id="l01002" name="l01002"></a><span class="lineno"> 1002</span> <span class="comment">// extract Join-Accept payload and start a new session</span></div>
<div class="line"><a id="l01003" name="l01003"></a><span class="lineno"> 1003</span> int16_t processJoinAccept(<a class="code hl_struct" href="struct_lo_ra_w_a_n_join_event__t.html">LoRaWANJoinEvent_t</a> *joinEvent);</div>
<div class="line"><a id="l01004" name="l01004"></a><span class="lineno"> 1004</span> </div>
<div class="line"><a id="l01005" name="l01005"></a><span class="lineno"> 1005</span> <span class="comment">// a join-accept can piggy-back a set of channels or channel masks</span></div>
<div class="line"><a id="l01006" name="l01006"></a><span class="lineno"> 1006</span> <span class="keywordtype">void</span> processCFList(<span class="keyword">const</span> uint8_t* cfList);</div>
<div class="line"><a id="l01007" name="l01007"></a><span class="lineno"> 1007</span> </div>
<div class="line"><a id="l01008" name="l01008"></a><span class="lineno"> 1008</span> <span class="comment">// check whether payload length and fport are allowed</span></div>
<div class="line"><a id="l01009" name="l01009"></a><span class="lineno"> 1009</span> int16_t isValidUplink(uint8_t* len, uint8_t fPort);</div>
<div class="line"><a id="l01010" name="l01010"></a><span class="lineno"> 1010</span> </div>
<div class="line"><a id="l01011" name="l01011"></a><span class="lineno"> 1011</span> <span class="comment">// perform ADR backoff</span></div>
<div class="line"><a id="l01012" name="l01012"></a><span class="lineno"> 1012</span> <span class="keywordtype">void</span> adrBackoff();</div>
<div class="line"><a id="l01013" name="l01013"></a><span class="lineno"> 1013</span> </div>
<div class="line"><a id="l01014" name="l01014"></a><span class="lineno"> 1014</span> <span class="comment">// create an encrypted uplink buffer, composing metadata, user data and MAC data</span></div>
<div class="line"><a id="l01015" name="l01015"></a><span class="lineno"> 1015</span> <span class="keywordtype">void</span> composeUplink(<span class="keyword">const</span> uint8_t* in, uint8_t lenIn, uint8_t* out, uint8_t fPort, <span class="keywordtype">bool</span> isConfirmed);</div>
<div class="line"><a id="l01016" name="l01016"></a><span class="lineno"> 1016</span> </div>
<div class="line"><a id="l01017" name="l01017"></a><span class="lineno"> 1017</span> <span class="comment">// generate and set the MIC of an uplink buffer (depends on selected channels)</span></div>
<div class="line"><a id="l01018" name="l01018"></a><span class="lineno"> 1018</span> <span class="keywordtype">void</span> micUplink(uint8_t* inOut, uint8_t lenInOut);</div>
<div class="line"><a id="l01019" name="l01019"></a><span class="lineno"> 1019</span> </div>
<div class="line"><a id="l01020" name="l01020"></a><span class="lineno"> 1020</span> <span class="comment">// transmit uplink buffer on a specified channel</span></div>
<div class="line"><a id="l01021" name="l01021"></a><span class="lineno"> 1021</span> int16_t transmitUplink(<span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a>* chnl, uint8_t* in, uint8_t len, <span class="keywordtype">bool</span> retrans);</div>
<div class="line"><a id="l01022" name="l01022"></a><span class="lineno"> 1022</span> </div>
<div class="line"><a id="l01023" name="l01023"></a><span class="lineno"> 1023</span> <span class="comment">// wait for, open and listen during receive windows; only performs listening</span></div>
<div class="line"><a id="l01024" name="l01024"></a><span class="lineno"> 1024</span> int16_t receiveCommon(uint8_t dir, <span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a>* dlChannels, <span class="keyword">const</span> <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a>* dlDelays, uint8_t numWindows, <a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> tReference);</div>
<div class="line"><a id="l01025" name="l01025"></a><span class="lineno"> 1025</span> </div>
<div class="line"><a id="l01026" name="l01026"></a><span class="lineno"> 1026</span> <span class="comment">// extract downlink payload and process MAC commands</span></div>
<div class="line"><a id="l01027" name="l01027"></a><span class="lineno"> 1027</span> int16_t parseDownlink(uint8_t* data, <span class="keywordtype">size_t</span>* len, <a class="code hl_struct" href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a>* event = NULL);</div>
<div class="line"><a id="l01028" name="l01028"></a><span class="lineno"> 1028</span> </div>
<div class="line"><a id="l01029" name="l01029"></a><span class="lineno"> 1029</span> <span class="comment">// execute mac command, return the number of processed bytes for sequential processing</span></div>
<div class="line"><a id="l01030" name="l01030"></a><span class="lineno"> 1030</span> <span class="keywordtype">bool</span> execMacCommand(uint8_t cid, uint8_t* optIn, uint8_t lenIn);</div>
<div class="line"><a id="l01031" name="l01031"></a><span class="lineno"> 1031</span> <span class="keywordtype">bool</span> execMacCommand(uint8_t cid, uint8_t* optIn, uint8_t lenIn, uint8_t* optOut);</div>
<div class="line"><a id="l01032" name="l01032"></a><span class="lineno"> 1032</span> </div>
<div class="line"><a id="l01033" name="l01033"></a><span class="lineno"> 1033</span> <span class="comment">// possible override for additional MAC commands that are not in the base specification</span></div>
<div class="line"><a id="l01034" name="l01034"></a><span class="lineno"> 1034</span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> derivedMacHandler(uint8_t cid, uint8_t* optIn, uint8_t lenIn, uint8_t* optOut);</div>
<div class="line"><a id="l01035" name="l01035"></a><span class="lineno"> 1035</span> </div>
<div class="line"><a id="l01036" name="l01036"></a><span class="lineno"> 1036</span> <span class="comment">// pre-process a (set of) LinkAdrReq commands into one super-channel-mask + Tx/Dr/NbTrans fields</span></div>
<div class="line"><a id="l01037" name="l01037"></a><span class="lineno"> 1037</span> <span class="keywordtype">void</span> preprocessMacLinkAdr(uint8_t* mPtr, uint8_t cLen, uint8_t* mAdrOpt);</div>
<div class="line"><a id="l01038" name="l01038"></a><span class="lineno"> 1038</span> </div>
<div class="line"><a id="l01039" name="l01039"></a><span class="lineno"> 1039</span> <span class="comment">// post-process a (set of) LinkAdrAns commands depending on LoRaWAN version</span></div>
<div class="line"><a id="l01040" name="l01040"></a><span class="lineno"> 1040</span> <span class="keywordtype">void</span> postprocessMacLinkAdr(uint8_t* ack, uint8_t cLen);</div>
<div class="line"><a id="l01041" name="l01041"></a><span class="lineno"> 1041</span> </div>
<div class="line"><a id="l01042" name="l01042"></a><span class="lineno"> 1042</span> <span class="comment">// get the properties of a MAC command given a certain command ID</span></div>
<div class="line"><a id="l01043" name="l01043"></a><span class="lineno"> 1043</span> int16_t getMacCommand(uint8_t cid, <a class="code hl_struct" href="struct_lo_ra_w_a_n_mac_command__t.html">LoRaWANMacCommand_t</a>* cmd);</div>
<div class="line"><a id="l01044" name="l01044"></a><span class="lineno"> 1044</span> </div>
<div class="line"><a id="l01045" name="l01045"></a><span class="lineno"> 1045</span> <span class="comment">// possible override for additional MAC commands that are not in the base specification</span></div>
<div class="line"><a id="l01046" name="l01046"></a><span class="lineno"> 1046</span> <span class="keyword">virtual</span> int16_t derivedMacFinder(uint8_t cid, <a class="code hl_struct" href="struct_lo_ra_w_a_n_mac_command__t.html">LoRaWANMacCommand_t</a>* cmd);</div>
<div class="line"><a id="l01047" name="l01047"></a><span class="lineno"> 1047</span> </div>
<div class="line"><a id="l01048" name="l01048"></a><span class="lineno"> 1048</span> <span class="comment">// get the length of a certain MAC command in a specific direction (up/down)</span></div>
<div class="line"><a id="l01049" name="l01049"></a><span class="lineno"> 1049</span> <span class="comment">// if inclusive is true, add one for the CID byte</span></div>
<div class="line"><a id="l01050" name="l01050"></a><span class="lineno"> 1050</span> <span class="comment">// include payload in case the MAC command has a dynamic length</span></div>
<div class="line"><a id="l01051" name="l01051"></a><span class="lineno"> 1051</span> <span class="keyword">virtual</span> int16_t getMacLen(uint8_t cid, uint8_t* len, uint8_t dir, <span class="keywordtype">bool</span> inclusive = <span class="keyword">false</span>, uint8_t* payload = NULL);</div>
<div class="line"><a id="l01052" name="l01052"></a><span class="lineno"> 1052</span> </div>
<div class="line"><a id="l01053" name="l01053"></a><span class="lineno"> 1053</span> <span class="comment">// find out of a MAC command should persist destruction</span></div>
<div class="line"><a id="l01054" name="l01054"></a><span class="lineno"> 1054</span> <span class="comment">// in uplink direction, some commands must persist if no downlink is received</span></div>
<div class="line"><a id="l01055" name="l01055"></a><span class="lineno"> 1055</span> <span class="comment">// in downlink direction, the user-accessible MAC commands remain available for retrieval</span></div>
<div class="line"><a id="l01056" name="l01056"></a><span class="lineno"> 1056</span> <span class="keywordtype">bool</span> isPersistentMacCommand(uint8_t cid, uint8_t dir);</div>
<div class="line"><a id="l01057" name="l01057"></a><span class="lineno"> 1057</span> </div>
<div class="line"><a id="l01058" name="l01058"></a><span class="lineno"> 1058</span> <span class="comment">// push MAC command to queue, done by copy</span></div>
<div class="line"><a id="l01059" name="l01059"></a><span class="lineno"> 1059</span> int16_t pushMacCommand(uint8_t cid, <span class="keyword">const</span> uint8_t* cOcts, uint8_t* out, uint8_t* lenOut, uint8_t dir);</div>
<div class="line"><a id="l01060" name="l01060"></a><span class="lineno"> 1060</span> </div>
<div class="line"><a id="l01061" name="l01061"></a><span class="lineno"> 1061</span> <span class="comment">// retrieve the payload of a certain MAC command, if present in the buffer</span></div>
<div class="line"><a id="l01062" name="l01062"></a><span class="lineno"> 1062</span> int16_t getMacPayload(uint8_t cid, <span class="keyword">const</span> uint8_t* in, uint8_t lenIn, uint8_t* out, uint8_t dir);</div>
<div class="line"><a id="l01063" name="l01063"></a><span class="lineno"> 1063</span> </div>
<div class="line"><a id="l01064" name="l01064"></a><span class="lineno"> 1064</span> <span class="comment">// delete a specific MAC command from queue, indicated by the command ID</span></div>
<div class="line"><a id="l01065" name="l01065"></a><span class="lineno"> 1065</span> int16_t deleteMacCommand(uint8_t cid, uint8_t* inOut, uint8_t* lenInOut, uint8_t dir);</div>
<div class="line"><a id="l01066" name="l01066"></a><span class="lineno"> 1066</span> </div>
<div class="line"><a id="l01067" name="l01067"></a><span class="lineno"> 1067</span> <span class="comment">// clear a MAC buffer, possible retaining persistent MAC commands</span></div>
<div class="line"><a id="l01068" name="l01068"></a><span class="lineno"> 1068</span> <span class="keywordtype">void</span> clearMacCommands(uint8_t* inOut, uint8_t* lenInOut, uint8_t dir);</div>
<div class="line"><a id="l01069" name="l01069"></a><span class="lineno"> 1069</span> </div>
<div class="line"><a id="l01070" name="l01070"></a><span class="lineno"> 1070</span> <span class="comment">// configure the common physical layer properties (frequency, sync word etc.)</span></div>
<div class="line"><a id="l01071" name="l01071"></a><span class="lineno"> 1071</span> int16_t setPhyProperties(<span class="keyword">const</span> <a class="code hl_struct" href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a>* chnl, uint8_t dir, int8_t pwr, <span class="keywordtype">size_t</span> pre = 0);</div>
<div class="line"><a id="l01072" name="l01072"></a><span class="lineno"> 1072</span> </div>
<div class="line"><a id="l01073" name="l01073"></a><span class="lineno"> 1073</span> <span class="comment">// Performs CSMA as per LoRa Alliance Technical Recommendation 13 (TR-013).</span></div>
<div class="line"><a id="l01074" name="l01074"></a><span class="lineno"> 1074</span> <span class="keywordtype">bool</span> csmaChannelClear(uint8_t difs, uint8_t numBackoff);</div>
<div class="line"><a id="l01075" name="l01075"></a><span class="lineno"> 1075</span> </div>
<div class="line"><a id="l01076" name="l01076"></a><span class="lineno"> 1076</span> <span class="comment">// perform a single CAD operation for the under SF/CH combination. Returns either busy or otherwise.</span></div>
<div class="line"><a id="l01077" name="l01077"></a><span class="lineno"> 1077</span> <span class="keywordtype">bool</span> cadChannelClear();</div>
<div class="line"><a id="l01078" name="l01078"></a><span class="lineno"> 1078</span> </div>
<div class="line"><a id="l01079" name="l01079"></a><span class="lineno"> 1079</span> <span class="comment">// (dynamic bands:) get or (fixed bands:) create a complete 80-bit channel mask for current configuration</span></div>
<div class="line"><a id="l01080" name="l01080"></a><span class="lineno"> 1080</span> <span class="keywordtype">void</span> getChannelPlanMask(uint64_t* chMaskGrp0123, uint32_t* chMaskGrp45);</div>
<div class="line"><a id="l01081" name="l01081"></a><span class="lineno"> 1081</span> </div>
<div class="line"><a id="l01082" name="l01082"></a><span class="lineno"> 1082</span> <span class="comment">// setup uplink/downlink channel data rates and frequencies</span></div>
<div class="line"><a id="l01083" name="l01083"></a><span class="lineno"> 1083</span> <span class="comment">// for dynamic channels, there is a small set of predefined channels</span></div>
<div class="line"><a id="l01084" name="l01084"></a><span class="lineno"> 1084</span> <span class="comment">// in case of JoinRequest, add some optional extra frequencies </span></div>
<div class="line"><a id="l01085" name="l01085"></a><span class="lineno"> 1085</span> <span class="keywordtype">void</span> selectChannelPlanDyn();</div>
<div class="line"><a id="l01086" name="l01086"></a><span class="lineno"> 1086</span> </div>
<div class="line"><a id="l01087" name="l01087"></a><span class="lineno"> 1087</span> <span class="comment">// setup uplink/downlink channel data rates and frequencies</span></div>
<div class="line"><a id="l01088" name="l01088"></a><span class="lineno"> 1088</span> <span class="comment">// for fixed bands, we only allow one sub-band at a time to be selected</span></div>
<div class="line"><a id="l01089" name="l01089"></a><span class="lineno"> 1089</span> <span class="keywordtype">void</span> selectChannelPlanFix();</div>
<div class="line"><a id="l01090" name="l01090"></a><span class="lineno"> 1090</span> </div>
<div class="line"><a id="l01091" name="l01091"></a><span class="lineno"> 1091</span> <span class="comment">// get the number of available channels,</span></div>
<div class="line"><a id="l01092" name="l01092"></a><span class="lineno"> 1092</span> <span class="comment">// along with a 16-bit mask indicating which channels can be used next for uplink/downlink</span></div>
<div class="line"><a id="l01093" name="l01093"></a><span class="lineno"> 1093</span> uint8_t getAvailableChannels(uint16_t* mask);</div>
<div class="line"><a id="l01094" name="l01094"></a><span class="lineno"> 1094</span> </div>
<div class="line"><a id="l01095" name="l01095"></a><span class="lineno"> 1095</span> <span class="comment">// (re)set/restore which channels can be used next for uplink/downlink</span></div>
<div class="line"><a id="l01096" name="l01096"></a><span class="lineno"> 1096</span> <span class="keywordtype">void</span> setAvailableChannels(uint16_t mask);</div>
<div class="line"><a id="l01097" name="l01097"></a><span class="lineno"> 1097</span> </div>
<div class="line"><a id="l01098" name="l01098"></a><span class="lineno"> 1098</span> <span class="comment">// select a set of random TX/RX channels for up- and downlink</span></div>
<div class="line"><a id="l01099" name="l01099"></a><span class="lineno"> 1099</span> int16_t selectChannels();</div>
<div class="line"><a id="l01100" name="l01100"></a><span class="lineno"> 1100</span> </div>
<div class="line"><a id="l01101" name="l01101"></a><span class="lineno"> 1101</span> <span class="comment">// apply a 96-bit channel mask</span></div>
<div class="line"><a id="l01102" name="l01102"></a><span class="lineno"> 1102</span> <span class="keywordtype">bool</span> applyChannelMask(uint64_t chMaskGrp0123, uint32_t chMaskGrp45);</div>
<div class="line"><a id="l01103" name="l01103"></a><span class="lineno"> 1103</span> </div>
<div class="line"><a id="l01104" name="l01104"></a><span class="lineno"> 1104</span><span class="preprocessor">#if RADIOLIB_DEBUG_PROTOCOL</span></div>
<div class="line"><a id="l01105" name="l01105"></a><span class="lineno"> 1105</span> <span class="comment">// print the available channels through debug</span></div>
<div class="line"><a id="l01106" name="l01106"></a><span class="lineno"> 1106</span> <span class="keywordtype">void</span> printChannels();</div>
<div class="line"><a id="l01107" name="l01107"></a><span class="lineno"> 1107</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01108" name="l01108"></a><span class="lineno"> 1108</span> </div>
<div class="line"><a id="l01109" name="l01109"></a><span class="lineno"> 1109</span> <span class="comment">// method to generate message integrity code</span></div>
<div class="line"><a id="l01110" name="l01110"></a><span class="lineno"> 1110</span> uint32_t generateMIC(<span class="keyword">const</span> uint8_t* msg, <span class="keywordtype">size_t</span> len, uint8_t* key);</div>
<div class="line"><a id="l01111" name="l01111"></a><span class="lineno"> 1111</span> </div>
<div class="line"><a id="l01112" name="l01112"></a><span class="lineno"> 1112</span> <span class="comment">// method to verify message integrity code</span></div>
<div class="line"><a id="l01113" name="l01113"></a><span class="lineno"> 1113</span> <span class="comment">// it assumes that the MIC is the last 4 bytes of the message</span></div>
<div class="line"><a id="l01114" name="l01114"></a><span class="lineno"> 1114</span> <span class="keywordtype">bool</span> verifyMIC(uint8_t* msg, <span class="keywordtype">size_t</span> len, uint8_t* key);</div>
<div class="line"><a id="l01115" name="l01115"></a><span class="lineno"> 1115</span> </div>
<div class="line"><a id="l01116" name="l01116"></a><span class="lineno"> 1116</span> <span class="comment">// find the first usable data rate for the given band</span></div>
<div class="line"><a id="l01117" name="l01117"></a><span class="lineno"> 1117</span> int16_t findDataRate(uint8_t dr, <a class="code hl_union" href="union_data_rate__t.html">DataRate_t</a>* dataRate);</div>
<div class="line"><a id="l01118" name="l01118"></a><span class="lineno"> 1118</span> </div>
<div class="line"><a id="l01119" name="l01119"></a><span class="lineno"> 1119</span> <span class="comment">// function to encrypt and decrypt payloads (regular uplink/downlink)</span></div>
<div class="line"><a id="l01120" name="l01120"></a><span class="lineno"> 1120</span> <span class="keywordtype">void</span> processAES(<span class="keyword">const</span> uint8_t* in, <span class="keywordtype">size_t</span> len, uint8_t* key, uint8_t* out, uint32_t fCnt, uint8_t dir, uint8_t ctrId, <span class="keywordtype">bool</span> counter);</div>
<div class="line"><a id="l01121" name="l01121"></a><span class="lineno"> 1121</span> </div>
<div class="line"><a id="l01122" name="l01122"></a><span class="lineno"> 1122</span> <span class="comment">// function that allows sleeping via user-provided callback</span></div>
<div class="line"><a id="l01123" name="l01123"></a><span class="lineno"> 1123</span> <span class="keywordtype">void</span> sleepDelay(<a class="code hl_typedef" href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a> ms);</div>
<div class="line"><a id="l01124" name="l01124"></a><span class="lineno"> 1124</span> </div>
<div class="line"><a id="l01125" name="l01125"></a><span class="lineno"> 1125</span> <span class="comment">// 16-bit checksum method that takes a uint8_t array of even length and calculates the checksum</span></div>
<div class="line"><a id="l01126" name="l01126"></a><span class="lineno"> 1126</span> <span class="keyword">static</span> uint16_t checkSum16(<span class="keyword">const</span> uint8_t *key, uint16_t keyLen);</div>
<div class="line"><a id="l01127" name="l01127"></a><span class="lineno"> 1127</span> </div>
<div class="line"><a id="l01128" name="l01128"></a><span class="lineno"> 1128</span> <span class="comment">// check the integrity of a buffer using a 16-bit checksum located in the last two bytes of the buffer</span></div>
<div class="line"><a id="l01129" name="l01129"></a><span class="lineno"> 1129</span> <span class="keyword">static</span> int16_t checkBufferCommon(<span class="keyword">const</span> uint8_t *buffer, uint16_t size);</div>
<div class="line"><a id="l01130" name="l01130"></a><span class="lineno"> 1130</span> </div>
<div class="line"><a id="l01131" name="l01131"></a><span class="lineno"> 1131</span> <span class="comment">// network-to-host conversion method - takes data from network packet and converts it to the host endians</span></div>
<div class="line"><a id="l01132" name="l01132"></a><span class="lineno"> 1132</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l01133" name="l01133"></a><span class="lineno"> 1133</span> <span class="keyword">static</span> T ntoh(<span class="keyword">const</span> uint8_t* buff, <span class="keywordtype">size_t</span> size = 0);</div>
<div class="line"><a id="l01134" name="l01134"></a><span class="lineno"> 1134</span> </div>
<div class="line"><a id="l01135" name="l01135"></a><span class="lineno"> 1135</span> <span class="comment">// host-to-network conversion method - takes data from host variable and and converts it to network packet endians</span></div>
<div class="line"><a id="l01136" name="l01136"></a><span class="lineno"> 1136</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l01137" name="l01137"></a><span class="lineno"> 1137</span> <span class="keyword">static</span> <span class="keywordtype">void</span> hton(uint8_t* buff, T val, <span class="keywordtype">size_t</span> size = 0);</div>
<div class="line"><a id="l01138" name="l01138"></a><span class="lineno"> 1138</span>};</div>
</div>
<div class="line"><a id="l01139" name="l01139"></a><span class="lineno"> 1139</span> </div>
<div class="line"><a id="l01140" name="l01140"></a><span class="lineno"> 1140</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l01141" name="l01141"></a><span class="lineno"> 1141</span>T LoRaWANNode::ntoh(<span class="keyword">const</span> uint8_t* buff, <span class="keywordtype">size_t</span> size) {</div>
<div class="line"><a id="l01142" name="l01142"></a><span class="lineno"> 1142</span> <span class="keyword">const</span> uint8_t* buffPtr = buff;</div>
<div class="line"><a id="l01143" name="l01143"></a><span class="lineno"> 1143</span> <span class="keywordtype">size_t</span> targetSize = <span class="keyword">sizeof</span>(T);</div>
<div class="line"><a id="l01144" name="l01144"></a><span class="lineno"> 1144</span> <span class="keywordflow">if</span>(size != 0) {</div>
<div class="line"><a id="l01145" name="l01145"></a><span class="lineno"> 1145</span> targetSize = size;</div>
<div class="line"><a id="l01146" name="l01146"></a><span class="lineno"> 1146</span> }</div>
<div class="line"><a id="l01147" name="l01147"></a><span class="lineno"> 1147</span> T res = 0;</div>
<div class="line"><a id="l01148" name="l01148"></a><span class="lineno"> 1148</span> <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0; i &lt; targetSize; i++) {</div>
<div class="line"><a id="l01149" name="l01149"></a><span class="lineno"> 1149</span> res |= (uint32_t)(*(buffPtr++)) &lt;&lt; 8*i;</div>
<div class="line"><a id="l01150" name="l01150"></a><span class="lineno"> 1150</span> }</div>
<div class="line"><a id="l01151" name="l01151"></a><span class="lineno"> 1151</span> <span class="keywordflow">return</span>(res);</div>
<div class="line"><a id="l01152" name="l01152"></a><span class="lineno"> 1152</span>}</div>
<div class="line"><a id="l01153" name="l01153"></a><span class="lineno"> 1153</span> </div>
<div class="line"><a id="l01154" name="l01154"></a><span class="lineno"> 1154</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l01155" name="l01155"></a><span class="lineno"> 1155</span><span class="keywordtype">void</span> LoRaWANNode::hton(uint8_t* buff, T val, <span class="keywordtype">size_t</span> size) {</div>
<div class="line"><a id="l01156" name="l01156"></a><span class="lineno"> 1156</span> uint8_t* buffPtr = buff;</div>
<div class="line"><a id="l01157" name="l01157"></a><span class="lineno"> 1157</span> <span class="keywordtype">size_t</span> targetSize = <span class="keyword">sizeof</span>(T);</div>
<div class="line"><a id="l01158" name="l01158"></a><span class="lineno"> 1158</span> <span class="keywordflow">if</span>(size != 0) {</div>
<div class="line"><a id="l01159" name="l01159"></a><span class="lineno"> 1159</span> targetSize = size;</div>
<div class="line"><a id="l01160" name="l01160"></a><span class="lineno"> 1160</span> }</div>
<div class="line"><a id="l01161" name="l01161"></a><span class="lineno"> 1161</span> <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0; i &lt; targetSize; i++) {</div>
<div class="line"><a id="l01162" name="l01162"></a><span class="lineno"> 1162</span> *(buffPtr++) = val &gt;&gt; 8*i;</div>
<div class="line"><a id="l01163" name="l01163"></a><span class="lineno"> 1163</span> }</div>
<div class="line"><a id="l01164" name="l01164"></a><span class="lineno"> 1164</span>}</div>
<div class="line"><a id="l01165" name="l01165"></a><span class="lineno"> 1165</span> </div>
<div class="line"><a id="l01166" name="l01166"></a><span class="lineno"> 1166</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html">LoRaWANNode</a></div><div class="ttdoc">LoRaWAN-compatible node (class A device).</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:527</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a0feeaed200d8f94ad94c3ed49f404847"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a0feeaed200d8f94ad94c3ed49f404847">LoRaWANNode::clearSession</a></div><div class="ttdeci">void clearSession()</div><div class="ttdoc">Clear an active session, so that the device will have to rejoin the network.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:277</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a11c2fbe631063da69355f8d74f4bf3b8"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a11c2fbe631063da69355f8d74f4bf3b8">LoRaWANNode::sendReceive</a></div><div class="ttdeci">virtual int16_t sendReceive(const char *strUp, uint8_t fPort, bool isConfirmed=false, LoRaWANEvent_t *eventUp=NULL, LoRaWANEvent_t *eventDown=NULL)</div><div class="ttdoc">Send a message to the server and wait for a downlink during Rx1 and/or Rx2 window.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:43</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a11c5f0867a9a8d731e980f865caebd99"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a11c5f0867a9a8d731e980f865caebd99">LoRaWANNode::setSleepFunction</a></div><div class="ttdeci">void setSleepFunction(SleepCb_t cb)</div><div class="ttdoc">Set custom delay/sleep function callback. If set, LoRaWAN node will call this function to wait for pe...</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:3378</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a14e8a8a098df28ff5ee294f235500499"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a14e8a8a098df28ff5ee294f235500499">LoRaWANNode::setDatarate</a></div><div class="ttdeci">int16_t setDatarate(uint8_t drUp)</div><div class="ttdoc">Set uplink datarate. This should not be used when ADR is enabled.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2689</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a16c7ae2edfe324e11498b13aa042665f"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a16c7ae2edfe324e11498b13aa042665f">LoRaWANNode::scheduleTransmission</a></div><div class="ttdeci">void scheduleTransmission(RadioLibTime_t tUplink)</div><div class="ttdoc">Set the exact time a transmission should occur. Note: this is the internal clock time....</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2822</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a2176aa3d546e6b00e870a7e1e310c403"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a2176aa3d546e6b00e870a7e1e310c403">LoRaWANNode::scanGuard</a></div><div class="ttdeci">RadioLibTime_t scanGuard</div><div class="ttdoc">Rx window padding in milliseconds according to the spec, the Rx window must be at least enough time t...</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:868</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a2d9a53560ebfbaf006eefd9761424d80"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a2d9a53560ebfbaf006eefd9761424d80">LoRaWANNode::setCSMA</a></div><div class="ttdeci">void setCSMA(bool csmaEnabled, uint8_t maxChanges=4, uint8_t backoffMax=0, uint8_t difsSlots=2)</div><div class="ttdoc">Configures CSMA for LoRaWAN as per TR013, LoRa Alliance.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2804</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a3aec67bd3fa7ec0f6e4bf6b86d971e9e"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a3aec67bd3fa7ec0f6e4bf6b86d971e9e">LoRaWANNode::SleepCb_t</a></div><div class="ttdeci">void(* SleepCb_t)(RadioLibTime_t ms)</div><div class="ttdoc">Callback to a user-provided sleep function.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:839</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a3d4bbd6d382496838954ab4ac1168b77"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a3d4bbd6d382496838954ab4ac1168b77">LoRaWANNode::setDutyCycle</a></div><div class="ttdeci">void setDutyCycle(bool enable=true, RadioLibTime_t msPerHour=0)</div><div class="ttdoc">Toggle adherence to dutyCycle limits to on or off.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2779</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a43b259fd8804ef8d9d4922962e9ecae5"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a43b259fd8804ef8d9d4922962e9ecae5">LoRaWANNode::beginABP</a></div><div class="ttdeci">int16_t beginABP(uint32_t addr, const uint8_t *fNwkSIntKey, const uint8_t *sNwkSIntKey, const uint8_t *nwkSEncKey, const uint8_t *appSKey)</div><div class="ttdoc">Set the device credentials and activation configuration.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:613</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a49e690c14858b46692e4ce9aa5a2566a"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a49e690c14858b46692e4ce9aa5a2566a">LoRaWANNode::timeUntilUplink</a></div><div class="ttdeci">RadioLibTime_t timeUntilUplink()</div><div class="ttdoc">Returns time in milliseconds until next uplink is available under dutyCycle limits.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:3330</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a5449e301634dff1838a1b024b4067034"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a5449e301634dff1838a1b024b4067034">LoRaWANNode::setDeviceStatus</a></div><div class="ttdeci">void setDeviceStatus(uint8_t battLevel)</div><div class="ttdoc">Set device status.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2818</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a5bb50904544f331806fd744ab5b99efa"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a5bb50904544f331806fd744ab5b99efa">LoRaWANNode::dutyCycleInterval</a></div><div class="ttdeci">RadioLibTime_t dutyCycleInterval(RadioLibTime_t msPerHour, RadioLibTime_t airtime)</div><div class="ttdoc">Calculate the minimum interval to adhere to a certain dutyCycle. This interval is based on the ToA of...</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:3320</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a62bfe68f6fe63c2e408dccbff6a34a4f"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a62bfe68f6fe63c2e408dccbff6a34a4f">LoRaWANNode::setDwellTime</a></div><div class="ttdeci">void setDwellTime(bool enable, RadioLibTime_t msPerUplink=0)</div><div class="ttdoc">Set or disable uplink dwell time limitation; enabled by default if mandatory.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2791</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a6785265f3311ff6bf296f82429c96701"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a6785265f3311ff6bf296f82429c96701">LoRaWANNode::getAFCntDown</a></div><div class="ttdeci">uint32_t getAFCntDown()</div><div class="ttdoc">Returns the last application downlink's frame counter; also 0 if no application downlink occured yet.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2838</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a683b02b63867bb7de5df45c94d190305"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a683b02b63867bb7de5df45c94d190305">LoRaWANNode::getLastToA</a></div><div class="ttdeci">RadioLibTime_t getLastToA()</div><div class="ttdoc">Get the Time-on-air of the last uplink message (in milliseconds).</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2851</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a77483c51548e48a5dff4b707f7770e86"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a77483c51548e48a5dff4b707f7770e86">LoRaWANNode::activateABP</a></div><div class="ttdeci">virtual int16_t activateABP(uint8_t initialDr=RADIOLIB_LORAWAN_DATA_RATE_UNUSED)</div><div class="ttdoc">Join network by restoring ABP session or performing over-the-air activation. In this procedure,...</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:984</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a8226f4d0329d15da9ffc706e5781403a"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a8226f4d0329d15da9ffc706e5781403a">LoRaWANNode::TS009</a></div><div class="ttdeci">bool TS009</div><div class="ttdoc">TS009 Protocol Specification Verification switch (allows FPort 224 and cuts off uplink payload instea...</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:854</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a84004883006b4a498d4899874952445b"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a84004883006b4a498d4899874952445b">LoRaWANNode::getBufferNonces</a></div><div class="ttdeci">uint8_t * getBufferNonces()</div><div class="ttdoc">Returns the pointer to the internal buffer that holds the LW base parameters.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:226</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a90369a4f2c4da11527872a7bbbf9ab06"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a90369a4f2c4da11527872a7bbbf9ab06">LoRaWANNode::getBufferSession</a></div><div class="ttdeci">uint8_t * getBufferSession()</div><div class="ttdoc">Returns the pointer to the internal buffer that holds the LW session parameters.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:427</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a9a44677a1ef7db1216bc482139d6be8d"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a9a44677a1ef7db1216bc482139d6be8d">LoRaWANNode::isActivated</a></div><div class="ttdeci">bool isActivated()</div><div class="ttdoc">Whether there is an ongoing session active.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:1074</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a9af613f7d923e7bdcfdbd020132c6d4b"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a9af613f7d923e7bdcfdbd020132c6d4b">LoRaWANNode::setTxPower</a></div><div class="ttdeci">int16_t setTxPower(int8_t txPower)</div><div class="ttdoc">Configure TX power of the radio module.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2722</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_a9e6e1ce4296364606ff8b10fb5f971de"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#a9e6e1ce4296364606ff8b10fb5f971de">LoRaWANNode::getMacDeviceTimeAns</a></div><div class="ttdeci">int16_t getMacDeviceTimeAns(uint32_t *gpsEpoch, uint8_t *fraction, bool returnUnix=true)</div><div class="ttdoc">Returns the network time after requesting a DeviceTime MAC command. Returns 'true' if a network respo...</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2535</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_aa7fabaa6efe9978c3674b1ab187446a1"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#aa7fabaa6efe9978c3674b1ab187446a1">LoRaWANNode::getNFCntDown</a></div><div class="ttdeci">uint32_t getNFCntDown()</div><div class="ttdoc">Returns the last network downlink's frame counter; also 0 if no network downlink occured yet.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2834</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_ab2df20a240812f184786dda5ace171ef"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#ab2df20a240812f184786dda5ace171ef">LoRaWANNode::beginOTAA</a></div><div class="ttdeci">int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, const uint8_t *nwkKey, const uint8_t *appKey)</div><div class="ttdoc">Set the device credentials and activation configuration.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:584</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_ab723160aa317cd84550d0da3a0f52811"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#ab723160aa317cd84550d0da3a0f52811">LoRaWANNode::getMaxPayloadLen</a></div><div class="ttdeci">uint8_t getMaxPayloadLen()</div><div class="ttdoc">Returns the maximum allowed uplink payload size given the current MAC state. Most importantly,...</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:3339</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_abd9e976eec64a3bd1ddf3331f2bc93cd"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#abd9e976eec64a3bd1ddf3331f2bc93cd">LoRaWANNode::activateOTAA</a></div><div class="ttdeci">virtual int16_t activateOTAA(uint8_t initialDr=RADIOLIB_LORAWAN_DATA_RATE_UNUSED, LoRaWANJoinEvent_t *joinEvent=NULL)</div><div class="ttdoc">Join network by restoring OTAA session or performing over-the-air activation. By this procedure,...</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:868</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_ad3217975ef9959ff83ce79dd80b0d777"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#ad3217975ef9959ff83ce79dd80b0d777">LoRaWANNode::getFCntUp</a></div><div class="ttdeci">uint32_t getFCntUp()</div><div class="ttdoc">Returns the last uplink's frame counter; also 0 if no uplink occured yet.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2827</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_ad99e2fa4738648a6f3efe72ff785def2"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#ad99e2fa4738648a6f3efe72ff785def2">LoRaWANNode::setBufferNonces</a></div><div class="ttdeci">int16_t setBufferNonces(const uint8_t *persistentBuffer)</div><div class="ttdoc">Fill the internal buffer that holds the LW base parameters with a supplied buffer.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:241</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_addfd8ac3d0bfe5a273e9ba10e51f8025"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#addfd8ac3d0bfe5a273e9ba10e51f8025">LoRaWANNode::setRx2Dr</a></div><div class="ttdeci">int16_t setRx2Dr(uint8_t dr)</div><div class="ttdoc">Configure the Rx2 datarate for ABP mode. This should not be needed for LoRaWAN 1.1 as it is configure...</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2748</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_adef05650cf4eb92042ca5e2688c1e164"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#adef05650cf4eb92042ca5e2688c1e164">LoRaWANNode::sendMacCommandReq</a></div><div class="ttdeci">int16_t sendMacCommandReq(uint8_t cid)</div><div class="ttdoc">Add a MAC command to the uplink queue. Only LinkCheck and DeviceTime are available to the user....</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2500</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_adf038f331c1dc954dafc2668e7a31ca0"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#adf038f331c1dc954dafc2668e7a31ca0">LoRaWANNode::getMacLinkCheckAns</a></div><div class="ttdeci">int16_t getMacLinkCheckAns(uint8_t *margin, uint8_t *gwCnt)</div><div class="ttdoc">Returns the quality of connectivity after requesting a LinkCheck MAC command. Returns 'true' if a net...</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2524</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_ae222275f807f472083ea6100c23c75ff"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#ae222275f807f472083ea6100c23c75ff">LoRaWANNode::setADR</a></div><div class="ttdeci">void setADR(bool enable=true)</div><div class="ttdoc">Toggle ADR to on or off.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2775</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_aedeb50c9ccb81e8092233d34e039cfa4"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#aedeb50c9ccb81e8092233d34e039cfa4">LoRaWANNode::setBufferSession</a></div><div class="ttdeci">int16_t setBufferSession(const uint8_t *persistentBuffer)</div><div class="ttdoc">Fill the internal buffer that holds the LW session parameters with a supplied buffer.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:459</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_aee0590cc9123ceac4c822eabed3150c6"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#aee0590cc9123ceac4c822eabed3150c6">LoRaWANNode::getDevAddr</a></div><div class="ttdeci">uint32_t getDevAddr()</div><div class="ttdoc">Returns the DevAddr of the device, regardless of OTAA or ABP mode.</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2847</div></div>
<div class="ttc" id="aclass_lo_ra_w_a_n_node_html_af4b3d07cd9bf4178d627204bae18b648"><div class="ttname"><a href="class_lo_ra_w_a_n_node.html#af4b3d07cd9bf4178d627204bae18b648">LoRaWANNode::resetFCntDown</a></div><div class="ttdeci">void resetFCntDown()</div><div class="ttdoc">Reset the downlink frame counters (application and network) This is unsafe and can possibly allow rep...</div><div class="ttdef"><b>Definition</b> LoRaWAN.cpp:2842</div></div>
<div class="ttc" id="aclass_physical_layer_html"><div class="ttname"><a href="class_physical_layer.html">PhysicalLayer</a></div><div class="ttdoc">Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....</div><div class="ttdef"><b>Definition</b> PhysicalLayer.h:216</div></div>
<div class="ttc" id="agroup__typedefs_html_ga210f31dd2bff7fb80563275648a5bbbd"><div class="ttname"><a href="group__typedefs.html#ga210f31dd2bff7fb80563275648a5bbbd">RadioLibTime_t</a></div><div class="ttdeci">unsigned long RadioLibTime_t</div><div class="ttdoc">Type used for durations in RadioLib.</div><div class="ttdef"><b>Definition</b> TypeDef.h:642</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html">LoRaWANBand_t</a></div><div class="ttdoc">Structure to save information about LoRaWAN band.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:372</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_a43fdafd540c93348f9b4a8958e021a4c"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#a43fdafd540c93348f9b4a8958e021a4c">LoRaWANBand_t::powerMax</a></div><div class="ttdeci">int8_t powerMax</div><div class="ttdoc">Maximum allowed output power in this band in dBm.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:389</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_a4bbc7445702c32199f0bbd011d6f4da6"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#a4bbc7445702c32199f0bbd011d6f4da6">LoRaWANBand_t::txParamSupported</a></div><div class="ttdeci">bool txParamSupported</div><div class="ttdoc">Whether this band implements the MAC command TxParamSetupReq.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:404</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_a709fdad617bd9138eef52bc7220c29f2"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#a709fdad617bd9138eef52bc7220c29f2">LoRaWANBand_t::txAck</a></div><div class="ttdeci">LoRaWANChannel_t txAck[2]</div><div class="ttdoc">Relay channels for ACK downlink.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:427</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_a743d3a23aa5c58e156dff633b830ee4f"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#a743d3a23aa5c58e156dff633b830ee4f">LoRaWANBand_t::dutyCycle</a></div><div class="ttdeci">RadioLibTime_t dutyCycle</div><div class="ttdoc">Number of milliseconds per hour of allowed Time-on-Air.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:395</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_a8b518a570756048dec56bec703a0b25b"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#a8b518a570756048dec56bec703a0b25b">LoRaWANBand_t::dataRates</a></div><div class="ttdeci">uint8_t dataRates[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES]</div><div class="ttdoc">The corresponding datarates, bandwidths and coding rates for DR index.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:430</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_a8bd0d705d9c0dbe87d25e83cc54e922c"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#a8bd0d705d9c0dbe87d25e83cc54e922c">LoRaWANBand_t::dwellTimeUp</a></div><div class="ttdeci">RadioLibTime_t dwellTimeUp</div><div class="ttdoc">Maximum dwell time per uplink message in milliseconds.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:398</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_a918f643c1fc6df722efd8f969c68cf7e"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#a918f643c1fc6df722efd8f969c68cf7e">LoRaWANBand_t::txWoR</a></div><div class="ttdeci">LoRaWANChannel_t txWoR[2]</div><div class="ttdoc">Relay channels for WoR uplink.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:424</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_a92195dec46b60a55913cd3af43f410f9"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#a92195dec46b60a55913cd3af43f410f9">LoRaWANBand_t::freqMin</a></div><div class="ttdeci">uint32_t freqMin</div><div class="ttdoc">Minimum allowed frequency (coded in 100 Hz steps)</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:380</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_a9b8143ac9bbf3ed45e7cc80fc71ce055"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#a9b8143ac9bbf3ed45e7cc80fc71ce055">LoRaWANBand_t::payloadLenMax</a></div><div class="ttdeci">uint8_t payloadLenMax[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES]</div><div class="ttdoc">Array of allowed maximum application payload lengths for each data rate (N-value)</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:386</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_a9bd952022473cb08e067c763325d689c"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#a9bd952022473cb08e067c763325d689c">LoRaWANBand_t::txFreqs</a></div><div class="ttdeci">LoRaWANChannel_t txFreqs[3]</div><div class="ttdoc">A set of default uplink (TX) channels for dynamic bands.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:407</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_aa22d7d7670846b36d3104439d18e5f15"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#aa22d7d7670846b36d3104439d18e5f15">LoRaWANBand_t::powerNumSteps</a></div><div class="ttdeci">int8_t powerNumSteps</div><div class="ttdoc">Number of power steps in this band.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:392</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_aa37a3cae13a68c2deb2968de26ad9bd3"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#aa37a3cae13a68c2deb2968de26ad9bd3">LoRaWANBand_t::txSpans</a></div><div class="ttdeci">LoRaWANChannelSpan_t txSpans[2]</div><div class="ttdoc">Default uplink (TX) channel spans for fixed bands, including Join-Request parameters.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:413</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_abb14a7c48ec89a944f441517b1d55986"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#abb14a7c48ec89a944f441517b1d55986">LoRaWANBand_t::bandNum</a></div><div class="ttdeci">uint8_t bandNum</div><div class="ttdoc">Identier for this band.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:374</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_ac6b39e29fe554cd53349d80dfff1f479"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#ac6b39e29fe554cd53349d80dfff1f479">LoRaWANBand_t::freqMax</a></div><div class="ttdeci">uint32_t freqMax</div><div class="ttdoc">Maximum allowed frequency (coded in 100 Hz steps)</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:383</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_ad7ab17cc0b530fb99c3be39fd6411802"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#ad7ab17cc0b530fb99c3be39fd6411802">LoRaWANBand_t::bandType</a></div><div class="ttdeci">uint8_t bandType</div><div class="ttdoc">Whether the channels are fixed per specification, or dynamically allocated through the network (plus ...</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:377</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_ae3ed10eddc647a6f770121a1662a854f"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#ae3ed10eddc647a6f770121a1662a854f">LoRaWANBand_t::rx2</a></div><div class="ttdeci">LoRaWANChannel_t rx2</div><div class="ttdoc">Backup channel for downlink (RX2) window.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:421</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_ae58f859a72e64aa4a6fe218ba7e21c10"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#ae58f859a72e64aa4a6fe218ba7e21c10">LoRaWANBand_t::numTxSpans</a></div><div class="ttdeci">uint8_t numTxSpans</div><div class="ttdoc">The number of TX channel spans for fixed bands.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:410</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_aef289b63007a6e085c7c66f71209d84c"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#aef289b63007a6e085c7c66f71209d84c">LoRaWANBand_t::dwellTimeDn</a></div><div class="ttdeci">RadioLibTime_t dwellTimeDn</div><div class="ttdoc">Maximum dwell time per downlink message in milliseconds.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:401</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band__t_html_af8def1e0b5c3dc122557f71f5637a529"><div class="ttname"><a href="struct_lo_ra_w_a_n_band__t.html#af8def1e0b5c3dc122557f71f5637a529">LoRaWANBand_t::rx1Span</a></div><div class="ttdeci">LoRaWANChannelSpan_t rx1Span</div><div class="ttdoc">Default downlink (RX1) channel span for fixed bands.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:416</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_band_num__t_html"><div class="ttname"><a href="struct_lo_ra_w_a_n_band_num__t.html">LoRaWANBandNum_t</a></div><div class="ttdoc">IDs of all currently supported bands.</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel__t_html"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel__t.html">LoRaWANChannel_t</a></div><div class="ttdoc">Structure to save information about LoRaWAN channels. To save space, adjacent channels are saved in &quot;...</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:313</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel__t_html_a5d8fc9046c6351b3bc54825052c471dd"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel__t.html#a5d8fc9046c6351b3bc54825052c471dd">LoRaWANChannel_t::available</a></div><div class="ttdeci">bool available</div><div class="ttdoc">Whether this channel is available for channel selection.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:333</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel__t_html_a8332e2b32f822524c6a1ed04de3144bf"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel__t.html#a8332e2b32f822524c6a1ed04de3144bf">LoRaWANChannel_t::dr</a></div><div class="ttdeci">uint8_t dr</div><div class="ttdoc">Datarate currently in use on this channel.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:330</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel__t_html_a96620451b311ba0126b9575aec81ec2f"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel__t.html#a96620451b311ba0126b9575aec81ec2f">LoRaWANChannel_t::freq</a></div><div class="ttdeci">uint32_t freq</div><div class="ttdoc">The channel frequency (coded in 100 Hz steps)</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:321</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel__t_html_a9fc4b7ec0b298df267cc2c39ef12cfa0"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel__t.html#a9fc4b7ec0b298df267cc2c39ef12cfa0">LoRaWANChannel_t::idx</a></div><div class="ttdeci">uint8_t idx</div><div class="ttdoc">The channel number, as specified by defaults or the network.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:318</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel__t_html_abb028e93f3fe15ed6f95e5fcd8a62f53"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel__t.html#abb028e93f3fe15ed6f95e5fcd8a62f53">LoRaWANChannel_t::drMin</a></div><div class="ttdeci">uint8_t drMin</div><div class="ttdoc">Minimum allowed datarate for this channel.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:324</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel__t_html_acde186d519eca4dc43d053f2146b75a0"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel__t.html#acde186d519eca4dc43d053f2146b75a0">LoRaWANChannel_t::enabled</a></div><div class="ttdeci">bool enabled</div><div class="ttdoc">Whether this channel is enabled (can be used) or is disabled.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:315</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel__t_html_aeabadf186d7bc105f6d289e3a491412c"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel__t.html#aeabadf186d7bc105f6d289e3a491412c">LoRaWANChannel_t::drMax</a></div><div class="ttdeci">uint8_t drMax</div><div class="ttdoc">Maximum allowed datarate for this channel (inclusive)</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:327</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel_span__t_html"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel_span__t.html">LoRaWANChannelSpan_t</a></div><div class="ttdoc">Structure to save information about LoRaWAN channels. To save space, adjacent channels are saved in &quot;...</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:345</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel_span__t_html_a17203af63259911cba8b2ae05be25ff5"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel_span__t.html#a17203af63259911cba8b2ae05be25ff5">LoRaWANChannelSpan_t::drJoinRequest</a></div><div class="ttdeci">uint8_t drJoinRequest</div><div class="ttdoc">Allowed data rates for a join request message.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:362</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel_span__t_html_a1bfba15154185b75693542cd0547cb96"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel_span__t.html#a1bfba15154185b75693542cd0547cb96">LoRaWANChannelSpan_t::freqStart</a></div><div class="ttdeci">uint32_t freqStart</div><div class="ttdoc">Center frequency of the first channel in span (coded in 100 Hz steps)</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:350</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel_span__t_html_a50f5701ae19b79a0c8c487673135b2f2"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel_span__t.html#a50f5701ae19b79a0c8c487673135b2f2">LoRaWANChannelSpan_t::numChannels</a></div><div class="ttdeci">uint8_t numChannels</div><div class="ttdoc">Total number of channels in the span.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:347</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel_span__t_html_a914d2b6f54e9c8d2841acf1d0652fd79"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel_span__t.html#a914d2b6f54e9c8d2841acf1d0652fd79">LoRaWANChannelSpan_t::drMax</a></div><div class="ttdeci">uint8_t drMax</div><div class="ttdoc">Maximum allowed datarate for all channels in this span (inclusive)</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:359</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel_span__t_html_a958f8056a2611c7a503169457278541e"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel_span__t.html#a958f8056a2611c7a503169457278541e">LoRaWANChannelSpan_t::freqStep</a></div><div class="ttdeci">uint32_t freqStep</div><div class="ttdoc">Frequency step between adjacent channels (coded in 100 Hz steps)</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:353</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_channel_span__t_html_ab613b4ca3a2c99ef0aa53f8132f54535"><div class="ttname"><a href="struct_lo_ra_w_a_n_channel_span__t.html#ab613b4ca3a2c99ef0aa53f8132f54535">LoRaWANChannelSpan_t::drMin</a></div><div class="ttdeci">uint8_t drMin</div><div class="ttdoc">Minimum allowed datarate for all channels in this span.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:356</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html">LoRaWANEvent_t</a></div><div class="ttdoc">Structure to save extra information about uplink/downlink event.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:490</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html_a01e1843dcd39911a0fbbb86cdca35d33"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html#a01e1843dcd39911a0fbbb86cdca35d33">LoRaWANEvent_t::freq</a></div><div class="ttdeci">float freq</div><div class="ttdoc">Frequency in MHz.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:508</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html_a09079dc76b5367d23766e357d2ddb794"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html#a09079dc76b5367d23766e357d2ddb794">LoRaWANEvent_t::confirmed</a></div><div class="ttdeci">bool confirmed</div><div class="ttdoc">Whether the event is confirmed or not (e.g., confirmed uplink sent by user application)</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:495</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html_a14f360e64ae4a6090c04333567f1a513"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html#a14f360e64ae4a6090c04333567f1a513">LoRaWANEvent_t::fPort</a></div><div class="ttdeci">uint8_t fPort</div><div class="ttdoc">Port number.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:517</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html_a49eebe64d351bb2e91901ef8fae044ff"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html#a49eebe64d351bb2e91901ef8fae044ff">LoRaWANEvent_t::power</a></div><div class="ttdeci">int16_t power</div><div class="ttdoc">Transmit power in dBm for uplink, or RSSI for downlink.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:511</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html_a506755c4731be16d126bdef873c420f8"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html#a506755c4731be16d126bdef873c420f8">LoRaWANEvent_t::confirming</a></div><div class="ttdeci">bool confirming</div><div class="ttdoc">Whether the event is confirming a previous request (e.g., server downlink reply to confirmed uplink s...</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:499</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html_a56281d98efee007a0c03e6a6ae8a592b"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html#a56281d98efee007a0c03e6a6ae8a592b">LoRaWANEvent_t::datarate</a></div><div class="ttdeci">uint8_t datarate</div><div class="ttdoc">Datarate.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:505</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html_a698a1956ffafa152e7c2cada3a2a2805"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html#a698a1956ffafa152e7c2cada3a2a2805">LoRaWANEvent_t::dir</a></div><div class="ttdeci">uint8_t dir</div><div class="ttdoc">Event direction, one of RADIOLIB_LORAWAN_CHANNEL_DIR_*.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:492</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html_a6e46d7cf9c75ff511ad4d063692c16e7"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html#a6e46d7cf9c75ff511ad4d063692c16e7">LoRaWANEvent_t::nbTrans</a></div><div class="ttdeci">uint8_t nbTrans</div><div class="ttdoc">Number of times this uplink was transmitted (ADR)</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:520</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html_a73ecb624afeda6ddb32c1007d3dcb846"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html#a73ecb624afeda6ddb32c1007d3dcb846">LoRaWANEvent_t::fCnt</a></div><div class="ttdeci">uint32_t fCnt</div><div class="ttdoc">The appropriate frame counter - for different events, different frame counters will be reported!</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:514</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_event__t_html_afe256fb2ed02e2ffdf0ae85f92951778"><div class="ttname"><a href="struct_lo_ra_w_a_n_event__t.html#afe256fb2ed02e2ffdf0ae85f92951778">LoRaWANEvent_t::frmPending</a></div><div class="ttdeci">bool frmPending</div><div class="ttdoc">Whether further downlink messages are pending on the server side.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:502</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_join_event__t_html"><div class="ttname"><a href="struct_lo_ra_w_a_n_join_event__t.html">LoRaWANJoinEvent_t</a></div><div class="ttdoc">Structure to save extra information about activation event.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:475</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_join_event__t_html_a5b233f8c9d2841b8db64df7f079ab0ee"><div class="ttname"><a href="struct_lo_ra_w_a_n_join_event__t.html#a5b233f8c9d2841b8db64df7f079ab0ee">LoRaWANJoinEvent_t::newSession</a></div><div class="ttdeci">bool newSession</div><div class="ttdoc">Whether a new session was started.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:477</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_join_event__t_html_a935bc95eb2c02242c61f192fa2c68d8b"><div class="ttname"><a href="struct_lo_ra_w_a_n_join_event__t.html#a935bc95eb2c02242c61f192fa2c68d8b">LoRaWANJoinEvent_t::joinNonce</a></div><div class="ttdeci">uint32_t joinNonce</div><div class="ttdoc">The received Join-Request JoinNonce value.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:483</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_join_event__t_html_abdb57ec1e16ea0d1822ba0a5632c9372"><div class="ttname"><a href="struct_lo_ra_w_a_n_join_event__t.html#abdb57ec1e16ea0d1822ba0a5632c9372">LoRaWANJoinEvent_t::devNonce</a></div><div class="ttdeci">uint16_t devNonce</div><div class="ttdoc">The transmitted Join-Request DevNonce value.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:480</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_mac_command__t_html"><div class="ttname"><a href="struct_lo_ra_w_a_n_mac_command__t.html">LoRaWANMacCommand_t</a></div><div class="ttdoc">MAC command specification structure.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:220</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_mac_command__t_html_a07d546268f6ac9ae191a7cca4791de37"><div class="ttname"><a href="struct_lo_ra_w_a_n_mac_command__t.html#a07d546268f6ac9ae191a7cca4791de37">LoRaWANMacCommand_t::lenDn</a></div><div class="ttdeci">const uint8_t lenDn</div><div class="ttdoc">Uplink message length.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:225</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_mac_command__t_html_a269530a63c3e2a66393fb10286a3b5b6"><div class="ttname"><a href="struct_lo_ra_w_a_n_mac_command__t.html#a269530a63c3e2a66393fb10286a3b5b6">LoRaWANMacCommand_t::user</a></div><div class="ttdeci">const bool user</div><div class="ttdoc">Whether this MAC command can be issued by the user or not.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:234</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_mac_command__t_html_a79d26324cafccbae8b95927935e0d0dc"><div class="ttname"><a href="struct_lo_ra_w_a_n_mac_command__t.html#a79d26324cafccbae8b95927935e0d0dc">LoRaWANMacCommand_t::cid</a></div><div class="ttdeci">const uint8_t cid</div><div class="ttdoc">Command ID.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:222</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_mac_command__t_html_a89f71b4d17ad16089772ed070cc0949e"><div class="ttname"><a href="struct_lo_ra_w_a_n_mac_command__t.html#a89f71b4d17ad16089772ed070cc0949e">LoRaWANMacCommand_t::lenUp</a></div><div class="ttdeci">const uint8_t lenUp</div><div class="ttdoc">Downlink message length.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:228</div></div>
<div class="ttc" id="astruct_lo_ra_w_a_n_mac_command__t_html_aa253350bc95c821bf42eaee170922355"><div class="ttname"><a href="struct_lo_ra_w_a_n_mac_command__t.html#aa253350bc95c821bf42eaee170922355">LoRaWANMacCommand_t::persist</a></div><div class="ttdeci">const bool persist</div><div class="ttdoc">Some commands must be resent until Class A downlink received.</div><div class="ttdef"><b>Definition</b> LoRaWAN.h:231</div></div>
<div class="ttc" id="aunion_data_rate__t_html"><div class="ttname"><a href="union_data_rate__t.html">DataRate_t</a></div><div class="ttdoc">Common data rate structure.</div><div class="ttdef"><b>Definition</b> PhysicalLayer.h:74</div></div>
</div><!-- fragment --></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="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_79690749eba542503bb1a9a3dbb495e1.html">protocols</a></li><li class="navelem"><a class="el" href="dir_476f96e9e2af087ba14ea5b60a229ae6.html">LoRaWAN</a></li><li class="navelem"><b>LoRaWAN.h</b></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>