regen docs

This commit is contained in:
geeksville
2020-05-03 20:14:35 -07:00
parent dbbf14c4bf
commit 53889e045c
4 changed files with 794 additions and 71 deletions

View File

@@ -32,7 +32,7 @@ the device.</li>
Includes always up-to-date location and username information for each
node in the mesh.
This is a read-only datastructure.</li>
<li>myNodeInfo - You probably don't want this.</li>
<li>myNodeInfo - Contains read-only information about the local radio device (software version, hardware version, etc)</li>
</ul>
<h2 id="published-pubsub-topics">Published PubSub topics</h2>
<p>We use a <a href="https://pypubsub.readthedocs.io/en/v4.0.3/">publish-subscribe</a> model to communicate asynchronous events.
@@ -80,7 +80,7 @@ properties of StreamInterface:
the device.
- nodes - The database of received nodes. Includes always up-to-date location and username information for each
node in the mesh. This is a read-only datastructure.
- myNodeInfo - You probably don&#39;t want this.
- myNodeInfo - Contains read-only information about the local radio device (software version, hardware version, etc)
## Published PubSub topics
@@ -116,13 +116,14 @@ interface = meshtastic.StreamInterface() # By default will try to find a meshtas
import google.protobuf.json_format
import serial
import serial.tools.list_ports
import threading
import logging
import sys
import traceback
from . import mesh_pb2
from . import util
from pubsub import pub
from dotmap import DotMap
START1 = 0x94
START2 = 0xc3
@@ -130,19 +131,26 @@ HEADER_LEN = 4
MAX_TO_FROM_RADIO_SIZE = 512
BROADCAST_ADDR = &#34;all&#34; # A special ID that means broadcast
BROADCAST_NUM = 255
MY_CONFIG_ID = 42
class MeshInterface:
&#34;&#34;&#34;Interface class for meshtastic devices
Properties:
isConnected
nodes
debugOut
&#34;&#34;&#34;
def __init__(self, debugOut=None):
&#34;&#34;&#34;Constructor&#34;&#34;&#34;
self.debugOut = debugOut
self.nodes = None # FIXME
self.isConnected = False
self._startConfig()
def sendText(self, text, destinationId=BROADCAST_ADDR):
@@ -152,7 +160,7 @@ class MeshInterface:
text {string} -- The text to send
Keyword Arguments:
destinationId {nodeId} -- where to send this message (default: {BROADCAST_ADDR})
destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR})
&#34;&#34;&#34;
self.sendData(text.encode(&#34;utf-8&#34;), destinationId,
dataType=mesh_pb2.Data.CLEAR_TEXT)
@@ -169,13 +177,38 @@ class MeshInterface:
You probably don&#39;t want this - use sendData instead.&#34;&#34;&#34;
toRadio = mesh_pb2.ToRadio()
# FIXME add support for non broadcast addresses
meshPacket.to = 255
if isinstance(destinationId, int):
nodeNum = destinationId
elif nodeNum == BROADCAST_ADDR:
nodeNum = 255
else:
raise Exception(
&#34;invalid destination addr, we don&#39;t yet support nodeid lookup&#34;)
meshPacket.to = nodeNum
toRadio.packet.CopyFrom(meshPacket)
self._sendToRadio(toRadio)
def writeConfig(self):
&#34;&#34;&#34;Write the current (edited) radioConfig to the device&#34;&#34;&#34;
if self.radioConfig == None:
raise Exception(&#34;No RadioConfig has been read&#34;)
t = mesh_pb2.ToRadio()
t.set_radio.CopyFrom(self.radioConfig)
self._sendToRadio(t)
def _disconnected(self):
&#34;&#34;&#34;Called by subclasses to tell clients this interface has disconnected&#34;&#34;&#34;
pub.sendMessage(&#34;meshtastic.connection.lost&#34;)
self.isConnected = False
pub.sendMessage(&#34;meshtastic.connection.lost&#34;, interface=self)
def _connected(self):
&#34;&#34;&#34;Called by this class to tell clients we are now fully connected to a node
&#34;&#34;&#34;
self.isConnected = True
pub.sendMessage(&#34;meshtastic.connection.established&#34;, interface=self)
def _startConfig(self):
&#34;&#34;&#34;Start device packets flowing&#34;&#34;&#34;
@@ -211,12 +244,25 @@ class MeshInterface:
self.nodes[node.user.id] = node
elif fromRadio.config_complete_id == MY_CONFIG_ID:
# we ignore the config_complete_id, it is unneeded for our stream API fromRadio.config_complete_id
pub.sendMessage(&#34;meshtastic.connection.established&#34;)
self._connected()
elif fromRadio.HasField(&#34;packet&#34;):
self._handlePacketFromRadio(fromRadio.packet)
elif fromRadio.rebooted:
self._disconnected()
self._startConfig() # redownload the node db etc...
else:
logging.warn(&#34;Unexpected FromRadio payload&#34;)
def _nodeNumToId(self, num):
if num == BROADCAST_NUM:
return BROADCAST_ADDR
try:
return self._nodesByNum[num].user.id
except:
logging.error(&#34;Node not found for fromId&#34;)
return None
def _handlePacketFromRadio(self, meshPacket):
&#34;&#34;&#34;Handle a MeshPacket that just arrived from the radio
@@ -225,16 +271,29 @@ class MeshInterface:
- meshtastic.receive.user(packet = MeshPacket dictionary)
- meshtastic.receive.data(packet = MeshPacket dictionary)
&#34;&#34;&#34;
# FIXME, update node DB as needed
json = google.protobuf.json_format.MessageToDict(meshPacket)
asDict = google.protobuf.json_format.MessageToDict(meshPacket)
# /add fromId and toId fields based on the node ID
asDict[&#34;fromId&#34;] = self._nodeNumToId(asDict[&#34;from&#34;])
asDict[&#34;toId&#34;] = self._nodeNumToId(asDict[&#34;to&#34;])
# We could provide our objects as DotMaps - which work with . notation or as dictionaries
#asObj = DotMap(asDict)
topic = None
if meshPacket.payload.HasField(&#34;position&#34;):
pub.sendMessage(&#34;meshtastic.receive.position&#34;, packet=json)
topic = &#34;meshtastic.receive.position&#34;
# FIXME, update node DB as needed
if meshPacket.payload.HasField(&#34;user&#34;):
pub.sendMessage(&#34;meshtastic.receive.user&#34;,
packet=json)
topic = &#34;meshtastic.receive.user&#34;
# FIXME, update node DB as needed
if meshPacket.payload.HasField(&#34;data&#34;):
pub.sendMessage(&#34;meshtastic.receive.data&#34;,
packet=json)
topic = &#34;meshtastic.receive.data&#34;
# For text messages, we go ahead and decode the text to ascii for our users
# if asObj.payload.data.typ == &#34;CLEAR_TEXT&#34;:
# asObj.payload.data.text = asObj.payload.data.payload.decode(
# &#34;utf-8&#34;)
pub.sendMessage(topic, packet=asDict, interface=self)
class StreamInterface(MeshInterface):
@@ -254,17 +313,17 @@ class StreamInterface(MeshInterface):
&#34;&#34;&#34;
if devPath is None:
ports = list(filter(lambda port: port.vid != None,
serial.tools.list_ports.comports()))
ports = util.findPorts()
if len(ports) == 0:
raise Exception(&#34;No Meshtastic devices detected&#34;)
elif len(ports) &gt; 1:
raise Exception(
f&#34;Multiple ports detected, you must specify a device, such as {ports[0].device}&#34;)
else:
devPath = ports[0].device
devPath = ports[0]
logging.debug(f&#34;Connecting to {devPath}&#34;)
self.devPath = devPath
self._rxBuf = bytes() # empty
self._wantExit = False
self.stream = serial.Serial(
@@ -288,6 +347,8 @@ class StreamInterface(MeshInterface):
logging.debug(&#34;Closing serial stream&#34;)
# pyserial cancel_read doesn&#39;t seem to work, therefore we ask the reader thread to close things for us
self._wantExit = True
if self._rxThread != threading.current_thread():
self._rxThread.join() # wait for it to exit
def __reader(self):
&#34;&#34;&#34;The reader thread that reads bytes from our stream&#34;&#34;&#34;
@@ -327,10 +388,13 @@ class StreamInterface(MeshInterface):
try:
self._handleFromRadio(self._rxBuf[HEADER_LEN:])
except Exception as ex:
logging.warn(
logging.error(
f&#34;Error handling FromRadio, possibly corrupted? {ex}&#34;)
traceback.print_exc()
self._rxBuf = empty
else:
# logging.debug(f&#34;timeout on {self.devPath}&#34;)
pass
logging.debug(&#34;reader is exiting&#34;)
self.stream.close()
self._disconnected()</code></pre>
@@ -343,6 +407,14 @@ class StreamInterface(MeshInterface):
<dd>
<div class="desc"></div>
</dd>
<dt><code class="name"><a title="meshtastic.test" href="test.html">meshtastic.test</a></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt><code class="name"><a title="meshtastic.util" href="util.html">meshtastic.util</a></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
</section>
<section>
@@ -358,6 +430,10 @@ class StreamInterface(MeshInterface):
</code></dt>
<dd>
<div class="desc"><p>Interface class for meshtastic devices</p>
<p>Properties:</p>
<p>isConnected
nodes
debugOut</p>
<p>Constructor</p></div>
<details class="source">
<summary>
@@ -365,12 +441,19 @@ class StreamInterface(MeshInterface):
</summary>
<pre><code class="python">class MeshInterface:
&#34;&#34;&#34;Interface class for meshtastic devices
Properties:
isConnected
nodes
debugOut
&#34;&#34;&#34;
def __init__(self, debugOut=None):
&#34;&#34;&#34;Constructor&#34;&#34;&#34;
self.debugOut = debugOut
self.nodes = None # FIXME
self.isConnected = False
self._startConfig()
def sendText(self, text, destinationId=BROADCAST_ADDR):
@@ -380,7 +463,7 @@ class StreamInterface(MeshInterface):
text {string} -- The text to send
Keyword Arguments:
destinationId {nodeId} -- where to send this message (default: {BROADCAST_ADDR})
destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR})
&#34;&#34;&#34;
self.sendData(text.encode(&#34;utf-8&#34;), destinationId,
dataType=mesh_pb2.Data.CLEAR_TEXT)
@@ -397,13 +480,38 @@ class StreamInterface(MeshInterface):
You probably don&#39;t want this - use sendData instead.&#34;&#34;&#34;
toRadio = mesh_pb2.ToRadio()
# FIXME add support for non broadcast addresses
meshPacket.to = 255
if isinstance(destinationId, int):
nodeNum = destinationId
elif nodeNum == BROADCAST_ADDR:
nodeNum = 255
else:
raise Exception(
&#34;invalid destination addr, we don&#39;t yet support nodeid lookup&#34;)
meshPacket.to = nodeNum
toRadio.packet.CopyFrom(meshPacket)
self._sendToRadio(toRadio)
def writeConfig(self):
&#34;&#34;&#34;Write the current (edited) radioConfig to the device&#34;&#34;&#34;
if self.radioConfig == None:
raise Exception(&#34;No RadioConfig has been read&#34;)
t = mesh_pb2.ToRadio()
t.set_radio.CopyFrom(self.radioConfig)
self._sendToRadio(t)
def _disconnected(self):
&#34;&#34;&#34;Called by subclasses to tell clients this interface has disconnected&#34;&#34;&#34;
pub.sendMessage(&#34;meshtastic.connection.lost&#34;)
self.isConnected = False
pub.sendMessage(&#34;meshtastic.connection.lost&#34;, interface=self)
def _connected(self):
&#34;&#34;&#34;Called by this class to tell clients we are now fully connected to a node
&#34;&#34;&#34;
self.isConnected = True
pub.sendMessage(&#34;meshtastic.connection.established&#34;, interface=self)
def _startConfig(self):
&#34;&#34;&#34;Start device packets flowing&#34;&#34;&#34;
@@ -439,12 +547,25 @@ class StreamInterface(MeshInterface):
self.nodes[node.user.id] = node
elif fromRadio.config_complete_id == MY_CONFIG_ID:
# we ignore the config_complete_id, it is unneeded for our stream API fromRadio.config_complete_id
pub.sendMessage(&#34;meshtastic.connection.established&#34;)
self._connected()
elif fromRadio.HasField(&#34;packet&#34;):
self._handlePacketFromRadio(fromRadio.packet)
elif fromRadio.rebooted:
self._disconnected()
self._startConfig() # redownload the node db etc...
else:
logging.warn(&#34;Unexpected FromRadio payload&#34;)
def _nodeNumToId(self, num):
if num == BROADCAST_NUM:
return BROADCAST_ADDR
try:
return self._nodesByNum[num].user.id
except:
logging.error(&#34;Node not found for fromId&#34;)
return None
def _handlePacketFromRadio(self, meshPacket):
&#34;&#34;&#34;Handle a MeshPacket that just arrived from the radio
@@ -453,16 +574,29 @@ class StreamInterface(MeshInterface):
- meshtastic.receive.user(packet = MeshPacket dictionary)
- meshtastic.receive.data(packet = MeshPacket dictionary)
&#34;&#34;&#34;
# FIXME, update node DB as needed
json = google.protobuf.json_format.MessageToDict(meshPacket)
asDict = google.protobuf.json_format.MessageToDict(meshPacket)
# /add fromId and toId fields based on the node ID
asDict[&#34;fromId&#34;] = self._nodeNumToId(asDict[&#34;from&#34;])
asDict[&#34;toId&#34;] = self._nodeNumToId(asDict[&#34;to&#34;])
# We could provide our objects as DotMaps - which work with . notation or as dictionaries
#asObj = DotMap(asDict)
topic = None
if meshPacket.payload.HasField(&#34;position&#34;):
pub.sendMessage(&#34;meshtastic.receive.position&#34;, packet=json)
topic = &#34;meshtastic.receive.position&#34;
# FIXME, update node DB as needed
if meshPacket.payload.HasField(&#34;user&#34;):
pub.sendMessage(&#34;meshtastic.receive.user&#34;,
packet=json)
topic = &#34;meshtastic.receive.user&#34;
# FIXME, update node DB as needed
if meshPacket.payload.HasField(&#34;data&#34;):
pub.sendMessage(&#34;meshtastic.receive.data&#34;,
packet=json)</code></pre>
topic = &#34;meshtastic.receive.data&#34;
# For text messages, we go ahead and decode the text to ascii for our users
# if asObj.payload.data.typ == &#34;CLEAR_TEXT&#34;:
# asObj.payload.data.text = asObj.payload.data.payload.decode(
# &#34;utf-8&#34;)
pub.sendMessage(topic, packet=asDict, interface=self)</code></pre>
</details>
<h3>Subclasses</h3>
<ul class="hlist">
@@ -502,7 +636,16 @@ You probably don't want this - use sendData instead.</p></div>
You probably don&#39;t want this - use sendData instead.&#34;&#34;&#34;
toRadio = mesh_pb2.ToRadio()
# FIXME add support for non broadcast addresses
meshPacket.to = 255
if isinstance(destinationId, int):
nodeNum = destinationId
elif nodeNum == BROADCAST_ADDR:
nodeNum = 255
else:
raise Exception(
&#34;invalid destination addr, we don&#39;t yet support nodeid lookup&#34;)
meshPacket.to = nodeNum
toRadio.packet.CopyFrom(meshPacket)
self._sendToRadio(toRadio)</code></pre>
</details>
@@ -515,7 +658,7 @@ You probably don't want this - use sendData instead.</p></div>
<h2 id="arguments">Arguments</h2>
<p>text {string} &ndash; The text to send</p>
<p>Keyword Arguments:
destinationId {nodeId} &ndash; where to send this message (default: {BROADCAST_ADDR})</p></div>
destinationId {nodeId or nodeNum} &ndash; where to send this message (default: {BROADCAST_ADDR})</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
@@ -527,12 +670,31 @@ destinationId {nodeId} &ndash; where to send this message (default: {BROADCAST_A
text {string} -- The text to send
Keyword Arguments:
destinationId {nodeId} -- where to send this message (default: {BROADCAST_ADDR})
destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR})
&#34;&#34;&#34;
self.sendData(text.encode(&#34;utf-8&#34;), destinationId,
dataType=mesh_pb2.Data.CLEAR_TEXT)</code></pre>
</details>
</dd>
<dt id="meshtastic.MeshInterface.writeConfig"><code class="name flex">
<span>def <span class="ident">writeConfig</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Write the current (edited) radioConfig to the device</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def writeConfig(self):
&#34;&#34;&#34;Write the current (edited) radioConfig to the device&#34;&#34;&#34;
if self.radioConfig == None:
raise Exception(&#34;No RadioConfig has been read&#34;)
t = mesh_pb2.ToRadio()
t.set_radio.CopyFrom(self.radioConfig)
self._sendToRadio(t)</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.StreamInterface"><code class="flex name class">
@@ -574,17 +736,17 @@ debugOut {stream} &ndash; If a stream is provided, any debug serial output from
&#34;&#34;&#34;
if devPath is None:
ports = list(filter(lambda port: port.vid != None,
serial.tools.list_ports.comports()))
ports = util.findPorts()
if len(ports) == 0:
raise Exception(&#34;No Meshtastic devices detected&#34;)
elif len(ports) &gt; 1:
raise Exception(
f&#34;Multiple ports detected, you must specify a device, such as {ports[0].device}&#34;)
else:
devPath = ports[0].device
devPath = ports[0]
logging.debug(f&#34;Connecting to {devPath}&#34;)
self.devPath = devPath
self._rxBuf = bytes() # empty
self._wantExit = False
self.stream = serial.Serial(
@@ -608,6 +770,8 @@ debugOut {stream} &ndash; If a stream is provided, any debug serial output from
logging.debug(&#34;Closing serial stream&#34;)
# pyserial cancel_read doesn&#39;t seem to work, therefore we ask the reader thread to close things for us
self._wantExit = True
if self._rxThread != threading.current_thread():
self._rxThread.join() # wait for it to exit
def __reader(self):
&#34;&#34;&#34;The reader thread that reads bytes from our stream&#34;&#34;&#34;
@@ -647,10 +811,13 @@ debugOut {stream} &ndash; If a stream is provided, any debug serial output from
try:
self._handleFromRadio(self._rxBuf[HEADER_LEN:])
except Exception as ex:
logging.warn(
logging.error(
f&#34;Error handling FromRadio, possibly corrupted? {ex}&#34;)
traceback.print_exc()
self._rxBuf = empty
else:
# logging.debug(f&#34;timeout on {self.devPath}&#34;)
pass
logging.debug(&#34;reader is exiting&#34;)
self.stream.close()
self._disconnected()</code></pre>
@@ -674,7 +841,9 @@ debugOut {stream} &ndash; If a stream is provided, any debug serial output from
&#34;&#34;&#34;Close a connection to the device&#34;&#34;&#34;
logging.debug(&#34;Closing serial stream&#34;)
# pyserial cancel_read doesn&#39;t seem to work, therefore we ask the reader thread to close things for us
self._wantExit = True</code></pre>
self._wantExit = True
if self._rxThread != threading.current_thread():
self._rxThread.join() # wait for it to exit</code></pre>
</details>
</dd>
</dl>
@@ -685,6 +854,7 @@ debugOut {stream} &ndash; If a stream is provided, any debug serial output from
<li><code><a title="meshtastic.MeshInterface.sendData" href="#meshtastic.MeshInterface.sendData">sendData</a></code></li>
<li><code><a title="meshtastic.MeshInterface.sendPacket" href="#meshtastic.MeshInterface.sendPacket">sendPacket</a></code></li>
<li><code><a title="meshtastic.MeshInterface.sendText" href="#meshtastic.MeshInterface.sendText">sendText</a></code></li>
<li><code><a title="meshtastic.MeshInterface.writeConfig" href="#meshtastic.MeshInterface.writeConfig">writeConfig</a></code></li>
</ul>
</li>
</ul>
@@ -705,6 +875,8 @@ debugOut {stream} &ndash; If a stream is provided, any debug serial output from
<li><h3><a href="#header-submodules">Sub-modules</a></h3>
<ul>
<li><code><a title="meshtastic.mesh_pb2" href="mesh_pb2.html">meshtastic.mesh_pb2</a></code></li>
<li><code><a title="meshtastic.test" href="test.html">meshtastic.test</a></code></li>
<li><code><a title="meshtastic.util" href="util.html">meshtastic.util</a></code></li>
</ul>
</li>
<li><h3><a href="#header-classes">Classes</a></h3>
@@ -715,6 +887,7 @@ debugOut {stream} &ndash; If a stream is provided, any debug serial output from
<li><code><a title="meshtastic.MeshInterface.sendData" href="#meshtastic.MeshInterface.sendData">sendData</a></code></li>
<li><code><a title="meshtastic.MeshInterface.sendPacket" href="#meshtastic.MeshInterface.sendPacket">sendPacket</a></code></li>
<li><code><a title="meshtastic.MeshInterface.sendText" href="#meshtastic.MeshInterface.sendText">sendText</a></code></li>
<li><code><a title="meshtastic.MeshInterface.writeConfig" href="#meshtastic.MeshInterface.writeConfig">writeConfig</a></code></li>
</ul>
</li>
<li>

View File

@@ -46,7 +46,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
package=&#39;&#39;,
syntax=&#39;proto3&#39;,
serialized_options=_b(&#39;\n\023com.geeksville.meshB\nMeshProtos&#39;),
serialized_pb=_b(&#39;\n\nmesh.proto\&#34;f\n\x08Position\x12\x10\n\x08latitude\x18\x01 \x01(\x01\x12\x11\n\tlongitude\x18\x02 \x01(\x01\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\x06 \x01(\r\&#34;g\n\x04\x44\x61ta\x12\x17\n\x03typ\x18\x01 \x01(\x0e\x32\n.Data.Type\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\&#34;5\n\x04Type\x12\n\n\x06OPAQUE\x10\x00\x12\x0e\n\nCLEAR_TEXT\x10\x01\x12\x11\n\rCLEAR_READACK\x10\x02\&#34;J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\&#34;\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\&#34;i\n\tSubPacket\x12\x1b\n\x08position\x18\x01 \x01(\x0b\x32\t.Position\x12\x13\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.Data\x12\x13\n\x04user\x18\x04 \x01(\x0b\x32\x05.User\x12\x15\n\rwant_response\x18\x05 \x01(\x08\&#34;p\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x05\x12\n\n\x02to\x18\x02 \x01(\x05\x12\x1b\n\x07payload\x18\x03 \x01(\x0b\x32\n.SubPacket\x12\x0f\n\x07rx_time\x18\x04 \x01(\r\x12\x0e\n\x06rx_snr\x18\x05 \x01(\x11\x12\n\n\x02id\x18\x06 \x01(\r\&#34;\xd4\x01\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\&#34;`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\&#34;\xd7\x03\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12*\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x1a\xe8\x02\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1a\n\x12num_missed_to_fail\x18\x03 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x18\n\x10keep_all_packets\x18\x64 \x01(\x08\x12\x18\n\x10promiscuous_mode\x18\x65 \x01(\x08\&#34;o\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\x05\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x05 \x01(\x05\x12\x17\n\x0f\x66requency_error\x18\x06 \x01(\x05\&#34;\xc4\x01\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\x05\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12\x12\n\nerror_code\x18\x07 \x01(\r\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\&#34;\xd5\x01\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\&#34;\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\&#34;\x1e\n\x0b\x44\x65\x62ugString\x12\x0f\n\x07message\x18\x01 \x01(\t\&#34;\xe5\x01\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12$\n\x0c\x64\x65\x62ug_string\x18\x07 \x01(\x0b\x32\x0c.DebugStringH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x42\t\n\x07variant\&#34;\x8c\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x42\t\n\x07variant*\x17\n\tConstants\x12\n\n\x06Unused\x10\x00\x42!\n\x13\x63om.geeksville.meshB\nMeshProtosb\x06proto3&#39;)
serialized_pb=_b(&#39;\n\nmesh.proto\&#34;f\n\x08Position\x12\x10\n\x08latitude\x18\x01 \x01(\x01\x12\x11\n\tlongitude\x18\x02 \x01(\x01\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\x06 \x01(\r\&#34;g\n\x04\x44\x61ta\x12\x17\n\x03typ\x18\x01 \x01(\x0e\x32\n.Data.Type\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\&#34;5\n\x04Type\x12\n\n\x06OPAQUE\x10\x00\x12\x0e\n\nCLEAR_TEXT\x10\x01\x12\x11\n\rCLEAR_READACK\x10\x02\&#34;J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\&#34;\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\&#34;i\n\tSubPacket\x12\x1b\n\x08position\x18\x01 \x01(\x0b\x32\t.Position\x12\x13\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.Data\x12\x13\n\x04user\x18\x04 \x01(\x0b\x32\x05.User\x12\x15\n\rwant_response\x18\x05 \x01(\x08\&#34;p\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x05\x12\n\n\x02to\x18\x02 \x01(\x05\x12\x1b\n\x07payload\x18\x03 \x01(\x0b\x32\n.SubPacket\x12\x0f\n\x07rx_time\x18\x04 \x01(\r\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\&#34;\xd4\x01\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\&#34;`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\&#34;\xd7\x03\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12*\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x1a\xe8\x02\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1a\n\x12num_missed_to_fail\x18\x03 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x18\n\x10keep_all_packets\x18\x64 \x01(\x08\x12\x18\n\x10promiscuous_mode\x18\x65 \x01(\x08\&#34;V\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\x05\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\&#34;\xc4\x01\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\x05\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12\x12\n\nerror_code\x18\x07 \x01(\r\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\&#34;\xd5\x01\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\&#34;\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\&#34;\x1e\n\x0b\x44\x65\x62ugString\x12\x0f\n\x07message\x18\x01 \x01(\t\&#34;\xf9\x01\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12$\n\x0c\x64\x65\x62ug_string\x18\x07 \x01(\x0b\x32\x0c.DebugStringH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x42\t\n\x07variant\&#34;\x8c\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x42\t\n\x07variant*\x17\n\tConstants\x12\n\n\x06Unused\x10\x00\x42!\n\x13\x63om.geeksville.meshB\nMeshProtosb\x06proto3&#39;)
)
_CONSTANTS = _descriptor.EnumDescriptor(
@@ -62,8 +62,8 @@ _CONSTANTS = _descriptor.EnumDescriptor(
],
containing_type=None,
serialized_options=None,
serialized_start=2177,
serialized_end=2200,
serialized_start=2172,
serialized_end=2195,
)
_sym_db.RegisterEnumDescriptor(_CONSTANTS)
@@ -397,16 +397,16 @@ _MESHPACKET = _descriptor.Descriptor(
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name=&#39;rx_snr&#39;, full_name=&#39;MeshPacket.rx_snr&#39;, index=4,
number=5, type=17, cpp_type=1, label=1,
name=&#39;id&#39;, full_name=&#39;MeshPacket.id&#39;, index=4,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name=&#39;id&#39;, full_name=&#39;MeshPacket.id&#39;, index=5,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
name=&#39;rx_snr&#39;, full_name=&#39;MeshPacket.rx_snr&#39;, index=5,
number=7, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
@@ -662,15 +662,8 @@ _NODEINFO = _descriptor.Descriptor(
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name=&#39;snr&#39;, full_name=&#39;NodeInfo.snr&#39;, index=3,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name=&#39;frequency_error&#39;, full_name=&#39;NodeInfo.frequency_error&#39;, index=4,
number=6, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
number=7, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
@@ -687,7 +680,7 @@ _NODEINFO = _descriptor.Descriptor(
oneofs=[
],
serialized_start=1242,
serialized_end=1353,
serialized_end=1328,
)
@@ -773,8 +766,8 @@ _MYNODEINFO = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=1356,
serialized_end=1552,
serialized_start=1331,
serialized_end=1527,
)
@@ -846,8 +839,8 @@ _DEVICESTATE = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=1555,
serialized_end=1768,
serialized_start=1530,
serialized_end=1743,
)
@@ -877,8 +870,8 @@ _DEBUGSTRING = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=1770,
serialized_end=1800,
serialized_start=1745,
serialized_end=1775,
)
@@ -938,6 +931,13 @@ _FROMRADIO = _descriptor.Descriptor(
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name=&#39;rebooted&#39;, full_name=&#39;FromRadio.rebooted&#39;, index=7,
number=9, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
@@ -953,8 +953,8 @@ _FROMRADIO = _descriptor.Descriptor(
name=&#39;variant&#39;, full_name=&#39;FromRadio.variant&#39;,
index=0, containing_type=None, fields=[]),
],
serialized_start=1803,
serialized_end=2032,
serialized_start=1778,
serialized_end=2027,
)
@@ -1008,8 +1008,8 @@ _TORADIO = _descriptor.Descriptor(
name=&#39;variant&#39;, full_name=&#39;ToRadio.variant&#39;,
index=0, containing_type=None, fields=[]),
],
serialized_start=2035,
serialized_end=2175,
serialized_start=2030,
serialized_end=2170,
)
_DATA.fields_by_name[&#39;typ&#39;].enum_type = _DATA_TYPE
@@ -1054,6 +1054,9 @@ _FROMRADIO.fields_by_name[&#39;debug_string&#39;].containing_oneof = _FROMRADIO.
_FROMRADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_FROMRADIO.fields_by_name[&#39;config_complete_id&#39;])
_FROMRADIO.fields_by_name[&#39;config_complete_id&#39;].containing_oneof = _FROMRADIO.oneofs_by_name[&#39;variant&#39;]
_FROMRADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_FROMRADIO.fields_by_name[&#39;rebooted&#39;])
_FROMRADIO.fields_by_name[&#39;rebooted&#39;].containing_oneof = _FROMRADIO.oneofs_by_name[&#39;variant&#39;]
_TORADIO.fields_by_name[&#39;packet&#39;].message_type = _MESHPACKET
_TORADIO.fields_by_name[&#39;set_radio&#39;].message_type = _RADIOCONFIG
_TORADIO.fields_by_name[&#39;set_owner&#39;].message_type = _USER
@@ -1419,6 +1422,10 @@ DESCRIPTOR._options = None
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.REBOOTED_FIELD_NUMBER"><code class="name">var <span class="ident">REBOOTED_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket"><code class="flex name class">
@@ -1536,10 +1543,6 @@ DESCRIPTOR._options = None
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.FREQUENCY_ERROR_FIELD_NUMBER"><code class="name">var <span class="ident">FREQUENCY_ERROR_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.NUM_FIELD_NUMBER"><code class="name">var <span class="ident">NUM_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
@@ -1830,6 +1833,7 @@ DESCRIPTOR._options = None
<li><code><a title="meshtastic.mesh_pb2.FromRadio.NUM_FIELD_NUMBER" href="#meshtastic.mesh_pb2.FromRadio.NUM_FIELD_NUMBER">NUM_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.PACKET_FIELD_NUMBER" href="#meshtastic.mesh_pb2.FromRadio.PACKET_FIELD_NUMBER">PACKET_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.RADIO_FIELD_NUMBER" href="#meshtastic.mesh_pb2.FromRadio.RADIO_FIELD_NUMBER">RADIO_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.REBOOTED_FIELD_NUMBER" href="#meshtastic.mesh_pb2.FromRadio.REBOOTED_FIELD_NUMBER">REBOOTED_FIELD_NUMBER</a></code></li>
</ul>
</li>
<li>
@@ -1863,7 +1867,6 @@ DESCRIPTOR._options = None
<h4><code><a title="meshtastic.mesh_pb2.NodeInfo" href="#meshtastic.mesh_pb2.NodeInfo">NodeInfo</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.DESCRIPTOR" href="#meshtastic.mesh_pb2.NodeInfo.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.FREQUENCY_ERROR_FIELD_NUMBER" href="#meshtastic.mesh_pb2.NodeInfo.FREQUENCY_ERROR_FIELD_NUMBER">FREQUENCY_ERROR_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.NUM_FIELD_NUMBER" href="#meshtastic.mesh_pb2.NodeInfo.NUM_FIELD_NUMBER">NUM_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.POSITION_FIELD_NUMBER" href="#meshtastic.mesh_pb2.NodeInfo.POSITION_FIELD_NUMBER">POSITION_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.SNR_FIELD_NUMBER" href="#meshtastic.mesh_pb2.NodeInfo.SNR_FIELD_NUMBER">SNR_FIELD_NUMBER</a></code></li>

400
docs/meshtastic/test.html Normal file
View File

@@ -0,0 +1,400 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.8.1" />
<title>meshtastic.test API documentation</title>
<meta name="description" content="" />
<link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css' rel='stylesheet'>
<link href='https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/8.0.0/sanitize.min.css' rel='stylesheet'>
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" rel="stylesheet">
<style>.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:30px;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:1em 0 .50em 0}h3{font-size:1.4em;margin:25px 0 10px 0}h4{margin:0;font-size:105%}a{color:#058;text-decoration:none;transition:color .3s ease-in-out}a:hover{color:#e82}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900}pre code{background:#f8f8f8;font-size:.8em;line-height:1.4em}code{background:#f2f2f1;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{background:#f8f8f8;border:0;border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0;padding:1ex}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-weight:bold;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}.admonition{padding:.1em .5em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.item .name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul{padding-left:1.5em}.toc > ul > li{margin-top:.5em}}</style>
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
</head>
<body>
<main>
<article id="content">
<header>
<h1 class="title">Module <code>meshtastic.test</code></h1>
</header>
<section id="section-intro">
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">import logging
from . import util
from . import StreamInterface
from pubsub import pub
import time
import sys
import threading
from dotmap import DotMap
&#34;&#34;&#34;The interfaces we are using for our tests&#34;&#34;&#34;
interfaces = None
&#34;&#34;&#34;A list of all packets we received while the current test was running&#34;&#34;&#34;
receivedPackets = None
testsRunning = False
testNumber = 0
def onReceive(packet, interface):
&#34;&#34;&#34;Callback invoked when a packet arrives&#34;&#34;&#34;
print(f&#34;From {interface.devPath}: {packet}&#34;)
p = DotMap(packet)
if p.payload.data.typ == &#34;CLEAR_TEXT&#34;:
# We only care a about clear text packets
receivedPackets.append(p)
def onNode(node):
&#34;&#34;&#34;Callback invoked when the node DB changes&#34;&#34;&#34;
print(f&#34;Node changed: {node}&#34;)
def subscribe():
&#34;&#34;&#34;Subscribe to the topics the user probably wants to see, prints output to stdout&#34;&#34;&#34;
pub.subscribe(onNode, &#34;meshtastic.node&#34;)
def testSend(fromInterface, toInterface):
&#34;&#34;&#34;
Sends one test packet between two nodes and then returns success or failure
Arguments:
fromInterface {[type]} -- [description]
toInterface {[type]} -- [description]
Returns:
boolean -- True for success
&#34;&#34;&#34;
global receivedPackets
receivedPackets = []
fromNode = fromInterface.myInfo.my_node_num
toNode = toInterface.myInfo.my_node_num
# FIXME, hack to test broadcast
toNode = 255
logging.info(f&#34;Sending test packet from {fromNode} to {toNode}&#34;)
fromInterface.sendText(f&#34;Test {testNumber}&#34;, toNode)
time.sleep(40)
return (len(receivedPackets) &gt;= 1)
def testThread():
logging.info(&#34;Found devices, starting tests...&#34;)
numFail = 0
numSuccess = 0
while True:
global testNumber
testNumber = testNumber + 1
success = testSend(interfaces[0], interfaces[1])
if not success:
numFail = numFail + 1
logging.error(
f&#34;Test failed, expected packet not received ({numFail} failures so far)&#34;)
else:
numSuccess = numSuccess + 1
logging.info(f&#34;Test succeeded ({numSuccess} successes so far)&#34;)
if numFail &gt;= 3:
for i in interfaces:
i.close()
return
time.sleep(1)
def onConnection(topic=pub.AUTO_TOPIC):
&#34;&#34;&#34;Callback invoked when we connect/disconnect from a radio&#34;&#34;&#34;
print(f&#34;Connection changed: {topic.getName()}&#34;)
global testsRunning
if (all(iface.isConnected for iface in interfaces) and not testsRunning):
testsRunning = True
t = threading.Thread(target=testThread, args=())
t.start()
def openDebugLog(portName):
debugname = &#34;log&#34; + portName.replace(&#34;/&#34;, &#34;_&#34;)
logging.info(f&#34;Writing serial debugging to {debugname}&#34;)
return open(debugname, &#39;w+&#39;, buffering=1)
def testAll():
&#34;&#34;&#34;
Run a series of tests using devices we can find.
Raises:
Exception: If not enough devices are found
&#34;&#34;&#34;
ports = util.findPorts()
if (len(ports) &lt; 2):
raise Exception(&#34;Must have at least two devices connected to USB&#34;)
pub.subscribe(onConnection, &#34;meshtastic.connection&#34;)
pub.subscribe(onReceive, &#34;meshtastic.receive&#34;)
global interfaces
interfaces = list(map(lambda port: StreamInterface(
port, debugOut=openDebugLog(port)), ports))
logging.info(&#34;Ports opened, waiting for device to complete connection&#34;)</code></pre>
</details>
</section>
<section>
</section>
<section>
<h2 class="section-title" id="header-variables">Global variables</h2>
<dl>
<dt id="meshtastic.test.interfaces"><code class="name">var <span class="ident">interfaces</span></code></dt>
<dd>
<div class="desc"><p>A list of all packets we received while the current test was running</p></div>
</dd>
</dl>
</section>
<section>
<h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="meshtastic.test.onConnection"><code class="name flex">
<span>def <span class="ident">onConnection</span></span>(<span>topic=pubsub.core.callables.AUTO_TOPIC)</span>
</code></dt>
<dd>
<div class="desc"><p>Callback invoked when we connect/disconnect from a radio</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def onConnection(topic=pub.AUTO_TOPIC):
&#34;&#34;&#34;Callback invoked when we connect/disconnect from a radio&#34;&#34;&#34;
print(f&#34;Connection changed: {topic.getName()}&#34;)
global testsRunning
if (all(iface.isConnected for iface in interfaces) and not testsRunning):
testsRunning = True
t = threading.Thread(target=testThread, args=())
t.start()</code></pre>
</details>
</dd>
<dt id="meshtastic.test.onNode"><code class="name flex">
<span>def <span class="ident">onNode</span></span>(<span>node)</span>
</code></dt>
<dd>
<div class="desc"><p>Callback invoked when the node DB changes</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def onNode(node):
&#34;&#34;&#34;Callback invoked when the node DB changes&#34;&#34;&#34;
print(f&#34;Node changed: {node}&#34;)</code></pre>
</details>
</dd>
<dt id="meshtastic.test.onReceive"><code class="name flex">
<span>def <span class="ident">onReceive</span></span>(<span>packet, interface)</span>
</code></dt>
<dd>
<div class="desc"><p>Callback invoked when a packet arrives</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def onReceive(packet, interface):
&#34;&#34;&#34;Callback invoked when a packet arrives&#34;&#34;&#34;
print(f&#34;From {interface.devPath}: {packet}&#34;)
p = DotMap(packet)
if p.payload.data.typ == &#34;CLEAR_TEXT&#34;:
# We only care a about clear text packets
receivedPackets.append(p)</code></pre>
</details>
</dd>
<dt id="meshtastic.test.openDebugLog"><code class="name flex">
<span>def <span class="ident">openDebugLog</span></span>(<span>portName)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def openDebugLog(portName):
debugname = &#34;log&#34; + portName.replace(&#34;/&#34;, &#34;_&#34;)
logging.info(f&#34;Writing serial debugging to {debugname}&#34;)
return open(debugname, &#39;w+&#39;, buffering=1)</code></pre>
</details>
</dd>
<dt id="meshtastic.test.subscribe"><code class="name flex">
<span>def <span class="ident">subscribe</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"><p>Subscribe to the topics the user probably wants to see, prints output to stdout</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def subscribe():
&#34;&#34;&#34;Subscribe to the topics the user probably wants to see, prints output to stdout&#34;&#34;&#34;
pub.subscribe(onNode, &#34;meshtastic.node&#34;)</code></pre>
</details>
</dd>
<dt id="meshtastic.test.testAll"><code class="name flex">
<span>def <span class="ident">testAll</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"><p>Run a series of tests using devices we can find.</p>
<h2 id="raises">Raises</h2>
<dl>
<dt><code>Exception</code></dt>
<dd>If not enough devices are found</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def testAll():
&#34;&#34;&#34;
Run a series of tests using devices we can find.
Raises:
Exception: If not enough devices are found
&#34;&#34;&#34;
ports = util.findPorts()
if (len(ports) &lt; 2):
raise Exception(&#34;Must have at least two devices connected to USB&#34;)
pub.subscribe(onConnection, &#34;meshtastic.connection&#34;)
pub.subscribe(onReceive, &#34;meshtastic.receive&#34;)
global interfaces
interfaces = list(map(lambda port: StreamInterface(
port, debugOut=openDebugLog(port)), ports))
logging.info(&#34;Ports opened, waiting for device to complete connection&#34;)</code></pre>
</details>
</dd>
<dt id="meshtastic.test.testSend"><code class="name flex">
<span>def <span class="ident">testSend</span></span>(<span>fromInterface, toInterface)</span>
</code></dt>
<dd>
<div class="desc"><p>Sends one test packet between two nodes and then returns success or failure</p>
<h2 id="arguments">Arguments</h2>
<p>fromInterface {[type]} &ndash; [description]
toInterface {[type]} &ndash; [description]</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>boolean -- True for success</code></dt>
<dd>&nbsp;</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def testSend(fromInterface, toInterface):
&#34;&#34;&#34;
Sends one test packet between two nodes and then returns success or failure
Arguments:
fromInterface {[type]} -- [description]
toInterface {[type]} -- [description]
Returns:
boolean -- True for success
&#34;&#34;&#34;
global receivedPackets
receivedPackets = []
fromNode = fromInterface.myInfo.my_node_num
toNode = toInterface.myInfo.my_node_num
# FIXME, hack to test broadcast
toNode = 255
logging.info(f&#34;Sending test packet from {fromNode} to {toNode}&#34;)
fromInterface.sendText(f&#34;Test {testNumber}&#34;, toNode)
time.sleep(40)
return (len(receivedPackets) &gt;= 1)</code></pre>
</details>
</dd>
<dt id="meshtastic.test.testThread"><code class="name flex">
<span>def <span class="ident">testThread</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def testThread():
logging.info(&#34;Found devices, starting tests...&#34;)
numFail = 0
numSuccess = 0
while True:
global testNumber
testNumber = testNumber + 1
success = testSend(interfaces[0], interfaces[1])
if not success:
numFail = numFail + 1
logging.error(
f&#34;Test failed, expected packet not received ({numFail} failures so far)&#34;)
else:
numSuccess = numSuccess + 1
logging.info(f&#34;Test succeeded ({numSuccess} successes so far)&#34;)
if numFail &gt;= 3:
for i in interfaces:
i.close()
return
time.sleep(1)</code></pre>
</details>
</dd>
</dl>
</section>
<section>
</section>
</article>
<nav id="sidebar">
<h1>Index</h1>
<div class="toc">
<ul></ul>
</div>
<ul id="index">
<li><h3>Super-module</h3>
<ul>
<li><code><a title="meshtastic" href="index.html">meshtastic</a></code></li>
</ul>
</li>
<li><h3><a href="#header-variables">Global variables</a></h3>
<ul class="">
<li><code><a title="meshtastic.test.interfaces" href="#meshtastic.test.interfaces">interfaces</a></code></li>
</ul>
</li>
<li><h3><a href="#header-functions">Functions</a></h3>
<ul class="two-column">
<li><code><a title="meshtastic.test.onConnection" href="#meshtastic.test.onConnection">onConnection</a></code></li>
<li><code><a title="meshtastic.test.onNode" href="#meshtastic.test.onNode">onNode</a></code></li>
<li><code><a title="meshtastic.test.onReceive" href="#meshtastic.test.onReceive">onReceive</a></code></li>
<li><code><a title="meshtastic.test.openDebugLog" href="#meshtastic.test.openDebugLog">openDebugLog</a></code></li>
<li><code><a title="meshtastic.test.subscribe" href="#meshtastic.test.subscribe">subscribe</a></code></li>
<li><code><a title="meshtastic.test.testAll" href="#meshtastic.test.testAll">testAll</a></code></li>
<li><code><a title="meshtastic.test.testSend" href="#meshtastic.test.testSend">testSend</a></code></li>
<li><code><a title="meshtastic.test.testThread" href="#meshtastic.test.testThread">testThread</a></code></li>
</ul>
</li>
</ul>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.8.1</a>.</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad()</script>
</body>
</html>

147
docs/meshtastic/util.html Normal file
View File

@@ -0,0 +1,147 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.8.1" />
<title>meshtastic.util API documentation</title>
<meta name="description" content="" />
<link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css' rel='stylesheet'>
<link href='https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/8.0.0/sanitize.min.css' rel='stylesheet'>
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" rel="stylesheet">
<style>.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:30px;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:1em 0 .50em 0}h3{font-size:1.4em;margin:25px 0 10px 0}h4{margin:0;font-size:105%}a{color:#058;text-decoration:none;transition:color .3s ease-in-out}a:hover{color:#e82}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900}pre code{background:#f8f8f8;font-size:.8em;line-height:1.4em}code{background:#f2f2f1;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{background:#f8f8f8;border:0;border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0;padding:1ex}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-weight:bold;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}.admonition{padding:.1em .5em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.item .name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul{padding-left:1.5em}.toc > ul > li{margin-top:.5em}}</style>
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
</head>
<body>
<main>
<article id="content">
<header>
<h1 class="title">Module <code>meshtastic.util</code></h1>
</header>
<section id="section-intro">
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from collections import defaultdict
import serial
import serial.tools.list_ports
def findPorts():
&#34;&#34;&#34;Find all ports that might have meshtastic devices
Returns:
list -- a list of device paths
&#34;&#34;&#34;
l = list(map(lambda port: port.device,
filter(lambda port: port.vid != None,
serial.tools.list_ports.comports())))
l.sort()
return l
class dotdict(dict):
&#34;&#34;&#34;dot.notation access to dictionary attributes&#34;&#34;&#34;
__getattr__ = dict.get
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__</code></pre>
</details>
</section>
<section>
</section>
<section>
</section>
<section>
<h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="meshtastic.util.findPorts"><code class="name flex">
<span>def <span class="ident">findPorts</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"><p>Find all ports that might have meshtastic devices</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>list -- a list</code> of <code>device paths</code></dt>
<dd>&nbsp;</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def findPorts():
&#34;&#34;&#34;Find all ports that might have meshtastic devices
Returns:
list -- a list of device paths
&#34;&#34;&#34;
l = list(map(lambda port: port.device,
filter(lambda port: port.vid != None,
serial.tools.list_ports.comports())))
l.sort()
return l</code></pre>
</details>
</dd>
</dl>
</section>
<section>
<h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="meshtastic.util.dotdict"><code class="flex name class">
<span>class <span class="ident">dotdict</span></span>
<span>(</span><span>...)</span>
</code></dt>
<dd>
<div class="desc"><p>dot.notation access to dictionary attributes</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class dotdict(dict):
&#34;&#34;&#34;dot.notation access to dictionary attributes&#34;&#34;&#34;
__getattr__ = dict.get
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li>builtins.dict</li>
</ul>
</dd>
</dl>
</section>
</article>
<nav id="sidebar">
<h1>Index</h1>
<div class="toc">
<ul></ul>
</div>
<ul id="index">
<li><h3>Super-module</h3>
<ul>
<li><code><a title="meshtastic" href="index.html">meshtastic</a></code></li>
</ul>
</li>
<li><h3><a href="#header-functions">Functions</a></h3>
<ul class="">
<li><code><a title="meshtastic.util.findPorts" href="#meshtastic.util.findPorts">findPorts</a></code></li>
</ul>
</li>
<li><h3><a href="#header-classes">Classes</a></h3>
<ul>
<li>
<h4><code><a title="meshtastic.util.dotdict" href="#meshtastic.util.dotdict">dotdict</a></code></h4>
</li>
</ul>
</li>
</ul>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.8.1</a>.</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad()</script>
</body>
</html>