Files
python/docs/meshtastic/mesh_pb2.html
Kevin Hester 53fab9f838 1.1.6
2020-10-15 08:24:59 +08:00

11967 lines
501 KiB
HTML

<!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.9.1" />
<title>meshtastic.mesh_pb2 API documentation</title>
<meta name="description" content="Generated protocol buffer code." />
<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>
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/typography.min.css" integrity="sha256-7l/o7C8jubJiy74VsKTidCy1yBkRtiUGbVkYBylBqUg=" crossorigin>
<link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/github.min.css" crossorigin>
<style>:root{--highlight-color:#fe9}.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%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}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}dt:target .name{background:var(--highlight-color)}.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%}td{padding:0 .5em}.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>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js" integrity="sha256-Uv3H6lx7dJmRfRvH8TH6kJD1TSK1aFcwgx+mdg3epi8=" crossorigin></script>
<script>window.addEventListener('DOMContentLoaded', () => hljs.initHighlighting())</script>
</head>
<body>
<main>
<article id="content">
<header>
<h1 class="title">Module <code>meshtastic.mesh_pb2</code></h1>
</header>
<section id="section-intro">
<p>Generated protocol buffer code.</p>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python"># -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mesh.proto
&#34;&#34;&#34;Generated protocol buffer code.&#34;&#34;&#34;
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name=&#39;mesh.proto&#39;,
package=&#39;&#39;,
syntax=&#39;proto3&#39;,
serialized_options=b&#39;\n\023com.geeksville.meshB\nMeshProtos&#39;,
create_key=_descriptor._internal_create_key,
serialized_pb=b&#39;\n\nmesh.proto\&#34;j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\&#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;\xd3\x02\n\tSubPacket\x12\x1d\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionH\x00\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12\x15\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&amp;\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12\&#34;\n\x0broute_error\x18\r \x01(\x0e\x32\x0b.RouteErrorH\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\t\n\x07payloadB\x05\n\x03\x61\x63k\&#34;\xb7\x01\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x42\t\n\x07payload\&#34;\xa8\x02\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\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\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;\xe0\x05\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\xf1\x04\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\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18&amp; \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\&#34; \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\&#34;h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\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\x12\x10\n\x08next_hop\x18\x05 \x01(\r\&#34;\xc5\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\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\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x19\n\x11\x63urrent_packet_id\x18\x0b \x01(\r\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\&#34;\xfd\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\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\&#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\&#34;f\n\x11ManufacturingData\x12\x12\n\nfradioFreq\x18\x01 \x01(\r\x12\x10\n\x08hw_model\x18\x02 \x01(\t\x12\x12\n\nhw_version\x18\x03 \x01(\t\x12\x17\n\x0fselftest_result\x18\x04 \x01(\x11*&gt;\n\nRouteError\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03*\x17\n\tConstants\x12\n\n\x06Unused\x10\x00*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\x10\x03\x12\x06\n\x02\x43N\x10\x04\x12\x06\n\x02JP\x10\x05\x12\x07\n\x03\x41NZ\x10\x06\x12\x06\n\x02KR\x10\x07\x12\x06\n\x02TW\x10\x08*U\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02\x42!\n\x13\x63om.geeksville.meshB\nMeshProtosb\x06proto3&#39;
)
_ROUTEERROR = _descriptor.EnumDescriptor(
name=&#39;RouteError&#39;,
full_name=&#39;RouteError&#39;,
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name=&#39;NONE&#39;, index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;NO_ROUTE&#39;, index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;GOT_NAK&#39;, index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;TIMEOUT&#39;, index=3, number=3,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=3123,
serialized_end=3185,
)
_sym_db.RegisterEnumDescriptor(_ROUTEERROR)
RouteError = enum_type_wrapper.EnumTypeWrapper(_ROUTEERROR)
_CONSTANTS = _descriptor.EnumDescriptor(
name=&#39;Constants&#39;,
full_name=&#39;Constants&#39;,
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name=&#39;Unused&#39;, index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=3187,
serialized_end=3210,
)
_sym_db.RegisterEnumDescriptor(_CONSTANTS)
Constants = enum_type_wrapper.EnumTypeWrapper(_CONSTANTS)
_REGIONCODE = _descriptor.EnumDescriptor(
name=&#39;RegionCode&#39;,
full_name=&#39;RegionCode&#39;,
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name=&#39;Unset&#39;, index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;US&#39;, index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;EU433&#39;, index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;EU865&#39;, index=3, number=3,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;CN&#39;, index=4, number=4,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;JP&#39;, index=5, number=5,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;ANZ&#39;, index=6, number=6,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;KR&#39;, index=7, number=7,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;TW&#39;, index=8, number=8,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=3212,
serialized_end=3306,
)
_sym_db.RegisterEnumDescriptor(_REGIONCODE)
RegionCode = enum_type_wrapper.EnumTypeWrapper(_REGIONCODE)
_GPSOPERATION = _descriptor.EnumDescriptor(
name=&#39;GpsOperation&#39;,
full_name=&#39;GpsOperation&#39;,
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name=&#39;GpsOpUnset&#39;, index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;GpsOpMobile&#39;, index=1, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;GpsOpTimeOnly&#39;, index=2, number=3,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;GpsOpDisabled&#39;, index=3, number=4,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=3308,
serialized_end=3393,
)
_sym_db.RegisterEnumDescriptor(_GPSOPERATION)
GpsOperation = enum_type_wrapper.EnumTypeWrapper(_GPSOPERATION)
_LOCATIONSHARING = _descriptor.EnumDescriptor(
name=&#39;LocationSharing&#39;,
full_name=&#39;LocationSharing&#39;,
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name=&#39;LocUnset&#39;, index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;LocEnabled&#39;, index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;LocDisabled&#39;, index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=3395,
serialized_end=3459,
)
_sym_db.RegisterEnumDescriptor(_LOCATIONSHARING)
LocationSharing = enum_type_wrapper.EnumTypeWrapper(_LOCATIONSHARING)
NONE = 0
NO_ROUTE = 1
GOT_NAK = 2
TIMEOUT = 3
Unused = 0
Unset = 0
US = 1
EU433 = 2
EU865 = 3
CN = 4
JP = 5
ANZ = 6
KR = 7
TW = 8
GpsOpUnset = 0
GpsOpMobile = 2
GpsOpTimeOnly = 3
GpsOpDisabled = 4
LocUnset = 0
LocEnabled = 1
LocDisabled = 2
_DATA_TYPE = _descriptor.EnumDescriptor(
name=&#39;Type&#39;,
full_name=&#39;Data.Type&#39;,
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name=&#39;OPAQUE&#39;, index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;CLEAR_TEXT&#39;, index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;CLEAR_READACK&#39;, index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=172,
serialized_end=225,
)
_sym_db.RegisterEnumDescriptor(_DATA_TYPE)
_CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor(
name=&#39;ModemConfig&#39;,
full_name=&#39;ChannelSettings.ModemConfig&#39;,
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name=&#39;Bw125Cr45Sf128&#39;, index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;Bw500Cr45Sf128&#39;, index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;Bw31_25Cr48Sf512&#39;, index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name=&#39;Bw125Cr48Sf4096&#39;, index=3, number=3,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=1065,
serialized_end=1161,
)
_sym_db.RegisterEnumDescriptor(_CHANNELSETTINGS_MODEMCONFIG)
_POSITION = _descriptor.Descriptor(
name=&#39;Position&#39;,
full_name=&#39;Position&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;latitude_i&#39;, full_name=&#39;Position.latitude_i&#39;, index=0,
number=7, type=17, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;longitude_i&#39;, full_name=&#39;Position.longitude_i&#39;, index=1,
number=8, type=17, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;altitude&#39;, full_name=&#39;Position.altitude&#39;, index=2,
number=3, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;battery_level&#39;, full_name=&#39;Position.battery_level&#39;, index=3,
number=4, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;time&#39;, full_name=&#39;Position.time&#39;, index=4,
number=9, type=7, 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, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=14,
serialized_end=120,
)
_DATA = _descriptor.Descriptor(
name=&#39;Data&#39;,
full_name=&#39;Data&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;typ&#39;, full_name=&#39;Data.typ&#39;, index=0,
number=1, type=14, cpp_type=8, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;payload&#39;, full_name=&#39;Data.payload&#39;, index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
_DATA_TYPE,
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=122,
serialized_end=225,
)
_USER = _descriptor.Descriptor(
name=&#39;User&#39;,
full_name=&#39;User&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;id&#39;, full_name=&#39;User.id&#39;, index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;long_name&#39;, full_name=&#39;User.long_name&#39;, index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;short_name&#39;, full_name=&#39;User.short_name&#39;, index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;macaddr&#39;, full_name=&#39;User.macaddr&#39;, index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=227,
serialized_end=301,
)
_ROUTEDISCOVERY = _descriptor.Descriptor(
name=&#39;RouteDiscovery&#39;,
full_name=&#39;RouteDiscovery&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;route&#39;, full_name=&#39;RouteDiscovery.route&#39;, index=0,
number=2, type=5, cpp_type=1, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=303,
serialized_end=334,
)
_SUBPACKET = _descriptor.Descriptor(
name=&#39;SubPacket&#39;,
full_name=&#39;SubPacket&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;position&#39;, full_name=&#39;SubPacket.position&#39;, index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;data&#39;, full_name=&#39;SubPacket.data&#39;, index=1,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;user&#39;, full_name=&#39;SubPacket.user&#39;, index=2,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;route_request&#39;, full_name=&#39;SubPacket.route_request&#39;, index=3,
number=6, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;route_reply&#39;, full_name=&#39;SubPacket.route_reply&#39;, index=4,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;route_error&#39;, full_name=&#39;SubPacket.route_error&#39;, index=5,
number=13, type=14, cpp_type=8, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;want_response&#39;, full_name=&#39;SubPacket.want_response&#39;, index=6,
number=5, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;success_id&#39;, full_name=&#39;SubPacket.success_id&#39;, index=7,
number=10, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;fail_id&#39;, full_name=&#39;SubPacket.fail_id&#39;, index=8,
number=11, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;dest&#39;, full_name=&#39;SubPacket.dest&#39;, index=9,
number=9, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;source&#39;, full_name=&#39;SubPacket.source&#39;, index=10,
number=12, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;original_id&#39;, full_name=&#39;SubPacket.original_id&#39;, index=11,
number=2, 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, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name=&#39;payload&#39;, full_name=&#39;SubPacket.payload&#39;,
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name=&#39;ack&#39;, full_name=&#39;SubPacket.ack&#39;,
index=1, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=337,
serialized_end=676,
)
_MESHPACKET = _descriptor.Descriptor(
name=&#39;MeshPacket&#39;,
full_name=&#39;MeshPacket&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;from&#39;, full_name=&#39;MeshPacket.from&#39;, index=0,
number=1, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;to&#39;, full_name=&#39;MeshPacket.to&#39;, index=1,
number=2, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;decoded&#39;, full_name=&#39;MeshPacket.decoded&#39;, index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;encrypted&#39;, full_name=&#39;MeshPacket.encrypted&#39;, index=3,
number=8, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;rx_time&#39;, full_name=&#39;MeshPacket.rx_time&#39;, index=5,
number=9, type=7, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;rx_snr&#39;, full_name=&#39;MeshPacket.rx_snr&#39;, index=6,
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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;hop_limit&#39;, full_name=&#39;MeshPacket.hop_limit&#39;, index=7,
number=10, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;want_ack&#39;, full_name=&#39;MeshPacket.want_ack&#39;, index=8,
number=11, 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, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name=&#39;payload&#39;, full_name=&#39;MeshPacket.payload&#39;,
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=679,
serialized_end=862,
)
_CHANNELSETTINGS = _descriptor.Descriptor(
name=&#39;ChannelSettings&#39;,
full_name=&#39;ChannelSettings&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;tx_power&#39;, full_name=&#39;ChannelSettings.tx_power&#39;, index=0,
number=1, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;modem_config&#39;, full_name=&#39;ChannelSettings.modem_config&#39;, index=1,
number=3, type=14, cpp_type=8, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;bandwidth&#39;, full_name=&#39;ChannelSettings.bandwidth&#39;, index=2,
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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;spread_factor&#39;, full_name=&#39;ChannelSettings.spread_factor&#39;, index=3,
number=7, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;coding_rate&#39;, full_name=&#39;ChannelSettings.coding_rate&#39;, index=4,
number=8, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;channel_num&#39;, full_name=&#39;ChannelSettings.channel_num&#39;, index=5,
number=9, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;psk&#39;, full_name=&#39;ChannelSettings.psk&#39;, index=6,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;name&#39;, full_name=&#39;ChannelSettings.name&#39;, index=7,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
_CHANNELSETTINGS_MODEMCONFIG,
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=865,
serialized_end=1161,
)
_RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor(
name=&#39;UserPreferences&#39;,
full_name=&#39;RadioConfig.UserPreferences&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;position_broadcast_secs&#39;, full_name=&#39;RadioConfig.UserPreferences.position_broadcast_secs&#39;, index=0,
number=1, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;send_owner_interval&#39;, full_name=&#39;RadioConfig.UserPreferences.send_owner_interval&#39;, index=1,
number=2, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;num_missed_to_fail&#39;, full_name=&#39;RadioConfig.UserPreferences.num_missed_to_fail&#39;, index=2,
number=3, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;wait_bluetooth_secs&#39;, full_name=&#39;RadioConfig.UserPreferences.wait_bluetooth_secs&#39;, index=3,
number=4, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;screen_on_secs&#39;, full_name=&#39;RadioConfig.UserPreferences.screen_on_secs&#39;, index=4,
number=5, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;phone_timeout_secs&#39;, full_name=&#39;RadioConfig.UserPreferences.phone_timeout_secs&#39;, index=5,
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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;phone_sds_timeout_sec&#39;, full_name=&#39;RadioConfig.UserPreferences.phone_sds_timeout_sec&#39;, index=6,
number=7, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;mesh_sds_timeout_secs&#39;, full_name=&#39;RadioConfig.UserPreferences.mesh_sds_timeout_secs&#39;, index=7,
number=8, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;sds_secs&#39;, full_name=&#39;RadioConfig.UserPreferences.sds_secs&#39;, index=8,
number=9, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;ls_secs&#39;, full_name=&#39;RadioConfig.UserPreferences.ls_secs&#39;, index=9,
number=10, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;min_wake_secs&#39;, full_name=&#39;RadioConfig.UserPreferences.min_wake_secs&#39;, index=10,
number=11, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;wifi_ssid&#39;, full_name=&#39;RadioConfig.UserPreferences.wifi_ssid&#39;, index=11,
number=12, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;wifi_password&#39;, full_name=&#39;RadioConfig.UserPreferences.wifi_password&#39;, index=12,
number=13, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;wifi_ap_mode&#39;, full_name=&#39;RadioConfig.UserPreferences.wifi_ap_mode&#39;, index=13,
number=14, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;region&#39;, full_name=&#39;RadioConfig.UserPreferences.region&#39;, index=14,
number=15, type=14, cpp_type=8, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;is_router&#39;, full_name=&#39;RadioConfig.UserPreferences.is_router&#39;, index=15,
number=37, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;is_low_power&#39;, full_name=&#39;RadioConfig.UserPreferences.is_low_power&#39;, index=16,
number=38, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;factory_reset&#39;, full_name=&#39;RadioConfig.UserPreferences.factory_reset&#39;, index=17,
number=100, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;location_share&#39;, full_name=&#39;RadioConfig.UserPreferences.location_share&#39;, index=18,
number=32, type=14, cpp_type=8, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;gps_operation&#39;, full_name=&#39;RadioConfig.UserPreferences.gps_operation&#39;, index=19,
number=33, type=14, cpp_type=8, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;gps_update_interval&#39;, full_name=&#39;RadioConfig.UserPreferences.gps_update_interval&#39;, index=20,
number=34, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;gps_attempt_time&#39;, full_name=&#39;RadioConfig.UserPreferences.gps_attempt_time&#39;, index=21,
number=36, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;ignore_incoming&#39;, full_name=&#39;RadioConfig.UserPreferences.ignore_incoming&#39;, index=22,
number=103, type=13, cpp_type=3, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=1275,
serialized_end=1900,
)
_RADIOCONFIG = _descriptor.Descriptor(
name=&#39;RadioConfig&#39;,
full_name=&#39;RadioConfig&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;preferences&#39;, full_name=&#39;RadioConfig.preferences&#39;, index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;channel_settings&#39;, full_name=&#39;RadioConfig.channel_settings&#39;, index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[_RADIOCONFIG_USERPREFERENCES, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=1164,
serialized_end=1900,
)
_NODEINFO = _descriptor.Descriptor(
name=&#39;NodeInfo&#39;,
full_name=&#39;NodeInfo&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;num&#39;, full_name=&#39;NodeInfo.num&#39;, index=0,
number=1, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;user&#39;, full_name=&#39;NodeInfo.user&#39;, index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;position&#39;, full_name=&#39;NodeInfo.position&#39;, index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;snr&#39;, full_name=&#39;NodeInfo.snr&#39;, index=3,
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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;next_hop&#39;, full_name=&#39;NodeInfo.next_hop&#39;, index=4,
number=5, 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, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=1902,
serialized_end=2006,
)
_MYNODEINFO = _descriptor.Descriptor(
name=&#39;MyNodeInfo&#39;,
full_name=&#39;MyNodeInfo&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;my_node_num&#39;, full_name=&#39;MyNodeInfo.my_node_num&#39;, index=0,
number=1, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;has_gps&#39;, full_name=&#39;MyNodeInfo.has_gps&#39;, index=1,
number=2, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;num_channels&#39;, full_name=&#39;MyNodeInfo.num_channels&#39;, index=2,
number=3, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;region&#39;, full_name=&#39;MyNodeInfo.region&#39;, index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;hw_model&#39;, full_name=&#39;MyNodeInfo.hw_model&#39;, index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;firmware_version&#39;, full_name=&#39;MyNodeInfo.firmware_version&#39;, index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;error_code&#39;, full_name=&#39;MyNodeInfo.error_code&#39;, index=6,
number=7, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;error_address&#39;, full_name=&#39;MyNodeInfo.error_address&#39;, index=7,
number=8, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;error_count&#39;, full_name=&#39;MyNodeInfo.error_count&#39;, index=8,
number=9, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;packet_id_bits&#39;, full_name=&#39;MyNodeInfo.packet_id_bits&#39;, index=9,
number=10, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;current_packet_id&#39;, full_name=&#39;MyNodeInfo.current_packet_id&#39;, index=10,
number=11, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;node_num_bits&#39;, full_name=&#39;MyNodeInfo.node_num_bits&#39;, index=11,
number=12, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;message_timeout_msec&#39;, full_name=&#39;MyNodeInfo.message_timeout_msec&#39;, index=12,
number=13, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;min_app_version&#39;, full_name=&#39;MyNodeInfo.min_app_version&#39;, index=13,
number=14, 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, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=2009,
serialized_end=2334,
)
_DEVICESTATE = _descriptor.Descriptor(
name=&#39;DeviceState&#39;,
full_name=&#39;DeviceState&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;radio&#39;, full_name=&#39;DeviceState.radio&#39;, index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;my_node&#39;, full_name=&#39;DeviceState.my_node&#39;, index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;owner&#39;, full_name=&#39;DeviceState.owner&#39;, index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;node_db&#39;, full_name=&#39;DeviceState.node_db&#39;, index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;receive_queue&#39;, full_name=&#39;DeviceState.receive_queue&#39;, index=4,
number=5, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;version&#39;, full_name=&#39;DeviceState.version&#39;, index=5,
number=8, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;rx_text_message&#39;, full_name=&#39;DeviceState.rx_text_message&#39;, index=6,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;no_save&#39;, full_name=&#39;DeviceState.no_save&#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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;did_gps_reset&#39;, full_name=&#39;DeviceState.did_gps_reset&#39;, index=8,
number=11, 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, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=2337,
serialized_end=2590,
)
_DEBUGSTRING = _descriptor.Descriptor(
name=&#39;DebugString&#39;,
full_name=&#39;DebugString&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;message&#39;, full_name=&#39;DebugString.message&#39;, index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=2592,
serialized_end=2622,
)
_FROMRADIO = _descriptor.Descriptor(
name=&#39;FromRadio&#39;,
full_name=&#39;FromRadio&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;num&#39;, full_name=&#39;FromRadio.num&#39;, index=0,
number=1, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;packet&#39;, full_name=&#39;FromRadio.packet&#39;, index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;my_info&#39;, full_name=&#39;FromRadio.my_info&#39;, index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;node_info&#39;, full_name=&#39;FromRadio.node_info&#39;, index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;radio&#39;, full_name=&#39;FromRadio.radio&#39;, index=4,
number=6, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;debug_string&#39;, full_name=&#39;FromRadio.debug_string&#39;, index=5,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;config_complete_id&#39;, full_name=&#39;FromRadio.config_complete_id&#39;, index=6,
number=8, 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, create_key=_descriptor._internal_create_key),
_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, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name=&#39;variant&#39;, full_name=&#39;FromRadio.variant&#39;,
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=2625,
serialized_end=2874,
)
_TORADIO = _descriptor.Descriptor(
name=&#39;ToRadio&#39;,
full_name=&#39;ToRadio&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;packet&#39;, full_name=&#39;ToRadio.packet&#39;, index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;want_config_id&#39;, full_name=&#39;ToRadio.want_config_id&#39;, index=1,
number=100, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;set_radio&#39;, full_name=&#39;ToRadio.set_radio&#39;, index=2,
number=101, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;set_owner&#39;, full_name=&#39;ToRadio.set_owner&#39;, index=3,
number=102, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name=&#39;variant&#39;, full_name=&#39;ToRadio.variant&#39;,
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=2877,
serialized_end=3017,
)
_MANUFACTURINGDATA = _descriptor.Descriptor(
name=&#39;ManufacturingData&#39;,
full_name=&#39;ManufacturingData&#39;,
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name=&#39;fradioFreq&#39;, full_name=&#39;ManufacturingData.fradioFreq&#39;, index=0,
number=1, 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, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;hw_model&#39;, full_name=&#39;ManufacturingData.hw_model&#39;, index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;hw_version&#39;, full_name=&#39;ManufacturingData.hw_version&#39;, index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b&#34;&#34;.decode(&#39;utf-8&#39;),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name=&#39;selftest_result&#39;, full_name=&#39;ManufacturingData.selftest_result&#39;, index=3,
number=4, type=17, 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, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax=&#39;proto3&#39;,
extension_ranges=[],
oneofs=[
],
serialized_start=3019,
serialized_end=3121,
)
_DATA.fields_by_name[&#39;typ&#39;].enum_type = _DATA_TYPE
_DATA_TYPE.containing_type = _DATA
_SUBPACKET.fields_by_name[&#39;position&#39;].message_type = _POSITION
_SUBPACKET.fields_by_name[&#39;data&#39;].message_type = _DATA
_SUBPACKET.fields_by_name[&#39;user&#39;].message_type = _USER
_SUBPACKET.fields_by_name[&#39;route_request&#39;].message_type = _ROUTEDISCOVERY
_SUBPACKET.fields_by_name[&#39;route_reply&#39;].message_type = _ROUTEDISCOVERY
_SUBPACKET.fields_by_name[&#39;route_error&#39;].enum_type = _ROUTEERROR
_SUBPACKET.oneofs_by_name[&#39;payload&#39;].fields.append(
_SUBPACKET.fields_by_name[&#39;position&#39;])
_SUBPACKET.fields_by_name[&#39;position&#39;].containing_oneof = _SUBPACKET.oneofs_by_name[&#39;payload&#39;]
_SUBPACKET.oneofs_by_name[&#39;payload&#39;].fields.append(
_SUBPACKET.fields_by_name[&#39;data&#39;])
_SUBPACKET.fields_by_name[&#39;data&#39;].containing_oneof = _SUBPACKET.oneofs_by_name[&#39;payload&#39;]
_SUBPACKET.oneofs_by_name[&#39;payload&#39;].fields.append(
_SUBPACKET.fields_by_name[&#39;user&#39;])
_SUBPACKET.fields_by_name[&#39;user&#39;].containing_oneof = _SUBPACKET.oneofs_by_name[&#39;payload&#39;]
_SUBPACKET.oneofs_by_name[&#39;payload&#39;].fields.append(
_SUBPACKET.fields_by_name[&#39;route_request&#39;])
_SUBPACKET.fields_by_name[&#39;route_request&#39;].containing_oneof = _SUBPACKET.oneofs_by_name[&#39;payload&#39;]
_SUBPACKET.oneofs_by_name[&#39;payload&#39;].fields.append(
_SUBPACKET.fields_by_name[&#39;route_reply&#39;])
_SUBPACKET.fields_by_name[&#39;route_reply&#39;].containing_oneof = _SUBPACKET.oneofs_by_name[&#39;payload&#39;]
_SUBPACKET.oneofs_by_name[&#39;payload&#39;].fields.append(
_SUBPACKET.fields_by_name[&#39;route_error&#39;])
_SUBPACKET.fields_by_name[&#39;route_error&#39;].containing_oneof = _SUBPACKET.oneofs_by_name[&#39;payload&#39;]
_SUBPACKET.oneofs_by_name[&#39;ack&#39;].fields.append(
_SUBPACKET.fields_by_name[&#39;success_id&#39;])
_SUBPACKET.fields_by_name[&#39;success_id&#39;].containing_oneof = _SUBPACKET.oneofs_by_name[&#39;ack&#39;]
_SUBPACKET.oneofs_by_name[&#39;ack&#39;].fields.append(
_SUBPACKET.fields_by_name[&#39;fail_id&#39;])
_SUBPACKET.fields_by_name[&#39;fail_id&#39;].containing_oneof = _SUBPACKET.oneofs_by_name[&#39;ack&#39;]
_MESHPACKET.fields_by_name[&#39;decoded&#39;].message_type = _SUBPACKET
_MESHPACKET.oneofs_by_name[&#39;payload&#39;].fields.append(
_MESHPACKET.fields_by_name[&#39;decoded&#39;])
_MESHPACKET.fields_by_name[&#39;decoded&#39;].containing_oneof = _MESHPACKET.oneofs_by_name[&#39;payload&#39;]
_MESHPACKET.oneofs_by_name[&#39;payload&#39;].fields.append(
_MESHPACKET.fields_by_name[&#39;encrypted&#39;])
_MESHPACKET.fields_by_name[&#39;encrypted&#39;].containing_oneof = _MESHPACKET.oneofs_by_name[&#39;payload&#39;]
_CHANNELSETTINGS.fields_by_name[&#39;modem_config&#39;].enum_type = _CHANNELSETTINGS_MODEMCONFIG
_CHANNELSETTINGS_MODEMCONFIG.containing_type = _CHANNELSETTINGS
_RADIOCONFIG_USERPREFERENCES.fields_by_name[&#39;region&#39;].enum_type = _REGIONCODE
_RADIOCONFIG_USERPREFERENCES.fields_by_name[&#39;location_share&#39;].enum_type = _LOCATIONSHARING
_RADIOCONFIG_USERPREFERENCES.fields_by_name[&#39;gps_operation&#39;].enum_type = _GPSOPERATION
_RADIOCONFIG_USERPREFERENCES.containing_type = _RADIOCONFIG
_RADIOCONFIG.fields_by_name[&#39;preferences&#39;].message_type = _RADIOCONFIG_USERPREFERENCES
_RADIOCONFIG.fields_by_name[&#39;channel_settings&#39;].message_type = _CHANNELSETTINGS
_NODEINFO.fields_by_name[&#39;user&#39;].message_type = _USER
_NODEINFO.fields_by_name[&#39;position&#39;].message_type = _POSITION
_DEVICESTATE.fields_by_name[&#39;radio&#39;].message_type = _RADIOCONFIG
_DEVICESTATE.fields_by_name[&#39;my_node&#39;].message_type = _MYNODEINFO
_DEVICESTATE.fields_by_name[&#39;owner&#39;].message_type = _USER
_DEVICESTATE.fields_by_name[&#39;node_db&#39;].message_type = _NODEINFO
_DEVICESTATE.fields_by_name[&#39;receive_queue&#39;].message_type = _MESHPACKET
_DEVICESTATE.fields_by_name[&#39;rx_text_message&#39;].message_type = _MESHPACKET
_FROMRADIO.fields_by_name[&#39;packet&#39;].message_type = _MESHPACKET
_FROMRADIO.fields_by_name[&#39;my_info&#39;].message_type = _MYNODEINFO
_FROMRADIO.fields_by_name[&#39;node_info&#39;].message_type = _NODEINFO
_FROMRADIO.fields_by_name[&#39;radio&#39;].message_type = _RADIOCONFIG
_FROMRADIO.fields_by_name[&#39;debug_string&#39;].message_type = _DEBUGSTRING
_FROMRADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_FROMRADIO.fields_by_name[&#39;packet&#39;])
_FROMRADIO.fields_by_name[&#39;packet&#39;].containing_oneof = _FROMRADIO.oneofs_by_name[&#39;variant&#39;]
_FROMRADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_FROMRADIO.fields_by_name[&#39;my_info&#39;])
_FROMRADIO.fields_by_name[&#39;my_info&#39;].containing_oneof = _FROMRADIO.oneofs_by_name[&#39;variant&#39;]
_FROMRADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_FROMRADIO.fields_by_name[&#39;node_info&#39;])
_FROMRADIO.fields_by_name[&#39;node_info&#39;].containing_oneof = _FROMRADIO.oneofs_by_name[&#39;variant&#39;]
_FROMRADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_FROMRADIO.fields_by_name[&#39;radio&#39;])
_FROMRADIO.fields_by_name[&#39;radio&#39;].containing_oneof = _FROMRADIO.oneofs_by_name[&#39;variant&#39;]
_FROMRADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_FROMRADIO.fields_by_name[&#39;debug_string&#39;])
_FROMRADIO.fields_by_name[&#39;debug_string&#39;].containing_oneof = _FROMRADIO.oneofs_by_name[&#39;variant&#39;]
_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
_TORADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_TORADIO.fields_by_name[&#39;packet&#39;])
_TORADIO.fields_by_name[&#39;packet&#39;].containing_oneof = _TORADIO.oneofs_by_name[&#39;variant&#39;]
_TORADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_TORADIO.fields_by_name[&#39;want_config_id&#39;])
_TORADIO.fields_by_name[&#39;want_config_id&#39;].containing_oneof = _TORADIO.oneofs_by_name[&#39;variant&#39;]
_TORADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_TORADIO.fields_by_name[&#39;set_radio&#39;])
_TORADIO.fields_by_name[&#39;set_radio&#39;].containing_oneof = _TORADIO.oneofs_by_name[&#39;variant&#39;]
_TORADIO.oneofs_by_name[&#39;variant&#39;].fields.append(
_TORADIO.fields_by_name[&#39;set_owner&#39;])
_TORADIO.fields_by_name[&#39;set_owner&#39;].containing_oneof = _TORADIO.oneofs_by_name[&#39;variant&#39;]
DESCRIPTOR.message_types_by_name[&#39;Position&#39;] = _POSITION
DESCRIPTOR.message_types_by_name[&#39;Data&#39;] = _DATA
DESCRIPTOR.message_types_by_name[&#39;User&#39;] = _USER
DESCRIPTOR.message_types_by_name[&#39;RouteDiscovery&#39;] = _ROUTEDISCOVERY
DESCRIPTOR.message_types_by_name[&#39;SubPacket&#39;] = _SUBPACKET
DESCRIPTOR.message_types_by_name[&#39;MeshPacket&#39;] = _MESHPACKET
DESCRIPTOR.message_types_by_name[&#39;ChannelSettings&#39;] = _CHANNELSETTINGS
DESCRIPTOR.message_types_by_name[&#39;RadioConfig&#39;] = _RADIOCONFIG
DESCRIPTOR.message_types_by_name[&#39;NodeInfo&#39;] = _NODEINFO
DESCRIPTOR.message_types_by_name[&#39;MyNodeInfo&#39;] = _MYNODEINFO
DESCRIPTOR.message_types_by_name[&#39;DeviceState&#39;] = _DEVICESTATE
DESCRIPTOR.message_types_by_name[&#39;DebugString&#39;] = _DEBUGSTRING
DESCRIPTOR.message_types_by_name[&#39;FromRadio&#39;] = _FROMRADIO
DESCRIPTOR.message_types_by_name[&#39;ToRadio&#39;] = _TORADIO
DESCRIPTOR.message_types_by_name[&#39;ManufacturingData&#39;] = _MANUFACTURINGDATA
DESCRIPTOR.enum_types_by_name[&#39;RouteError&#39;] = _ROUTEERROR
DESCRIPTOR.enum_types_by_name[&#39;Constants&#39;] = _CONSTANTS
DESCRIPTOR.enum_types_by_name[&#39;RegionCode&#39;] = _REGIONCODE
DESCRIPTOR.enum_types_by_name[&#39;GpsOperation&#39;] = _GPSOPERATION
DESCRIPTOR.enum_types_by_name[&#39;LocationSharing&#39;] = _LOCATIONSHARING
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Position = _reflection.GeneratedProtocolMessageType(&#39;Position&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _POSITION,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:Position)
})
_sym_db.RegisterMessage(Position)
Data = _reflection.GeneratedProtocolMessageType(&#39;Data&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _DATA,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:Data)
})
_sym_db.RegisterMessage(Data)
User = _reflection.GeneratedProtocolMessageType(&#39;User&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _USER,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:User)
})
_sym_db.RegisterMessage(User)
RouteDiscovery = _reflection.GeneratedProtocolMessageType(&#39;RouteDiscovery&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _ROUTEDISCOVERY,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:RouteDiscovery)
})
_sym_db.RegisterMessage(RouteDiscovery)
SubPacket = _reflection.GeneratedProtocolMessageType(&#39;SubPacket&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _SUBPACKET,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:SubPacket)
})
_sym_db.RegisterMessage(SubPacket)
MeshPacket = _reflection.GeneratedProtocolMessageType(&#39;MeshPacket&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _MESHPACKET,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:MeshPacket)
})
_sym_db.RegisterMessage(MeshPacket)
ChannelSettings = _reflection.GeneratedProtocolMessageType(&#39;ChannelSettings&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _CHANNELSETTINGS,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:ChannelSettings)
})
_sym_db.RegisterMessage(ChannelSettings)
RadioConfig = _reflection.GeneratedProtocolMessageType(&#39;RadioConfig&#39;, (_message.Message,), {
&#39;UserPreferences&#39; : _reflection.GeneratedProtocolMessageType(&#39;UserPreferences&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _RADIOCONFIG_USERPREFERENCES,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:RadioConfig.UserPreferences)
})
,
&#39;DESCRIPTOR&#39; : _RADIOCONFIG,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:RadioConfig)
})
_sym_db.RegisterMessage(RadioConfig)
_sym_db.RegisterMessage(RadioConfig.UserPreferences)
NodeInfo = _reflection.GeneratedProtocolMessageType(&#39;NodeInfo&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _NODEINFO,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:NodeInfo)
})
_sym_db.RegisterMessage(NodeInfo)
MyNodeInfo = _reflection.GeneratedProtocolMessageType(&#39;MyNodeInfo&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _MYNODEINFO,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:MyNodeInfo)
})
_sym_db.RegisterMessage(MyNodeInfo)
DeviceState = _reflection.GeneratedProtocolMessageType(&#39;DeviceState&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _DEVICESTATE,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:DeviceState)
})
_sym_db.RegisterMessage(DeviceState)
DebugString = _reflection.GeneratedProtocolMessageType(&#39;DebugString&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _DEBUGSTRING,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:DebugString)
})
_sym_db.RegisterMessage(DebugString)
FromRadio = _reflection.GeneratedProtocolMessageType(&#39;FromRadio&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _FROMRADIO,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:FromRadio)
})
_sym_db.RegisterMessage(FromRadio)
ToRadio = _reflection.GeneratedProtocolMessageType(&#39;ToRadio&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _TORADIO,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:ToRadio)
})
_sym_db.RegisterMessage(ToRadio)
ManufacturingData = _reflection.GeneratedProtocolMessageType(&#39;ManufacturingData&#39;, (_message.Message,), {
&#39;DESCRIPTOR&#39; : _MANUFACTURINGDATA,
&#39;__module__&#39; : &#39;mesh_pb2&#39;
# @@protoc_insertion_point(class_scope:ManufacturingData)
})
_sym_db.RegisterMessage(ManufacturingData)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)</code></pre>
</details>
</section>
<section>
</section>
<section>
</section>
<section>
</section>
<section>
<h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="meshtastic.mesh_pb2.ChannelSettings"><code class="flex name class">
<span>class <span class="ident">ChannelSettings</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ChannelSettings.BANDWIDTH_FIELD_NUMBER"><code class="name">var <span class="ident">BANDWIDTH_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.Bw125Cr45Sf128"><code class="name">var <span class="ident">Bw125Cr45Sf128</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.Bw125Cr48Sf4096"><code class="name">var <span class="ident">Bw125Cr48Sf4096</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.Bw31_25Cr48Sf512"><code class="name">var <span class="ident">Bw31_25Cr48Sf512</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.Bw500Cr45Sf128"><code class="name">var <span class="ident">Bw500Cr45Sf128</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.CHANNEL_NUM_FIELD_NUMBER"><code class="name">var <span class="ident">CHANNEL_NUM_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.CODING_RATE_FIELD_NUMBER"><code class="name">var <span class="ident">CODING_RATE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.MODEM_CONFIG_FIELD_NUMBER"><code class="name">var <span class="ident">MODEM_CONFIG_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.ModemConfig"><code class="name">var <span class="ident">ModemConfig</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.NAME_FIELD_NUMBER"><code class="name">var <span class="ident">NAME_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.PSK_FIELD_NUMBER"><code class="name">var <span class="ident">PSK_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.SPREAD_FACTOR_FIELD_NUMBER"><code class="name">var <span class="ident">SPREAD_FACTOR_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.TX_POWER_FIELD_NUMBER"><code class="name">var <span class="ident">TX_POWER_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ChannelSettings.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ChannelSettings.bandwidth"><code class="name">var <span class="ident">bandwidth</span></code></dt>
<dd>
<div class="desc"><p>Getter for bandwidth.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.channel_num"><code class="name">var <span class="ident">channel_num</span></code></dt>
<dd>
<div class="desc"><p>Getter for channel_num.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.coding_rate"><code class="name">var <span class="ident">coding_rate</span></code></dt>
<dd>
<div class="desc"><p>Getter for coding_rate.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.modem_config"><code class="name">var <span class="ident">modem_config</span></code></dt>
<dd>
<div class="desc"><p>Getter for modem_config.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.name"><code class="name">var <span class="ident">name</span></code></dt>
<dd>
<div class="desc"><p>Getter for name.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.psk"><code class="name">var <span class="ident">psk</span></code></dt>
<dd>
<div class="desc"><p>Getter for psk.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.spread_factor"><code class="name">var <span class="ident">spread_factor</span></code></dt>
<dd>
<div class="desc"><p>Getter for spread_factor.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.tx_power"><code class="name">var <span class="ident">tx_power</span></code></dt>
<dd>
<div class="desc"><p>Getter for tx_power.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ChannelSettings.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ChannelSettings.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.Data"><code class="flex name class">
<span>class <span class="ident">Data</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.Data.CLEAR_READACK"><code class="name">var <span class="ident">CLEAR_READACK</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Data.CLEAR_TEXT"><code class="name">var <span class="ident">CLEAR_TEXT</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Data.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Data.OPAQUE"><code class="name">var <span class="ident">OPAQUE</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Data.PAYLOAD_FIELD_NUMBER"><code class="name">var <span class="ident">PAYLOAD_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Data.TYP_FIELD_NUMBER"><code class="name">var <span class="ident">TYP_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Data.Type"><code class="name">var <span class="ident">Type</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.Data.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.Data.payload"><code class="name">var <span class="ident">payload</span></code></dt>
<dd>
<div class="desc"><p>Getter for payload.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.typ"><code class="name">var <span class="ident">typ</span></code></dt>
<dd>
<div class="desc"><p>Getter for typ.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.Data.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Data.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString"><code class="flex name class">
<span>class <span class="ident">DebugString</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.DebugString.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.MESSAGE_FIELD_NUMBER"><code class="name">var <span class="ident">MESSAGE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.DebugString.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.DebugString.message"><code class="name">var <span class="ident">message</span></code></dt>
<dd>
<div class="desc"><p>Getter for message.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.DebugString.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DebugString.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState"><code class="flex name class">
<span>class <span class="ident">DeviceState</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.DeviceState.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.DID_GPS_RESET_FIELD_NUMBER"><code class="name">var <span class="ident">DID_GPS_RESET_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.MY_NODE_FIELD_NUMBER"><code class="name">var <span class="ident">MY_NODE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.NODE_DB_FIELD_NUMBER"><code class="name">var <span class="ident">NODE_DB_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.NO_SAVE_FIELD_NUMBER"><code class="name">var <span class="ident">NO_SAVE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.OWNER_FIELD_NUMBER"><code class="name">var <span class="ident">OWNER_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.RADIO_FIELD_NUMBER"><code class="name">var <span class="ident">RADIO_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.RECEIVE_QUEUE_FIELD_NUMBER"><code class="name">var <span class="ident">RECEIVE_QUEUE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.RX_TEXT_MESSAGE_FIELD_NUMBER"><code class="name">var <span class="ident">RX_TEXT_MESSAGE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.VERSION_FIELD_NUMBER"><code class="name">var <span class="ident">VERSION_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.DeviceState.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.DeviceState.did_gps_reset"><code class="name">var <span class="ident">did_gps_reset</span></code></dt>
<dd>
<div class="desc"><p>Getter for did_gps_reset.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.my_node"><code class="name">var <span class="ident">my_node</span></code></dt>
<dd>
<div class="desc"><p>Getter for my_node.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.no_save"><code class="name">var <span class="ident">no_save</span></code></dt>
<dd>
<div class="desc"><p>Getter for no_save.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.node_db"><code class="name">var <span class="ident">node_db</span></code></dt>
<dd>
<div class="desc"><p>Getter for node_db.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.owner"><code class="name">var <span class="ident">owner</span></code></dt>
<dd>
<div class="desc"><p>Getter for owner.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.radio"><code class="name">var <span class="ident">radio</span></code></dt>
<dd>
<div class="desc"><p>Getter for radio.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.receive_queue"><code class="name">var <span class="ident">receive_queue</span></code></dt>
<dd>
<div class="desc"><p>Getter for receive_queue.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.rx_text_message"><code class="name">var <span class="ident">rx_text_message</span></code></dt>
<dd>
<div class="desc"><p>Getter for rx_text_message.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.version"><code class="name">var <span class="ident">version</span></code></dt>
<dd>
<div class="desc"><p>Getter for version.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.DeviceState.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.DeviceState.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio"><code class="flex name class">
<span>class <span class="ident">FromRadio</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.FromRadio.CONFIG_COMPLETE_ID_FIELD_NUMBER"><code class="name">var <span class="ident">CONFIG_COMPLETE_ID_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.DEBUG_STRING_FIELD_NUMBER"><code class="name">var <span class="ident">DEBUG_STRING_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.MY_INFO_FIELD_NUMBER"><code class="name">var <span class="ident">MY_INFO_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.NODE_INFO_FIELD_NUMBER"><code class="name">var <span class="ident">NODE_INFO_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.NUM_FIELD_NUMBER"><code class="name">var <span class="ident">NUM_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.PACKET_FIELD_NUMBER"><code class="name">var <span class="ident">PACKET_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.RADIO_FIELD_NUMBER"><code class="name">var <span class="ident">RADIO_FIELD_NUMBER</span></code></dt>
<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>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.FromRadio.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.FromRadio.config_complete_id"><code class="name">var <span class="ident">config_complete_id</span></code></dt>
<dd>
<div class="desc"><p>Getter for config_complete_id.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.debug_string"><code class="name">var <span class="ident">debug_string</span></code></dt>
<dd>
<div class="desc"><p>Getter for debug_string.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.my_info"><code class="name">var <span class="ident">my_info</span></code></dt>
<dd>
<div class="desc"><p>Getter for my_info.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.node_info"><code class="name">var <span class="ident">node_info</span></code></dt>
<dd>
<div class="desc"><p>Getter for node_info.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.num"><code class="name">var <span class="ident">num</span></code></dt>
<dd>
<div class="desc"><p>Getter for num.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.packet"><code class="name">var <span class="ident">packet</span></code></dt>
<dd>
<div class="desc"><p>Getter for packet.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.radio"><code class="name">var <span class="ident">radio</span></code></dt>
<dd>
<div class="desc"><p>Getter for radio.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.rebooted"><code class="name">var <span class="ident">rebooted</span></code></dt>
<dd>
<div class="desc"><p>Getter for rebooted.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.FromRadio.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.FromRadio.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData"><code class="flex name class">
<span>class <span class="ident">ManufacturingData</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ManufacturingData.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.FRADIOFREQ_FIELD_NUMBER"><code class="name">var <span class="ident">FRADIOFREQ_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.HW_MODEL_FIELD_NUMBER"><code class="name">var <span class="ident">HW_MODEL_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.HW_VERSION_FIELD_NUMBER"><code class="name">var <span class="ident">HW_VERSION_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.SELFTEST_RESULT_FIELD_NUMBER"><code class="name">var <span class="ident">SELFTEST_RESULT_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ManufacturingData.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ManufacturingData.fradioFreq"><code class="name">var <span class="ident">fradioFreq</span></code></dt>
<dd>
<div class="desc"><p>Getter for fradioFreq.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.hw_model"><code class="name">var <span class="ident">hw_model</span></code></dt>
<dd>
<div class="desc"><p>Getter for hw_model.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.hw_version"><code class="name">var <span class="ident">hw_version</span></code></dt>
<dd>
<div class="desc"><p>Getter for hw_version.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.selftest_result"><code class="name">var <span class="ident">selftest_result</span></code></dt>
<dd>
<div class="desc"><p>Getter for selftest_result.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ManufacturingData.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ManufacturingData.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket"><code class="flex name class">
<span>class <span class="ident">MeshPacket</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.MeshPacket.DECODED_FIELD_NUMBER"><code class="name">var <span class="ident">DECODED_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.ENCRYPTED_FIELD_NUMBER"><code class="name">var <span class="ident">ENCRYPTED_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.FROM_FIELD_NUMBER"><code class="name">var <span class="ident">FROM_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.HOP_LIMIT_FIELD_NUMBER"><code class="name">var <span class="ident">HOP_LIMIT_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.ID_FIELD_NUMBER"><code class="name">var <span class="ident">ID_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.RX_SNR_FIELD_NUMBER"><code class="name">var <span class="ident">RX_SNR_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.RX_TIME_FIELD_NUMBER"><code class="name">var <span class="ident">RX_TIME_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.TO_FIELD_NUMBER"><code class="name">var <span class="ident">TO_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.WANT_ACK_FIELD_NUMBER"><code class="name">var <span class="ident">WANT_ACK_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.MeshPacket.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.MeshPacket.decoded"><code class="name">var <span class="ident">decoded</span></code></dt>
<dd>
<div class="desc"><p>Getter for decoded.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.encrypted"><code class="name">var <span class="ident">encrypted</span></code></dt>
<dd>
<div class="desc"><p>Getter for encrypted.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.from"><code class="name">var <span class="ident">from</span></code></dt>
<dd>
<div class="desc"><p>Getter for from.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.hop_limit"><code class="name">var <span class="ident">hop_limit</span></code></dt>
<dd>
<div class="desc"><p>Getter for hop_limit.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.id"><code class="name">var <span class="ident">id</span></code></dt>
<dd>
<div class="desc"><p>Getter for id.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.rx_snr"><code class="name">var <span class="ident">rx_snr</span></code></dt>
<dd>
<div class="desc"><p>Getter for rx_snr.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.rx_time"><code class="name">var <span class="ident">rx_time</span></code></dt>
<dd>
<div class="desc"><p>Getter for rx_time.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.to"><code class="name">var <span class="ident">to</span></code></dt>
<dd>
<div class="desc"><p>Getter for to.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.want_ack"><code class="name">var <span class="ident">want_ack</span></code></dt>
<dd>
<div class="desc"><p>Getter for want_ack.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.MeshPacket.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MeshPacket.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo"><code class="flex name class">
<span>class <span class="ident">MyNodeInfo</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.CURRENT_PACKET_ID_FIELD_NUMBER"><code class="name">var <span class="ident">CURRENT_PACKET_ID_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.ERROR_ADDRESS_FIELD_NUMBER"><code class="name">var <span class="ident">ERROR_ADDRESS_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.ERROR_CODE_FIELD_NUMBER"><code class="name">var <span class="ident">ERROR_CODE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.ERROR_COUNT_FIELD_NUMBER"><code class="name">var <span class="ident">ERROR_COUNT_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.FIRMWARE_VERSION_FIELD_NUMBER"><code class="name">var <span class="ident">FIRMWARE_VERSION_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.HAS_GPS_FIELD_NUMBER"><code class="name">var <span class="ident">HAS_GPS_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.HW_MODEL_FIELD_NUMBER"><code class="name">var <span class="ident">HW_MODEL_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.MESSAGE_TIMEOUT_MSEC_FIELD_NUMBER"><code class="name">var <span class="ident">MESSAGE_TIMEOUT_MSEC_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.MIN_APP_VERSION_FIELD_NUMBER"><code class="name">var <span class="ident">MIN_APP_VERSION_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.MY_NODE_NUM_FIELD_NUMBER"><code class="name">var <span class="ident">MY_NODE_NUM_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.NODE_NUM_BITS_FIELD_NUMBER"><code class="name">var <span class="ident">NODE_NUM_BITS_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.NUM_CHANNELS_FIELD_NUMBER"><code class="name">var <span class="ident">NUM_CHANNELS_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.PACKET_ID_BITS_FIELD_NUMBER"><code class="name">var <span class="ident">PACKET_ID_BITS_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.REGION_FIELD_NUMBER"><code class="name">var <span class="ident">REGION_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.current_packet_id"><code class="name">var <span class="ident">current_packet_id</span></code></dt>
<dd>
<div class="desc"><p>Getter for current_packet_id.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.error_address"><code class="name">var <span class="ident">error_address</span></code></dt>
<dd>
<div class="desc"><p>Getter for error_address.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.error_code"><code class="name">var <span class="ident">error_code</span></code></dt>
<dd>
<div class="desc"><p>Getter for error_code.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.error_count"><code class="name">var <span class="ident">error_count</span></code></dt>
<dd>
<div class="desc"><p>Getter for error_count.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.firmware_version"><code class="name">var <span class="ident">firmware_version</span></code></dt>
<dd>
<div class="desc"><p>Getter for firmware_version.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.has_gps"><code class="name">var <span class="ident">has_gps</span></code></dt>
<dd>
<div class="desc"><p>Getter for has_gps.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.hw_model"><code class="name">var <span class="ident">hw_model</span></code></dt>
<dd>
<div class="desc"><p>Getter for hw_model.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.message_timeout_msec"><code class="name">var <span class="ident">message_timeout_msec</span></code></dt>
<dd>
<div class="desc"><p>Getter for message_timeout_msec.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.min_app_version"><code class="name">var <span class="ident">min_app_version</span></code></dt>
<dd>
<div class="desc"><p>Getter for min_app_version.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.my_node_num"><code class="name">var <span class="ident">my_node_num</span></code></dt>
<dd>
<div class="desc"><p>Getter for my_node_num.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.node_num_bits"><code class="name">var <span class="ident">node_num_bits</span></code></dt>
<dd>
<div class="desc"><p>Getter for node_num_bits.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.num_channels"><code class="name">var <span class="ident">num_channels</span></code></dt>
<dd>
<div class="desc"><p>Getter for num_channels.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.packet_id_bits"><code class="name">var <span class="ident">packet_id_bits</span></code></dt>
<dd>
<div class="desc"><p>Getter for packet_id_bits.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.region"><code class="name">var <span class="ident">region</span></code></dt>
<dd>
<div class="desc"><p>Getter for region.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.MyNodeInfo.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo"><code class="flex name class">
<span>class <span class="ident">NodeInfo</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.NodeInfo.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.NEXT_HOP_FIELD_NUMBER"><code class="name">var <span class="ident">NEXT_HOP_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>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.POSITION_FIELD_NUMBER"><code class="name">var <span class="ident">POSITION_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.SNR_FIELD_NUMBER"><code class="name">var <span class="ident">SNR_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.USER_FIELD_NUMBER"><code class="name">var <span class="ident">USER_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.NodeInfo.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.NodeInfo.next_hop"><code class="name">var <span class="ident">next_hop</span></code></dt>
<dd>
<div class="desc"><p>Getter for next_hop.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.num"><code class="name">var <span class="ident">num</span></code></dt>
<dd>
<div class="desc"><p>Getter for num.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.position"><code class="name">var <span class="ident">position</span></code></dt>
<dd>
<div class="desc"><p>Getter for position.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.snr"><code class="name">var <span class="ident">snr</span></code></dt>
<dd>
<div class="desc"><p>Getter for snr.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.user"><code class="name">var <span class="ident">user</span></code></dt>
<dd>
<div class="desc"><p>Getter for user.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.NodeInfo.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.NodeInfo.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.Position"><code class="flex name class">
<span>class <span class="ident">Position</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.Position.ALTITUDE_FIELD_NUMBER"><code class="name">var <span class="ident">ALTITUDE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Position.BATTERY_LEVEL_FIELD_NUMBER"><code class="name">var <span class="ident">BATTERY_LEVEL_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Position.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Position.LATITUDE_I_FIELD_NUMBER"><code class="name">var <span class="ident">LATITUDE_I_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Position.LONGITUDE_I_FIELD_NUMBER"><code class="name">var <span class="ident">LONGITUDE_I_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.Position.TIME_FIELD_NUMBER"><code class="name">var <span class="ident">TIME_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.Position.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.Position.altitude"><code class="name">var <span class="ident">altitude</span></code></dt>
<dd>
<div class="desc"><p>Getter for altitude.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.battery_level"><code class="name">var <span class="ident">battery_level</span></code></dt>
<dd>
<div class="desc"><p>Getter for battery_level.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.latitude_i"><code class="name">var <span class="ident">latitude_i</span></code></dt>
<dd>
<div class="desc"><p>Getter for latitude_i.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.longitude_i"><code class="name">var <span class="ident">longitude_i</span></code></dt>
<dd>
<div class="desc"><p>Getter for longitude_i.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.time"><code class="name">var <span class="ident">time</span></code></dt>
<dd>
<div class="desc"><p>Getter for time.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.Position.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.Position.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig"><code class="flex name class">
<span>class <span class="ident">RadioConfig</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.RadioConfig.CHANNEL_SETTINGS_FIELD_NUMBER"><code class="name">var <span class="ident">CHANNEL_SETTINGS_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.PREFERENCES_FIELD_NUMBER"><code class="name">var <span class="ident">PREFERENCES_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.UserPreferences"><code class="name">var <span class="ident">UserPreferences</span></code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.RadioConfig.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.RadioConfig.channel_settings"><code class="name">var <span class="ident">channel_settings</span></code></dt>
<dd>
<div class="desc"><p>Getter for channel_settings.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.preferences"><code class="name">var <span class="ident">preferences</span></code></dt>
<dd>
<div class="desc"><p>Getter for preferences.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.RadioConfig.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RadioConfig.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery"><code class="flex name class">
<span>class <span class="ident">RouteDiscovery</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.ROUTE_FIELD_NUMBER"><code class="name">var <span class="ident">ROUTE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.route"><code class="name">var <span class="ident">route</span></code></dt>
<dd>
<div class="desc"><p>Getter for route.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.RouteDiscovery.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket"><code class="flex name class">
<span>class <span class="ident">SubPacket</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.SubPacket.DATA_FIELD_NUMBER"><code class="name">var <span class="ident">DATA_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.DEST_FIELD_NUMBER"><code class="name">var <span class="ident">DEST_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.FAIL_ID_FIELD_NUMBER"><code class="name">var <span class="ident">FAIL_ID_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.ORIGINAL_ID_FIELD_NUMBER"><code class="name">var <span class="ident">ORIGINAL_ID_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.POSITION_FIELD_NUMBER"><code class="name">var <span class="ident">POSITION_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.ROUTE_ERROR_FIELD_NUMBER"><code class="name">var <span class="ident">ROUTE_ERROR_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.ROUTE_REPLY_FIELD_NUMBER"><code class="name">var <span class="ident">ROUTE_REPLY_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.ROUTE_REQUEST_FIELD_NUMBER"><code class="name">var <span class="ident">ROUTE_REQUEST_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.SOURCE_FIELD_NUMBER"><code class="name">var <span class="ident">SOURCE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.SUCCESS_ID_FIELD_NUMBER"><code class="name">var <span class="ident">SUCCESS_ID_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.USER_FIELD_NUMBER"><code class="name">var <span class="ident">USER_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.WANT_RESPONSE_FIELD_NUMBER"><code class="name">var <span class="ident">WANT_RESPONSE_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.SubPacket.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.SubPacket.data"><code class="name">var <span class="ident">data</span></code></dt>
<dd>
<div class="desc"><p>Getter for data.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.dest"><code class="name">var <span class="ident">dest</span></code></dt>
<dd>
<div class="desc"><p>Getter for dest.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.fail_id"><code class="name">var <span class="ident">fail_id</span></code></dt>
<dd>
<div class="desc"><p>Getter for fail_id.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.original_id"><code class="name">var <span class="ident">original_id</span></code></dt>
<dd>
<div class="desc"><p>Getter for original_id.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.position"><code class="name">var <span class="ident">position</span></code></dt>
<dd>
<div class="desc"><p>Getter for position.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.route_error"><code class="name">var <span class="ident">route_error</span></code></dt>
<dd>
<div class="desc"><p>Getter for route_error.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.route_reply"><code class="name">var <span class="ident">route_reply</span></code></dt>
<dd>
<div class="desc"><p>Getter for route_reply.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.route_request"><code class="name">var <span class="ident">route_request</span></code></dt>
<dd>
<div class="desc"><p>Getter for route_request.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.source"><code class="name">var <span class="ident">source</span></code></dt>
<dd>
<div class="desc"><p>Getter for source.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.success_id"><code class="name">var <span class="ident">success_id</span></code></dt>
<dd>
<div class="desc"><p>Getter for success_id.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.user"><code class="name">var <span class="ident">user</span></code></dt>
<dd>
<div class="desc"><p>Getter for user.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.want_response"><code class="name">var <span class="ident">want_response</span></code></dt>
<dd>
<div class="desc"><p>Getter for want_response.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.SubPacket.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.SubPacket.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio"><code class="flex name class">
<span>class <span class="ident">ToRadio</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ToRadio.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.PACKET_FIELD_NUMBER"><code class="name">var <span class="ident">PACKET_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.SET_OWNER_FIELD_NUMBER"><code class="name">var <span class="ident">SET_OWNER_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.SET_RADIO_FIELD_NUMBER"><code class="name">var <span class="ident">SET_RADIO_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.WANT_CONFIG_ID_FIELD_NUMBER"><code class="name">var <span class="ident">WANT_CONFIG_ID_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ToRadio.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ToRadio.packet"><code class="name">var <span class="ident">packet</span></code></dt>
<dd>
<div class="desc"><p>Getter for packet.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.set_owner"><code class="name">var <span class="ident">set_owner</span></code></dt>
<dd>
<div class="desc"><p>Getter for set_owner.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.set_radio"><code class="name">var <span class="ident">set_radio</span></code></dt>
<dd>
<div class="desc"><p>Getter for set_radio.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
field_value = self._fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
# Atomically check if another thread has preempted us and, if not, swap
# in the new object we just created. If someone has preempted us, we
# take that object and discard ours.
# WARNING: We are relying on setdefault() being atomic. This is true
# in CPython but we haven&#39;t investigated others. This warning appears
# in several other locations in this file.
field_value = self._fields.setdefault(field, field_value)
return field_value</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.want_config_id"><code class="name">var <span class="ident">want_config_id</span></code></dt>
<dd>
<div class="desc"><p>Getter for want_config_id.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.ToRadio.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.ToRadio.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="meshtastic.mesh_pb2.User"><code class="flex name class">
<span>class <span class="ident">User</span></span>
<span>(</span><span>**kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Abstract base class for protocol messages.</p>
<p>Protocol message classes are almost always generated by the protocol
compiler.
These generated types subclass Message and implement the methods
shown below.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>google.protobuf.message.Message</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.User.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.User.ID_FIELD_NUMBER"><code class="name">var <span class="ident">ID_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.User.LONG_NAME_FIELD_NUMBER"><code class="name">var <span class="ident">LONG_NAME_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.User.MACADDR_FIELD_NUMBER"><code class="name">var <span class="ident">MACADDR_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="meshtastic.mesh_pb2.User.SHORT_NAME_FIELD_NUMBER"><code class="name">var <span class="ident">SHORT_NAME_FIELD_NUMBER</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.User.FromString"><code class="name flex">
<span>def <span class="ident">FromString</span></span>(<span>s)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FromString(s):
message = cls()
message.MergeFromString(s)
return message</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.RegisterExtension"><code class="name flex">
<span>def <span class="ident">RegisterExtension</span></span>(<span>extension_handle)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def RegisterExtension(extension_handle):
extension_handle.containing_type = cls.DESCRIPTOR
# TODO(amauryfa): Use cls.MESSAGE_FACTORY.pool when available.
# pylint: disable=protected-access
cls.DESCRIPTOR.file.pool._AddExtensionDescriptor(extension_handle)
_AttachFieldHelpers(cls, extension_handle)</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="meshtastic.mesh_pb2.User.id"><code class="name">var <span class="ident">id</span></code></dt>
<dd>
<div class="desc"><p>Getter for id.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.long_name"><code class="name">var <span class="ident">long_name</span></code></dt>
<dd>
<div class="desc"><p>Getter for long_name.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.macaddr"><code class="name">var <span class="ident">macaddr</span></code></dt>
<dd>
<div class="desc"><p>Getter for macaddr.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.short_name"><code class="name">var <span class="ident">short_name</span></code></dt>
<dd>
<div class="desc"><p>Getter for short_name.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def getter(self):
# TODO(protobuf-team): This may be broken since there may not be
# default_value. Combine with has_default_value somehow.
return self._fields.get(field, default_value)</code></pre>
</details>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="meshtastic.mesh_pb2.User.ByteSize"><code class="name flex">
<span>def <span class="ident">ByteSize</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 ByteSize(self):
if not self._cached_byte_size_dirty:
return self._cached_byte_size
size = 0
descriptor = self.DESCRIPTOR
if descriptor.GetOptions().map_entry:
# Fields of map entry should always be serialized.
size = descriptor.fields_by_name[&#39;key&#39;]._sizer(self.key)
size += descriptor.fields_by_name[&#39;value&#39;]._sizer(self.value)
else:
for field_descriptor, field_value in self.ListFields():
size += field_descriptor._sizer(field_value)
for tag_bytes, value_bytes in self._unknown_fields:
size += len(tag_bytes) + len(value_bytes)
self._cached_byte_size = size
self._cached_byte_size_dirty = False
self._listener_for_children.dirty = False
return size</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.Clear"><code class="name flex">
<span>def <span class="ident">Clear</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 _Clear(self):
# Clear fields.
self._fields = {}
self._unknown_fields = ()
# pylint: disable=protected-access
if self._unknown_field_set is not None:
self._unknown_field_set._clear()
self._unknown_field_set = None
self._oneofs = {}
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.ClearField"><code class="name flex">
<span>def <span class="ident">ClearField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def ClearField(self, field_name):
try:
field = message_descriptor.fields_by_name[field_name]
except KeyError:
try:
field = message_descriptor.oneofs_by_name[field_name]
if field in self._oneofs:
field = self._oneofs[field]
else:
return
except KeyError:
raise ValueError(&#39;Protocol message %s has no &#34;%s&#34; field.&#39; %
(message_descriptor.name, field_name))
if field in self._fields:
# To match the C++ implementation, we need to invalidate iterators
# for map fields when ClearField() happens.
if hasattr(self._fields[field], &#39;InvalidateIterators&#39;):
self._fields[field].InvalidateIterators()
# Note: If the field is a sub-message, its listener will still point
# at us. That&#39;s fine, because the worst than can happen is that it
# will call _Modified() and invalidate our byte size. Big deal.
del self._fields[field]
if self._oneofs.get(field.containing_oneof, None) is field:
del self._oneofs[field.containing_oneof]
# Always call _Modified() -- even if nothing was changed, this is
# a mutating method, and thus calling it should cause the field to become
# present in the parent message.
self._Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.DiscardUnknownFields"><code class="name flex">
<span>def <span class="ident">DiscardUnknownFields</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 _DiscardUnknownFields(self):
self._unknown_fields = []
self._unknown_field_set = None # pylint: disable=protected-access
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
value[key].DiscardUnknownFields()
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for sub_message in value:
sub_message.DiscardUnknownFields()
else:
value.DiscardUnknownFields()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.FindInitializationErrors"><code class="name flex">
<span>def <span class="ident">FindInitializationErrors</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Finds required fields which are not initialized.</p>
<h2 id="returns">Returns</h2>
<p>A list of strings.
Each string is a path to an uninitialized field from
the top-level message, e.g. "foo.bar[5].baz".</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def FindInitializationErrors(self):
&#34;&#34;&#34;Finds required fields which are not initialized.
Returns:
A list of strings. Each string is a path to an uninitialized field from
the top-level message, e.g. &#34;foo.bar[5].baz&#34;.
&#34;&#34;&#34;
errors = [] # simplify things
for field in required_fields:
if not self.HasField(field.name):
errors.append(field.name)
for field, value in self.ListFields():
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.is_extension:
name = &#39;(%s)&#39; % field.full_name
else:
name = field.name
if _IsMapField(field):
if _IsMessageMapField(field):
for key in value:
element = value[key]
prefix = &#39;%s[%s].&#39; % (name, key)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
# ScalarMaps can&#39;t have any initialization errors.
pass
elif field.label == _FieldDescriptor.LABEL_REPEATED:
for i in range(len(value)):
element = value[i]
prefix = &#39;%s[%d].&#39; % (name, i)
sub_errors = element.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
else:
prefix = name + &#39;.&#39;
sub_errors = value.FindInitializationErrors()
errors += [prefix + error for error in sub_errors]
return errors</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.HasField"><code class="name flex">
<span>def <span class="ident">HasField</span></span>(<span>self, field_name)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def HasField(self, field_name):
try:
field = hassable_fields[field_name]
except KeyError:
raise ValueError(error_msg % (message_descriptor.full_name, field_name))
if isinstance(field, descriptor_mod.OneofDescriptor):
try:
return HasField(self, self._oneofs[field].name)
except KeyError:
return False
else:
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
value = self._fields.get(field)
return value is not None and value._is_present_in_parent
else:
return field in self._fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.IsInitialized"><code class="name flex">
<span>def <span class="ident">IsInitialized</span></span>(<span>self, errors=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if all required fields of a message are set.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>errors</code></strong></dt>
<dd>A list which, if provided, will be populated with the field
paths of all missing required fields.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>True iff the specified message has all required fields set.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def IsInitialized(self, errors=None):
&#34;&#34;&#34;Checks if all required fields of a message are set.
Args:
errors: A list which, if provided, will be populated with the field
paths of all missing required fields.
Returns:
True iff the specified message has all required fields set.
&#34;&#34;&#34;
# Performance is critical so we avoid HasField() and ListFields().
for field in required_fields:
if (field not in self._fields or
(field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and
not self._fields[field]._is_present_in_parent)):
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
for field, value in list(self._fields.items()): # dict can change size!
if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
if field.label == _FieldDescriptor.LABEL_REPEATED:
if (field.message_type.has_options and
field.message_type.GetOptions().map_entry):
continue
for element in value:
if not element.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
elif value._is_present_in_parent and not value.IsInitialized():
if errors is not None:
errors.extend(self.FindInitializationErrors())
return False
return True</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.ListFields"><code class="name flex">
<span>def <span class="ident">ListFields</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 ListFields(self):
all_fields = [item for item in self._fields.items() if _IsPresent(item)]
all_fields.sort(key = lambda item: item[0].number)
return all_fields</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.MergeFrom"><code class="name flex">
<span>def <span class="ident">MergeFrom</span></span>(<span>self, msg)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFrom(self, msg):
if not isinstance(msg, cls):
raise TypeError(
&#39;Parameter to MergeFrom() must be instance of same class: &#39;
&#39;expected %s got %s.&#39; % (cls.__name__, msg.__class__.__name__))
assert msg is not self
self._Modified()
fields = self._fields
for field, value in msg._fields.items():
if field.label == LABEL_REPEATED:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
elif field.cpp_type == CPPTYPE_MESSAGE:
if value._is_present_in_parent:
field_value = fields.get(field)
if field_value is None:
# Construct a new object to represent this field.
field_value = field._default_constructor(self)
fields[field] = field_value
field_value.MergeFrom(value)
else:
self._fields[field] = value
if field.containing_oneof:
self._UpdateOneofState(field)
if msg._unknown_fields:
if not self._unknown_fields:
self._unknown_fields = []
self._unknown_fields.extend(msg._unknown_fields)
# pylint: disable=protected-access
if self._unknown_field_set is None:
self._unknown_field_set = containers.UnknownFieldSet()
self._unknown_field_set._extend(msg._unknown_field_set)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.MergeFromString"><code class="name flex">
<span>def <span class="ident">MergeFromString</span></span>(<span>self, serialized)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def MergeFromString(self, serialized):
if isinstance(serialized, memoryview) and six.PY2:
raise TypeError(
&#39;memoryview not supported in Python 2 with the pure Python proto &#39;
&#39;implementation: this is to maintain compatibility with the C++ &#39;
&#39;implementation&#39;)
serialized = memoryview(serialized)
length = len(serialized)
try:
if self._InternalParse(serialized, 0, length) != length:
# The only reason _InternalParse would return early is if it
# encountered an end-group tag.
raise message_mod.DecodeError(&#39;Unexpected end-group tag.&#39;)
except (IndexError, TypeError):
# Now ord(buf[p:p+1]) == ord(&#39;&#39;) gets TypeError.
raise message_mod.DecodeError(&#39;Truncated message.&#39;)
except struct.error as e:
raise message_mod.DecodeError(e)
return length # Return this for legacy reasons.</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.SerializePartialToString"><code class="name flex">
<span>def <span class="ident">SerializePartialToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializePartialToString(self, **kwargs):
out = BytesIO()
self._InternalSerialize(out.write, **kwargs)
return out.getvalue()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.SerializeToString"><code class="name flex">
<span>def <span class="ident">SerializeToString</span></span>(<span>self, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def SerializeToString(self, **kwargs):
# Check if the message has all of its required fields set.
if not self.IsInitialized():
raise message_mod.EncodeError(
&#39;Message %s is missing required fields: %s&#39; % (
self.DESCRIPTOR.full_name, &#39;,&#39;.join(self.FindInitializationErrors())))
return self.SerializePartialToString(**kwargs)</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.SetInParent"><code class="name flex">
<span>def <span class="ident">SetInParent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Modified(self):
&#34;&#34;&#34;Sets the _cached_byte_size_dirty bit to true,
and propagates this to our listener iff this was a state change.
&#34;&#34;&#34;
# Note: Some callers check _cached_byte_size_dirty before calling
# _Modified() as an extra optimization. So, if this method is ever
# changed such that it does stuff even when _cached_byte_size_dirty is
# already true, the callers need to be updated.
if not self._cached_byte_size_dirty:
self._cached_byte_size_dirty = True
self._listener_for_children.dirty = True
self._is_present_in_parent = True
self._listener.Modified()</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.UnknownFields"><code class="name flex">
<span>def <span class="ident">UnknownFields</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 _UnknownFields(self):
if self._unknown_field_set is None: # pylint: disable=protected-access
# pylint: disable=protected-access
self._unknown_field_set = containers.UnknownFieldSet()
return self._unknown_field_set # pylint: disable=protected-access</code></pre>
</details>
</dd>
<dt id="meshtastic.mesh_pb2.User.WhichOneof"><code class="name flex">
<span>def <span class="ident">WhichOneof</span></span>(<span>self, oneof_name)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns the name of the currently set field inside a oneof, or None.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def WhichOneof(self, oneof_name):
&#34;&#34;&#34;Returns the name of the currently set field inside a oneof, or None.&#34;&#34;&#34;
try:
field = message_descriptor.oneofs_by_name[oneof_name]
except KeyError:
raise ValueError(
&#39;Protocol message has no oneof &#34;%s&#34; field.&#39; % oneof_name)
nested_field = self._oneofs.get(field, None)
if nested_field is not None and self.HasField(nested_field.name):
return nested_field.name
else:
return None</code></pre>
</details>
</dd>
</dl>
</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-classes">Classes</a></h3>
<ul>
<li>
<h4><code><a title="meshtastic.mesh_pb2.ChannelSettings" href="#meshtastic.mesh_pb2.ChannelSettings">ChannelSettings</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.BANDWIDTH_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ChannelSettings.BANDWIDTH_FIELD_NUMBER">BANDWIDTH_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.Bw125Cr45Sf128" href="#meshtastic.mesh_pb2.ChannelSettings.Bw125Cr45Sf128">Bw125Cr45Sf128</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.Bw125Cr48Sf4096" href="#meshtastic.mesh_pb2.ChannelSettings.Bw125Cr48Sf4096">Bw125Cr48Sf4096</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.Bw31_25Cr48Sf512" href="#meshtastic.mesh_pb2.ChannelSettings.Bw31_25Cr48Sf512">Bw31_25Cr48Sf512</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.Bw500Cr45Sf128" href="#meshtastic.mesh_pb2.ChannelSettings.Bw500Cr45Sf128">Bw500Cr45Sf128</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.ByteSize" href="#meshtastic.mesh_pb2.ChannelSettings.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.CHANNEL_NUM_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ChannelSettings.CHANNEL_NUM_FIELD_NUMBER">CHANNEL_NUM_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.CODING_RATE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ChannelSettings.CODING_RATE_FIELD_NUMBER">CODING_RATE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.Clear" href="#meshtastic.mesh_pb2.ChannelSettings.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.ClearField" href="#meshtastic.mesh_pb2.ChannelSettings.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.DESCRIPTOR" href="#meshtastic.mesh_pb2.ChannelSettings.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.DiscardUnknownFields" href="#meshtastic.mesh_pb2.ChannelSettings.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.FindInitializationErrors" href="#meshtastic.mesh_pb2.ChannelSettings.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.FromString" href="#meshtastic.mesh_pb2.ChannelSettings.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.HasField" href="#meshtastic.mesh_pb2.ChannelSettings.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.IsInitialized" href="#meshtastic.mesh_pb2.ChannelSettings.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.ListFields" href="#meshtastic.mesh_pb2.ChannelSettings.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.MODEM_CONFIG_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ChannelSettings.MODEM_CONFIG_FIELD_NUMBER">MODEM_CONFIG_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.MergeFrom" href="#meshtastic.mesh_pb2.ChannelSettings.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.MergeFromString" href="#meshtastic.mesh_pb2.ChannelSettings.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.ModemConfig" href="#meshtastic.mesh_pb2.ChannelSettings.ModemConfig">ModemConfig</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.NAME_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ChannelSettings.NAME_FIELD_NUMBER">NAME_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.PSK_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ChannelSettings.PSK_FIELD_NUMBER">PSK_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.RegisterExtension" href="#meshtastic.mesh_pb2.ChannelSettings.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.SPREAD_FACTOR_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ChannelSettings.SPREAD_FACTOR_FIELD_NUMBER">SPREAD_FACTOR_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.SerializePartialToString" href="#meshtastic.mesh_pb2.ChannelSettings.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.SerializeToString" href="#meshtastic.mesh_pb2.ChannelSettings.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.SetInParent" href="#meshtastic.mesh_pb2.ChannelSettings.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.TX_POWER_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ChannelSettings.TX_POWER_FIELD_NUMBER">TX_POWER_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.UnknownFields" href="#meshtastic.mesh_pb2.ChannelSettings.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.WhichOneof" href="#meshtastic.mesh_pb2.ChannelSettings.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.bandwidth" href="#meshtastic.mesh_pb2.ChannelSettings.bandwidth">bandwidth</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.channel_num" href="#meshtastic.mesh_pb2.ChannelSettings.channel_num">channel_num</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.coding_rate" href="#meshtastic.mesh_pb2.ChannelSettings.coding_rate">coding_rate</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.modem_config" href="#meshtastic.mesh_pb2.ChannelSettings.modem_config">modem_config</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.name" href="#meshtastic.mesh_pb2.ChannelSettings.name">name</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.psk" href="#meshtastic.mesh_pb2.ChannelSettings.psk">psk</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.spread_factor" href="#meshtastic.mesh_pb2.ChannelSettings.spread_factor">spread_factor</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ChannelSettings.tx_power" href="#meshtastic.mesh_pb2.ChannelSettings.tx_power">tx_power</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.Data" href="#meshtastic.mesh_pb2.Data">Data</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.Data.ByteSize" href="#meshtastic.mesh_pb2.Data.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.CLEAR_READACK" href="#meshtastic.mesh_pb2.Data.CLEAR_READACK">CLEAR_READACK</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.CLEAR_TEXT" href="#meshtastic.mesh_pb2.Data.CLEAR_TEXT">CLEAR_TEXT</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.Clear" href="#meshtastic.mesh_pb2.Data.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.ClearField" href="#meshtastic.mesh_pb2.Data.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.DESCRIPTOR" href="#meshtastic.mesh_pb2.Data.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.DiscardUnknownFields" href="#meshtastic.mesh_pb2.Data.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.FindInitializationErrors" href="#meshtastic.mesh_pb2.Data.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.FromString" href="#meshtastic.mesh_pb2.Data.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.HasField" href="#meshtastic.mesh_pb2.Data.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.IsInitialized" href="#meshtastic.mesh_pb2.Data.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.ListFields" href="#meshtastic.mesh_pb2.Data.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.MergeFrom" href="#meshtastic.mesh_pb2.Data.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.MergeFromString" href="#meshtastic.mesh_pb2.Data.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.OPAQUE" href="#meshtastic.mesh_pb2.Data.OPAQUE">OPAQUE</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.PAYLOAD_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Data.PAYLOAD_FIELD_NUMBER">PAYLOAD_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.RegisterExtension" href="#meshtastic.mesh_pb2.Data.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.SerializePartialToString" href="#meshtastic.mesh_pb2.Data.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.SerializeToString" href="#meshtastic.mesh_pb2.Data.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.SetInParent" href="#meshtastic.mesh_pb2.Data.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.TYP_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Data.TYP_FIELD_NUMBER">TYP_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.Type" href="#meshtastic.mesh_pb2.Data.Type">Type</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.UnknownFields" href="#meshtastic.mesh_pb2.Data.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.WhichOneof" href="#meshtastic.mesh_pb2.Data.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.payload" href="#meshtastic.mesh_pb2.Data.payload">payload</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Data.typ" href="#meshtastic.mesh_pb2.Data.typ">typ</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.DebugString" href="#meshtastic.mesh_pb2.DebugString">DebugString</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.DebugString.ByteSize" href="#meshtastic.mesh_pb2.DebugString.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.Clear" href="#meshtastic.mesh_pb2.DebugString.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.ClearField" href="#meshtastic.mesh_pb2.DebugString.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.DESCRIPTOR" href="#meshtastic.mesh_pb2.DebugString.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.DiscardUnknownFields" href="#meshtastic.mesh_pb2.DebugString.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.FindInitializationErrors" href="#meshtastic.mesh_pb2.DebugString.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.FromString" href="#meshtastic.mesh_pb2.DebugString.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.HasField" href="#meshtastic.mesh_pb2.DebugString.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.IsInitialized" href="#meshtastic.mesh_pb2.DebugString.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.ListFields" href="#meshtastic.mesh_pb2.DebugString.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.MESSAGE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.DebugString.MESSAGE_FIELD_NUMBER">MESSAGE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.MergeFrom" href="#meshtastic.mesh_pb2.DebugString.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.MergeFromString" href="#meshtastic.mesh_pb2.DebugString.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.RegisterExtension" href="#meshtastic.mesh_pb2.DebugString.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.SerializePartialToString" href="#meshtastic.mesh_pb2.DebugString.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.SerializeToString" href="#meshtastic.mesh_pb2.DebugString.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.SetInParent" href="#meshtastic.mesh_pb2.DebugString.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.UnknownFields" href="#meshtastic.mesh_pb2.DebugString.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.WhichOneof" href="#meshtastic.mesh_pb2.DebugString.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DebugString.message" href="#meshtastic.mesh_pb2.DebugString.message">message</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.DeviceState" href="#meshtastic.mesh_pb2.DeviceState">DeviceState</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.DeviceState.ByteSize" href="#meshtastic.mesh_pb2.DeviceState.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.Clear" href="#meshtastic.mesh_pb2.DeviceState.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.ClearField" href="#meshtastic.mesh_pb2.DeviceState.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.DESCRIPTOR" href="#meshtastic.mesh_pb2.DeviceState.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.DID_GPS_RESET_FIELD_NUMBER" href="#meshtastic.mesh_pb2.DeviceState.DID_GPS_RESET_FIELD_NUMBER">DID_GPS_RESET_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.DiscardUnknownFields" href="#meshtastic.mesh_pb2.DeviceState.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.FindInitializationErrors" href="#meshtastic.mesh_pb2.DeviceState.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.FromString" href="#meshtastic.mesh_pb2.DeviceState.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.HasField" href="#meshtastic.mesh_pb2.DeviceState.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.IsInitialized" href="#meshtastic.mesh_pb2.DeviceState.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.ListFields" href="#meshtastic.mesh_pb2.DeviceState.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.MY_NODE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.DeviceState.MY_NODE_FIELD_NUMBER">MY_NODE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.MergeFrom" href="#meshtastic.mesh_pb2.DeviceState.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.MergeFromString" href="#meshtastic.mesh_pb2.DeviceState.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.NODE_DB_FIELD_NUMBER" href="#meshtastic.mesh_pb2.DeviceState.NODE_DB_FIELD_NUMBER">NODE_DB_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.NO_SAVE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.DeviceState.NO_SAVE_FIELD_NUMBER">NO_SAVE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.OWNER_FIELD_NUMBER" href="#meshtastic.mesh_pb2.DeviceState.OWNER_FIELD_NUMBER">OWNER_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.RADIO_FIELD_NUMBER" href="#meshtastic.mesh_pb2.DeviceState.RADIO_FIELD_NUMBER">RADIO_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.RECEIVE_QUEUE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.DeviceState.RECEIVE_QUEUE_FIELD_NUMBER">RECEIVE_QUEUE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.RX_TEXT_MESSAGE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.DeviceState.RX_TEXT_MESSAGE_FIELD_NUMBER">RX_TEXT_MESSAGE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.RegisterExtension" href="#meshtastic.mesh_pb2.DeviceState.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.SerializePartialToString" href="#meshtastic.mesh_pb2.DeviceState.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.SerializeToString" href="#meshtastic.mesh_pb2.DeviceState.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.SetInParent" href="#meshtastic.mesh_pb2.DeviceState.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.UnknownFields" href="#meshtastic.mesh_pb2.DeviceState.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.VERSION_FIELD_NUMBER" href="#meshtastic.mesh_pb2.DeviceState.VERSION_FIELD_NUMBER">VERSION_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.WhichOneof" href="#meshtastic.mesh_pb2.DeviceState.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.did_gps_reset" href="#meshtastic.mesh_pb2.DeviceState.did_gps_reset">did_gps_reset</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.my_node" href="#meshtastic.mesh_pb2.DeviceState.my_node">my_node</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.no_save" href="#meshtastic.mesh_pb2.DeviceState.no_save">no_save</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.node_db" href="#meshtastic.mesh_pb2.DeviceState.node_db">node_db</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.owner" href="#meshtastic.mesh_pb2.DeviceState.owner">owner</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.radio" href="#meshtastic.mesh_pb2.DeviceState.radio">radio</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.receive_queue" href="#meshtastic.mesh_pb2.DeviceState.receive_queue">receive_queue</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.rx_text_message" href="#meshtastic.mesh_pb2.DeviceState.rx_text_message">rx_text_message</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.DeviceState.version" href="#meshtastic.mesh_pb2.DeviceState.version">version</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.FromRadio" href="#meshtastic.mesh_pb2.FromRadio">FromRadio</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.FromRadio.ByteSize" href="#meshtastic.mesh_pb2.FromRadio.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.CONFIG_COMPLETE_ID_FIELD_NUMBER" href="#meshtastic.mesh_pb2.FromRadio.CONFIG_COMPLETE_ID_FIELD_NUMBER">CONFIG_COMPLETE_ID_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.Clear" href="#meshtastic.mesh_pb2.FromRadio.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.ClearField" href="#meshtastic.mesh_pb2.FromRadio.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.DEBUG_STRING_FIELD_NUMBER" href="#meshtastic.mesh_pb2.FromRadio.DEBUG_STRING_FIELD_NUMBER">DEBUG_STRING_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.DESCRIPTOR" href="#meshtastic.mesh_pb2.FromRadio.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.DiscardUnknownFields" href="#meshtastic.mesh_pb2.FromRadio.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.FindInitializationErrors" href="#meshtastic.mesh_pb2.FromRadio.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.FromString" href="#meshtastic.mesh_pb2.FromRadio.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.HasField" href="#meshtastic.mesh_pb2.FromRadio.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.IsInitialized" href="#meshtastic.mesh_pb2.FromRadio.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.ListFields" href="#meshtastic.mesh_pb2.FromRadio.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.MY_INFO_FIELD_NUMBER" href="#meshtastic.mesh_pb2.FromRadio.MY_INFO_FIELD_NUMBER">MY_INFO_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.MergeFrom" href="#meshtastic.mesh_pb2.FromRadio.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.MergeFromString" href="#meshtastic.mesh_pb2.FromRadio.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.NODE_INFO_FIELD_NUMBER" href="#meshtastic.mesh_pb2.FromRadio.NODE_INFO_FIELD_NUMBER">NODE_INFO_FIELD_NUMBER</a></code></li>
<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>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.RegisterExtension" href="#meshtastic.mesh_pb2.FromRadio.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.SerializePartialToString" href="#meshtastic.mesh_pb2.FromRadio.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.SerializeToString" href="#meshtastic.mesh_pb2.FromRadio.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.SetInParent" href="#meshtastic.mesh_pb2.FromRadio.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.UnknownFields" href="#meshtastic.mesh_pb2.FromRadio.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.WhichOneof" href="#meshtastic.mesh_pb2.FromRadio.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.config_complete_id" href="#meshtastic.mesh_pb2.FromRadio.config_complete_id">config_complete_id</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.debug_string" href="#meshtastic.mesh_pb2.FromRadio.debug_string">debug_string</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.my_info" href="#meshtastic.mesh_pb2.FromRadio.my_info">my_info</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.node_info" href="#meshtastic.mesh_pb2.FromRadio.node_info">node_info</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.num" href="#meshtastic.mesh_pb2.FromRadio.num">num</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.packet" href="#meshtastic.mesh_pb2.FromRadio.packet">packet</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.radio" href="#meshtastic.mesh_pb2.FromRadio.radio">radio</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.FromRadio.rebooted" href="#meshtastic.mesh_pb2.FromRadio.rebooted">rebooted</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.ManufacturingData" href="#meshtastic.mesh_pb2.ManufacturingData">ManufacturingData</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.ByteSize" href="#meshtastic.mesh_pb2.ManufacturingData.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.Clear" href="#meshtastic.mesh_pb2.ManufacturingData.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.ClearField" href="#meshtastic.mesh_pb2.ManufacturingData.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.DESCRIPTOR" href="#meshtastic.mesh_pb2.ManufacturingData.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.DiscardUnknownFields" href="#meshtastic.mesh_pb2.ManufacturingData.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.FRADIOFREQ_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ManufacturingData.FRADIOFREQ_FIELD_NUMBER">FRADIOFREQ_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.FindInitializationErrors" href="#meshtastic.mesh_pb2.ManufacturingData.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.FromString" href="#meshtastic.mesh_pb2.ManufacturingData.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.HW_MODEL_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ManufacturingData.HW_MODEL_FIELD_NUMBER">HW_MODEL_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.HW_VERSION_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ManufacturingData.HW_VERSION_FIELD_NUMBER">HW_VERSION_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.HasField" href="#meshtastic.mesh_pb2.ManufacturingData.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.IsInitialized" href="#meshtastic.mesh_pb2.ManufacturingData.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.ListFields" href="#meshtastic.mesh_pb2.ManufacturingData.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.MergeFrom" href="#meshtastic.mesh_pb2.ManufacturingData.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.MergeFromString" href="#meshtastic.mesh_pb2.ManufacturingData.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.RegisterExtension" href="#meshtastic.mesh_pb2.ManufacturingData.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.SELFTEST_RESULT_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ManufacturingData.SELFTEST_RESULT_FIELD_NUMBER">SELFTEST_RESULT_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.SerializePartialToString" href="#meshtastic.mesh_pb2.ManufacturingData.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.SerializeToString" href="#meshtastic.mesh_pb2.ManufacturingData.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.SetInParent" href="#meshtastic.mesh_pb2.ManufacturingData.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.UnknownFields" href="#meshtastic.mesh_pb2.ManufacturingData.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.WhichOneof" href="#meshtastic.mesh_pb2.ManufacturingData.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.fradioFreq" href="#meshtastic.mesh_pb2.ManufacturingData.fradioFreq">fradioFreq</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.hw_model" href="#meshtastic.mesh_pb2.ManufacturingData.hw_model">hw_model</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.hw_version" href="#meshtastic.mesh_pb2.ManufacturingData.hw_version">hw_version</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ManufacturingData.selftest_result" href="#meshtastic.mesh_pb2.ManufacturingData.selftest_result">selftest_result</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.MeshPacket" href="#meshtastic.mesh_pb2.MeshPacket">MeshPacket</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.ByteSize" href="#meshtastic.mesh_pb2.MeshPacket.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.Clear" href="#meshtastic.mesh_pb2.MeshPacket.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.ClearField" href="#meshtastic.mesh_pb2.MeshPacket.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.DECODED_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.DECODED_FIELD_NUMBER">DECODED_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.DESCRIPTOR" href="#meshtastic.mesh_pb2.MeshPacket.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.DiscardUnknownFields" href="#meshtastic.mesh_pb2.MeshPacket.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.ENCRYPTED_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.ENCRYPTED_FIELD_NUMBER">ENCRYPTED_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.FROM_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.FROM_FIELD_NUMBER">FROM_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.FindInitializationErrors" href="#meshtastic.mesh_pb2.MeshPacket.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.FromString" href="#meshtastic.mesh_pb2.MeshPacket.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.HOP_LIMIT_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.HOP_LIMIT_FIELD_NUMBER">HOP_LIMIT_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.HasField" href="#meshtastic.mesh_pb2.MeshPacket.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.ID_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.ID_FIELD_NUMBER">ID_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.IsInitialized" href="#meshtastic.mesh_pb2.MeshPacket.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.ListFields" href="#meshtastic.mesh_pb2.MeshPacket.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.MergeFrom" href="#meshtastic.mesh_pb2.MeshPacket.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.MergeFromString" href="#meshtastic.mesh_pb2.MeshPacket.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.RX_SNR_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.RX_SNR_FIELD_NUMBER">RX_SNR_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.RX_TIME_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.RX_TIME_FIELD_NUMBER">RX_TIME_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.RegisterExtension" href="#meshtastic.mesh_pb2.MeshPacket.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.SerializePartialToString" href="#meshtastic.mesh_pb2.MeshPacket.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.SerializeToString" href="#meshtastic.mesh_pb2.MeshPacket.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.SetInParent" href="#meshtastic.mesh_pb2.MeshPacket.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.TO_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.TO_FIELD_NUMBER">TO_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.UnknownFields" href="#meshtastic.mesh_pb2.MeshPacket.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.WANT_ACK_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.WANT_ACK_FIELD_NUMBER">WANT_ACK_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.WhichOneof" href="#meshtastic.mesh_pb2.MeshPacket.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.decoded" href="#meshtastic.mesh_pb2.MeshPacket.decoded">decoded</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.encrypted" href="#meshtastic.mesh_pb2.MeshPacket.encrypted">encrypted</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.from" href="#meshtastic.mesh_pb2.MeshPacket.from">from</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.hop_limit" href="#meshtastic.mesh_pb2.MeshPacket.hop_limit">hop_limit</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.id" href="#meshtastic.mesh_pb2.MeshPacket.id">id</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.rx_snr" href="#meshtastic.mesh_pb2.MeshPacket.rx_snr">rx_snr</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.rx_time" href="#meshtastic.mesh_pb2.MeshPacket.rx_time">rx_time</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.to" href="#meshtastic.mesh_pb2.MeshPacket.to">to</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.want_ack" href="#meshtastic.mesh_pb2.MeshPacket.want_ack">want_ack</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.MyNodeInfo" href="#meshtastic.mesh_pb2.MyNodeInfo">MyNodeInfo</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.ByteSize" href="#meshtastic.mesh_pb2.MyNodeInfo.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.CURRENT_PACKET_ID_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.CURRENT_PACKET_ID_FIELD_NUMBER">CURRENT_PACKET_ID_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.Clear" href="#meshtastic.mesh_pb2.MyNodeInfo.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.ClearField" href="#meshtastic.mesh_pb2.MyNodeInfo.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.DESCRIPTOR" href="#meshtastic.mesh_pb2.MyNodeInfo.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.DiscardUnknownFields" href="#meshtastic.mesh_pb2.MyNodeInfo.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.ERROR_ADDRESS_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.ERROR_ADDRESS_FIELD_NUMBER">ERROR_ADDRESS_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.ERROR_CODE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.ERROR_CODE_FIELD_NUMBER">ERROR_CODE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.ERROR_COUNT_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.ERROR_COUNT_FIELD_NUMBER">ERROR_COUNT_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.FIRMWARE_VERSION_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.FIRMWARE_VERSION_FIELD_NUMBER">FIRMWARE_VERSION_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.FindInitializationErrors" href="#meshtastic.mesh_pb2.MyNodeInfo.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.FromString" href="#meshtastic.mesh_pb2.MyNodeInfo.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.HAS_GPS_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.HAS_GPS_FIELD_NUMBER">HAS_GPS_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.HW_MODEL_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.HW_MODEL_FIELD_NUMBER">HW_MODEL_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.HasField" href="#meshtastic.mesh_pb2.MyNodeInfo.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.IsInitialized" href="#meshtastic.mesh_pb2.MyNodeInfo.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.ListFields" href="#meshtastic.mesh_pb2.MyNodeInfo.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.MESSAGE_TIMEOUT_MSEC_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.MESSAGE_TIMEOUT_MSEC_FIELD_NUMBER">MESSAGE_TIMEOUT_MSEC_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.MIN_APP_VERSION_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.MIN_APP_VERSION_FIELD_NUMBER">MIN_APP_VERSION_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.MY_NODE_NUM_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.MY_NODE_NUM_FIELD_NUMBER">MY_NODE_NUM_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.MergeFrom" href="#meshtastic.mesh_pb2.MyNodeInfo.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.MergeFromString" href="#meshtastic.mesh_pb2.MyNodeInfo.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.NODE_NUM_BITS_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.NODE_NUM_BITS_FIELD_NUMBER">NODE_NUM_BITS_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.NUM_CHANNELS_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.NUM_CHANNELS_FIELD_NUMBER">NUM_CHANNELS_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.PACKET_ID_BITS_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.PACKET_ID_BITS_FIELD_NUMBER">PACKET_ID_BITS_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.REGION_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.REGION_FIELD_NUMBER">REGION_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.RegisterExtension" href="#meshtastic.mesh_pb2.MyNodeInfo.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.SerializePartialToString" href="#meshtastic.mesh_pb2.MyNodeInfo.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.SerializeToString" href="#meshtastic.mesh_pb2.MyNodeInfo.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.SetInParent" href="#meshtastic.mesh_pb2.MyNodeInfo.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.UnknownFields" href="#meshtastic.mesh_pb2.MyNodeInfo.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.WhichOneof" href="#meshtastic.mesh_pb2.MyNodeInfo.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.current_packet_id" href="#meshtastic.mesh_pb2.MyNodeInfo.current_packet_id">current_packet_id</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.error_address" href="#meshtastic.mesh_pb2.MyNodeInfo.error_address">error_address</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.error_code" href="#meshtastic.mesh_pb2.MyNodeInfo.error_code">error_code</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.error_count" href="#meshtastic.mesh_pb2.MyNodeInfo.error_count">error_count</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.firmware_version" href="#meshtastic.mesh_pb2.MyNodeInfo.firmware_version">firmware_version</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.has_gps" href="#meshtastic.mesh_pb2.MyNodeInfo.has_gps">has_gps</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.hw_model" href="#meshtastic.mesh_pb2.MyNodeInfo.hw_model">hw_model</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.message_timeout_msec" href="#meshtastic.mesh_pb2.MyNodeInfo.message_timeout_msec">message_timeout_msec</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.min_app_version" href="#meshtastic.mesh_pb2.MyNodeInfo.min_app_version">min_app_version</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.my_node_num" href="#meshtastic.mesh_pb2.MyNodeInfo.my_node_num">my_node_num</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.node_num_bits" href="#meshtastic.mesh_pb2.MyNodeInfo.node_num_bits">node_num_bits</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.num_channels" href="#meshtastic.mesh_pb2.MyNodeInfo.num_channels">num_channels</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.packet_id_bits" href="#meshtastic.mesh_pb2.MyNodeInfo.packet_id_bits">packet_id_bits</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.region" href="#meshtastic.mesh_pb2.MyNodeInfo.region">region</a></code></li>
</ul>
</li>
<li>
<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.ByteSize" href="#meshtastic.mesh_pb2.NodeInfo.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.Clear" href="#meshtastic.mesh_pb2.NodeInfo.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.ClearField" href="#meshtastic.mesh_pb2.NodeInfo.ClearField">ClearField</a></code></li>
<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.DiscardUnknownFields" href="#meshtastic.mesh_pb2.NodeInfo.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.FindInitializationErrors" href="#meshtastic.mesh_pb2.NodeInfo.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.FromString" href="#meshtastic.mesh_pb2.NodeInfo.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.HasField" href="#meshtastic.mesh_pb2.NodeInfo.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.IsInitialized" href="#meshtastic.mesh_pb2.NodeInfo.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.ListFields" href="#meshtastic.mesh_pb2.NodeInfo.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.MergeFrom" href="#meshtastic.mesh_pb2.NodeInfo.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.MergeFromString" href="#meshtastic.mesh_pb2.NodeInfo.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.NEXT_HOP_FIELD_NUMBER" href="#meshtastic.mesh_pb2.NodeInfo.NEXT_HOP_FIELD_NUMBER">NEXT_HOP_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.RegisterExtension" href="#meshtastic.mesh_pb2.NodeInfo.RegisterExtension">RegisterExtension</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>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.SerializePartialToString" href="#meshtastic.mesh_pb2.NodeInfo.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.SerializeToString" href="#meshtastic.mesh_pb2.NodeInfo.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.SetInParent" href="#meshtastic.mesh_pb2.NodeInfo.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.USER_FIELD_NUMBER" href="#meshtastic.mesh_pb2.NodeInfo.USER_FIELD_NUMBER">USER_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.UnknownFields" href="#meshtastic.mesh_pb2.NodeInfo.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.WhichOneof" href="#meshtastic.mesh_pb2.NodeInfo.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.next_hop" href="#meshtastic.mesh_pb2.NodeInfo.next_hop">next_hop</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.num" href="#meshtastic.mesh_pb2.NodeInfo.num">num</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.position" href="#meshtastic.mesh_pb2.NodeInfo.position">position</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.snr" href="#meshtastic.mesh_pb2.NodeInfo.snr">snr</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.NodeInfo.user" href="#meshtastic.mesh_pb2.NodeInfo.user">user</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.Position" href="#meshtastic.mesh_pb2.Position">Position</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.Position.ALTITUDE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.ALTITUDE_FIELD_NUMBER">ALTITUDE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.BATTERY_LEVEL_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.BATTERY_LEVEL_FIELD_NUMBER">BATTERY_LEVEL_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.ByteSize" href="#meshtastic.mesh_pb2.Position.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.Clear" href="#meshtastic.mesh_pb2.Position.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.ClearField" href="#meshtastic.mesh_pb2.Position.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.DESCRIPTOR" href="#meshtastic.mesh_pb2.Position.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.DiscardUnknownFields" href="#meshtastic.mesh_pb2.Position.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.FindInitializationErrors" href="#meshtastic.mesh_pb2.Position.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.FromString" href="#meshtastic.mesh_pb2.Position.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.HasField" href="#meshtastic.mesh_pb2.Position.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.IsInitialized" href="#meshtastic.mesh_pb2.Position.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.LATITUDE_I_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.LATITUDE_I_FIELD_NUMBER">LATITUDE_I_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.LONGITUDE_I_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.LONGITUDE_I_FIELD_NUMBER">LONGITUDE_I_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.ListFields" href="#meshtastic.mesh_pb2.Position.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.MergeFrom" href="#meshtastic.mesh_pb2.Position.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.MergeFromString" href="#meshtastic.mesh_pb2.Position.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.RegisterExtension" href="#meshtastic.mesh_pb2.Position.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.SerializePartialToString" href="#meshtastic.mesh_pb2.Position.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.SerializeToString" href="#meshtastic.mesh_pb2.Position.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.SetInParent" href="#meshtastic.mesh_pb2.Position.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.TIME_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.TIME_FIELD_NUMBER">TIME_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.UnknownFields" href="#meshtastic.mesh_pb2.Position.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.WhichOneof" href="#meshtastic.mesh_pb2.Position.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.altitude" href="#meshtastic.mesh_pb2.Position.altitude">altitude</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.battery_level" href="#meshtastic.mesh_pb2.Position.battery_level">battery_level</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.latitude_i" href="#meshtastic.mesh_pb2.Position.latitude_i">latitude_i</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.longitude_i" href="#meshtastic.mesh_pb2.Position.longitude_i">longitude_i</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.Position.time" href="#meshtastic.mesh_pb2.Position.time">time</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.RadioConfig" href="#meshtastic.mesh_pb2.RadioConfig">RadioConfig</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.ByteSize" href="#meshtastic.mesh_pb2.RadioConfig.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.CHANNEL_SETTINGS_FIELD_NUMBER" href="#meshtastic.mesh_pb2.RadioConfig.CHANNEL_SETTINGS_FIELD_NUMBER">CHANNEL_SETTINGS_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.Clear" href="#meshtastic.mesh_pb2.RadioConfig.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.ClearField" href="#meshtastic.mesh_pb2.RadioConfig.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.DESCRIPTOR" href="#meshtastic.mesh_pb2.RadioConfig.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.DiscardUnknownFields" href="#meshtastic.mesh_pb2.RadioConfig.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.FindInitializationErrors" href="#meshtastic.mesh_pb2.RadioConfig.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.FromString" href="#meshtastic.mesh_pb2.RadioConfig.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.HasField" href="#meshtastic.mesh_pb2.RadioConfig.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.IsInitialized" href="#meshtastic.mesh_pb2.RadioConfig.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.ListFields" href="#meshtastic.mesh_pb2.RadioConfig.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.MergeFrom" href="#meshtastic.mesh_pb2.RadioConfig.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.MergeFromString" href="#meshtastic.mesh_pb2.RadioConfig.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.PREFERENCES_FIELD_NUMBER" href="#meshtastic.mesh_pb2.RadioConfig.PREFERENCES_FIELD_NUMBER">PREFERENCES_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.RegisterExtension" href="#meshtastic.mesh_pb2.RadioConfig.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.SerializePartialToString" href="#meshtastic.mesh_pb2.RadioConfig.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.SerializeToString" href="#meshtastic.mesh_pb2.RadioConfig.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.SetInParent" href="#meshtastic.mesh_pb2.RadioConfig.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.UnknownFields" href="#meshtastic.mesh_pb2.RadioConfig.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.UserPreferences" href="#meshtastic.mesh_pb2.RadioConfig.UserPreferences">UserPreferences</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.WhichOneof" href="#meshtastic.mesh_pb2.RadioConfig.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.channel_settings" href="#meshtastic.mesh_pb2.RadioConfig.channel_settings">channel_settings</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RadioConfig.preferences" href="#meshtastic.mesh_pb2.RadioConfig.preferences">preferences</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.RouteDiscovery" href="#meshtastic.mesh_pb2.RouteDiscovery">RouteDiscovery</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.ByteSize" href="#meshtastic.mesh_pb2.RouteDiscovery.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.Clear" href="#meshtastic.mesh_pb2.RouteDiscovery.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.ClearField" href="#meshtastic.mesh_pb2.RouteDiscovery.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.DESCRIPTOR" href="#meshtastic.mesh_pb2.RouteDiscovery.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.DiscardUnknownFields" href="#meshtastic.mesh_pb2.RouteDiscovery.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.FindInitializationErrors" href="#meshtastic.mesh_pb2.RouteDiscovery.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.FromString" href="#meshtastic.mesh_pb2.RouteDiscovery.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.HasField" href="#meshtastic.mesh_pb2.RouteDiscovery.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.IsInitialized" href="#meshtastic.mesh_pb2.RouteDiscovery.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.ListFields" href="#meshtastic.mesh_pb2.RouteDiscovery.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.MergeFrom" href="#meshtastic.mesh_pb2.RouteDiscovery.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.MergeFromString" href="#meshtastic.mesh_pb2.RouteDiscovery.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.ROUTE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.RouteDiscovery.ROUTE_FIELD_NUMBER">ROUTE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.RegisterExtension" href="#meshtastic.mesh_pb2.RouteDiscovery.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.SerializePartialToString" href="#meshtastic.mesh_pb2.RouteDiscovery.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.SerializeToString" href="#meshtastic.mesh_pb2.RouteDiscovery.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.SetInParent" href="#meshtastic.mesh_pb2.RouteDiscovery.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.UnknownFields" href="#meshtastic.mesh_pb2.RouteDiscovery.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.WhichOneof" href="#meshtastic.mesh_pb2.RouteDiscovery.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.RouteDiscovery.route" href="#meshtastic.mesh_pb2.RouteDiscovery.route">route</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.SubPacket" href="#meshtastic.mesh_pb2.SubPacket">SubPacket</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.SubPacket.ByteSize" href="#meshtastic.mesh_pb2.SubPacket.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.Clear" href="#meshtastic.mesh_pb2.SubPacket.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.ClearField" href="#meshtastic.mesh_pb2.SubPacket.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.DATA_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.DATA_FIELD_NUMBER">DATA_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.DESCRIPTOR" href="#meshtastic.mesh_pb2.SubPacket.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.DEST_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.DEST_FIELD_NUMBER">DEST_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.DiscardUnknownFields" href="#meshtastic.mesh_pb2.SubPacket.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.FAIL_ID_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.FAIL_ID_FIELD_NUMBER">FAIL_ID_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.FindInitializationErrors" href="#meshtastic.mesh_pb2.SubPacket.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.FromString" href="#meshtastic.mesh_pb2.SubPacket.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.HasField" href="#meshtastic.mesh_pb2.SubPacket.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.IsInitialized" href="#meshtastic.mesh_pb2.SubPacket.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.ListFields" href="#meshtastic.mesh_pb2.SubPacket.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.MergeFrom" href="#meshtastic.mesh_pb2.SubPacket.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.MergeFromString" href="#meshtastic.mesh_pb2.SubPacket.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.ORIGINAL_ID_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.ORIGINAL_ID_FIELD_NUMBER">ORIGINAL_ID_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.POSITION_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.POSITION_FIELD_NUMBER">POSITION_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.ROUTE_ERROR_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.ROUTE_ERROR_FIELD_NUMBER">ROUTE_ERROR_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.ROUTE_REPLY_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.ROUTE_REPLY_FIELD_NUMBER">ROUTE_REPLY_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.ROUTE_REQUEST_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.ROUTE_REQUEST_FIELD_NUMBER">ROUTE_REQUEST_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.RegisterExtension" href="#meshtastic.mesh_pb2.SubPacket.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.SOURCE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.SOURCE_FIELD_NUMBER">SOURCE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.SUCCESS_ID_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.SUCCESS_ID_FIELD_NUMBER">SUCCESS_ID_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.SerializePartialToString" href="#meshtastic.mesh_pb2.SubPacket.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.SerializeToString" href="#meshtastic.mesh_pb2.SubPacket.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.SetInParent" href="#meshtastic.mesh_pb2.SubPacket.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.USER_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.USER_FIELD_NUMBER">USER_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.UnknownFields" href="#meshtastic.mesh_pb2.SubPacket.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.WANT_RESPONSE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.SubPacket.WANT_RESPONSE_FIELD_NUMBER">WANT_RESPONSE_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.WhichOneof" href="#meshtastic.mesh_pb2.SubPacket.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.data" href="#meshtastic.mesh_pb2.SubPacket.data">data</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.dest" href="#meshtastic.mesh_pb2.SubPacket.dest">dest</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.fail_id" href="#meshtastic.mesh_pb2.SubPacket.fail_id">fail_id</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.original_id" href="#meshtastic.mesh_pb2.SubPacket.original_id">original_id</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.position" href="#meshtastic.mesh_pb2.SubPacket.position">position</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.route_error" href="#meshtastic.mesh_pb2.SubPacket.route_error">route_error</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.route_reply" href="#meshtastic.mesh_pb2.SubPacket.route_reply">route_reply</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.route_request" href="#meshtastic.mesh_pb2.SubPacket.route_request">route_request</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.source" href="#meshtastic.mesh_pb2.SubPacket.source">source</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.success_id" href="#meshtastic.mesh_pb2.SubPacket.success_id">success_id</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.user" href="#meshtastic.mesh_pb2.SubPacket.user">user</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.SubPacket.want_response" href="#meshtastic.mesh_pb2.SubPacket.want_response">want_response</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.ToRadio" href="#meshtastic.mesh_pb2.ToRadio">ToRadio</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.ToRadio.ByteSize" href="#meshtastic.mesh_pb2.ToRadio.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.Clear" href="#meshtastic.mesh_pb2.ToRadio.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.ClearField" href="#meshtastic.mesh_pb2.ToRadio.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.DESCRIPTOR" href="#meshtastic.mesh_pb2.ToRadio.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.DiscardUnknownFields" href="#meshtastic.mesh_pb2.ToRadio.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.FindInitializationErrors" href="#meshtastic.mesh_pb2.ToRadio.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.FromString" href="#meshtastic.mesh_pb2.ToRadio.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.HasField" href="#meshtastic.mesh_pb2.ToRadio.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.IsInitialized" href="#meshtastic.mesh_pb2.ToRadio.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.ListFields" href="#meshtastic.mesh_pb2.ToRadio.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.MergeFrom" href="#meshtastic.mesh_pb2.ToRadio.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.MergeFromString" href="#meshtastic.mesh_pb2.ToRadio.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.PACKET_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ToRadio.PACKET_FIELD_NUMBER">PACKET_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.RegisterExtension" href="#meshtastic.mesh_pb2.ToRadio.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.SET_OWNER_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ToRadio.SET_OWNER_FIELD_NUMBER">SET_OWNER_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.SET_RADIO_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ToRadio.SET_RADIO_FIELD_NUMBER">SET_RADIO_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.SerializePartialToString" href="#meshtastic.mesh_pb2.ToRadio.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.SerializeToString" href="#meshtastic.mesh_pb2.ToRadio.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.SetInParent" href="#meshtastic.mesh_pb2.ToRadio.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.UnknownFields" href="#meshtastic.mesh_pb2.ToRadio.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.WANT_CONFIG_ID_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ToRadio.WANT_CONFIG_ID_FIELD_NUMBER">WANT_CONFIG_ID_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.WhichOneof" href="#meshtastic.mesh_pb2.ToRadio.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.packet" href="#meshtastic.mesh_pb2.ToRadio.packet">packet</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.set_owner" href="#meshtastic.mesh_pb2.ToRadio.set_owner">set_owner</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.set_radio" href="#meshtastic.mesh_pb2.ToRadio.set_radio">set_radio</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.ToRadio.want_config_id" href="#meshtastic.mesh_pb2.ToRadio.want_config_id">want_config_id</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="meshtastic.mesh_pb2.User" href="#meshtastic.mesh_pb2.User">User</a></code></h4>
<ul class="">
<li><code><a title="meshtastic.mesh_pb2.User.ByteSize" href="#meshtastic.mesh_pb2.User.ByteSize">ByteSize</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.Clear" href="#meshtastic.mesh_pb2.User.Clear">Clear</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.ClearField" href="#meshtastic.mesh_pb2.User.ClearField">ClearField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.DESCRIPTOR" href="#meshtastic.mesh_pb2.User.DESCRIPTOR">DESCRIPTOR</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.DiscardUnknownFields" href="#meshtastic.mesh_pb2.User.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.FindInitializationErrors" href="#meshtastic.mesh_pb2.User.FindInitializationErrors">FindInitializationErrors</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.FromString" href="#meshtastic.mesh_pb2.User.FromString">FromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.HasField" href="#meshtastic.mesh_pb2.User.HasField">HasField</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.ID_FIELD_NUMBER" href="#meshtastic.mesh_pb2.User.ID_FIELD_NUMBER">ID_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.IsInitialized" href="#meshtastic.mesh_pb2.User.IsInitialized">IsInitialized</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.LONG_NAME_FIELD_NUMBER" href="#meshtastic.mesh_pb2.User.LONG_NAME_FIELD_NUMBER">LONG_NAME_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.ListFields" href="#meshtastic.mesh_pb2.User.ListFields">ListFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.MACADDR_FIELD_NUMBER" href="#meshtastic.mesh_pb2.User.MACADDR_FIELD_NUMBER">MACADDR_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.MergeFrom" href="#meshtastic.mesh_pb2.User.MergeFrom">MergeFrom</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.MergeFromString" href="#meshtastic.mesh_pb2.User.MergeFromString">MergeFromString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.RegisterExtension" href="#meshtastic.mesh_pb2.User.RegisterExtension">RegisterExtension</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.SHORT_NAME_FIELD_NUMBER" href="#meshtastic.mesh_pb2.User.SHORT_NAME_FIELD_NUMBER">SHORT_NAME_FIELD_NUMBER</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.SerializePartialToString" href="#meshtastic.mesh_pb2.User.SerializePartialToString">SerializePartialToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.SerializeToString" href="#meshtastic.mesh_pb2.User.SerializeToString">SerializeToString</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.SetInParent" href="#meshtastic.mesh_pb2.User.SetInParent">SetInParent</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.UnknownFields" href="#meshtastic.mesh_pb2.User.UnknownFields">UnknownFields</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.WhichOneof" href="#meshtastic.mesh_pb2.User.WhichOneof">WhichOneof</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.id" href="#meshtastic.mesh_pb2.User.id">id</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.long_name" href="#meshtastic.mesh_pb2.User.long_name">long_name</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.macaddr" href="#meshtastic.mesh_pb2.User.macaddr">macaddr</a></code></li>
<li><code><a title="meshtastic.mesh_pb2.User.short_name" href="#meshtastic.mesh_pb2.User.short_name">short_name</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.9.1</a>.</p>
</footer>
</body>
</html>