mirror of
https://github.com/meshtastic/python.git
synced 2025-12-27 01:47:50 -05:00
9658 lines
404 KiB
HTML
9658 lines
404 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.10.0" />
|
|
<title>meshtastic.mesh_pb2 API documentation</title>
|
|
<meta name="description" content="" />
|
|
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
|
|
<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">
|
|
<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
|
|
|
|
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()
|
|
|
|
|
|
from . import portnums_pb2 as portnums__pb2
|
|
|
|
|
|
DESCRIPTOR = _descriptor.FileDescriptor(
|
|
name='mesh.proto',
|
|
package='',
|
|
syntax='proto3',
|
|
serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003Z!github.com/meshtastic/gomeshproto',
|
|
serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"\x94\x06\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\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\x12,\n\x0flocation_source\x18\n \x01(\x0e\x32\x13.Position.LocSource\x12,\n\x0f\x61ltitude_source\x18\x0b \x01(\x0e\x32\x13.Position.AltSource\x12\x15\n\rpos_timestamp\x18\x0c \x01(\x07\x12\x17\n\x0fpos_time_millis\x18\r \x01(\x05\x12\x14\n\x0c\x61ltitude_hae\x18\x0e \x01(\x11\x12\x15\n\ralt_geoid_sep\x18\x0f \x01(\x11\x12\x0c\n\x04PDOP\x18\x10 \x01(\r\x12\x0c\n\x04HDOP\x18\x11 \x01(\r\x12\x0c\n\x04VDOP\x18\x12 \x01(\r\x12\x14\n\x0cgps_accuracy\x18\x13 \x01(\r\x12\x14\n\x0cground_speed\x18\x14 \x01(\r\x12\x14\n\x0cground_track\x18\x15 \x01(\r\x12\x13\n\x0b\x66ix_quality\x18\x16 \x01(\r\x12\x10\n\x08\x66ix_type\x18\x17 \x01(\r\x12\x14\n\x0csats_in_view\x18\x18 \x01(\r\x12\x11\n\tsensor_id\x18\x19 \x01(\r\x12\x17\n\x0fpos_next_update\x18( \x01(\r\x12\x16\n\x0epos_seq_number\x18) \x01(\r\"n\n\tLocSource\x12\x16\n\x12LOCSRC_UNSPECIFIED\x10\x00\x12\x17\n\x13LOCSRC_MANUAL_ENTRY\x10\x01\x12\x17\n\x13LOCSRC_GPS_INTERNAL\x10\x02\x12\x17\n\x13LOCSRC_GPS_EXTERNAL\x10\x03\"\x85\x01\n\tAltSource\x12\x16\n\x12\x41LTSRC_UNSPECIFIED\x10\x00\x12\x17\n\x13\x41LTSRC_MANUAL_ENTRY\x10\x01\x12\x17\n\x13\x41LTSRC_GPS_INTERNAL\x10\x02\x12\x17\n\x13\x41LTSRC_GPS_EXTERNAL\x10\x03\x12\x15\n\x11\x41LTSRC_BAROMETRIC\x10\x04J\x04\x08\x07\x10\x08J\x04\x08\x08\x10\t\"\xd7\x01\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\x12 \n\x08hw_model\x18\x06 \x01(\x0e\x32\x0e.HardwareModel\x12\x13\n\x0bis_licensed\x18\x07 \x01(\x08\x12\x13\n\x04team\x18\x08 \x01(\x0e\x32\x05.Team\x12\x14\n\x0ctx_power_dbm\x18\n \x01(\r\x12\x14\n\x0c\x61nt_gain_dbi\x18\x0b \x01(\r\x12\x13\n\x0b\x61nt_azimuth\x18\x0c \x01(\r\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\xc5\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\"\xb4\x01\n\x05\x45rror\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\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x12\x0f\n\x0bNO_RESPONSE\x10\x08\x12\x0f\n\x0b\x42\x41\x44_REQUEST\x10 \x12\x12\n\x0eNOT_AUTHORIZED\x10!B\t\n\x07variant\"{\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\x12\x12\n\nrequest_id\x18\x06 \x01(\x07\"\xe0\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\x12\x0f\n\x07rx_rssi\x18\r \x01(\x05\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"j\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\x12\n\nlast_heard\x18\x04 \x01(\x07\"\xcb\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x1f\n\x13hw_model_deprecated\x18\x05 \x01(\tB\x02\x18\x01\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x14\n\x0creboot_count\x18\n \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xe9\x01\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \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 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03J\x04\x08\x06\x10\x07\"\xe1\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12&\n\tpeer_info\x18\x03 \x01(\x0b\x32\x11.ToRadio.PeerInfoH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12\x14\n\ndisconnect\x18h \x01(\x08H\x00\x1a\x35\n\x08PeerInfo\x12\x13\n\x0b\x61pp_version\x18\x01 \x01(\r\x12\x14\n\x0cmqtt_gateway\x18\x02 \x01(\x08\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02J\x04\x08\x65\x10\x66J\x04\x08\x66\x10gJ\x04\x08g\x10h*\xac\x02\n\rHardwareModel\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08TLORA_V2\x10\x01\x12\x0c\n\x08TLORA_V1\x10\x02\x12\x12\n\x0eTLORA_V2_1_1p6\x10\x03\x12\t\n\x05TBEAM\x10\x04\x12\x0f\n\x0bHELTEC_V2_0\x10\x05\x12\x0c\n\x08TBEAM0p7\x10\x06\x12\n\n\x06T_ECHO\x10\x07\x12\x10\n\x0cTLORA_V1_1p3\x10\x08\x12\x0b\n\x07RAK4631\x10\t\x12\x0f\n\x0bHELTEC_V2_1\x10\n\x12\x11\n\rLORA_RELAY_V1\x10 \x12\x0e\n\nNRF52840DK\x10!\x12\x07\n\x03PPR\x10\"\x12\x0f\n\x0bGENIEBLOCKS\x10#\x12\x11\n\rNRF52_UNKNOWN\x10$\x12\r\n\tPORTDUINO\x10%\x12\x0f\n\x0b\x41NDROID_SIM\x10&\x12\n\n\x06\x44IY_V1\x10\'*\xb5\x01\n\x04Team\x12\t\n\x05\x43LEAR\x10\x00\x12\x08\n\x04\x43YAN\x10\x01\x12\t\n\x05WHITE\x10\x02\x12\n\n\x06YELLOW\x10\x03\x12\n\n\x06ORANGE\x10\x04\x12\x0b\n\x07MAGENTA\x10\x05\x12\x07\n\x03RED\x10\x06\x12\n\n\x06MAROON\x10\x07\x12\n\n\x06PURPLE\x10\x08\x12\r\n\tDARK_BLUE\x10\t\x12\x08\n\x04\x42LUE\x10\n\x12\x08\n\x04TEAL\x10\x0b\x12\t\n\x05GREEN\x10\x0c\x12\x0e\n\nDARK_GREEN\x10\r\x12\t\n\x05\x42ROWN\x10\x0e*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xed\x01*\xe1\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x12\x0c\n\x08\x42rownout\x10\t\x12\x11\n\rSX1262Failure\x10\n\x12\x0f\n\x0bRadioSpiBug\x10\x0b\x42\x46\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
|
,
|
|
dependencies=[portnums__pb2.DESCRIPTOR,])
|
|
|
|
_HARDWAREMODEL = _descriptor.EnumDescriptor(
|
|
name='HardwareModel',
|
|
full_name='HardwareModel',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
_descriptor.EnumValueDescriptor(
|
|
name='UNSET', index=0, number=0,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TLORA_V2', index=1, number=1,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TLORA_V1', index=2, number=2,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TLORA_V2_1_1p6', index=3, number=3,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TBEAM', index=4, number=4,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='HELTEC_V2_0', index=5, number=5,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TBEAM0p7', index=6, number=6,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='T_ECHO', index=7, number=7,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TLORA_V1_1p3', index=8, number=8,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='RAK4631', index=9, number=9,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='HELTEC_V2_1', index=10, number=10,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='LORA_RELAY_V1', index=11, number=32,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='NRF52840DK', index=12, number=33,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='PPR', index=13, number=34,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='GENIEBLOCKS', index=14, number=35,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='NRF52_UNKNOWN', index=15, number=36,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='PORTDUINO', index=16, number=37,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='ANDROID_SIM', index=17, number=38,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='DIY_V1', index=18, number=39,
|
|
serialized_options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
serialized_options=None,
|
|
serialized_start=2971,
|
|
serialized_end=3271,
|
|
)
|
|
_sym_db.RegisterEnumDescriptor(_HARDWAREMODEL)
|
|
|
|
HardwareModel = enum_type_wrapper.EnumTypeWrapper(_HARDWAREMODEL)
|
|
_TEAM = _descriptor.EnumDescriptor(
|
|
name='Team',
|
|
full_name='Team',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
_descriptor.EnumValueDescriptor(
|
|
name='CLEAR', index=0, number=0,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='CYAN', index=1, number=1,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='WHITE', index=2, number=2,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='YELLOW', index=3, number=3,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='ORANGE', index=4, number=4,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='MAGENTA', index=5, number=5,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='RED', index=6, number=6,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='MAROON', index=7, number=7,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='PURPLE', index=8, number=8,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='DARK_BLUE', index=9, number=9,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='BLUE', index=10, number=10,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TEAL', index=11, number=11,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='GREEN', index=12, number=12,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='DARK_GREEN', index=13, number=13,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='BROWN', index=14, number=14,
|
|
serialized_options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
serialized_options=None,
|
|
serialized_start=3274,
|
|
serialized_end=3455,
|
|
)
|
|
_sym_db.RegisterEnumDescriptor(_TEAM)
|
|
|
|
Team = enum_type_wrapper.EnumTypeWrapper(_TEAM)
|
|
_CONSTANTS = _descriptor.EnumDescriptor(
|
|
name='Constants',
|
|
full_name='Constants',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
_descriptor.EnumValueDescriptor(
|
|
name='Unused', index=0, number=0,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='DATA_PAYLOAD_LEN', index=1, number=237,
|
|
serialized_options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
serialized_options=None,
|
|
serialized_start=3457,
|
|
serialized_end=3503,
|
|
)
|
|
_sym_db.RegisterEnumDescriptor(_CONSTANTS)
|
|
|
|
Constants = enum_type_wrapper.EnumTypeWrapper(_CONSTANTS)
|
|
_CRITICALERRORCODE = _descriptor.EnumDescriptor(
|
|
name='CriticalErrorCode',
|
|
full_name='CriticalErrorCode',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
_descriptor.EnumValueDescriptor(
|
|
name='None', index=0, number=0,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TxWatchdog', index=1, number=1,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='SleepEnterWait', index=2, number=2,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='NoRadio', index=3, number=3,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='Unspecified', index=4, number=4,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='UBloxInitFailed', index=5, number=5,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='NoAXP192', index=6, number=6,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='InvalidRadioSetting', index=7, number=7,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TransmitFailed', index=8, number=8,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='Brownout', index=9, number=9,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='SX1262Failure', index=10, number=10,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='RadioSpiBug', index=11, number=11,
|
|
serialized_options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
serialized_options=None,
|
|
serialized_start=3506,
|
|
serialized_end=3731,
|
|
)
|
|
_sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE)
|
|
|
|
CriticalErrorCode = enum_type_wrapper.EnumTypeWrapper(_CRITICALERRORCODE)
|
|
UNSET = 0
|
|
TLORA_V2 = 1
|
|
TLORA_V1 = 2
|
|
TLORA_V2_1_1p6 = 3
|
|
TBEAM = 4
|
|
HELTEC_V2_0 = 5
|
|
TBEAM0p7 = 6
|
|
T_ECHO = 7
|
|
TLORA_V1_1p3 = 8
|
|
RAK4631 = 9
|
|
HELTEC_V2_1 = 10
|
|
LORA_RELAY_V1 = 32
|
|
NRF52840DK = 33
|
|
PPR = 34
|
|
GENIEBLOCKS = 35
|
|
NRF52_UNKNOWN = 36
|
|
PORTDUINO = 37
|
|
ANDROID_SIM = 38
|
|
DIY_V1 = 39
|
|
CLEAR = 0
|
|
CYAN = 1
|
|
WHITE = 2
|
|
YELLOW = 3
|
|
ORANGE = 4
|
|
MAGENTA = 5
|
|
RED = 6
|
|
MAROON = 7
|
|
PURPLE = 8
|
|
DARK_BLUE = 9
|
|
BLUE = 10
|
|
TEAL = 11
|
|
GREEN = 12
|
|
DARK_GREEN = 13
|
|
BROWN = 14
|
|
Unused = 0
|
|
DATA_PAYLOAD_LEN = 237
|
|
globals()['None'] = 0
|
|
TxWatchdog = 1
|
|
SleepEnterWait = 2
|
|
NoRadio = 3
|
|
Unspecified = 4
|
|
UBloxInitFailed = 5
|
|
NoAXP192 = 6
|
|
InvalidRadioSetting = 7
|
|
TransmitFailed = 8
|
|
Brownout = 9
|
|
SX1262Failure = 10
|
|
RadioSpiBug = 11
|
|
|
|
|
|
_POSITION_LOCSOURCE = _descriptor.EnumDescriptor(
|
|
name='LocSource',
|
|
full_name='Position.LocSource',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
_descriptor.EnumValueDescriptor(
|
|
name='LOCSRC_UNSPECIFIED', index=0, number=0,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='LOCSRC_MANUAL_ENTRY', index=1, number=1,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='LOCSRC_GPS_INTERNAL', index=2, number=2,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='LOCSRC_GPS_EXTERNAL', index=3, number=3,
|
|
serialized_options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
serialized_options=None,
|
|
serialized_start=561,
|
|
serialized_end=671,
|
|
)
|
|
_sym_db.RegisterEnumDescriptor(_POSITION_LOCSOURCE)
|
|
|
|
_POSITION_ALTSOURCE = _descriptor.EnumDescriptor(
|
|
name='AltSource',
|
|
full_name='Position.AltSource',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
_descriptor.EnumValueDescriptor(
|
|
name='ALTSRC_UNSPECIFIED', index=0, number=0,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='ALTSRC_MANUAL_ENTRY', index=1, number=1,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='ALTSRC_GPS_INTERNAL', index=2, number=2,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='ALTSRC_GPS_EXTERNAL', index=3, number=3,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='ALTSRC_BAROMETRIC', index=4, number=4,
|
|
serialized_options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
serialized_options=None,
|
|
serialized_start=674,
|
|
serialized_end=807,
|
|
)
|
|
_sym_db.RegisterEnumDescriptor(_POSITION_ALTSOURCE)
|
|
|
|
_ROUTING_ERROR = _descriptor.EnumDescriptor(
|
|
name='Error',
|
|
full_name='Routing.Error',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
_descriptor.EnumValueDescriptor(
|
|
name='NONE', index=0, number=0,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='NO_ROUTE', index=1, number=1,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='GOT_NAK', index=2, number=2,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TIMEOUT', index=3, number=3,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='NO_INTERFACE', index=4, number=4,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='MAX_RETRANSMIT', index=5, number=5,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='NO_CHANNEL', index=6, number=6,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TOO_LARGE', index=7, number=7,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='NO_RESPONSE', index=8, number=8,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='BAD_REQUEST', index=9, number=32,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='NOT_AUTHORIZED', index=10, number=33,
|
|
serialized_options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
serialized_options=None,
|
|
serialized_start=1207,
|
|
serialized_end=1387,
|
|
)
|
|
_sym_db.RegisterEnumDescriptor(_ROUTING_ERROR)
|
|
|
|
_MESHPACKET_PRIORITY = _descriptor.EnumDescriptor(
|
|
name='Priority',
|
|
full_name='MeshPacket.Priority',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
_descriptor.EnumValueDescriptor(
|
|
name='UNSET', index=0, number=0,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='MIN', index=1, number=1,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='BACKGROUND', index=2, number=10,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='DEFAULT', index=3, number=64,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='RELIABLE', index=4, number=70,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='ACK', index=5, number=120,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='MAX', index=6, number=127,
|
|
serialized_options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
serialized_options=None,
|
|
serialized_start=1769,
|
|
serialized_end=1860,
|
|
)
|
|
_sym_db.RegisterEnumDescriptor(_MESHPACKET_PRIORITY)
|
|
|
|
_LOGRECORD_LEVEL = _descriptor.EnumDescriptor(
|
|
name='Level',
|
|
full_name='LogRecord.Level',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
_descriptor.EnumValueDescriptor(
|
|
name='UNSET', index=0, number=0,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='CRITICAL', index=1, number=50,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='ERROR', index=2, number=40,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='WARNING', index=3, number=30,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='INFO', index=4, number=20,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='DEBUG', index=5, number=10,
|
|
serialized_options=None,
|
|
type=None),
|
|
_descriptor.EnumValueDescriptor(
|
|
name='TRACE', index=6, number=5,
|
|
serialized_options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
serialized_options=None,
|
|
serialized_start=2416,
|
|
serialized_end=2504,
|
|
)
|
|
_sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL)
|
|
|
|
|
|
_POSITION = _descriptor.Descriptor(
|
|
name='Position',
|
|
full_name='Position',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='latitude_i', full_name='Position.latitude_i', index=0,
|
|
number=1, type=15, cpp_type=1, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='longitude_i', full_name='Position.longitude_i', index=1,
|
|
number=2, type=15, cpp_type=1, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='altitude', full_name='Position.altitude', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='battery_level', full_name='Position.battery_level', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='time', full_name='Position.time', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='location_source', full_name='Position.location_source', index=5,
|
|
number=10, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='altitude_source', full_name='Position.altitude_source', index=6,
|
|
number=11, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='pos_timestamp', full_name='Position.pos_timestamp', index=7,
|
|
number=12, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='pos_time_millis', full_name='Position.pos_time_millis', index=8,
|
|
number=13, type=5, cpp_type=1, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='altitude_hae', full_name='Position.altitude_hae', index=9,
|
|
number=14, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='alt_geoid_sep', full_name='Position.alt_geoid_sep', index=10,
|
|
number=15, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='PDOP', full_name='Position.PDOP', index=11,
|
|
number=16, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='HDOP', full_name='Position.HDOP', index=12,
|
|
number=17, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='VDOP', full_name='Position.VDOP', index=13,
|
|
number=18, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='gps_accuracy', full_name='Position.gps_accuracy', index=14,
|
|
number=19, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='ground_speed', full_name='Position.ground_speed', index=15,
|
|
number=20, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='ground_track', full_name='Position.ground_track', index=16,
|
|
number=21, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='fix_quality', full_name='Position.fix_quality', index=17,
|
|
number=22, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='fix_type', full_name='Position.fix_type', index=18,
|
|
number=23, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='sats_in_view', full_name='Position.sats_in_view', index=19,
|
|
number=24, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='sensor_id', full_name='Position.sensor_id', index=20,
|
|
number=25, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='pos_next_update', full_name='Position.pos_next_update', index=21,
|
|
number=40, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='pos_seq_number', full_name='Position.pos_seq_number', index=22,
|
|
number=41, 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),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
_POSITION_LOCSOURCE,
|
|
_POSITION_ALTSOURCE,
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
],
|
|
serialized_start=31,
|
|
serialized_end=819,
|
|
)
|
|
|
|
|
|
_USER = _descriptor.Descriptor(
|
|
name='User',
|
|
full_name='User',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='id', full_name='User.id', index=0,
|
|
number=1, type=9, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"".decode('utf-8'),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='long_name', full_name='User.long_name', index=1,
|
|
number=2, type=9, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"".decode('utf-8'),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='short_name', full_name='User.short_name', index=2,
|
|
number=3, type=9, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"".decode('utf-8'),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='macaddr', full_name='User.macaddr', index=3,
|
|
number=4, type=12, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"",
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='hw_model', full_name='User.hw_model', index=4,
|
|
number=6, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='is_licensed', full_name='User.is_licensed', index=5,
|
|
number=7, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='team', full_name='User.team', index=6,
|
|
number=8, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='tx_power_dbm', full_name='User.tx_power_dbm', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='ant_gain_dbi', full_name='User.ant_gain_dbi', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='ant_azimuth', full_name='User.ant_azimuth', index=9,
|
|
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),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
],
|
|
serialized_start=822,
|
|
serialized_end=1037,
|
|
)
|
|
|
|
|
|
_ROUTEDISCOVERY = _descriptor.Descriptor(
|
|
name='RouteDiscovery',
|
|
full_name='RouteDiscovery',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='route', full_name='RouteDiscovery.route', index=0,
|
|
number=2, type=7, 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),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
],
|
|
serialized_start=1039,
|
|
serialized_end=1070,
|
|
)
|
|
|
|
|
|
_ROUTING = _descriptor.Descriptor(
|
|
name='Routing',
|
|
full_name='Routing',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='route_request', full_name='Routing.route_request', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='route_reply', full_name='Routing.route_reply', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='error_reason', full_name='Routing.error_reason', index=2,
|
|
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),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
_ROUTING_ERROR,
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
_descriptor.OneofDescriptor(
|
|
name='variant', full_name='Routing.variant',
|
|
index=0, containing_type=None, fields=[]),
|
|
],
|
|
serialized_start=1073,
|
|
serialized_end=1398,
|
|
)
|
|
|
|
|
|
_DATA = _descriptor.Descriptor(
|
|
name='Data',
|
|
full_name='Data',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='portnum', full_name='Data.portnum', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='payload', full_name='Data.payload', index=1,
|
|
number=2, type=12, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"",
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='want_response', full_name='Data.want_response', index=2,
|
|
number=3, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='dest', full_name='Data.dest', index=3,
|
|
number=4, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='source', full_name='Data.source', index=4,
|
|
number=5, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='request_id', full_name='Data.request_id', index=5,
|
|
number=6, 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),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
],
|
|
serialized_start=1400,
|
|
serialized_end=1523,
|
|
)
|
|
|
|
|
|
_MESHPACKET = _descriptor.Descriptor(
|
|
name='MeshPacket',
|
|
full_name='MeshPacket',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='from', full_name='MeshPacket.from', index=0,
|
|
number=1, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='to', full_name='MeshPacket.to', index=1,
|
|
number=2, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='channel', full_name='MeshPacket.channel', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='decoded', full_name='MeshPacket.decoded', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='encrypted', full_name='MeshPacket.encrypted', index=4,
|
|
number=5, type=12, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"",
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='id', full_name='MeshPacket.id', index=5,
|
|
number=6, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='rx_time', full_name='MeshPacket.rx_time', index=6,
|
|
number=7, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='rx_snr', full_name='MeshPacket.rx_snr', index=7,
|
|
number=8, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='hop_limit', full_name='MeshPacket.hop_limit', index=8,
|
|
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),
|
|
_descriptor.FieldDescriptor(
|
|
name='want_ack', full_name='MeshPacket.want_ack', index=9,
|
|
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),
|
|
_descriptor.FieldDescriptor(
|
|
name='priority', full_name='MeshPacket.priority', index=10,
|
|
number=12, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='rx_rssi', full_name='MeshPacket.rx_rssi', index=11,
|
|
number=13, 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),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
_MESHPACKET_PRIORITY,
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
_descriptor.OneofDescriptor(
|
|
name='payloadVariant', full_name='MeshPacket.payloadVariant',
|
|
index=0, containing_type=None, fields=[]),
|
|
],
|
|
serialized_start=1526,
|
|
serialized_end=1878,
|
|
)
|
|
|
|
|
|
_NODEINFO = _descriptor.Descriptor(
|
|
name='NodeInfo',
|
|
full_name='NodeInfo',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='num', full_name='NodeInfo.num', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='user', full_name='NodeInfo.user', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='position', full_name='NodeInfo.position', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='snr', full_name='NodeInfo.snr', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='last_heard', full_name='NodeInfo.last_heard', index=4,
|
|
number=4, 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),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
],
|
|
serialized_start=1880,
|
|
serialized_end=1986,
|
|
)
|
|
|
|
|
|
_MYNODEINFO = _descriptor.Descriptor(
|
|
name='MyNodeInfo',
|
|
full_name='MyNodeInfo',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='my_node_num', full_name='MyNodeInfo.my_node_num', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='has_gps', full_name='MyNodeInfo.has_gps', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='num_bands', full_name='MyNodeInfo.num_bands', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='max_channels', full_name='MyNodeInfo.max_channels', index=3,
|
|
number=15, type=13, cpp_type=3, label=1,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='region', full_name='MyNodeInfo.region', index=4,
|
|
number=4, type=9, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"".decode('utf-8'),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=b'\030\001', file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='hw_model_deprecated', full_name='MyNodeInfo.hw_model_deprecated', index=5,
|
|
number=5, type=9, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"".decode('utf-8'),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=b'\030\001', file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='firmware_version', full_name='MyNodeInfo.firmware_version', index=6,
|
|
number=6, type=9, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"".decode('utf-8'),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='error_code', full_name='MyNodeInfo.error_code', index=7,
|
|
number=7, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='error_address', full_name='MyNodeInfo.error_address', index=8,
|
|
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),
|
|
_descriptor.FieldDescriptor(
|
|
name='error_count', full_name='MyNodeInfo.error_count', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='reboot_count', full_name='MyNodeInfo.reboot_count', index=10,
|
|
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),
|
|
_descriptor.FieldDescriptor(
|
|
name='message_timeout_msec', full_name='MyNodeInfo.message_timeout_msec', index=11,
|
|
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),
|
|
_descriptor.FieldDescriptor(
|
|
name='min_app_version', full_name='MyNodeInfo.min_app_version', index=12,
|
|
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),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
],
|
|
serialized_start=1989,
|
|
serialized_end=2320,
|
|
)
|
|
|
|
|
|
_LOGRECORD = _descriptor.Descriptor(
|
|
name='LogRecord',
|
|
full_name='LogRecord',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='message', full_name='LogRecord.message', index=0,
|
|
number=1, type=9, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"".decode('utf-8'),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='time', full_name='LogRecord.time', index=1,
|
|
number=2, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='source', full_name='LogRecord.source', index=2,
|
|
number=3, type=9, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=b"".decode('utf-8'),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
_descriptor.FieldDescriptor(
|
|
name='level', full_name='LogRecord.level', index=3,
|
|
number=4, 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),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
_LOGRECORD_LEVEL,
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
],
|
|
serialized_start=2323,
|
|
serialized_end=2504,
|
|
)
|
|
|
|
|
|
_FROMRADIO = _descriptor.Descriptor(
|
|
name='FromRadio',
|
|
full_name='FromRadio',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='num', full_name='FromRadio.num', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='packet', full_name='FromRadio.packet', index=1,
|
|
number=11, 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='my_info', full_name='FromRadio.my_info', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='node_info', full_name='FromRadio.node_info', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='log_record', full_name='FromRadio.log_record', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='config_complete_id', full_name='FromRadio.config_complete_id', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='rebooted', full_name='FromRadio.rebooted', index=6,
|
|
number=9, type=8, cpp_type=7, label=1,
|
|
has_default_value=False, default_value=False,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
_descriptor.OneofDescriptor(
|
|
name='payloadVariant', full_name='FromRadio.payloadVariant',
|
|
index=0, containing_type=None, fields=[]),
|
|
],
|
|
serialized_start=2507,
|
|
serialized_end=2740,
|
|
)
|
|
|
|
|
|
_TORADIO_PEERINFO = _descriptor.Descriptor(
|
|
name='PeerInfo',
|
|
full_name='ToRadio.PeerInfo',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='app_version', full_name='ToRadio.PeerInfo.app_version', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='mqtt_gateway', full_name='ToRadio.PeerInfo.mqtt_gateway', 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),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
],
|
|
serialized_start=2873,
|
|
serialized_end=2926,
|
|
)
|
|
|
|
_TORADIO = _descriptor.Descriptor(
|
|
name='ToRadio',
|
|
full_name='ToRadio',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
_descriptor.FieldDescriptor(
|
|
name='packet', full_name='ToRadio.packet', index=0,
|
|
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),
|
|
_descriptor.FieldDescriptor(
|
|
name='peer_info', full_name='ToRadio.peer_info', 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),
|
|
_descriptor.FieldDescriptor(
|
|
name='want_config_id', full_name='ToRadio.want_config_id', index=2,
|
|
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),
|
|
_descriptor.FieldDescriptor(
|
|
name='disconnect', full_name='ToRadio.disconnect', index=3,
|
|
number=104, type=8, cpp_type=7, label=1,
|
|
has_default_value=False, default_value=False,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
serialized_options=None, file=DESCRIPTOR),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[_TORADIO_PEERINFO, ],
|
|
enum_types=[
|
|
],
|
|
serialized_options=None,
|
|
is_extendable=False,
|
|
syntax='proto3',
|
|
extension_ranges=[],
|
|
oneofs=[
|
|
_descriptor.OneofDescriptor(
|
|
name='payloadVariant', full_name='ToRadio.payloadVariant',
|
|
index=0, containing_type=None, fields=[]),
|
|
],
|
|
serialized_start=2743,
|
|
serialized_end=2968,
|
|
)
|
|
|
|
_POSITION.fields_by_name['location_source'].enum_type = _POSITION_LOCSOURCE
|
|
_POSITION.fields_by_name['altitude_source'].enum_type = _POSITION_ALTSOURCE
|
|
_POSITION_LOCSOURCE.containing_type = _POSITION
|
|
_POSITION_ALTSOURCE.containing_type = _POSITION
|
|
_USER.fields_by_name['hw_model'].enum_type = _HARDWAREMODEL
|
|
_USER.fields_by_name['team'].enum_type = _TEAM
|
|
_ROUTING.fields_by_name['route_request'].message_type = _ROUTEDISCOVERY
|
|
_ROUTING.fields_by_name['route_reply'].message_type = _ROUTEDISCOVERY
|
|
_ROUTING.fields_by_name['error_reason'].enum_type = _ROUTING_ERROR
|
|
_ROUTING_ERROR.containing_type = _ROUTING
|
|
_ROUTING.oneofs_by_name['variant'].fields.append(
|
|
_ROUTING.fields_by_name['route_request'])
|
|
_ROUTING.fields_by_name['route_request'].containing_oneof = _ROUTING.oneofs_by_name['variant']
|
|
_ROUTING.oneofs_by_name['variant'].fields.append(
|
|
_ROUTING.fields_by_name['route_reply'])
|
|
_ROUTING.fields_by_name['route_reply'].containing_oneof = _ROUTING.oneofs_by_name['variant']
|
|
_ROUTING.oneofs_by_name['variant'].fields.append(
|
|
_ROUTING.fields_by_name['error_reason'])
|
|
_ROUTING.fields_by_name['error_reason'].containing_oneof = _ROUTING.oneofs_by_name['variant']
|
|
_DATA.fields_by_name['portnum'].enum_type = portnums__pb2._PORTNUM
|
|
_MESHPACKET.fields_by_name['decoded'].message_type = _DATA
|
|
_MESHPACKET.fields_by_name['priority'].enum_type = _MESHPACKET_PRIORITY
|
|
_MESHPACKET_PRIORITY.containing_type = _MESHPACKET
|
|
_MESHPACKET.oneofs_by_name['payloadVariant'].fields.append(
|
|
_MESHPACKET.fields_by_name['decoded'])
|
|
_MESHPACKET.fields_by_name['decoded'].containing_oneof = _MESHPACKET.oneofs_by_name['payloadVariant']
|
|
_MESHPACKET.oneofs_by_name['payloadVariant'].fields.append(
|
|
_MESHPACKET.fields_by_name['encrypted'])
|
|
_MESHPACKET.fields_by_name['encrypted'].containing_oneof = _MESHPACKET.oneofs_by_name['payloadVariant']
|
|
_NODEINFO.fields_by_name['user'].message_type = _USER
|
|
_NODEINFO.fields_by_name['position'].message_type = _POSITION
|
|
_MYNODEINFO.fields_by_name['error_code'].enum_type = _CRITICALERRORCODE
|
|
_LOGRECORD.fields_by_name['level'].enum_type = _LOGRECORD_LEVEL
|
|
_LOGRECORD_LEVEL.containing_type = _LOGRECORD
|
|
_FROMRADIO.fields_by_name['packet'].message_type = _MESHPACKET
|
|
_FROMRADIO.fields_by_name['my_info'].message_type = _MYNODEINFO
|
|
_FROMRADIO.fields_by_name['node_info'].message_type = _NODEINFO
|
|
_FROMRADIO.fields_by_name['log_record'].message_type = _LOGRECORD
|
|
_FROMRADIO.oneofs_by_name['payloadVariant'].fields.append(
|
|
_FROMRADIO.fields_by_name['packet'])
|
|
_FROMRADIO.fields_by_name['packet'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant']
|
|
_FROMRADIO.oneofs_by_name['payloadVariant'].fields.append(
|
|
_FROMRADIO.fields_by_name['my_info'])
|
|
_FROMRADIO.fields_by_name['my_info'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant']
|
|
_FROMRADIO.oneofs_by_name['payloadVariant'].fields.append(
|
|
_FROMRADIO.fields_by_name['node_info'])
|
|
_FROMRADIO.fields_by_name['node_info'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant']
|
|
_FROMRADIO.oneofs_by_name['payloadVariant'].fields.append(
|
|
_FROMRADIO.fields_by_name['log_record'])
|
|
_FROMRADIO.fields_by_name['log_record'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant']
|
|
_FROMRADIO.oneofs_by_name['payloadVariant'].fields.append(
|
|
_FROMRADIO.fields_by_name['config_complete_id'])
|
|
_FROMRADIO.fields_by_name['config_complete_id'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant']
|
|
_FROMRADIO.oneofs_by_name['payloadVariant'].fields.append(
|
|
_FROMRADIO.fields_by_name['rebooted'])
|
|
_FROMRADIO.fields_by_name['rebooted'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant']
|
|
_TORADIO_PEERINFO.containing_type = _TORADIO
|
|
_TORADIO.fields_by_name['packet'].message_type = _MESHPACKET
|
|
_TORADIO.fields_by_name['peer_info'].message_type = _TORADIO_PEERINFO
|
|
_TORADIO.oneofs_by_name['payloadVariant'].fields.append(
|
|
_TORADIO.fields_by_name['packet'])
|
|
_TORADIO.fields_by_name['packet'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant']
|
|
_TORADIO.oneofs_by_name['payloadVariant'].fields.append(
|
|
_TORADIO.fields_by_name['peer_info'])
|
|
_TORADIO.fields_by_name['peer_info'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant']
|
|
_TORADIO.oneofs_by_name['payloadVariant'].fields.append(
|
|
_TORADIO.fields_by_name['want_config_id'])
|
|
_TORADIO.fields_by_name['want_config_id'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant']
|
|
_TORADIO.oneofs_by_name['payloadVariant'].fields.append(
|
|
_TORADIO.fields_by_name['disconnect'])
|
|
_TORADIO.fields_by_name['disconnect'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant']
|
|
DESCRIPTOR.message_types_by_name['Position'] = _POSITION
|
|
DESCRIPTOR.message_types_by_name['User'] = _USER
|
|
DESCRIPTOR.message_types_by_name['RouteDiscovery'] = _ROUTEDISCOVERY
|
|
DESCRIPTOR.message_types_by_name['Routing'] = _ROUTING
|
|
DESCRIPTOR.message_types_by_name['Data'] = _DATA
|
|
DESCRIPTOR.message_types_by_name['MeshPacket'] = _MESHPACKET
|
|
DESCRIPTOR.message_types_by_name['NodeInfo'] = _NODEINFO
|
|
DESCRIPTOR.message_types_by_name['MyNodeInfo'] = _MYNODEINFO
|
|
DESCRIPTOR.message_types_by_name['LogRecord'] = _LOGRECORD
|
|
DESCRIPTOR.message_types_by_name['FromRadio'] = _FROMRADIO
|
|
DESCRIPTOR.message_types_by_name['ToRadio'] = _TORADIO
|
|
DESCRIPTOR.enum_types_by_name['HardwareModel'] = _HARDWAREMODEL
|
|
DESCRIPTOR.enum_types_by_name['Team'] = _TEAM
|
|
DESCRIPTOR.enum_types_by_name['Constants'] = _CONSTANTS
|
|
DESCRIPTOR.enum_types_by_name['CriticalErrorCode'] = _CRITICALERRORCODE
|
|
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
|
|
|
Position = _reflection.GeneratedProtocolMessageType('Position', (_message.Message,), {
|
|
'DESCRIPTOR' : _POSITION,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:Position)
|
|
})
|
|
_sym_db.RegisterMessage(Position)
|
|
|
|
User = _reflection.GeneratedProtocolMessageType('User', (_message.Message,), {
|
|
'DESCRIPTOR' : _USER,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:User)
|
|
})
|
|
_sym_db.RegisterMessage(User)
|
|
|
|
RouteDiscovery = _reflection.GeneratedProtocolMessageType('RouteDiscovery', (_message.Message,), {
|
|
'DESCRIPTOR' : _ROUTEDISCOVERY,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:RouteDiscovery)
|
|
})
|
|
_sym_db.RegisterMessage(RouteDiscovery)
|
|
|
|
Routing = _reflection.GeneratedProtocolMessageType('Routing', (_message.Message,), {
|
|
'DESCRIPTOR' : _ROUTING,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:Routing)
|
|
})
|
|
_sym_db.RegisterMessage(Routing)
|
|
|
|
Data = _reflection.GeneratedProtocolMessageType('Data', (_message.Message,), {
|
|
'DESCRIPTOR' : _DATA,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:Data)
|
|
})
|
|
_sym_db.RegisterMessage(Data)
|
|
|
|
MeshPacket = _reflection.GeneratedProtocolMessageType('MeshPacket', (_message.Message,), {
|
|
'DESCRIPTOR' : _MESHPACKET,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:MeshPacket)
|
|
})
|
|
_sym_db.RegisterMessage(MeshPacket)
|
|
|
|
NodeInfo = _reflection.GeneratedProtocolMessageType('NodeInfo', (_message.Message,), {
|
|
'DESCRIPTOR' : _NODEINFO,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:NodeInfo)
|
|
})
|
|
_sym_db.RegisterMessage(NodeInfo)
|
|
|
|
MyNodeInfo = _reflection.GeneratedProtocolMessageType('MyNodeInfo', (_message.Message,), {
|
|
'DESCRIPTOR' : _MYNODEINFO,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:MyNodeInfo)
|
|
})
|
|
_sym_db.RegisterMessage(MyNodeInfo)
|
|
|
|
LogRecord = _reflection.GeneratedProtocolMessageType('LogRecord', (_message.Message,), {
|
|
'DESCRIPTOR' : _LOGRECORD,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:LogRecord)
|
|
})
|
|
_sym_db.RegisterMessage(LogRecord)
|
|
|
|
FromRadio = _reflection.GeneratedProtocolMessageType('FromRadio', (_message.Message,), {
|
|
'DESCRIPTOR' : _FROMRADIO,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:FromRadio)
|
|
})
|
|
_sym_db.RegisterMessage(FromRadio)
|
|
|
|
ToRadio = _reflection.GeneratedProtocolMessageType('ToRadio', (_message.Message,), {
|
|
|
|
'PeerInfo' : _reflection.GeneratedProtocolMessageType('PeerInfo', (_message.Message,), {
|
|
'DESCRIPTOR' : _TORADIO_PEERINFO,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:ToRadio.PeerInfo)
|
|
})
|
|
,
|
|
'DESCRIPTOR' : _TORADIO,
|
|
'__module__' : 'mesh_pb2'
|
|
# @@protoc_insertion_point(class_scope:ToRadio)
|
|
})
|
|
_sym_db.RegisterMessage(ToRadio)
|
|
_sym_db.RegisterMessage(ToRadio.PeerInfo)
|
|
|
|
|
|
DESCRIPTOR._options = None
|
|
_MYNODEINFO.fields_by_name['region']._options = None
|
|
_MYNODEINFO.fields_by_name['hw_model_deprecated']._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.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.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Data.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.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.PORTNUM_FIELD_NUMBER"><code class="name">var <span class="ident">PORTNUM_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Data.REQUEST_ID_FIELD_NUMBER"><code class="name">var <span class="ident">REQUEST_ID_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Data.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.Data.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.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.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.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.portnum"><code class="name">var <span class="ident">portnum</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for portnum.</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.request_id"><code class="name">var <span class="ident">request_id</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for request_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.Data.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.Data.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.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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.FromRadio.LOG_RECORD_FIELD_NUMBER"><code class="name">var <span class="ident">LOG_RECORD_FIELD_NUMBER</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.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.log_record"><code class="name">var <span class="ident">log_record</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for log_record.</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'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'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'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'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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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.LogRecord"><code class="flex name class">
|
|
<span>class <span class="ident">LogRecord</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.LogRecord.CRITICAL"><code class="name">var <span class="ident">CRITICAL</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.DEBUG"><code class="name">var <span class="ident">DEBUG</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.ERROR"><code class="name">var <span class="ident">ERROR</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.INFO"><code class="name">var <span class="ident">INFO</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.LEVEL_FIELD_NUMBER"><code class="name">var <span class="ident">LEVEL_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.Level"><code class="name">var <span class="ident">Level</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.MESSAGE_FIELD_NUMBER"><code class="name">var <span class="ident">MESSAGE_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.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.LogRecord.TIME_FIELD_NUMBER"><code class="name">var <span class="ident">TIME_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.TRACE"><code class="name">var <span class="ident">TRACE</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.UNSET"><code class="name">var <span class="ident">UNSET</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.WARNING"><code class="name">var <span class="ident">WARNING</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
</dl>
|
|
<h3>Static methods</h3>
|
|
<dl>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.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.LogRecord.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.LogRecord.level"><code class="name">var <span class="ident">level</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for 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.LogRecord.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>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.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.LogRecord.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.LogRecord.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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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.LogRecord.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.LogRecord.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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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.LogRecord.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.LogRecord.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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
sub_errors = value.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
|
|
return errors</code></pre>
|
|
</details>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.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.LogRecord.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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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.LogRecord.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.LogRecord.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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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.LogRecord.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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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.LogRecord.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.LogRecord.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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.join(self.FindInitializationErrors())))
|
|
return self.SerializePartialToString(**kwargs)</code></pre>
|
|
</details>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.LogRecord.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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.LogRecord.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.LogRecord.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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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.ACK"><code class="name">var <span class="ident">ACK</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.MeshPacket.BACKGROUND"><code class="name">var <span class="ident">BACKGROUND</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.MeshPacket.CHANNEL_FIELD_NUMBER"><code class="name">var <span class="ident">CHANNEL_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<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.DEFAULT"><code class="name">var <span class="ident">DEFAULT</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.MAX"><code class="name">var <span class="ident">MAX</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.MeshPacket.MIN"><code class="name">var <span class="ident">MIN</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.MeshPacket.PRIORITY_FIELD_NUMBER"><code class="name">var <span class="ident">PRIORITY_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.MeshPacket.Priority"><code class="name">var <span class="ident">Priority</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.MeshPacket.RELIABLE"><code class="name">var <span class="ident">RELIABLE</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.MeshPacket.RX_RSSI_FIELD_NUMBER"><code class="name">var <span class="ident">RX_RSSI_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.UNSET"><code class="name">var <span class="ident">UNSET</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.channel"><code class="name">var <span class="ident">channel</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for channel.</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.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'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.priority"><code class="name">var <span class="ident">priority</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for priority.</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_rssi"><code class="name">var <span class="ident">rx_rssi</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for rx_rssi.</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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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.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_DEPRECATED_FIELD_NUMBER"><code class="name">var <span class="ident">HW_MODEL_DEPRECATED_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.MyNodeInfo.MAX_CHANNELS_FIELD_NUMBER"><code class="name">var <span class="ident">MAX_CHANNELS_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.NUM_BANDS_FIELD_NUMBER"><code class="name">var <span class="ident">NUM_BANDS_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.MyNodeInfo.REBOOT_COUNT_FIELD_NUMBER"><code class="name">var <span class="ident">REBOOT_COUNT_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.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_deprecated"><code class="name">var <span class="ident">hw_model_deprecated</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for hw_model_deprecated.</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.max_channels"><code class="name">var <span class="ident">max_channels</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for max_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.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.num_bands"><code class="name">var <span class="ident">num_bands</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for num_bands.</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.reboot_count"><code class="name">var <span class="ident">reboot_count</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for reboot_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.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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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.LAST_HEARD_FIELD_NUMBER"><code class="name">var <span class="ident">LAST_HEARD_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.last_heard"><code class="name">var <span class="ident">last_heard</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for last_heard.</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'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'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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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.ALTITUDE_HAE_FIELD_NUMBER"><code class="name">var <span class="ident">ALTITUDE_HAE_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.ALTITUDE_SOURCE_FIELD_NUMBER"><code class="name">var <span class="ident">ALTITUDE_SOURCE_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.ALTSRC_BAROMETRIC"><code class="name">var <span class="ident">ALTSRC_BAROMETRIC</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.ALTSRC_GPS_EXTERNAL"><code class="name">var <span class="ident">ALTSRC_GPS_EXTERNAL</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.ALTSRC_GPS_INTERNAL"><code class="name">var <span class="ident">ALTSRC_GPS_INTERNAL</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.ALTSRC_MANUAL_ENTRY"><code class="name">var <span class="ident">ALTSRC_MANUAL_ENTRY</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.ALTSRC_UNSPECIFIED"><code class="name">var <span class="ident">ALTSRC_UNSPECIFIED</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.ALT_GEOID_SEP_FIELD_NUMBER"><code class="name">var <span class="ident">ALT_GEOID_SEP_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.AltSource"><code class="name">var <span class="ident">AltSource</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.FIX_QUALITY_FIELD_NUMBER"><code class="name">var <span class="ident">FIX_QUALITY_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.FIX_TYPE_FIELD_NUMBER"><code class="name">var <span class="ident">FIX_TYPE_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.GPS_ACCURACY_FIELD_NUMBER"><code class="name">var <span class="ident">GPS_ACCURACY_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.GROUND_SPEED_FIELD_NUMBER"><code class="name">var <span class="ident">GROUND_SPEED_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.GROUND_TRACK_FIELD_NUMBER"><code class="name">var <span class="ident">GROUND_TRACK_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.HDOP_FIELD_NUMBER"><code class="name">var <span class="ident">HDOP_FIELD_NUMBER</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.LOCATION_SOURCE_FIELD_NUMBER"><code class="name">var <span class="ident">LOCATION_SOURCE_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.LOCSRC_GPS_EXTERNAL"><code class="name">var <span class="ident">LOCSRC_GPS_EXTERNAL</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.LOCSRC_GPS_INTERNAL"><code class="name">var <span class="ident">LOCSRC_GPS_INTERNAL</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.LOCSRC_MANUAL_ENTRY"><code class="name">var <span class="ident">LOCSRC_MANUAL_ENTRY</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.LOCSRC_UNSPECIFIED"><code class="name">var <span class="ident">LOCSRC_UNSPECIFIED</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.LocSource"><code class="name">var <span class="ident">LocSource</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.PDOP_FIELD_NUMBER"><code class="name">var <span class="ident">PDOP_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.POS_NEXT_UPDATE_FIELD_NUMBER"><code class="name">var <span class="ident">POS_NEXT_UPDATE_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.POS_SEQ_NUMBER_FIELD_NUMBER"><code class="name">var <span class="ident">POS_SEQ_NUMBER_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.POS_TIMESTAMP_FIELD_NUMBER"><code class="name">var <span class="ident">POS_TIMESTAMP_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.POS_TIME_MILLIS_FIELD_NUMBER"><code class="name">var <span class="ident">POS_TIME_MILLIS_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.SATS_IN_VIEW_FIELD_NUMBER"><code class="name">var <span class="ident">SATS_IN_VIEW_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Position.SENSOR_ID_FIELD_NUMBER"><code class="name">var <span class="ident">SENSOR_ID_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>
|
|
<dt id="meshtastic.mesh_pb2.Position.VDOP_FIELD_NUMBER"><code class="name">var <span class="ident">VDOP_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.HDOP"><code class="name">var <span class="ident">HDOP</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for HDOP.</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.PDOP"><code class="name">var <span class="ident">PDOP</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for PDOP.</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.VDOP"><code class="name">var <span class="ident">VDOP</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for VDOP.</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.alt_geoid_sep"><code class="name">var <span class="ident">alt_geoid_sep</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for alt_geoid_sep.</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.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.altitude_hae"><code class="name">var <span class="ident">altitude_hae</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for altitude_hae.</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.altitude_source"><code class="name">var <span class="ident">altitude_source</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for altitude_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.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.fix_quality"><code class="name">var <span class="ident">fix_quality</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for fix_quality.</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.fix_type"><code class="name">var <span class="ident">fix_type</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for fix_type.</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.gps_accuracy"><code class="name">var <span class="ident">gps_accuracy</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for gps_accuracy.</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.ground_speed"><code class="name">var <span class="ident">ground_speed</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for ground_speed.</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.ground_track"><code class="name">var <span class="ident">ground_track</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for ground_track.</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.location_source"><code class="name">var <span class="ident">location_source</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for location_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.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.pos_next_update"><code class="name">var <span class="ident">pos_next_update</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for pos_next_update.</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.pos_seq_number"><code class="name">var <span class="ident">pos_seq_number</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for pos_seq_number.</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.pos_time_millis"><code class="name">var <span class="ident">pos_time_millis</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for pos_time_millis.</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.pos_timestamp"><code class="name">var <span class="ident">pos_timestamp</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for pos_timestamp.</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.sats_in_view"><code class="name">var <span class="ident">sats_in_view</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for sats_in_view.</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.sensor_id"><code class="name">var <span class="ident">sensor_id</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for sensor_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.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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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'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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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.Routing"><code class="flex name class">
|
|
<span>class <span class="ident">Routing</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.Routing.BAD_REQUEST"><code class="name">var <span class="ident">BAD_REQUEST</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.DESCRIPTOR"><code class="name">var <span class="ident">DESCRIPTOR</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.ERROR_REASON_FIELD_NUMBER"><code class="name">var <span class="ident">ERROR_REASON_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.Error"><code class="name">var <span class="ident">Error</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.GOT_NAK"><code class="name">var <span class="ident">GOT_NAK</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.MAX_RETRANSMIT"><code class="name">var <span class="ident">MAX_RETRANSMIT</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.NONE"><code class="name">var <span class="ident">NONE</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.NOT_AUTHORIZED"><code class="name">var <span class="ident">NOT_AUTHORIZED</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.NO_CHANNEL"><code class="name">var <span class="ident">NO_CHANNEL</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.NO_INTERFACE"><code class="name">var <span class="ident">NO_INTERFACE</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.NO_RESPONSE"><code class="name">var <span class="ident">NO_RESPONSE</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.NO_ROUTE"><code class="name">var <span class="ident">NO_ROUTE</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.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.Routing.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.Routing.TIMEOUT"><code class="name">var <span class="ident">TIMEOUT</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.TOO_LARGE"><code class="name">var <span class="ident">TOO_LARGE</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
</dl>
|
|
<h3>Static methods</h3>
|
|
<dl>
|
|
<dt id="meshtastic.mesh_pb2.Routing.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.Routing.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.Routing.error_reason"><code class="name">var <span class="ident">error_reason</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for error_reason.</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.Routing.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'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.Routing.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'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.Routing.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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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.Routing.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.Routing.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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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.Routing.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.Routing.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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
sub_errors = value.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
|
|
return errors</code></pre>
|
|
</details>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.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.Routing.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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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.Routing.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.Routing.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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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.Routing.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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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.Routing.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.Routing.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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.join(self.FindInitializationErrors())))
|
|
return self.SerializePartialToString(**kwargs)</code></pre>
|
|
</details>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.Routing.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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.Routing.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.Routing.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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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.DISCONNECT_FIELD_NUMBER"><code class="name">var <span class="ident">DISCONNECT_FIELD_NUMBER</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.PEER_INFO_FIELD_NUMBER"><code class="name">var <span class="ident">PEER_INFO_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.ToRadio.PeerInfo"><code class="name">var <span class="ident">PeerInfo</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>
|
|
<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.disconnect"><code class="name">var <span class="ident">disconnect</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for disconnect.</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.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'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.peer_info"><code class="name">var <span class="ident">peer_info</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for peer_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'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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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.ANT_AZIMUTH_FIELD_NUMBER"><code class="name">var <span class="ident">ANT_AZIMUTH_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.User.ANT_GAIN_DBI_FIELD_NUMBER"><code class="name">var <span class="ident">ANT_GAIN_DBI_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<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.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.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.IS_LICENSED_FIELD_NUMBER"><code class="name">var <span class="ident">IS_LICENSED_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>
|
|
<dt id="meshtastic.mesh_pb2.User.TEAM_FIELD_NUMBER"><code class="name">var <span class="ident">TEAM_FIELD_NUMBER</span></code></dt>
|
|
<dd>
|
|
<div class="desc"></div>
|
|
</dd>
|
|
<dt id="meshtastic.mesh_pb2.User.TX_POWER_DBM_FIELD_NUMBER"><code class="name">var <span class="ident">TX_POWER_DBM_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.ant_azimuth"><code class="name">var <span class="ident">ant_azimuth</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for ant_azimuth.</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.ant_gain_dbi"><code class="name">var <span class="ident">ant_gain_dbi</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for ant_gain_dbi.</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.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.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.is_licensed"><code class="name">var <span class="ident">is_licensed</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for is_licensed.</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>
|
|
<dt id="meshtastic.mesh_pb2.User.team"><code class="name">var <span class="ident">team</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for team.</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.tx_power_dbm"><code class="name">var <span class="ident">tx_power_dbm</span></code></dt>
|
|
<dd>
|
|
<div class="desc"><p>Getter for tx_power_dbm.</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['key']._sizer(self.key)
|
|
size += descriptor.fields_by_name['value']._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('Protocol message %s has no "%s" field.' %
|
|
(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], 'InvalidateIterators'):
|
|
self._fields[field].InvalidateIterators()
|
|
|
|
# Note: If the field is a sub-message, its listener will still point
|
|
# at us. That'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):
|
|
"""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. "foo.bar[5].baz".
|
|
"""
|
|
|
|
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 = '(%s)' % field.full_name
|
|
else:
|
|
name = field.name
|
|
|
|
if _IsMapField(field):
|
|
if _IsMessageMapField(field):
|
|
for key in value:
|
|
element = value[key]
|
|
prefix = '%s[%s].' % (name, key)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
# ScalarMaps can't have any initialization errors.
|
|
pass
|
|
elif field.label == _FieldDescriptor.LABEL_REPEATED:
|
|
for i in range(len(value)):
|
|
element = value[i]
|
|
prefix = '%s[%d].' % (name, i)
|
|
sub_errors = element.FindInitializationErrors()
|
|
errors += [prefix + error for error in sub_errors]
|
|
else:
|
|
prefix = name + '.'
|
|
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):
|
|
"""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.
|
|
"""
|
|
|
|
# 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(
|
|
'Parameter to MergeFrom() must be instance of same class: '
|
|
'expected %s got %s.' % (_FullyQualifiedClassName(cls),
|
|
_FullyQualifiedClassName(msg.__class__)))
|
|
|
|
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):
|
|
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('Unexpected end-group tag.')
|
|
except (IndexError, TypeError):
|
|
# Now ord(buf[p:p+1]) == ord('') gets TypeError.
|
|
raise message_mod.DecodeError('Truncated message.')
|
|
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(
|
|
'Message %s is missing required fields: %s' % (
|
|
self.DESCRIPTOR.full_name, ','.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):
|
|
"""Sets the _cached_byte_size_dirty bit to true,
|
|
and propagates this to our listener iff this was a state change.
|
|
"""
|
|
|
|
# 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):
|
|
"""Returns the name of the currently set field inside a oneof, or None."""
|
|
try:
|
|
field = message_descriptor.oneofs_by_name[oneof_name]
|
|
except KeyError:
|
|
raise ValueError(
|
|
'Protocol message has no oneof "%s" field.' % 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.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" 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.DEST_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Data.DEST_FIELD_NUMBER">DEST_FIELD_NUMBER</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.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.PORTNUM_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Data.PORTNUM_FIELD_NUMBER">PORTNUM_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Data.REQUEST_ID_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Data.REQUEST_ID_FIELD_NUMBER">REQUEST_ID_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.SOURCE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Data.SOURCE_FIELD_NUMBER">SOURCE_FIELD_NUMBER</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.UnknownFields" href="#meshtastic.mesh_pb2.Data.UnknownFields">UnknownFields</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Data.WANT_RESPONSE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Data.WANT_RESPONSE_FIELD_NUMBER">WANT_RESPONSE_FIELD_NUMBER</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.dest" href="#meshtastic.mesh_pb2.Data.dest">dest</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.portnum" href="#meshtastic.mesh_pb2.Data.portnum">portnum</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Data.request_id" href="#meshtastic.mesh_pb2.Data.request_id">request_id</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Data.source" href="#meshtastic.mesh_pb2.Data.source">source</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Data.want_response" href="#meshtastic.mesh_pb2.Data.want_response">want_response</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.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.LOG_RECORD_FIELD_NUMBER" href="#meshtastic.mesh_pb2.FromRadio.LOG_RECORD_FIELD_NUMBER">LOG_RECORD_FIELD_NUMBER</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.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.log_record" href="#meshtastic.mesh_pb2.FromRadio.log_record">log_record</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.rebooted" href="#meshtastic.mesh_pb2.FromRadio.rebooted">rebooted</a></code></li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<h4><code><a title="meshtastic.mesh_pb2.LogRecord" href="#meshtastic.mesh_pb2.LogRecord">LogRecord</a></code></h4>
|
|
<ul class="">
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.ByteSize" href="#meshtastic.mesh_pb2.LogRecord.ByteSize">ByteSize</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.CRITICAL" href="#meshtastic.mesh_pb2.LogRecord.CRITICAL">CRITICAL</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.Clear" href="#meshtastic.mesh_pb2.LogRecord.Clear">Clear</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.ClearField" href="#meshtastic.mesh_pb2.LogRecord.ClearField">ClearField</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.DEBUG" href="#meshtastic.mesh_pb2.LogRecord.DEBUG">DEBUG</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.DESCRIPTOR" href="#meshtastic.mesh_pb2.LogRecord.DESCRIPTOR">DESCRIPTOR</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.DiscardUnknownFields" href="#meshtastic.mesh_pb2.LogRecord.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.ERROR" href="#meshtastic.mesh_pb2.LogRecord.ERROR">ERROR</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.FindInitializationErrors" href="#meshtastic.mesh_pb2.LogRecord.FindInitializationErrors">FindInitializationErrors</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.FromString" href="#meshtastic.mesh_pb2.LogRecord.FromString">FromString</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.HasField" href="#meshtastic.mesh_pb2.LogRecord.HasField">HasField</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.INFO" href="#meshtastic.mesh_pb2.LogRecord.INFO">INFO</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.IsInitialized" href="#meshtastic.mesh_pb2.LogRecord.IsInitialized">IsInitialized</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.LEVEL_FIELD_NUMBER" href="#meshtastic.mesh_pb2.LogRecord.LEVEL_FIELD_NUMBER">LEVEL_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.Level" href="#meshtastic.mesh_pb2.LogRecord.Level">Level</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.ListFields" href="#meshtastic.mesh_pb2.LogRecord.ListFields">ListFields</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.MESSAGE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.LogRecord.MESSAGE_FIELD_NUMBER">MESSAGE_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.MergeFrom" href="#meshtastic.mesh_pb2.LogRecord.MergeFrom">MergeFrom</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.MergeFromString" href="#meshtastic.mesh_pb2.LogRecord.MergeFromString">MergeFromString</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.RegisterExtension" href="#meshtastic.mesh_pb2.LogRecord.RegisterExtension">RegisterExtension</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.SOURCE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.LogRecord.SOURCE_FIELD_NUMBER">SOURCE_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.SerializePartialToString" href="#meshtastic.mesh_pb2.LogRecord.SerializePartialToString">SerializePartialToString</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.SerializeToString" href="#meshtastic.mesh_pb2.LogRecord.SerializeToString">SerializeToString</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.SetInParent" href="#meshtastic.mesh_pb2.LogRecord.SetInParent">SetInParent</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.TIME_FIELD_NUMBER" href="#meshtastic.mesh_pb2.LogRecord.TIME_FIELD_NUMBER">TIME_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.TRACE" href="#meshtastic.mesh_pb2.LogRecord.TRACE">TRACE</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.UNSET" href="#meshtastic.mesh_pb2.LogRecord.UNSET">UNSET</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.UnknownFields" href="#meshtastic.mesh_pb2.LogRecord.UnknownFields">UnknownFields</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.WARNING" href="#meshtastic.mesh_pb2.LogRecord.WARNING">WARNING</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.WhichOneof" href="#meshtastic.mesh_pb2.LogRecord.WhichOneof">WhichOneof</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.level" href="#meshtastic.mesh_pb2.LogRecord.level">level</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.message" href="#meshtastic.mesh_pb2.LogRecord.message">message</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.source" href="#meshtastic.mesh_pb2.LogRecord.source">source</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.LogRecord.time" href="#meshtastic.mesh_pb2.LogRecord.time">time</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.ACK" href="#meshtastic.mesh_pb2.MeshPacket.ACK">ACK</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.BACKGROUND" href="#meshtastic.mesh_pb2.MeshPacket.BACKGROUND">BACKGROUND</a></code></li>
|
|
<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.CHANNEL_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.CHANNEL_FIELD_NUMBER">CHANNEL_FIELD_NUMBER</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.DEFAULT" href="#meshtastic.mesh_pb2.MeshPacket.DEFAULT">DEFAULT</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.MAX" href="#meshtastic.mesh_pb2.MeshPacket.MAX">MAX</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.MIN" href="#meshtastic.mesh_pb2.MeshPacket.MIN">MIN</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.PRIORITY_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.PRIORITY_FIELD_NUMBER">PRIORITY_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.Priority" href="#meshtastic.mesh_pb2.MeshPacket.Priority">Priority</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.RELIABLE" href="#meshtastic.mesh_pb2.MeshPacket.RELIABLE">RELIABLE</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.RX_RSSI_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MeshPacket.RX_RSSI_FIELD_NUMBER">RX_RSSI_FIELD_NUMBER</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.UNSET" href="#meshtastic.mesh_pb2.MeshPacket.UNSET">UNSET</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.channel" href="#meshtastic.mesh_pb2.MeshPacket.channel">channel</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.priority" href="#meshtastic.mesh_pb2.MeshPacket.priority">priority</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.MeshPacket.rx_rssi" href="#meshtastic.mesh_pb2.MeshPacket.rx_rssi">rx_rssi</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.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_DEPRECATED_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.HW_MODEL_DEPRECATED_FIELD_NUMBER">HW_MODEL_DEPRECATED_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.MAX_CHANNELS_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.MAX_CHANNELS_FIELD_NUMBER">MAX_CHANNELS_FIELD_NUMBER</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.NUM_BANDS_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.NUM_BANDS_FIELD_NUMBER">NUM_BANDS_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.REBOOT_COUNT_FIELD_NUMBER" href="#meshtastic.mesh_pb2.MyNodeInfo.REBOOT_COUNT_FIELD_NUMBER">REBOOT_COUNT_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.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_deprecated" href="#meshtastic.mesh_pb2.MyNodeInfo.hw_model_deprecated">hw_model_deprecated</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.max_channels" href="#meshtastic.mesh_pb2.MyNodeInfo.max_channels">max_channels</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.num_bands" href="#meshtastic.mesh_pb2.MyNodeInfo.num_bands">num_bands</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.MyNodeInfo.reboot_count" href="#meshtastic.mesh_pb2.MyNodeInfo.reboot_count">reboot_count</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.LAST_HEARD_FIELD_NUMBER" href="#meshtastic.mesh_pb2.NodeInfo.LAST_HEARD_FIELD_NUMBER">LAST_HEARD_FIELD_NUMBER</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.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.last_heard" href="#meshtastic.mesh_pb2.NodeInfo.last_heard">last_heard</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.ALTITUDE_HAE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.ALTITUDE_HAE_FIELD_NUMBER">ALTITUDE_HAE_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.ALTITUDE_SOURCE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.ALTITUDE_SOURCE_FIELD_NUMBER">ALTITUDE_SOURCE_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.ALTSRC_BAROMETRIC" href="#meshtastic.mesh_pb2.Position.ALTSRC_BAROMETRIC">ALTSRC_BAROMETRIC</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.ALTSRC_GPS_EXTERNAL" href="#meshtastic.mesh_pb2.Position.ALTSRC_GPS_EXTERNAL">ALTSRC_GPS_EXTERNAL</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.ALTSRC_GPS_INTERNAL" href="#meshtastic.mesh_pb2.Position.ALTSRC_GPS_INTERNAL">ALTSRC_GPS_INTERNAL</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.ALTSRC_MANUAL_ENTRY" href="#meshtastic.mesh_pb2.Position.ALTSRC_MANUAL_ENTRY">ALTSRC_MANUAL_ENTRY</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.ALTSRC_UNSPECIFIED" href="#meshtastic.mesh_pb2.Position.ALTSRC_UNSPECIFIED">ALTSRC_UNSPECIFIED</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.ALT_GEOID_SEP_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.ALT_GEOID_SEP_FIELD_NUMBER">ALT_GEOID_SEP_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.AltSource" href="#meshtastic.mesh_pb2.Position.AltSource">AltSource</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.FIX_QUALITY_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.FIX_QUALITY_FIELD_NUMBER">FIX_QUALITY_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.FIX_TYPE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.FIX_TYPE_FIELD_NUMBER">FIX_TYPE_FIELD_NUMBER</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.GPS_ACCURACY_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.GPS_ACCURACY_FIELD_NUMBER">GPS_ACCURACY_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.GROUND_SPEED_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.GROUND_SPEED_FIELD_NUMBER">GROUND_SPEED_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.GROUND_TRACK_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.GROUND_TRACK_FIELD_NUMBER">GROUND_TRACK_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.HDOP" href="#meshtastic.mesh_pb2.Position.HDOP">HDOP</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.HDOP_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.HDOP_FIELD_NUMBER">HDOP_FIELD_NUMBER</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.LOCATION_SOURCE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.LOCATION_SOURCE_FIELD_NUMBER">LOCATION_SOURCE_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.LOCSRC_GPS_EXTERNAL" href="#meshtastic.mesh_pb2.Position.LOCSRC_GPS_EXTERNAL">LOCSRC_GPS_EXTERNAL</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.LOCSRC_GPS_INTERNAL" href="#meshtastic.mesh_pb2.Position.LOCSRC_GPS_INTERNAL">LOCSRC_GPS_INTERNAL</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.LOCSRC_MANUAL_ENTRY" href="#meshtastic.mesh_pb2.Position.LOCSRC_MANUAL_ENTRY">LOCSRC_MANUAL_ENTRY</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.LOCSRC_UNSPECIFIED" href="#meshtastic.mesh_pb2.Position.LOCSRC_UNSPECIFIED">LOCSRC_UNSPECIFIED</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.LocSource" href="#meshtastic.mesh_pb2.Position.LocSource">LocSource</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.PDOP" href="#meshtastic.mesh_pb2.Position.PDOP">PDOP</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.PDOP_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.PDOP_FIELD_NUMBER">PDOP_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.POS_NEXT_UPDATE_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.POS_NEXT_UPDATE_FIELD_NUMBER">POS_NEXT_UPDATE_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.POS_SEQ_NUMBER_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.POS_SEQ_NUMBER_FIELD_NUMBER">POS_SEQ_NUMBER_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.POS_TIMESTAMP_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.POS_TIMESTAMP_FIELD_NUMBER">POS_TIMESTAMP_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.POS_TIME_MILLIS_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.POS_TIME_MILLIS_FIELD_NUMBER">POS_TIME_MILLIS_FIELD_NUMBER</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.SATS_IN_VIEW_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.SATS_IN_VIEW_FIELD_NUMBER">SATS_IN_VIEW_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.SENSOR_ID_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.SENSOR_ID_FIELD_NUMBER">SENSOR_ID_FIELD_NUMBER</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.VDOP" href="#meshtastic.mesh_pb2.Position.VDOP">VDOP</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.VDOP_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Position.VDOP_FIELD_NUMBER">VDOP_FIELD_NUMBER</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.alt_geoid_sep" href="#meshtastic.mesh_pb2.Position.alt_geoid_sep">alt_geoid_sep</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.altitude_hae" href="#meshtastic.mesh_pb2.Position.altitude_hae">altitude_hae</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.altitude_source" href="#meshtastic.mesh_pb2.Position.altitude_source">altitude_source</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.fix_quality" href="#meshtastic.mesh_pb2.Position.fix_quality">fix_quality</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.fix_type" href="#meshtastic.mesh_pb2.Position.fix_type">fix_type</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.gps_accuracy" href="#meshtastic.mesh_pb2.Position.gps_accuracy">gps_accuracy</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.ground_speed" href="#meshtastic.mesh_pb2.Position.ground_speed">ground_speed</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.ground_track" href="#meshtastic.mesh_pb2.Position.ground_track">ground_track</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.location_source" href="#meshtastic.mesh_pb2.Position.location_source">location_source</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.pos_next_update" href="#meshtastic.mesh_pb2.Position.pos_next_update">pos_next_update</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.pos_seq_number" href="#meshtastic.mesh_pb2.Position.pos_seq_number">pos_seq_number</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.pos_time_millis" href="#meshtastic.mesh_pb2.Position.pos_time_millis">pos_time_millis</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.pos_timestamp" href="#meshtastic.mesh_pb2.Position.pos_timestamp">pos_timestamp</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.sats_in_view" href="#meshtastic.mesh_pb2.Position.sats_in_view">sats_in_view</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Position.sensor_id" href="#meshtastic.mesh_pb2.Position.sensor_id">sensor_id</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.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.Routing" href="#meshtastic.mesh_pb2.Routing">Routing</a></code></h4>
|
|
<ul class="">
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.BAD_REQUEST" href="#meshtastic.mesh_pb2.Routing.BAD_REQUEST">BAD_REQUEST</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.ByteSize" href="#meshtastic.mesh_pb2.Routing.ByteSize">ByteSize</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.Clear" href="#meshtastic.mesh_pb2.Routing.Clear">Clear</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.ClearField" href="#meshtastic.mesh_pb2.Routing.ClearField">ClearField</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.DESCRIPTOR" href="#meshtastic.mesh_pb2.Routing.DESCRIPTOR">DESCRIPTOR</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.DiscardUnknownFields" href="#meshtastic.mesh_pb2.Routing.DiscardUnknownFields">DiscardUnknownFields</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.ERROR_REASON_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Routing.ERROR_REASON_FIELD_NUMBER">ERROR_REASON_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.Error" href="#meshtastic.mesh_pb2.Routing.Error">Error</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.FindInitializationErrors" href="#meshtastic.mesh_pb2.Routing.FindInitializationErrors">FindInitializationErrors</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.FromString" href="#meshtastic.mesh_pb2.Routing.FromString">FromString</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.GOT_NAK" href="#meshtastic.mesh_pb2.Routing.GOT_NAK">GOT_NAK</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.HasField" href="#meshtastic.mesh_pb2.Routing.HasField">HasField</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.IsInitialized" href="#meshtastic.mesh_pb2.Routing.IsInitialized">IsInitialized</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.ListFields" href="#meshtastic.mesh_pb2.Routing.ListFields">ListFields</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.MAX_RETRANSMIT" href="#meshtastic.mesh_pb2.Routing.MAX_RETRANSMIT">MAX_RETRANSMIT</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.MergeFrom" href="#meshtastic.mesh_pb2.Routing.MergeFrom">MergeFrom</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.MergeFromString" href="#meshtastic.mesh_pb2.Routing.MergeFromString">MergeFromString</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.NONE" href="#meshtastic.mesh_pb2.Routing.NONE">NONE</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.NOT_AUTHORIZED" href="#meshtastic.mesh_pb2.Routing.NOT_AUTHORIZED">NOT_AUTHORIZED</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.NO_CHANNEL" href="#meshtastic.mesh_pb2.Routing.NO_CHANNEL">NO_CHANNEL</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.NO_INTERFACE" href="#meshtastic.mesh_pb2.Routing.NO_INTERFACE">NO_INTERFACE</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.NO_RESPONSE" href="#meshtastic.mesh_pb2.Routing.NO_RESPONSE">NO_RESPONSE</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.NO_ROUTE" href="#meshtastic.mesh_pb2.Routing.NO_ROUTE">NO_ROUTE</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.ROUTE_REPLY_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Routing.ROUTE_REPLY_FIELD_NUMBER">ROUTE_REPLY_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.ROUTE_REQUEST_FIELD_NUMBER" href="#meshtastic.mesh_pb2.Routing.ROUTE_REQUEST_FIELD_NUMBER">ROUTE_REQUEST_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.RegisterExtension" href="#meshtastic.mesh_pb2.Routing.RegisterExtension">RegisterExtension</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.SerializePartialToString" href="#meshtastic.mesh_pb2.Routing.SerializePartialToString">SerializePartialToString</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.SerializeToString" href="#meshtastic.mesh_pb2.Routing.SerializeToString">SerializeToString</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.SetInParent" href="#meshtastic.mesh_pb2.Routing.SetInParent">SetInParent</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.TIMEOUT" href="#meshtastic.mesh_pb2.Routing.TIMEOUT">TIMEOUT</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.TOO_LARGE" href="#meshtastic.mesh_pb2.Routing.TOO_LARGE">TOO_LARGE</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.UnknownFields" href="#meshtastic.mesh_pb2.Routing.UnknownFields">UnknownFields</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.WhichOneof" href="#meshtastic.mesh_pb2.Routing.WhichOneof">WhichOneof</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.error_reason" href="#meshtastic.mesh_pb2.Routing.error_reason">error_reason</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.route_reply" href="#meshtastic.mesh_pb2.Routing.route_reply">route_reply</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.Routing.route_request" href="#meshtastic.mesh_pb2.Routing.route_request">route_request</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.DISCONNECT_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ToRadio.DISCONNECT_FIELD_NUMBER">DISCONNECT_FIELD_NUMBER</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.PEER_INFO_FIELD_NUMBER" href="#meshtastic.mesh_pb2.ToRadio.PEER_INFO_FIELD_NUMBER">PEER_INFO_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.ToRadio.PeerInfo" href="#meshtastic.mesh_pb2.ToRadio.PeerInfo">PeerInfo</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.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.disconnect" href="#meshtastic.mesh_pb2.ToRadio.disconnect">disconnect</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.peer_info" href="#meshtastic.mesh_pb2.ToRadio.peer_info">peer_info</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.ANT_AZIMUTH_FIELD_NUMBER" href="#meshtastic.mesh_pb2.User.ANT_AZIMUTH_FIELD_NUMBER">ANT_AZIMUTH_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.User.ANT_GAIN_DBI_FIELD_NUMBER" href="#meshtastic.mesh_pb2.User.ANT_GAIN_DBI_FIELD_NUMBER">ANT_GAIN_DBI_FIELD_NUMBER</a></code></li>
|
|
<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.HW_MODEL_FIELD_NUMBER" href="#meshtastic.mesh_pb2.User.HW_MODEL_FIELD_NUMBER">HW_MODEL_FIELD_NUMBER</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.IS_LICENSED_FIELD_NUMBER" href="#meshtastic.mesh_pb2.User.IS_LICENSED_FIELD_NUMBER">IS_LICENSED_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.TEAM_FIELD_NUMBER" href="#meshtastic.mesh_pb2.User.TEAM_FIELD_NUMBER">TEAM_FIELD_NUMBER</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.User.TX_POWER_DBM_FIELD_NUMBER" href="#meshtastic.mesh_pb2.User.TX_POWER_DBM_FIELD_NUMBER">TX_POWER_DBM_FIELD_NUMBER</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.ant_azimuth" href="#meshtastic.mesh_pb2.User.ant_azimuth">ant_azimuth</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.User.ant_gain_dbi" href="#meshtastic.mesh_pb2.User.ant_gain_dbi">ant_gain_dbi</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.User.hw_model" href="#meshtastic.mesh_pb2.User.hw_model">hw_model</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.is_licensed" href="#meshtastic.mesh_pb2.User.is_licensed">is_licensed</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>
|
|
<li><code><a title="meshtastic.mesh_pb2.User.team" href="#meshtastic.mesh_pb2.User.team">team</a></code></li>
|
|
<li><code><a title="meshtastic.mesh_pb2.User.tx_power_dbm" href="#meshtastic.mesh_pb2.User.tx_power_dbm">tx_power_dbm</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</main>
|
|
<footer id="footer">
|
|
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
|
|
</footer>
|
|
</body>
|
|
</html> |