Merge pull request #183 from mkinney/more_doc

regen doc with overriding the pdoc _is_public()
This commit is contained in:
mkinney
2021-12-28 22:12:04 -08:00
committed by GitHub
42 changed files with 3334 additions and 86 deletions

View File

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.admin_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -326,7 +326,7 @@ DESCRIPTOR._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.apponly_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -164,7 +164,7 @@ DESCRIPTOR._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.ble API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -47,7 +47,7 @@
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.ble_interface API documentation</title>
<meta name="description" content="Bluetooth interface" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -161,10 +161,49 @@ link - just be a dumb serial client.</p></div>
<ul class="hlist">
<li><a title="meshtastic.mesh_interface.MeshInterface" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface">MeshInterface</a></li>
</ul>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.ble_interface.BLEInterface._readFromRadio"><code class="name flex">
<span>def <span class="ident">_readFromRadio</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _readFromRadio(self):
if not self.noProto:
wasEmpty = False
while not wasEmpty:
if self.device:
b = self.device.char_read(FROMRADIO_UUID)
wasEmpty = len(b) == 0
if not wasEmpty:
self._handleFromRadio(b)</code></pre>
</details>
</dd>
</dl>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="meshtastic.mesh_interface.MeshInterface" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface">MeshInterface</a></b></code>:
<ul class="hlist">
<li><code><a title="meshtastic.mesh_interface.MeshInterface._connected" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._connected">_connected</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._disconnected" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._disconnected">_disconnected</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._fixupPosition" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._fixupPosition">_fixupPosition</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._generatePacketId" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._generatePacketId">_generatePacketId</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._getOrCreateByNum" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._getOrCreateByNum">_getOrCreateByNum</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._handleConfigComplete" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handleConfigComplete">_handleConfigComplete</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._handleFromRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handleFromRadio">_handleFromRadio</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._handlePacketFromRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handlePacketFromRadio">_handlePacketFromRadio</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._nodeNumToId" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._nodeNumToId">_nodeNumToId</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendDisconnect" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendDisconnect">_sendDisconnect</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendPacket" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendPacket">_sendPacket</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendToRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendToRadio">_sendToRadio</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendToRadioImpl" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendToRadioImpl">_sendToRadioImpl</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._startConfig" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._startConfig">_startConfig</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._startHeartbeat" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._startHeartbeat">_startHeartbeat</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._waitConnected" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._waitConnected">_waitConnected</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface.close" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface.close">close</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface.getLongName" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface.getLongName">getLongName</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface.getMyNodeInfo" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface.getMyNodeInfo">getMyNodeInfo</a></code></li>
@@ -199,6 +238,9 @@ link - just be a dumb serial client.</p></div>
<ul>
<li>
<h4><code><a title="meshtastic.ble_interface.BLEInterface" href="#meshtastic.ble_interface.BLEInterface">BLEInterface</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.ble_interface.BLEInterface._readFromRadio" href="#meshtastic.ble_interface.BLEInterface._readFromRadio">_readFromRadio</a></code></li>
</ul>
</li>
</ul>
</li>
@@ -206,7 +248,7 @@ link - just be a dumb serial client.</p></div>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.channel_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -503,7 +503,7 @@ DESCRIPTOR._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.deviceonly_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -458,7 +458,7 @@ DESCRIPTOR._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.environmental_measurement_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -185,7 +185,7 @@ DESCRIPTOR._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.globals API documentation</title>
<meta name="description" content="Globals singleton class …" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -184,6 +184,13 @@ class Globals:
&#34;&#34;&#34;Get channel_index&#34;&#34;&#34;
return self.channel_index</code></pre>
</details>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.globals.Globals._Globals__instance"><code class="name">var <span class="ident">_Globals__instance</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.globals.Globals.getInstance"><code class="name flex">
@@ -356,6 +363,7 @@ def getInstance():
<li>
<h4><code><a title="meshtastic.globals.Globals" href="#meshtastic.globals.Globals">Globals</a></code></h4>
<ul class="two-column">
<li><code><a title="meshtastic.globals.Globals._Globals__instance" href="#meshtastic.globals.Globals._Globals__instance">_Globals__instance</a></code></li>
<li><code><a title="meshtastic.globals.Globals.getInstance" href="#meshtastic.globals.Globals.getInstance">getInstance</a></code></li>
<li><code><a title="meshtastic.globals.Globals.get_args" href="#meshtastic.globals.Globals.get_args">get_args</a></code></li>
<li><code><a title="meshtastic.globals.Globals.get_channel_index" href="#meshtastic.globals.Globals.get_channel_index">get_channel_index</a></code></li>
@@ -374,7 +382,7 @@ def getInstance():
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic API documentation</title>
<meta name="description" content="an API for Meshtastic devices …" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -390,6 +390,89 @@ level of device code we are guaranteed to understand</p>
</dl>
</section>
<section>
<h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="meshtastic._onNodeInfoReceive"><code class="name flex">
<span>def <span class="ident">_onNodeInfoReceive</span></span>(<span>iface, asDict)</span>
</code></dt>
<dd>
<div class="desc"><p>Special auto parsing for received messages</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _onNodeInfoReceive(iface, asDict):
&#34;&#34;&#34;Special auto parsing for received messages&#34;&#34;&#34;
p = asDict[&#34;decoded&#34;][&#34;user&#34;]
# decode user protobufs and update nodedb, provide decoded version as &#34;position&#34; in the published msg
# update node DB as needed
n = iface._getOrCreateByNum(asDict[&#34;from&#34;])
n[&#34;user&#34;] = p
# We now have a node ID, make sure it is uptodate in that table
iface.nodes[p[&#34;id&#34;]] = n
_receiveInfoUpdate(iface, asDict)</code></pre>
</details>
</dd>
<dt id="meshtastic._onPositionReceive"><code class="name flex">
<span>def <span class="ident">_onPositionReceive</span></span>(<span>iface, asDict)</span>
</code></dt>
<dd>
<div class="desc"><p>Special auto parsing for received messages</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _onPositionReceive(iface, asDict):
&#34;&#34;&#34;Special auto parsing for received messages&#34;&#34;&#34;
p = asDict[&#34;decoded&#34;][&#34;position&#34;]
iface._fixupPosition(p)
# update node DB as needed
iface._getOrCreateByNum(asDict[&#34;from&#34;])[&#34;position&#34;] = p</code></pre>
</details>
</dd>
<dt id="meshtastic._onTextReceive"><code class="name flex">
<span>def <span class="ident">_onTextReceive</span></span>(<span>iface, asDict)</span>
</code></dt>
<dd>
<div class="desc"><p>Special text auto parsing for received messages</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _onTextReceive(iface, asDict):
&#34;&#34;&#34;Special text auto parsing for received messages&#34;&#34;&#34;
# We don&#39;t throw if the utf8 is invalid in the text message. Instead we just don&#39;t populate
# the decoded.data.text and we log an error message. This at least allows some delivery to
# the app and the app can deal with the missing decoded representation.
#
# Usually btw this problem is caused by apps sending binary data but setting the payload type to
# text.
try:
asBytes = asDict[&#34;decoded&#34;][&#34;payload&#34;]
asDict[&#34;decoded&#34;][&#34;text&#34;] = asBytes.decode(&#34;utf-8&#34;)
except Exception as ex:
logging.error(f&#34;Malformatted utf8 in text message: {ex}&#34;)
_receiveInfoUpdate(iface, asDict)</code></pre>
</details>
</dd>
<dt id="meshtastic._receiveInfoUpdate"><code class="name flex">
<span>def <span class="ident">_receiveInfoUpdate</span></span>(<span>iface, asDict)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _receiveInfoUpdate(iface, asDict):
if &#34;from&#34; in asDict:
iface._getOrCreateByNum(asDict[&#34;from&#34;])[&#34;lastReceived&#34;] = asDict
iface._getOrCreateByNum(asDict[&#34;from&#34;])[&#34;lastHeard&#34;] = asDict.get(&#34;rxTime&#34;)
iface._getOrCreateByNum(asDict[&#34;from&#34;])[&#34;snr&#34;] = asDict.get(&#34;rxSnr&#34;)
iface._getOrCreateByNum(asDict[&#34;from&#34;])[&#34;hopLimit&#34;] = asDict.get(&#34;hopLimit&#34;)</code></pre>
</details>
</dd>
</dl>
</section>
<section>
<h2 class="section-title" id="header-classes">Classes</h2>
@@ -417,6 +500,37 @@ level of device code we are guaranteed to understand</p>
<ul class="hlist">
<li>builtins.tuple</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.KnownProtocol._field_defaults"><code class="name">var <span class="ident">_field_defaults</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.KnownProtocol._fields"><code class="name">var <span class="ident">_fields</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.KnownProtocol._make"><code class="name flex">
<span>def <span class="ident">_make</span></span>(<span>iterable)</span>
</code></dt>
<dd>
<div class="desc"><p>Make a new KnownProtocol object from a sequence or iterable</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def _make(cls, iterable):
result = tuple_new(cls, iterable)
if _len(result) != num_fields:
raise TypeError(f&#39;Expected {num_fields} arguments, got {len(result)}&#39;)
return result</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.KnownProtocol.name"><code class="name">var <span class="ident">name</span> : str</code></dt>
@@ -432,6 +546,39 @@ level of device code we are guaranteed to understand</p>
<div class="desc"><p>Alias for field number 1</p></div>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.KnownProtocol._asdict"><code class="name flex">
<span>def <span class="ident">_asdict</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Return a new dict which maps field names to their values.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _asdict(self):
&#39;Return a new dict which maps field names to their values.&#39;
return _dict(_zip(self._fields, self))</code></pre>
</details>
</dd>
<dt id="meshtastic.KnownProtocol._replace"><code class="name flex">
<span>def <span class="ident">_replace</span></span>(<span>self, /, **kwds)</span>
</code></dt>
<dd>
<div class="desc"><p>Return a new KnownProtocol object replacing specified fields with new values</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _replace(self, /, **kwds):
result = self._make(_map(kwds.pop, field_names, self))
if kwds:
raise ValueError(f&#39;Got unexpected field names: {list(kwds)!r}&#39;)
return result</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.ResponseHandler"><code class="flex name class">
<span>class <span class="ident">ResponseHandler</span></span>
@@ -453,6 +600,37 @@ level of device code we are guaranteed to understand</p>
<ul class="hlist">
<li>builtins.tuple</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.ResponseHandler._field_defaults"><code class="name">var <span class="ident">_field_defaults</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.ResponseHandler._fields"><code class="name">var <span class="ident">_fields</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.ResponseHandler._make"><code class="name flex">
<span>def <span class="ident">_make</span></span>(<span>iterable)</span>
</code></dt>
<dd>
<div class="desc"><p>Make a new ResponseHandler object from a sequence or iterable</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def _make(cls, iterable):
result = tuple_new(cls, iterable)
if _len(result) != num_fields:
raise TypeError(f&#39;Expected {num_fields} arguments, got {len(result)}&#39;)
return result</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.ResponseHandler.callback"><code class="name">var <span class="ident">callback</span> : Callable</code></dt>
@@ -460,6 +638,39 @@ level of device code we are guaranteed to understand</p>
<div class="desc"><p>Alias for field number 0</p></div>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.ResponseHandler._asdict"><code class="name flex">
<span>def <span class="ident">_asdict</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Return a new dict which maps field names to their values.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _asdict(self):
&#39;Return a new dict which maps field names to their values.&#39;
return _dict(_zip(self._fields, self))</code></pre>
</details>
</dd>
<dt id="meshtastic.ResponseHandler._replace"><code class="name flex">
<span>def <span class="ident">_replace</span></span>(<span>self, /, **kwds)</span>
</code></dt>
<dd>
<div class="desc"><p>Return a new ResponseHandler object replacing specified fields with new values</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _replace(self, /, **kwds):
result = self._make(_map(kwds.pop, field_names, self))
if kwds:
raise ValueError(f&#39;Got unexpected field names: {list(kwds)!r}&#39;)
return result</code></pre>
</details>
</dd>
</dl>
</dd>
</dl>
</section>
@@ -510,11 +721,24 @@ level of device code we are guaranteed to understand</p>
<li><code><a title="meshtastic.OUR_APP_VERSION" href="#meshtastic.OUR_APP_VERSION">OUR_APP_VERSION</a></code></li>
</ul>
</li>
<li><h3><a href="#header-functions">Functions</a></h3>
<ul class="">
<li><code><a title="meshtastic._onNodeInfoReceive" href="#meshtastic._onNodeInfoReceive">_onNodeInfoReceive</a></code></li>
<li><code><a title="meshtastic._onPositionReceive" href="#meshtastic._onPositionReceive">_onPositionReceive</a></code></li>
<li><code><a title="meshtastic._onTextReceive" href="#meshtastic._onTextReceive">_onTextReceive</a></code></li>
<li><code><a title="meshtastic._receiveInfoUpdate" href="#meshtastic._receiveInfoUpdate">_receiveInfoUpdate</a></code></li>
</ul>
</li>
<li><h3><a href="#header-classes">Classes</a></h3>
<ul>
<li>
<h4><code><a title="meshtastic.KnownProtocol" href="#meshtastic.KnownProtocol">KnownProtocol</a></code></h4>
<ul class="">
<ul class="two-column">
<li><code><a title="meshtastic.KnownProtocol._asdict" href="#meshtastic.KnownProtocol._asdict">_asdict</a></code></li>
<li><code><a title="meshtastic.KnownProtocol._field_defaults" href="#meshtastic.KnownProtocol._field_defaults">_field_defaults</a></code></li>
<li><code><a title="meshtastic.KnownProtocol._fields" href="#meshtastic.KnownProtocol._fields">_fields</a></code></li>
<li><code><a title="meshtastic.KnownProtocol._make" href="#meshtastic.KnownProtocol._make">_make</a></code></li>
<li><code><a title="meshtastic.KnownProtocol._replace" href="#meshtastic.KnownProtocol._replace">_replace</a></code></li>
<li><code><a title="meshtastic.KnownProtocol.name" href="#meshtastic.KnownProtocol.name">name</a></code></li>
<li><code><a title="meshtastic.KnownProtocol.onReceive" href="#meshtastic.KnownProtocol.onReceive">onReceive</a></code></li>
<li><code><a title="meshtastic.KnownProtocol.protobufFactory" href="#meshtastic.KnownProtocol.protobufFactory">protobufFactory</a></code></li>
@@ -522,7 +746,12 @@ level of device code we are guaranteed to understand</p>
</li>
<li>
<h4><code><a title="meshtastic.ResponseHandler" href="#meshtastic.ResponseHandler">ResponseHandler</a></code></h4>
<ul class="">
<ul class="two-column">
<li><code><a title="meshtastic.ResponseHandler._asdict" href="#meshtastic.ResponseHandler._asdict">_asdict</a></code></li>
<li><code><a title="meshtastic.ResponseHandler._field_defaults" href="#meshtastic.ResponseHandler._field_defaults">_field_defaults</a></code></li>
<li><code><a title="meshtastic.ResponseHandler._fields" href="#meshtastic.ResponseHandler._fields">_fields</a></code></li>
<li><code><a title="meshtastic.ResponseHandler._make" href="#meshtastic.ResponseHandler._make">_make</a></code></li>
<li><code><a title="meshtastic.ResponseHandler._replace" href="#meshtastic.ResponseHandler._replace">_replace</a></code></li>
<li><code><a title="meshtastic.ResponseHandler.callback" href="#meshtastic.ResponseHandler.callback">callback</a></code></li>
</ul>
</li>
@@ -532,7 +761,7 @@ level of device code we are guaranteed to understand</p>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.mesh_interface API documentation</title>
<meta name="description" content="Mesh Interface class" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -1395,6 +1395,555 @@ link - just be a dumb serial client.</p></div>
</ul>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_interface.MeshInterface._addResponseHandler"><code class="name flex">
<span>def <span class="ident">_addResponseHandler</span></span>(<span>self, requestId, callback)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _addResponseHandler(self, requestId, callback):
self.responseHandlers[requestId] = ResponseHandler(callback)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._connected"><code class="name flex">
<span>def <span class="ident">_connected</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Called by this class to tell clients we are now fully connected to a node</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _connected(self):
&#34;&#34;&#34;Called by this class to tell clients we are now fully connected to a node
&#34;&#34;&#34;
# (because I&#39;m lazy) _connected might be called when remote Node
# objects complete their config reads, don&#39;t generate redundant isConnected
# for the local interface
if not self.isConnected.is_set():
self.isConnected.set()
self._startHeartbeat()
publishingThread.queueWork(lambda: pub.sendMessage(
&#34;meshtastic.connection.established&#34;, interface=self))</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._disconnected"><code class="name flex">
<span>def <span class="ident">_disconnected</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Called by subclasses to tell clients this interface has disconnected</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _disconnected(self):
&#34;&#34;&#34;Called by subclasses to tell clients this interface has disconnected&#34;&#34;&#34;
self.isConnected.clear()
publishingThread.queueWork(lambda: pub.sendMessage(
&#34;meshtastic.connection.lost&#34;, interface=self))</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._fixupPosition"><code class="name flex">
<span>def <span class="ident">_fixupPosition</span></span>(<span>self, position)</span>
</code></dt>
<dd>
<div class="desc"><p>Convert integer lat/lon into floats</p>
<h2 id="arguments">Arguments</h2>
<p>position {Position dictionary} &ndash; object ot fix up</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _fixupPosition(self, position):
&#34;&#34;&#34;Convert integer lat/lon into floats
Arguments:
position {Position dictionary} -- object ot fix up
&#34;&#34;&#34;
if &#34;latitudeI&#34; in position:
position[&#34;latitude&#34;] = position[&#34;latitudeI&#34;] * 1e-7
if &#34;longitudeI&#34; in position:
position[&#34;longitude&#34;] = position[&#34;longitudeI&#34;] * 1e-7</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._generatePacketId"><code class="name flex">
<span>def <span class="ident">_generatePacketId</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Get a new unique packet ID</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _generatePacketId(self):
&#34;&#34;&#34;Get a new unique packet ID&#34;&#34;&#34;
if self.currentPacketId is None:
raise Exception(&#34;Not connected yet, can not generate packet&#34;)
else:
self.currentPacketId = (self.currentPacketId + 1) &amp; 0xffffffff
return self.currentPacketId</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._getOrCreateByNum"><code class="name flex">
<span>def <span class="ident">_getOrCreateByNum</span></span>(<span>self, nodeNum)</span>
</code></dt>
<dd>
<div class="desc"><p>Given a nodenum find the NodeInfo in the DB (or create if necessary)</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _getOrCreateByNum(self, nodeNum):
&#34;&#34;&#34;Given a nodenum find the NodeInfo in the DB (or create if necessary)&#34;&#34;&#34;
if nodeNum == BROADCAST_NUM:
raise Exception(&#34;Can not create/find nodenum by the broadcast num&#34;)
if nodeNum in self.nodesByNum:
return self.nodesByNum[nodeNum]
else:
n = {&#34;num&#34;: nodeNum} # Create a minimial node db entry
self.nodesByNum[nodeNum] = n
return n</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._handleConfigComplete"><code class="name flex">
<span>def <span class="ident">_handleConfigComplete</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Done with initial config messages, now send regular MeshPackets
to ask for settings and channels</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _handleConfigComplete(self):
&#34;&#34;&#34;
Done with initial config messages, now send regular MeshPackets
to ask for settings and channels
&#34;&#34;&#34;
self.localNode.requestConfig()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._handleFromRadio"><code class="name flex">
<span>def <span class="ident">_handleFromRadio</span></span>(<span>self, fromRadioBytes)</span>
</code></dt>
<dd>
<div class="desc"><p>Handle a packet that arrived from the radio(update model and publish events)</p>
<p>Called by subclasses.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _handleFromRadio(self, fromRadioBytes):
&#34;&#34;&#34;
Handle a packet that arrived from the radio(update model and publish events)
Called by subclasses.&#34;&#34;&#34;
fromRadio = mesh_pb2.FromRadio()
fromRadio.ParseFromString(fromRadioBytes)
logging.debug(f&#34;in mesh_interface.py _handleFromRadio() fromRadioBytes: {fromRadioBytes}&#34;)
asDict = google.protobuf.json_format.MessageToDict(fromRadio)
logging.debug(f&#34;Received from radio: {fromRadio}&#34;)
if fromRadio.HasField(&#34;my_info&#34;):
self.myInfo = fromRadio.my_info
self.localNode.nodeNum = self.myInfo.my_node_num
logging.debug(f&#34;Received myinfo: {stripnl(fromRadio.my_info)}&#34;)
failmsg = None
# Check for app too old
if self.myInfo.min_app_version &gt; OUR_APP_VERSION:
failmsg = &#34;This device needs a newer python client, run &#39;pip install --upgrade meshtastic&#39;.&#34;\
&#34;For more information see https://tinyurl.com/5bjsxu32&#34;
# check for firmware too old
if self.myInfo.max_channels == 0:
failmsg = &#34;This version of meshtastic-python requires device firmware version 1.2 or later. &#34;\
&#34;For more information see https://tinyurl.com/5bjsxu32&#34;
if failmsg:
self.failure = Exception(failmsg)
self.isConnected.set() # let waitConnected return this exception
self.close()
elif fromRadio.HasField(&#34;node_info&#34;):
node = asDict[&#34;nodeInfo&#34;]
try:
self._fixupPosition(node[&#34;position&#34;])
except:
logging.debug(&#34;Node without position&#34;)
logging.debug(f&#34;Received nodeinfo: {node}&#34;)
self.nodesByNum[node[&#34;num&#34;]] = node
if &#34;user&#34; in node: # Some nodes might not have user/ids assigned yet
if &#34;id&#34; in node[&#34;user&#34;]:
self.nodes[node[&#34;user&#34;][&#34;id&#34;]] = node
publishingThread.queueWork(lambda: pub.sendMessage(&#34;meshtastic.node.updated&#34;,
node=node, interface=self))
elif fromRadio.config_complete_id == self.configId:
# we ignore the config_complete_id, it is unneeded for our
# stream API fromRadio.config_complete_id
logging.debug(f&#34;Config complete ID {self.configId}&#34;)
self._handleConfigComplete()
elif fromRadio.HasField(&#34;packet&#34;):
self._handlePacketFromRadio(fromRadio.packet)
elif fromRadio.rebooted:
# Tell clients the device went away. Careful not to call the overridden
# subclass version that closes the serial port
MeshInterface._disconnected(self)
self._startConfig() # redownload the node db etc...
else:
logging.debug(&#34;Unexpected FromRadio payload&#34;)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._handlePacketFromRadio"><code class="name flex">
<span>def <span class="ident">_handlePacketFromRadio</span></span>(<span>self, meshPacket, hack=False)</span>
</code></dt>
<dd>
<div class="desc"><p>Handle a MeshPacket that just arrived from the radio</p>
<p>hack - well, since we used 'from', which is a python keyword,
as an attribute to MeshPacket in protobufs,
there really is no way to do something like this:
meshPacket = mesh_pb2.MeshPacket()
meshPacket.from = 123
If hack is True, we can unit test this code.</p>
<p>Will publish one of the following events:
- meshtastic.receive.text(packet = MeshPacket dictionary)
- meshtastic.receive.position(packet = MeshPacket dictionary)
- meshtastic.receive.user(packet = MeshPacket dictionary)
- meshtastic.receive.data(packet = MeshPacket dictionary)</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _handlePacketFromRadio(self, meshPacket, hack=False):
&#34;&#34;&#34;Handle a MeshPacket that just arrived from the radio
hack - well, since we used &#39;from&#39;, which is a python keyword,
as an attribute to MeshPacket in protobufs,
there really is no way to do something like this:
meshPacket = mesh_pb2.MeshPacket()
meshPacket.from = 123
If hack is True, we can unit test this code.
Will publish one of the following events:
- meshtastic.receive.text(packet = MeshPacket dictionary)
- meshtastic.receive.position(packet = MeshPacket dictionary)
- meshtastic.receive.user(packet = MeshPacket dictionary)
- meshtastic.receive.data(packet = MeshPacket dictionary)
&#34;&#34;&#34;
asDict = google.protobuf.json_format.MessageToDict(meshPacket)
# We normally decompose the payload into a dictionary so that the client
# doesn&#39;t need to understand protobufs. But advanced clients might
# want the raw protobuf, so we provide it in &#34;raw&#34;
asDict[&#34;raw&#34;] = meshPacket
# from might be missing if the nodenum was zero.
if not hack and &#34;from&#34; not in asDict:
asDict[&#34;from&#34;] = 0
logging.error(f&#34;Device returned a packet we sent, ignoring: {stripnl(asDict)}&#34;)
print(f&#34;Error: Device returned a packet we sent, ignoring: {stripnl(asDict)}&#34;)
return
if &#34;to&#34; not in asDict:
asDict[&#34;to&#34;] = 0
# /add fromId and toId fields based on the node ID
try:
asDict[&#34;fromId&#34;] = self._nodeNumToId(asDict[&#34;from&#34;])
except Exception as ex:
logging.warning(f&#34;Not populating fromId {ex}&#34;)
try:
asDict[&#34;toId&#34;] = self._nodeNumToId(asDict[&#34;to&#34;])
except Exception as ex:
logging.warning(f&#34;Not populating toId {ex}&#34;)
# We could provide our objects as DotMaps - which work with . notation or as dictionaries
# asObj = DotMap(asDict)
topic = &#34;meshtastic.receive&#34; # Generic unknown packet type
decoded = asDict[&#34;decoded&#34;]
# The default MessageToDict converts byte arrays into base64 strings.
# We don&#39;t want that - it messes up data payload. So slam in the correct
# byte array.
decoded[&#34;payload&#34;] = meshPacket.decoded.payload
# UNKNOWN_APP is the default protobuf portnum value, and therefore if not
# set it will not be populated at all to make API usage easier, set
# it to prevent confusion
if &#34;portnum&#34; not in decoded:
new_portnum = portnums_pb2.PortNum.Name(portnums_pb2.PortNum.UNKNOWN_APP)
decoded[&#34;portnum&#34;] = new_portnum
logging.warning(f&#34;portnum was not in decoded. Setting to:{new_portnum}&#34;)
portnum = decoded[&#34;portnum&#34;]
topic = f&#34;meshtastic.receive.data.{portnum}&#34;
# decode position protobufs and update nodedb, provide decoded version
# as &#34;position&#34; in the published msg move the following into a &#39;decoders&#39;
# API that clients could register?
portNumInt = meshPacket.decoded.portnum # we want portnum as an int
handler = protocols.get(portNumInt)
# The decoded protobuf as a dictionary (if we understand this message)
p = None
if handler is not None:
topic = f&#34;meshtastic.receive.{handler.name}&#34;
# Convert to protobuf if possible
if handler.protobufFactory is not None:
pb = handler.protobufFactory()
pb.ParseFromString(meshPacket.decoded.payload)
p = google.protobuf.json_format.MessageToDict(pb)
asDict[&#34;decoded&#34;][handler.name] = p
# Also provide the protobuf raw
asDict[&#34;decoded&#34;][handler.name][&#34;raw&#34;] = pb
# Call specialized onReceive if necessary
if handler.onReceive is not None:
handler.onReceive(self, asDict)
# Is this message in response to a request, if so, look for a handler
requestId = decoded.get(&#34;requestId&#34;)
if requestId is not None:
# We ignore ACK packets, but send NAKs and data responses to the handlers
routing = decoded.get(&#34;routing&#34;)
isAck = routing is not None and (&#34;errorReason&#34; not in routing)
if not isAck:
# we keep the responseHandler in dict until we get a non ack
handler = self.responseHandlers.pop(requestId, None)
if handler is not None:
handler.callback(asDict)
logging.debug(f&#34;Publishing {topic}: packet={stripnl(asDict)} &#34;)
publishingThread.queueWork(lambda: pub.sendMessage(
topic, packet=asDict, interface=self))</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._nodeNumToId"><code class="name flex">
<span>def <span class="ident">_nodeNumToId</span></span>(<span>self, num)</span>
</code></dt>
<dd>
<div class="desc"><p>Map a node node number to a node ID</p>
<h2 id="arguments">Arguments</h2>
<p>num {int} &ndash; Node number</p>
<h2 id="returns">Returns</h2>
<p>string &ndash; Node ID</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _nodeNumToId(self, num):
&#34;&#34;&#34;Map a node node number to a node ID
Arguments:
num {int} -- Node number
Returns:
string -- Node ID
&#34;&#34;&#34;
if num == BROADCAST_NUM:
return BROADCAST_ADDR
try:
return self.nodesByNum[num][&#34;user&#34;][&#34;id&#34;]
except:
logging.debug(f&#34;Node {num} not found for fromId&#34;)
return None</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._sendDisconnect"><code class="name flex">
<span>def <span class="ident">_sendDisconnect</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Tell device we are done using it</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _sendDisconnect(self):
&#34;&#34;&#34;Tell device we are done using it&#34;&#34;&#34;
m = mesh_pb2.ToRadio()
m.disconnect = True
self._sendToRadio(m)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._sendPacket"><code class="name flex">
<span>def <span class="ident">_sendPacket</span></span>(<span>self, meshPacket, destinationId='^all', wantAck=False, hopLimit=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Send a MeshPacket to the specified node (or if unspecified, broadcast).
You probably don't want this - use sendData instead.</p>
<p>Returns the sent packet. The id field will be populated in this packet and
can be used to track future message acks/naks.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _sendPacket(self, meshPacket,
destinationId=BROADCAST_ADDR,
wantAck=False, hopLimit=None):
&#34;&#34;&#34;Send a MeshPacket to the specified node (or if unspecified, broadcast).
You probably don&#39;t want this - use sendData instead.
Returns the sent packet. The id field will be populated in this packet and
can be used to track future message acks/naks.
&#34;&#34;&#34;
if hopLimit is None:
hopLimit = self.defaultHopLimit
# We allow users to talk to the local node before we&#39;ve completed the full connection flow...
if(self.myInfo is not None and destinationId != self.myInfo.my_node_num):
self._waitConnected()
toRadio = mesh_pb2.ToRadio()
nodeNum = 0
if destinationId is None:
our_exit(&#34;Warning: destinationId must not be None&#34;)
elif isinstance(destinationId, int):
nodeNum = destinationId
elif destinationId == BROADCAST_ADDR:
nodeNum = BROADCAST_NUM
elif destinationId == LOCAL_ADDR:
if self.myInfo:
nodeNum = self.myInfo.my_node_num
else:
our_exit(&#34;Warning: No myInfo found.&#34;)
# A simple hex style nodeid - we can parse this without needing the DB
elif destinationId.startswith(&#34;!&#34;):
nodeNum = int(destinationId[1:], 16)
else:
if self.nodes:
node = self.nodes.get(destinationId)
if not node:
our_exit(f&#34;Warning: NodeId {destinationId} not found in DB&#34;)
nodeNum = node[&#39;num&#39;]
else:
logging.warning(&#34;Warning: There were no self.nodes.&#34;)
meshPacket.to = nodeNum
meshPacket.want_ack = wantAck
meshPacket.hop_limit = hopLimit
# if the user hasn&#39;t set an ID for this packet (likely and recommended),
# we should pick a new unique ID so the message can be tracked.
if meshPacket.id == 0:
meshPacket.id = self._generatePacketId()
toRadio.packet.CopyFrom(meshPacket)
if self.noProto:
logging.warning(f&#34;Not sending packet because protocol use is disabled by noProto&#34;)
else:
logging.debug(f&#34;Sending packet: {stripnl(meshPacket)}&#34;)
self._sendToRadio(toRadio)
return meshPacket</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._sendToRadio"><code class="name flex">
<span>def <span class="ident">_sendToRadio</span></span>(<span>self, toRadio)</span>
</code></dt>
<dd>
<div class="desc"><p>Send a ToRadio protobuf to the device</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _sendToRadio(self, toRadio):
&#34;&#34;&#34;Send a ToRadio protobuf to the device&#34;&#34;&#34;
if self.noProto:
logging.warning(f&#34;Not sending packet because protocol use is disabled by noProto&#34;)
else:
#logging.debug(f&#34;Sending toRadio: {stripnl(toRadio)}&#34;)
self._sendToRadioImpl(toRadio)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._sendToRadioImpl"><code class="name flex">
<span>def <span class="ident">_sendToRadioImpl</span></span>(<span>self, toRadio)</span>
</code></dt>
<dd>
<div class="desc"><p>Send a ToRadio protobuf to the device</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _sendToRadioImpl(self, toRadio):
&#34;&#34;&#34;Send a ToRadio protobuf to the device&#34;&#34;&#34;
logging.error(f&#34;Subclass must provide toradio: {toRadio}&#34;)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._startConfig"><code class="name flex">
<span>def <span class="ident">_startConfig</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Start device packets flowing</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _startConfig(self):
&#34;&#34;&#34;Start device packets flowing&#34;&#34;&#34;
self.myInfo = None
self.nodes = {} # nodes keyed by ID
self.nodesByNum = {} # nodes keyed by nodenum
startConfig = mesh_pb2.ToRadio()
self.configId = random.randint(0, 0xffffffff)
startConfig.want_config_id = self.configId
self._sendToRadio(startConfig)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._startHeartbeat"><code class="name flex">
<span>def <span class="ident">_startHeartbeat</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>We need to send a heartbeat message to the device every X seconds</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _startHeartbeat(self):
&#34;&#34;&#34;We need to send a heartbeat message to the device every X seconds&#34;&#34;&#34;
def callback():
self.heartbeatTimer = None
prefs = self.localNode.radioConfig.preferences
i = prefs.phone_timeout_secs / 2
logging.debug(f&#34;Sending heartbeat, interval {i}&#34;)
if i != 0:
self.heartbeatTimer = threading.Timer(i, callback)
self.heartbeatTimer.start()
p = mesh_pb2.ToRadio()
self._sendToRadio(p)
callback() # run our periodic callback now, it will make another timer if necessary</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface._waitConnected"><code class="name flex">
<span>def <span class="ident">_waitConnected</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Block until the initial node db download is complete, or timeout
and raise an exception</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _waitConnected(self):
&#34;&#34;&#34;Block until the initial node db download is complete, or timeout
and raise an exception&#34;&#34;&#34;
if not self.noProto:
if not self.isConnected.wait(15.0): # timeout after x seconds
raise Exception(&#34;Timed out waiting for connection completion&#34;)
# If we failed while connecting, raise the connection to the client
if self.failure:
raise self.failure</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_interface.MeshInterface.close"><code class="name flex">
<span>def <span class="ident">close</span></span>(<span>self)</span>
</code></dt>
@@ -1824,7 +2373,24 @@ and can be used to track future message acks/naks.</p></div>
<ul>
<li>
<h4><code><a title="meshtastic.mesh_interface.MeshInterface" href="#meshtastic.mesh_interface.MeshInterface">MeshInterface</a></code></h4>
<ul class="two-column">
<ul class="">
<li><code><a title="meshtastic.mesh_interface.MeshInterface._addResponseHandler" href="#meshtastic.mesh_interface.MeshInterface._addResponseHandler">_addResponseHandler</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._connected" href="#meshtastic.mesh_interface.MeshInterface._connected">_connected</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._disconnected" href="#meshtastic.mesh_interface.MeshInterface._disconnected">_disconnected</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._fixupPosition" href="#meshtastic.mesh_interface.MeshInterface._fixupPosition">_fixupPosition</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._generatePacketId" href="#meshtastic.mesh_interface.MeshInterface._generatePacketId">_generatePacketId</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._getOrCreateByNum" href="#meshtastic.mesh_interface.MeshInterface._getOrCreateByNum">_getOrCreateByNum</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._handleConfigComplete" href="#meshtastic.mesh_interface.MeshInterface._handleConfigComplete">_handleConfigComplete</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._handleFromRadio" href="#meshtastic.mesh_interface.MeshInterface._handleFromRadio">_handleFromRadio</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._handlePacketFromRadio" href="#meshtastic.mesh_interface.MeshInterface._handlePacketFromRadio">_handlePacketFromRadio</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._nodeNumToId" href="#meshtastic.mesh_interface.MeshInterface._nodeNumToId">_nodeNumToId</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendDisconnect" href="#meshtastic.mesh_interface.MeshInterface._sendDisconnect">_sendDisconnect</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendPacket" href="#meshtastic.mesh_interface.MeshInterface._sendPacket">_sendPacket</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendToRadio" href="#meshtastic.mesh_interface.MeshInterface._sendToRadio">_sendToRadio</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendToRadioImpl" href="#meshtastic.mesh_interface.MeshInterface._sendToRadioImpl">_sendToRadioImpl</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._startConfig" href="#meshtastic.mesh_interface.MeshInterface._startConfig">_startConfig</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._startHeartbeat" href="#meshtastic.mesh_interface.MeshInterface._startHeartbeat">_startHeartbeat</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._waitConnected" href="#meshtastic.mesh_interface.MeshInterface._waitConnected">_waitConnected</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface.close" href="#meshtastic.mesh_interface.MeshInterface.close">close</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface.getLongName" href="#meshtastic.mesh_interface.MeshInterface.getLongName">getLongName</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface.getMyNodeInfo" href="#meshtastic.mesh_interface.MeshInterface.getMyNodeInfo">getMyNodeInfo</a></code></li>
@@ -1845,7 +2411,7 @@ and can be used to track future message acks/naks.</p></div>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.mesh_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -2689,7 +2689,7 @@ _MYNODEINFO.fields_by_name[&#39;hw_model_deprecated&#39;]._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.mqtt_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -188,7 +188,7 @@ DESCRIPTOR._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.node API documentation</title>
<meta name="description" content="Node class" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -785,6 +785,149 @@ class Node:
</details>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.node.Node._fillChannels"><code class="name flex">
<span>def <span class="ident">_fillChannels</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Mark unused channels as disabled</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _fillChannels(self):
&#34;&#34;&#34;Mark unused channels as disabled&#34;&#34;&#34;
# Add extra disabled channels as needed
index = len(self.channels)
while index &lt; self.iface.myInfo.max_channels:
ch = channel_pb2.Channel()
ch.role = channel_pb2.Channel.Role.DISABLED
ch.index = index
self.channels.append(ch)
index += 1</code></pre>
</details>
</dd>
<dt id="meshtastic.node.Node._fixupChannels"><code class="name flex">
<span>def <span class="ident">_fixupChannels</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Fixup indexes and add disabled channels as needed</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _fixupChannels(self):
&#34;&#34;&#34;Fixup indexes and add disabled channels as needed&#34;&#34;&#34;
# Add extra disabled channels as needed
# TODO: These 2 lines seem to not do anything.
for index, ch in enumerate(self.channels):
ch.index = index # fixup indexes
self._fillChannels()</code></pre>
</details>
</dd>
<dt id="meshtastic.node.Node._getAdminChannelIndex"><code class="name flex">
<span>def <span class="ident">_getAdminChannelIndex</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Return the channel number of the admin channel, or 0 if no reserved channel</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _getAdminChannelIndex(self):
&#34;&#34;&#34;Return the channel number of the admin channel, or 0 if no reserved channel&#34;&#34;&#34;
c = self.getChannelByName(&#34;admin&#34;)
if c:
return c.index
else:
return 0</code></pre>
</details>
</dd>
<dt id="meshtastic.node.Node._requestChannel"><code class="name flex">
<span>def <span class="ident">_requestChannel</span></span>(<span>self, channelNum: int)</span>
</code></dt>
<dd>
<div class="desc"><p>Done with initial config messages, now send regular
MeshPackets to ask for settings</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _requestChannel(self, channelNum: int):
&#34;&#34;&#34;Done with initial config messages, now send regular
MeshPackets to ask for settings&#34;&#34;&#34;
p = admin_pb2.AdminMessage()
p.get_channel_request = channelNum + 1
# Show progress message for super slow operations
if self != self.iface.localNode:
print(f&#34;Requesting channel {channelNum} info from remote node (this could take a while)&#34;)
logging.debug(f&#34;Requesting channel {channelNum} info from remote node (this could take a while)&#34;)
else:
logging.debug(f&#34;Requesting channel {channelNum}&#34;)
return self._sendAdmin(p, wantResponse=True, onResponse=self.onResponseRequestChannel)</code></pre>
</details>
</dd>
<dt id="meshtastic.node.Node._requestSettings"><code class="name flex">
<span>def <span class="ident">_requestSettings</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Done with initial config messages, now send regular
MeshPackets to ask for settings.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _requestSettings(self):
&#34;&#34;&#34;Done with initial config messages, now send regular
MeshPackets to ask for settings.&#34;&#34;&#34;
p = admin_pb2.AdminMessage()
p.get_radio_request = True
# Show progress message for super slow operations
if self != self.iface.localNode:
print(&#34;Requesting preferences from remote node.&#34;)
print(&#34;Be sure:&#34;)
print(&#34; 1. There is a SECONDARY channel named &#39;admin&#39;.&#34;)
print(&#34; 2. The &#39;--seturl&#39; was used to configure.&#34;)
print(&#34; 3. All devices have the same modem config. (i.e., &#39;--ch-longfast&#39;)&#34;)
print(&#34; 4. All devices have been rebooted after all of the above. (optional, but recommended)&#34;)
print(&#34;Note: This could take a while (it requests remote channel configs, then writes config)&#34;)
return self._sendAdmin(p, wantResponse=True, onResponse=self.onResponseRequestSettings)</code></pre>
</details>
</dd>
<dt id="meshtastic.node.Node._sendAdmin"><code class="name flex">
<span>def <span class="ident">_sendAdmin</span></span>(<span>self, p: admin_pb2.AdminMessage, wantResponse=False, onResponse=None, adminIndex=0)</span>
</code></dt>
<dd>
<div class="desc"><p>Send an admin message to the specified node (or the local node if destNodeNum is zero)</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _sendAdmin(self, p: admin_pb2.AdminMessage, wantResponse=False,
onResponse=None, adminIndex=0):
&#34;&#34;&#34;Send an admin message to the specified node (or the local node if destNodeNum is zero)&#34;&#34;&#34;
if self.noProto:
logging.warning(f&#34;Not sending packet because protocol use is disabled by noProto&#34;)
else:
if adminIndex == 0: # unless a special channel index was used, we want to use the admin index
adminIndex = self.iface.localNode._getAdminChannelIndex()
logging.debug(f&#39;adminIndex:{adminIndex}&#39;)
return self.iface.sendData(p, self.nodeNum,
portNum=portnums_pb2.PortNum.ADMIN_APP,
wantAck=True,
wantResponse=wantResponse,
onResponse=onResponse,
channelIndex=adminIndex)</code></pre>
</details>
</dd>
<dt id="meshtastic.node.Node.deleteChannel"><code class="name flex">
<span>def <span class="ident">deleteChannel</span></span>(<span>self, channelIndex)</span>
</code></dt>
@@ -1248,6 +1391,12 @@ returns: None if there is no channel found</p></div>
<li>
<h4><code><a title="meshtastic.node.Node" href="#meshtastic.node.Node">Node</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.node.Node._fillChannels" href="#meshtastic.node.Node._fillChannels">_fillChannels</a></code></li>
<li><code><a title="meshtastic.node.Node._fixupChannels" href="#meshtastic.node.Node._fixupChannels">_fixupChannels</a></code></li>
<li><code><a title="meshtastic.node.Node._getAdminChannelIndex" href="#meshtastic.node.Node._getAdminChannelIndex">_getAdminChannelIndex</a></code></li>
<li><code><a title="meshtastic.node.Node._requestChannel" href="#meshtastic.node.Node._requestChannel">_requestChannel</a></code></li>
<li><code><a title="meshtastic.node.Node._requestSettings" href="#meshtastic.node.Node._requestSettings">_requestSettings</a></code></li>
<li><code><a title="meshtastic.node.Node._sendAdmin" href="#meshtastic.node.Node._sendAdmin">_sendAdmin</a></code></li>
<li><code><a title="meshtastic.node.Node.deleteChannel" href="#meshtastic.node.Node.deleteChannel">deleteChannel</a></code></li>
<li><code><a title="meshtastic.node.Node.exitSimulator" href="#meshtastic.node.Node.exitSimulator">exitSimulator</a></code></li>
<li><code><a title="meshtastic.node.Node.getChannelByChannelIndex" href="#meshtastic.node.Node.getChannelByChannelIndex">getChannelByChannelIndex</a></code></li>
@@ -1274,7 +1423,7 @@ returns: None if there is no channel found</p></div>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.portnums_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -184,7 +184,7 @@ DESCRIPTOR._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.radioconfig_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -1036,7 +1036,7 @@ DESCRIPTOR._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.remote_hardware API documentation</title>
<meta name="description" content="Remote hardware" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -220,6 +220,23 @@ code for how you can connect to your own custom meshtastic services</p>
</details>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.remote_hardware.RemoteHardwareClient._sendHardware"><code class="name flex">
<span>def <span class="ident">_sendHardware</span></span>(<span>self, nodeid, r, wantResponse=False, onResponse=None)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _sendHardware(self, nodeid, r, wantResponse=False, onResponse=None):
if not nodeid:
our_exit(r&#34;Warning: Must use a destination node ID for this operation (use --dest \!xxxxxxxxx)&#34;)
return self.iface.sendData(r, nodeid, portnums_pb2.REMOTE_HARDWARE_APP,
wantAck=True, channelIndex=self.channelIndex,
wantResponse=wantResponse, onResponse=onResponse)</code></pre>
</details>
</dd>
<dt id="meshtastic.remote_hardware.RemoteHardwareClient.readGPIOs"><code class="name flex">
<span>def <span class="ident">readGPIOs</span></span>(<span>self, nodeid, mask, onResponse=None)</span>
</code></dt>
@@ -307,6 +324,7 @@ are 1 will be changed</p></div>
<li>
<h4><code><a title="meshtastic.remote_hardware.RemoteHardwareClient" href="#meshtastic.remote_hardware.RemoteHardwareClient">RemoteHardwareClient</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.remote_hardware.RemoteHardwareClient._sendHardware" href="#meshtastic.remote_hardware.RemoteHardwareClient._sendHardware">_sendHardware</a></code></li>
<li><code><a title="meshtastic.remote_hardware.RemoteHardwareClient.readGPIOs" href="#meshtastic.remote_hardware.RemoteHardwareClient.readGPIOs">readGPIOs</a></code></li>
<li><code><a title="meshtastic.remote_hardware.RemoteHardwareClient.watchGPIOs" href="#meshtastic.remote_hardware.RemoteHardwareClient.watchGPIOs">watchGPIOs</a></code></li>
<li><code><a title="meshtastic.remote_hardware.RemoteHardwareClient.writeGPIOs" href="#meshtastic.remote_hardware.RemoteHardwareClient.writeGPIOs">writeGPIOs</a></code></li>
@@ -318,7 +336,7 @@ are 1 will be changed</p></div>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.remote_hardware_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -261,7 +261,7 @@ DESCRIPTOR._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.serial_interface API documentation</title>
<meta name="description" content="Serial interface class" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -202,10 +202,75 @@ debugOut {stream} &ndash; If a stream is provided, any debug serial output from
<li><a title="meshtastic.stream_interface.StreamInterface" href="stream_interface.html#meshtastic.stream_interface.StreamInterface">StreamInterface</a></li>
<li><a title="meshtastic.mesh_interface.MeshInterface" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface">MeshInterface</a></li>
</ul>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.serial_interface.SerialInterface._hostPlatformAlwaysDrivesUartRts"><code class="name flex">
<span>def <span class="ident">_hostPlatformAlwaysDrivesUartRts</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _hostPlatformAlwaysDrivesUartRts(self):
# OS-X/Windows seems to have a bug in its CP21xx serial drivers. It ignores that we asked for no RTSCTS
# control and will always drive RTS either high or low (rather than letting the CP102 leave
# it as an open-collector floating pin).
# TODO: When WSL2 supports USB passthrough, this will get messier. If/when WSL2 gets virtual serial
# ports that &#34;share&#34; the Windows serial port (and thus the Windows drivers), this code will need to be
# updated to reflect that as well -- or if T-Beams get made with an alternate USB to UART bridge that has
# a less buggy driver.
return platform.system() != &#39;Linux&#39; or self._isWsl1()</code></pre>
</details>
</dd>
<dt id="meshtastic.serial_interface.SerialInterface._isWsl1"><code class="name flex">
<span>def <span class="ident">_isWsl1</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _isWsl1(self):
# WSL1 identifies itself as Linux, but has a special char device at /dev/lxss for use with session control,
# e.g. /init. We should treat WSL1 as Windows for the RTS-driving hack because the underlying platfrom
# serial driver for the CP21xx still exhibits the buggy behavior.
# WSL2 is not covered here, as it does not (as of 2021-May-25) support the appropriate functionality to
# share or pass-through serial ports.
try:
# Claims to be Linux, but has /dev/lxss; must be WSL 1
return platform.system() == &#39;Linux&#39; and stat.S_ISCHR(os.stat(&#39;/dev/lxss&#39;).st_mode)
except:
# Couldn&#39;t stat /dev/lxss special device; not WSL1
return False</code></pre>
</details>
</dd>
</dl>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="meshtastic.stream_interface.StreamInterface" href="stream_interface.html#meshtastic.stream_interface.StreamInterface">StreamInterface</a></b></code>:
<ul class="hlist">
<li><code><a title="meshtastic.stream_interface.StreamInterface._StreamInterface__reader" href="stream_interface.html#meshtastic.stream_interface.StreamInterface._StreamInterface__reader">_StreamInterface__reader</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._connected" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._connected">_connected</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._disconnected" href="stream_interface.html#meshtastic.stream_interface.StreamInterface._disconnected">_disconnected</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._fixupPosition" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._fixupPosition">_fixupPosition</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._generatePacketId" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._generatePacketId">_generatePacketId</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._getOrCreateByNum" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._getOrCreateByNum">_getOrCreateByNum</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._handleConfigComplete" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handleConfigComplete">_handleConfigComplete</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._handleFromRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handleFromRadio">_handleFromRadio</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._handlePacketFromRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handlePacketFromRadio">_handlePacketFromRadio</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._nodeNumToId" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._nodeNumToId">_nodeNumToId</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._readBytes" href="stream_interface.html#meshtastic.stream_interface.StreamInterface._readBytes">_readBytes</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._sendDisconnect" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendDisconnect">_sendDisconnect</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._sendPacket" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendPacket">_sendPacket</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._sendToRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendToRadio">_sendToRadio</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._sendToRadioImpl" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendToRadioImpl">_sendToRadioImpl</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._startConfig" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._startConfig">_startConfig</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._startHeartbeat" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._startHeartbeat">_startHeartbeat</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._waitConnected" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._waitConnected">_waitConnected</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._writeBytes" href="stream_interface.html#meshtastic.stream_interface.StreamInterface._writeBytes">_writeBytes</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface.close" href="stream_interface.html#meshtastic.stream_interface.StreamInterface.close">close</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface.connect" href="stream_interface.html#meshtastic.stream_interface.StreamInterface.connect">connect</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface.getLongName" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface.getLongName">getLongName</a></code></li>
@@ -241,6 +306,10 @@ debugOut {stream} &ndash; If a stream is provided, any debug serial output from
<ul>
<li>
<h4><code><a title="meshtastic.serial_interface.SerialInterface" href="#meshtastic.serial_interface.SerialInterface">SerialInterface</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.serial_interface.SerialInterface._hostPlatformAlwaysDrivesUartRts" href="#meshtastic.serial_interface.SerialInterface._hostPlatformAlwaysDrivesUartRts">_hostPlatformAlwaysDrivesUartRts</a></code></li>
<li><code><a title="meshtastic.serial_interface.SerialInterface._isWsl1" href="#meshtastic.serial_interface.SerialInterface._isWsl1">_isWsl1</a></code></li>
</ul>
</li>
</ul>
</li>
@@ -248,7 +317,7 @@ debugOut {stream} &ndash; If a stream is provided, any debug serial output from
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.storeforward_pb2 API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -459,7 +459,7 @@ DESCRIPTOR._options = None
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.stream_interface API documentation</title>
<meta name="description" content="Stream Interface base class" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -410,6 +410,133 @@ device will be emitted to that stream. (default: {None})</p>
</ul>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.stream_interface.StreamInterface._StreamInterface__reader"><code class="name flex">
<span>def <span class="ident">_StreamInterface__reader</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>The reader thread that reads bytes from our stream</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def __reader(self):
&#34;&#34;&#34;The reader thread that reads bytes from our stream&#34;&#34;&#34;
logging.debug(&#39;in __reader()&#39;)
empty = bytes()
try:
while not self._wantExit:
logging.debug(&#34;reading character&#34;)
b = self._readBytes(1)
logging.debug(&#34;In reader loop&#34;)
#logging.debug(f&#34;read returned {b}&#34;)
if len(b) &gt; 0:
c = b[0]
#logging.debug(f&#39;c:{c}&#39;)
ptr = len(self._rxBuf)
# Assume we want to append this byte, fixme use bytearray instead
self._rxBuf = self._rxBuf + b
if ptr == 0: # looking for START1
if c != START1:
self._rxBuf = empty # failed to find start
if self.debugOut is not None:
try:
self.debugOut.write(b.decode(&#34;utf-8&#34;))
except:
self.debugOut.write(&#39;?&#39;)
elif ptr == 1: # looking for START2
if c != START2:
self._rxBuf = empty # failed to find start2
elif ptr &gt;= HEADER_LEN - 1: # we&#39;ve at least got a header
#logging.debug(&#39;at least we received a header&#39;)
# big endian length follows header
packetlen = (self._rxBuf[2] &lt;&lt; 8) + self._rxBuf[3]
if ptr == HEADER_LEN - 1: # we _just_ finished reading the header, validate length
if packetlen &gt; MAX_TO_FROM_RADIO_SIZE:
self._rxBuf = empty # length was out out bounds, restart
if len(self._rxBuf) != 0 and ptr + 1 &gt;= packetlen + HEADER_LEN:
try:
self._handleFromRadio(self._rxBuf[HEADER_LEN:])
except Exception as ex:
logging.error(f&#34;Error while handling message from radio {ex}&#34;)
traceback.print_exc()
self._rxBuf = empty
else:
# logging.debug(f&#34;timeout&#34;)
pass
except serial.SerialException as ex:
if not self._wantExit: # We might intentionally get an exception during shutdown
logging.warning(f&#34;Meshtastic serial port disconnected, disconnecting... {ex}&#34;)
except OSError as ex:
if not self._wantExit: # We might intentionally get an exception during shutdown
logging.error(f&#34;Unexpected OSError, terminating meshtastic reader... {ex}&#34;)
except Exception as ex:
logging.error(f&#34;Unexpected exception, terminating meshtastic reader... {ex}&#34;)
finally:
logging.debug(&#34;reader is exiting&#34;)
self._disconnected()</code></pre>
</details>
</dd>
<dt id="meshtastic.stream_interface.StreamInterface._disconnected"><code class="name flex">
<span>def <span class="ident">_disconnected</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>We override the superclass implementation to close our port</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _disconnected(self):
&#34;&#34;&#34;We override the superclass implementation to close our port&#34;&#34;&#34;
MeshInterface._disconnected(self)
logging.debug(&#34;Closing our port&#34;)
# pylint: disable=E0203
if not self.stream is None:
# pylint: disable=E0203
self.stream.close()
# pylint: disable=W0201
self.stream = None</code></pre>
</details>
</dd>
<dt id="meshtastic.stream_interface.StreamInterface._readBytes"><code class="name flex">
<span>def <span class="ident">_readBytes</span></span>(<span>self, length)</span>
</code></dt>
<dd>
<div class="desc"><p>Read an array of bytes from our stream</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _readBytes(self, length):
&#34;&#34;&#34;Read an array of bytes from our stream&#34;&#34;&#34;
if self.stream:
return self.stream.read(length)
else:
return None</code></pre>
</details>
</dd>
<dt id="meshtastic.stream_interface.StreamInterface._writeBytes"><code class="name flex">
<span>def <span class="ident">_writeBytes</span></span>(<span>self, b)</span>
</code></dt>
<dd>
<div class="desc"><p>Write an array of bytes to our stream and flush</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _writeBytes(self, b):
&#34;&#34;&#34;Write an array of bytes to our stream and flush&#34;&#34;&#34;
if self.stream: # ignore writes when stream is closed
self.stream.write(b)
self.stream.flush()</code></pre>
</details>
</dd>
<dt id="meshtastic.stream_interface.StreamInterface.close"><code class="name flex">
<span>def <span class="ident">close</span></span>(<span>self)</span>
</code></dt>
@@ -469,6 +596,21 @@ passed in connectNow=False you can manually start the reading thread later.</p><
<ul class="hlist">
<li><code><b><a title="meshtastic.mesh_interface.MeshInterface" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface">MeshInterface</a></b></code>:
<ul class="hlist">
<li><code><a title="meshtastic.mesh_interface.MeshInterface._connected" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._connected">_connected</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._fixupPosition" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._fixupPosition">_fixupPosition</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._generatePacketId" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._generatePacketId">_generatePacketId</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._getOrCreateByNum" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._getOrCreateByNum">_getOrCreateByNum</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._handleConfigComplete" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handleConfigComplete">_handleConfigComplete</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._handleFromRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handleFromRadio">_handleFromRadio</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._handlePacketFromRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handlePacketFromRadio">_handlePacketFromRadio</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._nodeNumToId" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._nodeNumToId">_nodeNumToId</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendDisconnect" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendDisconnect">_sendDisconnect</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendPacket" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendPacket">_sendPacket</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendToRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendToRadio">_sendToRadio</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._sendToRadioImpl" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendToRadioImpl">_sendToRadioImpl</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._startConfig" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._startConfig">_startConfig</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._startHeartbeat" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._startHeartbeat">_startHeartbeat</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface._waitConnected" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._waitConnected">_waitConnected</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface.getLongName" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface.getLongName">getLongName</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface.getMyNodeInfo" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface.getMyNodeInfo">getMyNodeInfo</a></code></li>
<li><code><a title="meshtastic.mesh_interface.MeshInterface.getMyUser" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface.getMyUser">getMyUser</a></code></li>
@@ -503,6 +645,10 @@ passed in connectNow=False you can manually start the reading thread later.</p><
<li>
<h4><code><a title="meshtastic.stream_interface.StreamInterface" href="#meshtastic.stream_interface.StreamInterface">StreamInterface</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.stream_interface.StreamInterface._StreamInterface__reader" href="#meshtastic.stream_interface.StreamInterface._StreamInterface__reader">_StreamInterface__reader</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._disconnected" href="#meshtastic.stream_interface.StreamInterface._disconnected">_disconnected</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._readBytes" href="#meshtastic.stream_interface.StreamInterface._readBytes">_readBytes</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._writeBytes" href="#meshtastic.stream_interface.StreamInterface._writeBytes">_writeBytes</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface.close" href="#meshtastic.stream_interface.StreamInterface.close">close</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface.connect" href="#meshtastic.stream_interface.StreamInterface.connect">connect</a></code></li>
</ul>
@@ -513,7 +659,7 @@ passed in connectNow=False you can manually start the reading thread later.</p><
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tcp_interface API documentation</title>
<meta name="description" content="TCPInterface class for interfacing with http endpoint" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -200,6 +200,25 @@ hostname {string} &ndash; Hostname/IP address of the device to connect to</p></d
<ul class="hlist">
<li><code><b><a title="meshtastic.stream_interface.StreamInterface" href="stream_interface.html#meshtastic.stream_interface.StreamInterface">StreamInterface</a></b></code>:
<ul class="hlist">
<li><code><a title="meshtastic.stream_interface.StreamInterface._StreamInterface__reader" href="stream_interface.html#meshtastic.stream_interface.StreamInterface._StreamInterface__reader">_StreamInterface__reader</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._connected" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._connected">_connected</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._disconnected" href="stream_interface.html#meshtastic.stream_interface.StreamInterface._disconnected">_disconnected</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._fixupPosition" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._fixupPosition">_fixupPosition</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._generatePacketId" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._generatePacketId">_generatePacketId</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._getOrCreateByNum" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._getOrCreateByNum">_getOrCreateByNum</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._handleConfigComplete" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handleConfigComplete">_handleConfigComplete</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._handleFromRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handleFromRadio">_handleFromRadio</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._handlePacketFromRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._handlePacketFromRadio">_handlePacketFromRadio</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._nodeNumToId" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._nodeNumToId">_nodeNumToId</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._readBytes" href="stream_interface.html#meshtastic.stream_interface.StreamInterface._readBytes">_readBytes</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._sendDisconnect" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendDisconnect">_sendDisconnect</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._sendPacket" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendPacket">_sendPacket</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._sendToRadio" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendToRadio">_sendToRadio</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._sendToRadioImpl" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._sendToRadioImpl">_sendToRadioImpl</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._startConfig" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._startConfig">_startConfig</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._startHeartbeat" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._startHeartbeat">_startHeartbeat</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._waitConnected" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface._waitConnected">_waitConnected</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface._writeBytes" href="stream_interface.html#meshtastic.stream_interface.StreamInterface._writeBytes">_writeBytes</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface.close" href="stream_interface.html#meshtastic.stream_interface.StreamInterface.close">close</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface.connect" href="stream_interface.html#meshtastic.stream_interface.StreamInterface.connect">connect</a></code></li>
<li><code><a title="meshtastic.stream_interface.StreamInterface.getLongName" href="mesh_interface.html#meshtastic.mesh_interface.MeshInterface.getLongName">getLongName</a></code></li>
@@ -245,7 +264,7 @@ hostname {string} &ndash; Hostname/IP address of the device to connect to</p></d
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.test API documentation</title>
<meta name="description" content="With two radios connected serially, send and receive test
messages and report back if successful." />
@@ -538,7 +538,7 @@ python3 -c 'from meshtastic.test import testSimulator; testSimulator()'</p></div
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.conftest API documentation</title>
<meta name="description" content="Common pytest code (place for fixtures)." />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -193,7 +193,7 @@ def reset_globals():
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -136,7 +136,7 @@ If not, you need to run: …</p></div>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_ble_interface API documentation</title>
<meta name="description" content="Meshtastic unit tests for ble_interface.py" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -89,7 +89,7 @@ def test_BLEInterface():
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_examples API documentation</title>
<meta name="description" content="Meshtastic test that the examples run as expected.
We assume you have a python virtual environment in current directory.
@@ -126,7 +126,7 @@ def test_examples_hello_world_serial_with_arg(capsys):
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_globals API documentation</title>
<meta name="description" content="Meshtastic unit tests for globals.py" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -124,7 +124,7 @@ def test_globals_there_can_be_only_one():
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_int API documentation</title>
<meta name="description" content="Meshtastic integration tests" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -171,7 +171,7 @@ def test_int_version():
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_main API documentation</title>
<meta name="description" content="Meshtastic unit tests for __main__.py" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -3981,7 +3981,7 @@ def test_main_test_two_ports_success(patched_find_ports, patched_test_all, reset
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_mesh_interface API documentation</title>
<meta name="description" content="Meshtastic unit tests for mesh_interface.py" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -1284,7 +1284,7 @@ def test_sendPosition_with_a_position(caplog, reset_globals):
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_node API documentation</title>
<meta name="description" content="Meshtastic unit tests for node.py" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -2266,7 +2266,7 @@ def test_writeConfig_with_no_radioConfig(capsys):
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_remote_hardware API documentation</title>
<meta name="description" content="Meshtastic unit tests for remote_hardware.py" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -298,7 +298,7 @@ def test_writeGPIOs(caplog):
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_serial_interface API documentation</title>
<meta name="description" content="Meshtastic unit tests for serial_interface.py" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -180,7 +180,7 @@ def test_SerialInterface_single_port(mocked_findPorts, mocked_serial):
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_smoke1 API documentation</title>
<meta name="description" content="Meshtastic smoke tests with a single device via USB" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -1816,7 +1816,7 @@ def test_smoke1_test_with_arg_but_no_hardware():
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_smoke2 API documentation</title>
<meta name="description" content="Meshtastic smoke tests with 2 devices connected via USB" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -121,7 +121,7 @@ def test_smoke2_test():
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_smoke_wifi API documentation</title>
<meta name="description" content="Meshtastic smoke tests a device setup with wifi …" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -109,7 +109,7 @@ def test_smokewifi_info():
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_stream_interface API documentation</title>
<meta name="description" content="Meshtastic unit tests for stream_interface.py" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -240,7 +240,7 @@ def test_sendToRadioImpl(caplog, reset_globals):
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_tcp_interface API documentation</title>
<meta name="description" content="Meshtastic unit tests for tcp_interface.py" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -114,7 +114,7 @@ def test_TCPInterface(capsys):
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tests.test_util API documentation</title>
<meta name="description" content="Meshtastic unit tests for util.py" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -513,7 +513,7 @@ def test_support_info(capsys):
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.tunnel API documentation</title>
<meta name="description" content="Code for IP tunnel over a mesh …" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -492,6 +492,118 @@ subnet is used to construct our network number (normally 10.115.x.x)</p></div>
</details>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.tunnel.Tunnel._Tunnel__tunReader"><code class="name flex">
<span>def <span class="ident">_Tunnel__tunReader</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def __tunReader(self):
tap = self.tun
logging.debug(&#34;TUN reader running&#34;)
while True:
p = tap.read()
#logging.debug(f&#34;IP packet received on TUN interface, type={type(p)}&#34;)
destAddr = p[16:20]
if not self._shouldFilterPacket(p):
self.sendPacket(destAddr, p)</code></pre>
</details>
</dd>
<dt id="meshtastic.tunnel.Tunnel._ipToNodeId"><code class="name flex">
<span>def <span class="ident">_ipToNodeId</span></span>(<span>self, ipAddr)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _ipToNodeId(self, ipAddr):
# We only consider the last 16 bits of the nodenum for IP address matching
ipBits = ipAddr[2] * 256 + ipAddr[3]
if ipBits == 0xffff:
return &#34;^all&#34;
for node in self.iface.nodes.values():
nodeNum = node[&#34;num&#34;] &amp; 0xffff
# logging.debug(f&#34;Considering nodenum 0x{nodeNum:x} for ipBits 0x{ipBits:x}&#34;)
if (nodeNum) == ipBits:
return node[&#34;user&#34;][&#34;id&#34;]
return None</code></pre>
</details>
</dd>
<dt id="meshtastic.tunnel.Tunnel._nodeNumToIp"><code class="name flex">
<span>def <span class="ident">_nodeNumToIp</span></span>(<span>self, nodeNum)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _nodeNumToIp(self, nodeNum):
return f&#34;{self.subnetPrefix}.{(nodeNum &gt;&gt; 8) &amp; 0xff}.{nodeNum &amp; 0xff}&#34;</code></pre>
</details>
</dd>
<dt id="meshtastic.tunnel.Tunnel._shouldFilterPacket"><code class="name flex">
<span>def <span class="ident">_shouldFilterPacket</span></span>(<span>self, p)</span>
</code></dt>
<dd>
<div class="desc"><p>Given a packet, decode it and return true if it should be ignored</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _shouldFilterPacket(self, p):
&#34;&#34;&#34;Given a packet, decode it and return true if it should be ignored&#34;&#34;&#34;
protocol = p[8 + 1]
srcaddr = p[12:16]
destAddr = p[16:20]
subheader = 20
ignore = False # Assume we will be forwarding the packet
if protocol in protocolBlacklist:
ignore = True
logging.log(
LOG_TRACE, f&#34;Ignoring blacklisted protocol 0x{protocol:02x}&#34;)
elif protocol == 0x01: # ICMP
icmpType = p[20]
icmpCode = p[21]
checksum = p[22:24]
# pylint: disable=line-too-long
logging.debug(f&#34;forwarding ICMP message src={ipstr(srcaddr)}, dest={ipstr(destAddr)}, type={icmpType}, code={icmpCode}, checksum={checksum}&#34;)
# reply to pings (swap src and dest but keep rest of packet unchanged)
#pingback = p[:12]+p[16:20]+p[12:16]+p[20:]
# tap.write(pingback)
elif protocol == 0x11: # UDP
srcport = readnet_u16(p, subheader)
destport = readnet_u16(p, subheader + 2)
if destport in udpBlacklist:
ignore = True
logging.log(
LOG_TRACE, f&#34;ignoring blacklisted UDP port {destport}&#34;)
else:
logging.debug(
f&#34;forwarding udp srcport={srcport}, destport={destport}&#34;)
elif protocol == 0x06: # TCP
srcport = readnet_u16(p, subheader)
destport = readnet_u16(p, subheader + 2)
if destport in tcpBlacklist:
ignore = True
logging.log(LOG_TRACE, f&#34;ignoring blacklisted TCP port {destport}&#34;)
else:
logging.debug(f&#34;forwarding tcp srcport={srcport}, destport={destport}&#34;)
else:
logging.warning(f&#34;forwarding unexpected protocol 0x{protocol:02x}, &#34;\
&#34;src={ipstr(srcaddr)}, dest={ipstr(destAddr)}&#34;)
return ignore</code></pre>
</details>
</dd>
<dt id="meshtastic.tunnel.Tunnel.close"><code class="name flex">
<span>def <span class="ident">close</span></span>(<span>self)</span>
</code></dt>
@@ -597,7 +709,11 @@ subnet is used to construct our network number (normally 10.115.x.x)</p></div>
<ul>
<li>
<h4><code><a title="meshtastic.tunnel.Tunnel" href="#meshtastic.tunnel.Tunnel">Tunnel</a></code></h4>
<ul class="">
<ul class="two-column">
<li><code><a title="meshtastic.tunnel.Tunnel._Tunnel__tunReader" href="#meshtastic.tunnel.Tunnel._Tunnel__tunReader">_Tunnel__tunReader</a></code></li>
<li><code><a title="meshtastic.tunnel.Tunnel._ipToNodeId" href="#meshtastic.tunnel.Tunnel._ipToNodeId">_ipToNodeId</a></code></li>
<li><code><a title="meshtastic.tunnel.Tunnel._nodeNumToIp" href="#meshtastic.tunnel.Tunnel._nodeNumToIp">_nodeNumToIp</a></code></li>
<li><code><a title="meshtastic.tunnel.Tunnel._shouldFilterPacket" href="#meshtastic.tunnel.Tunnel._shouldFilterPacket">_shouldFilterPacket</a></code></li>
<li><code><a title="meshtastic.tunnel.Tunnel.close" href="#meshtastic.tunnel.Tunnel.close">close</a></code></li>
<li><code><a title="meshtastic.tunnel.Tunnel.onReceive" href="#meshtastic.tunnel.Tunnel.onReceive">onReceive</a></code></li>
<li><code><a title="meshtastic.tunnel.Tunnel.sendPacket" href="#meshtastic.tunnel.Tunnel.sendPacket">sendPacket</a></code></li>
@@ -609,7 +725,7 @@ subnet is used to construct our network number (normally 10.115.x.x)</p></div>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<meta name="generator" content="pdoc 0.10.1.dev1+g4aa70de.d20211229" />
<title>meshtastic.util API documentation</title>
<meta name="description" content="Utility functions." />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -525,6 +525,26 @@ given a string that contains ": true", replace with ": 'true'" (or false)</p></d
</details>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.util.DeferredExecution._run"><code class="name flex">
<span>def <span class="ident">_run</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def _run(self):
while True:
try:
o = self.queue.get()
o()
except:
logging.error(
f&#34;Unexpected error in deferred execution {sys.exc_info()[0]}&#34;)
print(traceback.format_exc())</code></pre>
</details>
</dd>
<dt id="meshtastic.util.DeferredExecution.queueWork"><code class="name flex">
<span>def <span class="ident">queueWork</span></span>(<span>self, runnable)</span>
</code></dt>
@@ -663,6 +683,7 @@ given a string that contains ": true", replace with ": 'true'" (or false)</p></d
<li>
<h4><code><a title="meshtastic.util.DeferredExecution" href="#meshtastic.util.DeferredExecution">DeferredExecution</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.util.DeferredExecution._run" href="#meshtastic.util.DeferredExecution._run">_run</a></code></li>
<li><code><a title="meshtastic.util.DeferredExecution.queueWork" href="#meshtastic.util.DeferredExecution.queueWork">queueWork</a></code></li>
</ul>
</li>
@@ -682,7 +703,7 @@ given a string that contains ": true", replace with ": 'true'" (or false)</p></d
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.1.dev1+g4aa70de.d20211229</a>.</p>
</footer>
</body>
</html>