diff --git a/.github/workflows/update_protobufs.yml b/.github/workflows/update_protobufs.yml index 5cec898..c7b9375 100644 --- a/.github/workflows/update_protobufs.yml +++ b/.github/workflows/update_protobufs.yml @@ -37,5 +37,5 @@ jobs: git config --global user.email 'bot@noreply.github.com' git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} git add protobufs - git add meshtastic + git add meshtastic/protobuf git commit -m "Update protobuf submodule" && git push || echo "No changes to commit" diff --git a/bin/regen-protobufs.sh b/bin/regen-protobufs.sh index 6b993c8..a41f7ba 100755 --- a/bin/regen-protobufs.sh +++ b/bin/regen-protobufs.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + #Uncomment to run hack #gsed -i 's/import "\//import ".\//g' ./protobufs/meshtastic/* #gsed -i 's/package meshtastic;//g' ./protobufs/meshtastic/* @@ -7,17 +9,45 @@ # protoc looks for mypy plugin in the python path source $(poetry env info --path)/bin/activate -./nanopb-0.4.8/generator-bin/protoc -I=protobufs --python_out ./ --mypy_out ./ ./protobufs/meshtastic/*.proto -./nanopb-0.4.8/generator-bin/protoc -I=protobufs --python_out ./meshtastic/ --mypy_out ./meshtastic/ ./protobufs/nanopb.proto +# Put our temp files in the poetry build directory +TMPDIR=./build/meshtastic/protofixup +echo "Fixing up protobuf paths in ${TMPDIR} temp directory" -# workaround for import bug in protoc https://github.com/protocolbuffers/protobuf/issues/1491#issuecomment-690618628 +# Ensure a clean build +rm -r "${TMPDIR}" + +INDIR=${TMPDIR}/in/meshtastic/protobuf +OUTDIR=${TMPDIR}/out +PYIDIR=${TMPDIR}/out +mkdir -p "${OUTDIR}" "${INDIR}" "${PYIDIR}" +cp ./protobufs/meshtastic/*.proto "${INDIR}" + +# OS-X sed is apparently a little different and expects an arg for -i if [[ $OSTYPE == 'darwin'* ]]; then - sed -i '' -E 's/^(import.*_pb2)/from . \1/' meshtastic/*.py - # automate the current workaround (may be related to Meshtastic-protobufs issue #27 https://github.com/meshtastic/protobufs/issues/27) - sed -i '' -E "s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py + SEDCMD="sed -i '' -E" else - sed -i -e 's/^import.*_pb2/from . \0/' meshtastic/*.py - # automate the current workaround (may be related to Meshtastic-protobufs issue #27 https://github.com/meshtastic/protobufs/issues/27) - sed -i -e "s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py + SEDCMD="sed -i -E" fi + + +# change the package names to meshtastic.protobuf +$SEDCMD 's/^package meshtastic;/package meshtastic.protobuf;/' "${INDIR}/"*.proto +# fix the imports to match +$SEDCMD 's/^import "meshtastic\//import "meshtastic\/protobuf\//' "${INDIR}/"*.proto + +# Generate the python files +./nanopb-0.4.8/generator-bin/protoc -I=$TMPDIR/in --python_out "${OUTDIR}" "--mypy_out=${PYIDIR}" $INDIR/*.proto + +# Change "from meshtastic.protobuf import" to "from . import" +$SEDCMD 's/^from meshtastic.protobuf import/from . import/' "${OUTDIR}"/meshtastic/protobuf/*pb2*.py[i] + +# Create a __init__.py in the out directory +touch "${OUTDIR}/meshtastic/protobuf/__init__.py" + +# Copy to the source controlled tree +mkdir -p meshtastic/protobuf +rm -rf meshtastic/protobuf/*pb2*.py +cp "${OUTDIR}/meshtastic/protobuf"/* meshtastic/protobuf + +exit 0 diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 7b5bd22..75508d0 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -82,7 +82,10 @@ from google.protobuf.json_format import MessageToJson from pubsub import pub # type: ignore[import-untyped] from tabulate import tabulate -from meshtastic import ( +from meshtastic.node import Node +from meshtastic.util import DeferredExecution, Timeout, catchAndIgnore, fixme, stripnl + +from .protobuf import ( admin_pb2, apponly_pb2, channel_pb2, @@ -94,10 +97,10 @@ from meshtastic import ( remote_hardware_pb2, storeforward_pb2, telemetry_pb2, +) +from . import ( util, ) -from meshtastic.node import Node -from meshtastic.util import DeferredExecution, Timeout, catchAndIgnore, fixme, stripnl # Note: To follow PEP224, comments should be after the module variable. diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index ba4e6ec..aa8f90d 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -20,7 +20,8 @@ from pubsub import pub # type: ignore[import-untyped] import meshtastic.test import meshtastic.util from meshtastic import mt_config -from meshtastic import channel_pb2, config_pb2, portnums_pb2, remote_hardware, BROADCAST_ADDR +from meshtastic.protobuf import channel_pb2, config_pb2, portnums_pb2 +from meshtastic import remote_hardware, BROADCAST_ADDR from meshtastic.version import get_active_version from meshtastic.ble_interface import BLEInterface from meshtastic.mesh_interface import MeshInterface diff --git a/meshtastic/admin_pb2.py b/meshtastic/admin_pb2.py deleted file mode 100644 index e98de3e..0000000 --- a/meshtastic/admin_pb2.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/admin.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from meshtastic import channel_pb2 as meshtastic_dot_channel__pb2 -from meshtastic import config_pb2 as meshtastic_dot_config__pb2 -from meshtastic import connection_status_pb2 as meshtastic_dot_connection__status__pb2 -from meshtastic import mesh_pb2 as meshtastic_dot_mesh__pb2 -from meshtastic import module_config_pb2 as meshtastic_dot_module__config__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16meshtastic/admin.proto\x12\nmeshtastic\x1a\x18meshtastic/channel.proto\x1a\x17meshtastic/config.proto\x1a\"meshtastic/connection_status.proto\x1a\x15meshtastic/mesh.proto\x1a\x1emeshtastic/module_config.proto\"\xce\x11\n\x0c\x41\x64minMessage\x12\x1d\n\x13get_channel_request\x18\x01 \x01(\rH\x00\x12\x33\n\x14get_channel_response\x18\x02 \x01(\x0b\x32\x13.meshtastic.ChannelH\x00\x12\x1b\n\x11get_owner_request\x18\x03 \x01(\x08H\x00\x12.\n\x12get_owner_response\x18\x04 \x01(\x0b\x32\x10.meshtastic.UserH\x00\x12\x41\n\x12get_config_request\x18\x05 \x01(\x0e\x32#.meshtastic.AdminMessage.ConfigTypeH\x00\x12\x31\n\x13get_config_response\x18\x06 \x01(\x0b\x32\x12.meshtastic.ConfigH\x00\x12N\n\x19get_module_config_request\x18\x07 \x01(\x0e\x32).meshtastic.AdminMessage.ModuleConfigTypeH\x00\x12>\n\x1aget_module_config_response\x18\x08 \x01(\x0b\x32\x18.meshtastic.ModuleConfigH\x00\x12\x34\n*get_canned_message_module_messages_request\x18\n \x01(\x08H\x00\x12\x35\n+get_canned_message_module_messages_response\x18\x0b \x01(\tH\x00\x12%\n\x1bget_device_metadata_request\x18\x0c \x01(\x08H\x00\x12\x42\n\x1cget_device_metadata_response\x18\r \x01(\x0b\x32\x1a.meshtastic.DeviceMetadataH\x00\x12\x1e\n\x14get_ringtone_request\x18\x0e \x01(\x08H\x00\x12\x1f\n\x15get_ringtone_response\x18\x0f \x01(\tH\x00\x12.\n$get_device_connection_status_request\x18\x10 \x01(\x08H\x00\x12S\n%get_device_connection_status_response\x18\x11 \x01(\x0b\x32\".meshtastic.DeviceConnectionStatusH\x00\x12\x31\n\x0cset_ham_mode\x18\x12 \x01(\x0b\x32\x19.meshtastic.HamParametersH\x00\x12/\n%get_node_remote_hardware_pins_request\x18\x13 \x01(\x08H\x00\x12\\\n&get_node_remote_hardware_pins_response\x18\x14 \x01(\x0b\x32*.meshtastic.NodeRemoteHardwarePinsResponseH\x00\x12 \n\x16\x65nter_dfu_mode_request\x18\x15 \x01(\x08H\x00\x12\x1d\n\x13\x64\x65lete_file_request\x18\x16 \x01(\tH\x00\x12%\n\tset_owner\x18 \x01(\x0b\x32\x10.meshtastic.UserH\x00\x12*\n\x0bset_channel\x18! \x01(\x0b\x32\x13.meshtastic.ChannelH\x00\x12(\n\nset_config\x18\" \x01(\x0b\x32\x12.meshtastic.ConfigH\x00\x12\x35\n\x11set_module_config\x18# \x01(\x0b\x32\x18.meshtastic.ModuleConfigH\x00\x12,\n\"set_canned_message_module_messages\x18$ \x01(\tH\x00\x12\x1e\n\x14set_ringtone_message\x18% \x01(\tH\x00\x12\x1b\n\x11remove_by_nodenum\x18& \x01(\rH\x00\x12\x1b\n\x11set_favorite_node\x18\' \x01(\rH\x00\x12\x1e\n\x14remove_favorite_node\x18( \x01(\rH\x00\x12\x32\n\x12set_fixed_position\x18) \x01(\x0b\x32\x14.meshtastic.PositionH\x00\x12\x1f\n\x15remove_fixed_position\x18* \x01(\x08H\x00\x12\x1d\n\x13\x62\x65gin_edit_settings\x18@ \x01(\x08H\x00\x12\x1e\n\x14\x63ommit_edit_settings\x18\x41 \x01(\x08H\x00\x12\x1c\n\x12reboot_ota_seconds\x18_ \x01(\x05H\x00\x12\x18\n\x0e\x65xit_simulator\x18` \x01(\x08H\x00\x12\x18\n\x0ereboot_seconds\x18\x61 \x01(\x05H\x00\x12\x1a\n\x10shutdown_seconds\x18\x62 \x01(\x05H\x00\x12\x17\n\rfactory_reset\x18\x63 \x01(\x05H\x00\x12\x16\n\x0cnodedb_reset\x18\x64 \x01(\x05H\x00\"\x95\x01\n\nConfigType\x12\x11\n\rDEVICE_CONFIG\x10\x00\x12\x13\n\x0fPOSITION_CONFIG\x10\x01\x12\x10\n\x0cPOWER_CONFIG\x10\x02\x12\x12\n\x0eNETWORK_CONFIG\x10\x03\x12\x12\n\x0e\x44ISPLAY_CONFIG\x10\x04\x12\x0f\n\x0bLORA_CONFIG\x10\x05\x12\x14\n\x10\x42LUETOOTH_CONFIG\x10\x06\"\xbb\x02\n\x10ModuleConfigType\x12\x0f\n\x0bMQTT_CONFIG\x10\x00\x12\x11\n\rSERIAL_CONFIG\x10\x01\x12\x13\n\x0f\x45XTNOTIF_CONFIG\x10\x02\x12\x17\n\x13STOREFORWARD_CONFIG\x10\x03\x12\x14\n\x10RANGETEST_CONFIG\x10\x04\x12\x14\n\x10TELEMETRY_CONFIG\x10\x05\x12\x14\n\x10\x43\x41NNEDMSG_CONFIG\x10\x06\x12\x10\n\x0c\x41UDIO_CONFIG\x10\x07\x12\x19\n\x15REMOTEHARDWARE_CONFIG\x10\x08\x12\x17\n\x13NEIGHBORINFO_CONFIG\x10\t\x12\x1a\n\x16\x41MBIENTLIGHTING_CONFIG\x10\n\x12\x1a\n\x16\x44\x45TECTIONSENSOR_CONFIG\x10\x0b\x12\x15\n\x11PAXCOUNTER_CONFIG\x10\x0c\x42\x11\n\x0fpayload_variant\"[\n\rHamParameters\x12\x11\n\tcall_sign\x18\x01 \x01(\t\x12\x10\n\x08tx_power\x18\x02 \x01(\x05\x12\x11\n\tfrequency\x18\x03 \x01(\x02\x12\x12\n\nshort_name\x18\x04 \x01(\t\"f\n\x1eNodeRemoteHardwarePinsResponse\x12\x44\n\x19node_remote_hardware_pins\x18\x01 \x03(\x0b\x32!.meshtastic.NodeRemoteHardwarePinB`\n\x13\x63om.geeksville.meshB\x0b\x41\x64minProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.admin_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\013AdminProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _ADMINMESSAGE._serialized_start=181 - _ADMINMESSAGE._serialized_end=2435 - _ADMINMESSAGE_CONFIGTYPE._serialized_start=1949 - _ADMINMESSAGE_CONFIGTYPE._serialized_end=2098 - _ADMINMESSAGE_MODULECONFIGTYPE._serialized_start=2101 - _ADMINMESSAGE_MODULECONFIGTYPE._serialized_end=2416 - _HAMPARAMETERS._serialized_start=2437 - _HAMPARAMETERS._serialized_end=2528 - _NODEREMOTEHARDWAREPINSRESPONSE._serialized_start=2530 - _NODEREMOTEHARDWAREPINSRESPONSE._serialized_end=2632 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/apponly_pb2.py b/meshtastic/apponly_pb2.py deleted file mode 100644 index 46d9931..0000000 --- a/meshtastic/apponly_pb2.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/apponly.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from meshtastic import channel_pb2 as meshtastic_dot_channel__pb2 -from meshtastic import config_pb2 as meshtastic_dot_config__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18meshtastic/apponly.proto\x12\nmeshtastic\x1a\x18meshtastic/channel.proto\x1a\x17meshtastic/config.proto\"o\n\nChannelSet\x12-\n\x08settings\x18\x01 \x03(\x0b\x32\x1b.meshtastic.ChannelSettings\x12\x32\n\x0blora_config\x18\x02 \x01(\x0b\x32\x1d.meshtastic.Config.LoRaConfigBb\n\x13\x63om.geeksville.meshB\rAppOnlyProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.apponly_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\rAppOnlyProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _CHANNELSET._serialized_start=91 - _CHANNELSET._serialized_end=202 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/atak_pb2.py b/meshtastic/atak_pb2.py deleted file mode 100644 index a813729..0000000 --- a/meshtastic/atak_pb2.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/atak.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15meshtastic/atak.proto\x12\nmeshtastic\"\xe6\x01\n\tTAKPacket\x12\x15\n\ris_compressed\x18\x01 \x01(\x08\x12$\n\x07\x63ontact\x18\x02 \x01(\x0b\x32\x13.meshtastic.Contact\x12 \n\x05group\x18\x03 \x01(\x0b\x32\x11.meshtastic.Group\x12\"\n\x06status\x18\x04 \x01(\x0b\x32\x12.meshtastic.Status\x12\x1e\n\x03pli\x18\x05 \x01(\x0b\x32\x0f.meshtastic.PLIH\x00\x12#\n\x04\x63hat\x18\x06 \x01(\x0b\x32\x13.meshtastic.GeoChatH\x00\x42\x11\n\x0fpayload_variant\"\\\n\x07GeoChat\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x02to\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bto_callsign\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x05\n\x03_toB\x0e\n\x0c_to_callsign\"M\n\x05Group\x12$\n\x04role\x18\x01 \x01(\x0e\x32\x16.meshtastic.MemberRole\x12\x1e\n\x04team\x18\x02 \x01(\x0e\x32\x10.meshtastic.Team\"\x19\n\x06Status\x12\x0f\n\x07\x62\x61ttery\x18\x01 \x01(\r\"4\n\x07\x43ontact\x12\x10\n\x08\x63\x61llsign\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65vice_callsign\x18\x02 \x01(\t\"_\n\x03PLI\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\r\n\x05speed\x18\x04 \x01(\r\x12\x0e\n\x06\x63ourse\x18\x05 \x01(\r*\xc0\x01\n\x04Team\x12\x14\n\x10Unspecifed_Color\x10\x00\x12\t\n\x05White\x10\x01\x12\n\n\x06Yellow\x10\x02\x12\n\n\x06Orange\x10\x03\x12\x0b\n\x07Magenta\x10\x04\x12\x07\n\x03Red\x10\x05\x12\n\n\x06Maroon\x10\x06\x12\n\n\x06Purple\x10\x07\x12\r\n\tDark_Blue\x10\x08\x12\x08\n\x04\x42lue\x10\t\x12\x08\n\x04\x43yan\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*\x7f\n\nMemberRole\x12\x0e\n\nUnspecifed\x10\x00\x12\x0e\n\nTeamMember\x10\x01\x12\x0c\n\x08TeamLead\x10\x02\x12\x06\n\x02HQ\x10\x03\x12\n\n\x06Sniper\x10\x04\x12\t\n\x05Medic\x10\x05\x12\x13\n\x0f\x46orwardObserver\x10\x06\x12\x07\n\x03RTO\x10\x07\x12\x06\n\x02K9\x10\x08\x42_\n\x13\x63om.geeksville.meshB\nATAKProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.atak_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\nATAKProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _TEAM._serialized_start=622 - _TEAM._serialized_end=814 - _MEMBERROLE._serialized_start=816 - _MEMBERROLE._serialized_end=943 - _TAKPACKET._serialized_start=38 - _TAKPACKET._serialized_end=268 - _GEOCHAT._serialized_start=270 - _GEOCHAT._serialized_end=362 - _GROUP._serialized_start=364 - _GROUP._serialized_end=441 - _STATUS._serialized_start=443 - _STATUS._serialized_end=468 - _CONTACT._serialized_start=470 - _CONTACT._serialized_end=522 - _PLI._serialized_start=524 - _PLI._serialized_end=619 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/channel_pb2.py b/meshtastic/channel_pb2.py deleted file mode 100644 index 2e66fe8..0000000 --- a/meshtastic/channel_pb2.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/channel.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18meshtastic/channel.proto\x12\nmeshtastic\"\xb8\x01\n\x0f\x43hannelSettings\x12\x17\n\x0b\x63hannel_num\x18\x01 \x01(\rB\x02\x18\x01\x12\x0b\n\x03psk\x18\x02 \x01(\x0c\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\n\n\x02id\x18\x04 \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x05 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x06 \x01(\x08\x12\x33\n\x0fmodule_settings\x18\x07 \x01(\x0b\x32\x1a.meshtastic.ModuleSettings\"E\n\x0eModuleSettings\x12\x1a\n\x12position_precision\x18\x01 \x01(\r\x12\x17\n\x0fis_client_muted\x18\x02 \x01(\x08\"\xa1\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\x05\x12-\n\x08settings\x18\x02 \x01(\x0b\x32\x1b.meshtastic.ChannelSettings\x12&\n\x04role\x18\x03 \x01(\x0e\x32\x18.meshtastic.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\x42\x62\n\x13\x63om.geeksville.meshB\rChannelProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.channel_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\rChannelProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _CHANNELSETTINGS.fields_by_name['channel_num']._options = None - _CHANNELSETTINGS.fields_by_name['channel_num']._serialized_options = b'\030\001' - _CHANNELSETTINGS._serialized_start=41 - _CHANNELSETTINGS._serialized_end=225 - _MODULESETTINGS._serialized_start=227 - _MODULESETTINGS._serialized_end=296 - _CHANNEL._serialized_start=299 - _CHANNEL._serialized_end=460 - _CHANNEL_ROLE._serialized_start=412 - _CHANNEL_ROLE._serialized_end=460 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/clientonly_pb2.py b/meshtastic/clientonly_pb2.py deleted file mode 100644 index 91e7b0d..0000000 --- a/meshtastic/clientonly_pb2.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/clientonly.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from meshtastic import localonly_pb2 as meshtastic_dot_localonly__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bmeshtastic/clientonly.proto\x12\nmeshtastic\x1a\x1ameshtastic/localonly.proto\"\x8d\x02\n\rDeviceProfile\x12\x16\n\tlong_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nshort_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x63hannel_url\x18\x03 \x01(\tH\x02\x88\x01\x01\x12,\n\x06\x63onfig\x18\x04 \x01(\x0b\x32\x17.meshtastic.LocalConfigH\x03\x88\x01\x01\x12\x39\n\rmodule_config\x18\x05 \x01(\x0b\x32\x1d.meshtastic.LocalModuleConfigH\x04\x88\x01\x01\x42\x0c\n\n_long_nameB\r\n\x0b_short_nameB\x0e\n\x0c_channel_urlB\t\n\x07_configB\x10\n\x0e_module_configBe\n\x13\x63om.geeksville.meshB\x10\x43lientOnlyProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.clientonly_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\020ClientOnlyProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _DEVICEPROFILE._serialized_start=72 - _DEVICEPROFILE._serialized_end=341 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/clientonly_pb2.pyi b/meshtastic/clientonly_pb2.pyi deleted file mode 100644 index 10820e7..0000000 --- a/meshtastic/clientonly_pb2.pyi +++ /dev/null @@ -1,77 +0,0 @@ -""" -@generated by mypy-protobuf. Do not edit manually! -isort:skip_file -""" -import builtins -import google.protobuf.descriptor -import google.protobuf.message -import meshtastic.localonly_pb2 -import sys -import typing - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor - -@typing_extensions.final -class DeviceProfile(google.protobuf.message.Message): - """ - This abstraction is used to contain any configuration for provisioning a node on any client. - It is useful for importing and exporting configurations. - """ - - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - LONG_NAME_FIELD_NUMBER: builtins.int - SHORT_NAME_FIELD_NUMBER: builtins.int - CHANNEL_URL_FIELD_NUMBER: builtins.int - CONFIG_FIELD_NUMBER: builtins.int - MODULE_CONFIG_FIELD_NUMBER: builtins.int - long_name: builtins.str - """ - Long name for the node - """ - short_name: builtins.str - """ - Short name of the node - """ - channel_url: builtins.str - """ - The url of the channels from our node - """ - @property - def config(self) -> meshtastic.localonly_pb2.LocalConfig: - """ - The Config of the node - """ - @property - def module_config(self) -> meshtastic.localonly_pb2.LocalModuleConfig: - """ - The ModuleConfig of the node - """ - def __init__( - self, - *, - long_name: builtins.str | None = ..., - short_name: builtins.str | None = ..., - channel_url: builtins.str | None = ..., - config: meshtastic.localonly_pb2.LocalConfig | None = ..., - module_config: meshtastic.localonly_pb2.LocalModuleConfig | None = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_channel_url", b"_channel_url", "_config", b"_config", "_long_name", b"_long_name", "_module_config", b"_module_config", "_short_name", b"_short_name", "channel_url", b"channel_url", "config", b"config", "long_name", b"long_name", "module_config", b"module_config", "short_name", b"short_name"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_channel_url", b"_channel_url", "_config", b"_config", "_long_name", b"_long_name", "_module_config", b"_module_config", "_short_name", b"_short_name", "channel_url", b"channel_url", "config", b"config", "long_name", b"long_name", "module_config", b"module_config", "short_name", b"short_name"]) -> None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_channel_url", b"_channel_url"]) -> typing_extensions.Literal["channel_url"] | None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_config", b"_config"]) -> typing_extensions.Literal["config"] | None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_long_name", b"_long_name"]) -> typing_extensions.Literal["long_name"] | None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_module_config", b"_module_config"]) -> typing_extensions.Literal["module_config"] | None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_short_name", b"_short_name"]) -> typing_extensions.Literal["short_name"] | None: ... - -global___DeviceProfile = DeviceProfile diff --git a/meshtastic/config_pb2.py b/meshtastic/config_pb2.py deleted file mode 100644 index 9b216f9..0000000 --- a/meshtastic/config_pb2.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/config.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17meshtastic/config.proto\x12\nmeshtastic\"\xc2\x1f\n\x06\x43onfig\x12\x31\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x1f.meshtastic.Config.DeviceConfigH\x00\x12\x35\n\x08position\x18\x02 \x01(\x0b\x32!.meshtastic.Config.PositionConfigH\x00\x12/\n\x05power\x18\x03 \x01(\x0b\x32\x1e.meshtastic.Config.PowerConfigH\x00\x12\x33\n\x07network\x18\x04 \x01(\x0b\x32 .meshtastic.Config.NetworkConfigH\x00\x12\x33\n\x07\x64isplay\x18\x05 \x01(\x0b\x32 .meshtastic.Config.DisplayConfigH\x00\x12-\n\x04lora\x18\x06 \x01(\x0b\x32\x1d.meshtastic.Config.LoRaConfigH\x00\x12\x37\n\tbluetooth\x18\x07 \x01(\x0b\x32\".meshtastic.Config.BluetoothConfigH\x00\x1a\x91\x05\n\x0c\x44\x65viceConfig\x12\x32\n\x04role\x18\x01 \x01(\x0e\x32$.meshtastic.Config.DeviceConfig.Role\x12\x16\n\x0eserial_enabled\x18\x02 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x03 \x01(\x08\x12\x13\n\x0b\x62utton_gpio\x18\x04 \x01(\r\x12\x13\n\x0b\x62uzzer_gpio\x18\x05 \x01(\r\x12I\n\x10rebroadcast_mode\x18\x06 \x01(\x0e\x32/.meshtastic.Config.DeviceConfig.RebroadcastMode\x12 \n\x18node_info_broadcast_secs\x18\x07 \x01(\r\x12\"\n\x1a\x64ouble_tap_as_button_press\x18\x08 \x01(\x08\x12\x12\n\nis_managed\x18\t \x01(\x08\x12\x1c\n\x14\x64isable_triple_click\x18\n \x01(\x08\x12\r\n\x05tzdef\x18\x0b \x01(\t\x12\x1e\n\x16led_heartbeat_disabled\x18\x0c \x01(\x08\"\xaa\x01\n\x04Role\x12\n\n\x06\x43LIENT\x10\x00\x12\x0f\n\x0b\x43LIENT_MUTE\x10\x01\x12\n\n\x06ROUTER\x10\x02\x12\x11\n\rROUTER_CLIENT\x10\x03\x12\x0c\n\x08REPEATER\x10\x04\x12\x0b\n\x07TRACKER\x10\x05\x12\n\n\x06SENSOR\x10\x06\x12\x07\n\x03TAK\x10\x07\x12\x11\n\rCLIENT_HIDDEN\x10\x08\x12\x12\n\x0eLOST_AND_FOUND\x10\t\x12\x0f\n\x0bTAK_TRACKER\x10\n\"Q\n\x0fRebroadcastMode\x12\x07\n\x03\x41LL\x10\x00\x12\x15\n\x11\x41LL_SKIP_DECODING\x10\x01\x12\x0e\n\nLOCAL_ONLY\x10\x02\x12\x0e\n\nKNOWN_ONLY\x10\x03\x1a\x91\x05\n\x0ePositionConfig\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12(\n position_broadcast_smart_enabled\x18\x02 \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\x03 \x01(\x08\x12\x17\n\x0bgps_enabled\x18\x04 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x13gps_update_interval\x18\x05 \x01(\r\x12\x1c\n\x10gps_attempt_time\x18\x06 \x01(\rB\x02\x18\x01\x12\x16\n\x0eposition_flags\x18\x07 \x01(\r\x12\x0f\n\x07rx_gpio\x18\x08 \x01(\r\x12\x0f\n\x07tx_gpio\x18\t \x01(\r\x12(\n broadcast_smart_minimum_distance\x18\n \x01(\r\x12-\n%broadcast_smart_minimum_interval_secs\x18\x0b \x01(\r\x12\x13\n\x0bgps_en_gpio\x18\x0c \x01(\r\x12;\n\x08gps_mode\x18\r \x01(\x0e\x32).meshtastic.Config.PositionConfig.GpsMode\"\xab\x01\n\rPositionFlags\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x41LTITUDE\x10\x01\x12\x10\n\x0c\x41LTITUDE_MSL\x10\x02\x12\x16\n\x12GEOIDAL_SEPARATION\x10\x04\x12\x07\n\x03\x44OP\x10\x08\x12\t\n\x05HVDOP\x10\x10\x12\r\n\tSATINVIEW\x10 \x12\n\n\x06SEQ_NO\x10@\x12\x0e\n\tTIMESTAMP\x10\x80\x01\x12\x0c\n\x07HEADING\x10\x80\x02\x12\n\n\x05SPEED\x10\x80\x04\"5\n\x07GpsMode\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0f\n\x0bNOT_PRESENT\x10\x02\x1a\xea\x01\n\x0bPowerConfig\x12\x17\n\x0fis_power_saving\x18\x01 \x01(\x08\x12&\n\x1eon_battery_shutdown_after_secs\x18\x02 \x01(\r\x12\x1f\n\x17\x61\x64\x63_multiplier_override\x18\x03 \x01(\x02\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x10\n\x08sds_secs\x18\x06 \x01(\r\x12\x0f\n\x07ls_secs\x18\x07 \x01(\r\x12\x15\n\rmin_wake_secs\x18\x08 \x01(\r\x12\"\n\x1a\x64\x65vice_battery_ina_address\x18\t \x01(\r\x1a\xfe\x02\n\rNetworkConfig\x12\x14\n\x0cwifi_enabled\x18\x01 \x01(\x08\x12\x11\n\twifi_ssid\x18\x03 \x01(\t\x12\x10\n\x08wifi_psk\x18\x04 \x01(\t\x12\x12\n\nntp_server\x18\x05 \x01(\t\x12\x13\n\x0b\x65th_enabled\x18\x06 \x01(\x08\x12\x42\n\x0c\x61\x64\x64ress_mode\x18\x07 \x01(\x0e\x32,.meshtastic.Config.NetworkConfig.AddressMode\x12@\n\x0bipv4_config\x18\x08 \x01(\x0b\x32+.meshtastic.Config.NetworkConfig.IpV4Config\x12\x16\n\x0ersyslog_server\x18\t \x01(\t\x1a\x46\n\nIpV4Config\x12\n\n\x02ip\x18\x01 \x01(\x07\x12\x0f\n\x07gateway\x18\x02 \x01(\x07\x12\x0e\n\x06subnet\x18\x03 \x01(\x07\x12\x0b\n\x03\x64ns\x18\x04 \x01(\x07\"#\n\x0b\x41\x64\x64ressMode\x12\x08\n\x04\x44HCP\x10\x00\x12\n\n\x06STATIC\x10\x01\x1a\xbe\x05\n\rDisplayConfig\x12\x16\n\x0escreen_on_secs\x18\x01 \x01(\r\x12H\n\ngps_format\x18\x02 \x01(\x0e\x32\x34.meshtastic.Config.DisplayConfig.GpsCoordinateFormat\x12!\n\x19\x61uto_screen_carousel_secs\x18\x03 \x01(\r\x12\x19\n\x11\x63ompass_north_top\x18\x04 \x01(\x08\x12\x13\n\x0b\x66lip_screen\x18\x05 \x01(\x08\x12<\n\x05units\x18\x06 \x01(\x0e\x32-.meshtastic.Config.DisplayConfig.DisplayUnits\x12\x37\n\x04oled\x18\x07 \x01(\x0e\x32).meshtastic.Config.DisplayConfig.OledType\x12\x41\n\x0b\x64isplaymode\x18\x08 \x01(\x0e\x32,.meshtastic.Config.DisplayConfig.DisplayMode\x12\x14\n\x0cheading_bold\x18\t \x01(\x08\x12\x1d\n\x15wake_on_tap_or_motion\x18\n \x01(\x08\"M\n\x13GpsCoordinateFormat\x12\x07\n\x03\x44\x45\x43\x10\x00\x12\x07\n\x03\x44MS\x10\x01\x12\x07\n\x03UTM\x10\x02\x12\x08\n\x04MGRS\x10\x03\x12\x07\n\x03OLC\x10\x04\x12\x08\n\x04OSGR\x10\x05\"(\n\x0c\x44isplayUnits\x12\n\n\x06METRIC\x10\x00\x12\x0c\n\x08IMPERIAL\x10\x01\"M\n\x08OledType\x12\r\n\tOLED_AUTO\x10\x00\x12\x10\n\x0cOLED_SSD1306\x10\x01\x12\x0f\n\x0bOLED_SH1106\x10\x02\x12\x0f\n\x0bOLED_SH1107\x10\x03\"A\n\x0b\x44isplayMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08TWOCOLOR\x10\x01\x12\x0c\n\x08INVERTED\x10\x02\x12\t\n\x05\x43OLOR\x10\x03\x1a\xb0\x06\n\nLoRaConfig\x12\x12\n\nuse_preset\x18\x01 \x01(\x08\x12?\n\x0cmodem_preset\x18\x02 \x01(\x0e\x32).meshtastic.Config.LoRaConfig.ModemPreset\x12\x11\n\tbandwidth\x18\x03 \x01(\r\x12\x15\n\rspread_factor\x18\x04 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x05 \x01(\r\x12\x18\n\x10\x66requency_offset\x18\x06 \x01(\x02\x12\x38\n\x06region\x18\x07 \x01(\x0e\x32(.meshtastic.Config.LoRaConfig.RegionCode\x12\x11\n\thop_limit\x18\x08 \x01(\r\x12\x12\n\ntx_enabled\x18\t \x01(\x08\x12\x10\n\x08tx_power\x18\n \x01(\x05\x12\x13\n\x0b\x63hannel_num\x18\x0b \x01(\r\x12\x1b\n\x13override_duty_cycle\x18\x0c \x01(\x08\x12\x1e\n\x16sx126x_rx_boosted_gain\x18\r \x01(\x08\x12\x1a\n\x12override_frequency\x18\x0e \x01(\x02\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x13\n\x0bignore_mqtt\x18h \x01(\x08\"\xcd\x01\n\nRegionCode\x12\t\n\x05UNSET\x10\x00\x12\x06\n\x02US\x10\x01\x12\n\n\x06\x45U_433\x10\x02\x12\n\n\x06\x45U_868\x10\x03\x12\x06\n\x02\x43N\x10\x04\x12\x06\n\x02JP\x10\x05\x12\x07\n\x03\x41NZ\x10\x06\x12\x06\n\x02KR\x10\x07\x12\x06\n\x02TW\x10\x08\x12\x06\n\x02RU\x10\t\x12\x06\n\x02IN\x10\n\x12\n\n\x06NZ_865\x10\x0b\x12\x06\n\x02TH\x10\x0c\x12\x0b\n\x07LORA_24\x10\r\x12\n\n\x06UA_433\x10\x0e\x12\n\n\x06UA_868\x10\x0f\x12\n\n\x06MY_433\x10\x10\x12\n\n\x06MY_919\x10\x11\x12\n\n\x06SG_923\x10\x12\"\x94\x01\n\x0bModemPreset\x12\r\n\tLONG_FAST\x10\x00\x12\r\n\tLONG_SLOW\x10\x01\x12\x12\n\x0eVERY_LONG_SLOW\x10\x02\x12\x0f\n\x0bMEDIUM_SLOW\x10\x03\x12\x0f\n\x0bMEDIUM_FAST\x10\x04\x12\x0e\n\nSHORT_SLOW\x10\x05\x12\x0e\n\nSHORT_FAST\x10\x06\x12\x11\n\rLONG_MODERATE\x10\x07\x1a\xad\x01\n\x0f\x42luetoothConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12<\n\x04mode\x18\x02 \x01(\x0e\x32..meshtastic.Config.BluetoothConfig.PairingMode\x12\x11\n\tfixed_pin\x18\x03 \x01(\r\"8\n\x0bPairingMode\x12\x0e\n\nRANDOM_PIN\x10\x00\x12\r\n\tFIXED_PIN\x10\x01\x12\n\n\x06NO_PIN\x10\x02\x42\x11\n\x0fpayload_variantBa\n\x13\x63om.geeksville.meshB\x0c\x43onfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.config_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\014ConfigProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _CONFIG_POSITIONCONFIG.fields_by_name['gps_enabled']._options = None - _CONFIG_POSITIONCONFIG.fields_by_name['gps_enabled']._serialized_options = b'\030\001' - _CONFIG_POSITIONCONFIG.fields_by_name['gps_attempt_time']._options = None - _CONFIG_POSITIONCONFIG.fields_by_name['gps_attempt_time']._serialized_options = b'\030\001' - _CONFIG._serialized_start=40 - _CONFIG._serialized_end=4074 - _CONFIG_DEVICECONFIG._serialized_start=416 - _CONFIG_DEVICECONFIG._serialized_end=1073 - _CONFIG_DEVICECONFIG_ROLE._serialized_start=820 - _CONFIG_DEVICECONFIG_ROLE._serialized_end=990 - _CONFIG_DEVICECONFIG_REBROADCASTMODE._serialized_start=992 - _CONFIG_DEVICECONFIG_REBROADCASTMODE._serialized_end=1073 - _CONFIG_POSITIONCONFIG._serialized_start=1076 - _CONFIG_POSITIONCONFIG._serialized_end=1733 - _CONFIG_POSITIONCONFIG_POSITIONFLAGS._serialized_start=1507 - _CONFIG_POSITIONCONFIG_POSITIONFLAGS._serialized_end=1678 - _CONFIG_POSITIONCONFIG_GPSMODE._serialized_start=1680 - _CONFIG_POSITIONCONFIG_GPSMODE._serialized_end=1733 - _CONFIG_POWERCONFIG._serialized_start=1736 - _CONFIG_POWERCONFIG._serialized_end=1970 - _CONFIG_NETWORKCONFIG._serialized_start=1973 - _CONFIG_NETWORKCONFIG._serialized_end=2355 - _CONFIG_NETWORKCONFIG_IPV4CONFIG._serialized_start=2248 - _CONFIG_NETWORKCONFIG_IPV4CONFIG._serialized_end=2318 - _CONFIG_NETWORKCONFIG_ADDRESSMODE._serialized_start=2320 - _CONFIG_NETWORKCONFIG_ADDRESSMODE._serialized_end=2355 - _CONFIG_DISPLAYCONFIG._serialized_start=2358 - _CONFIG_DISPLAYCONFIG._serialized_end=3060 - _CONFIG_DISPLAYCONFIG_GPSCOORDINATEFORMAT._serialized_start=2795 - _CONFIG_DISPLAYCONFIG_GPSCOORDINATEFORMAT._serialized_end=2872 - _CONFIG_DISPLAYCONFIG_DISPLAYUNITS._serialized_start=2874 - _CONFIG_DISPLAYCONFIG_DISPLAYUNITS._serialized_end=2914 - _CONFIG_DISPLAYCONFIG_OLEDTYPE._serialized_start=2916 - _CONFIG_DISPLAYCONFIG_OLEDTYPE._serialized_end=2993 - _CONFIG_DISPLAYCONFIG_DISPLAYMODE._serialized_start=2995 - _CONFIG_DISPLAYCONFIG_DISPLAYMODE._serialized_end=3060 - _CONFIG_LORACONFIG._serialized_start=3063 - _CONFIG_LORACONFIG._serialized_end=3879 - _CONFIG_LORACONFIG_REGIONCODE._serialized_start=3523 - _CONFIG_LORACONFIG_REGIONCODE._serialized_end=3728 - _CONFIG_LORACONFIG_MODEMPRESET._serialized_start=3731 - _CONFIG_LORACONFIG_MODEMPRESET._serialized_end=3879 - _CONFIG_BLUETOOTHCONFIG._serialized_start=3882 - _CONFIG_BLUETOOTHCONFIG._serialized_end=4055 - _CONFIG_BLUETOOTHCONFIG_PAIRINGMODE._serialized_start=3999 - _CONFIG_BLUETOOTHCONFIG_PAIRINGMODE._serialized_end=4055 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/connection_status_pb2.py b/meshtastic/connection_status_pb2.py deleted file mode 100644 index 1d37189..0000000 --- a/meshtastic/connection_status_pb2.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/connection_status.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"meshtastic/connection_status.proto\x12\nmeshtastic\"\xb1\x02\n\x16\x44\x65viceConnectionStatus\x12\x33\n\x04wifi\x18\x01 \x01(\x0b\x32 .meshtastic.WifiConnectionStatusH\x00\x88\x01\x01\x12;\n\x08\x65thernet\x18\x02 \x01(\x0b\x32$.meshtastic.EthernetConnectionStatusH\x01\x88\x01\x01\x12=\n\tbluetooth\x18\x03 \x01(\x0b\x32%.meshtastic.BluetoothConnectionStatusH\x02\x88\x01\x01\x12\x37\n\x06serial\x18\x04 \x01(\x0b\x32\".meshtastic.SerialConnectionStatusH\x03\x88\x01\x01\x42\x07\n\x05_wifiB\x0b\n\t_ethernetB\x0c\n\n_bluetoothB\t\n\x07_serial\"g\n\x14WifiConnectionStatus\x12\x33\n\x06status\x18\x01 \x01(\x0b\x32#.meshtastic.NetworkConnectionStatus\x12\x0c\n\x04ssid\x18\x02 \x01(\t\x12\x0c\n\x04rssi\x18\x03 \x01(\x05\"O\n\x18\x45thernetConnectionStatus\x12\x33\n\x06status\x18\x01 \x01(\x0b\x32#.meshtastic.NetworkConnectionStatus\"{\n\x17NetworkConnectionStatus\x12\x12\n\nip_address\x18\x01 \x01(\x07\x12\x14\n\x0cis_connected\x18\x02 \x01(\x08\x12\x19\n\x11is_mqtt_connected\x18\x03 \x01(\x08\x12\x1b\n\x13is_syslog_connected\x18\x04 \x01(\x08\"L\n\x19\x42luetoothConnectionStatus\x12\x0b\n\x03pin\x18\x01 \x01(\r\x12\x0c\n\x04rssi\x18\x02 \x01(\x05\x12\x14\n\x0cis_connected\x18\x03 \x01(\x08\"<\n\x16SerialConnectionStatus\x12\x0c\n\x04\x62\x61ud\x18\x01 \x01(\r\x12\x14\n\x0cis_connected\x18\x02 \x01(\x08\x42\x65\n\x13\x63om.geeksville.meshB\x10\x43onnStatusProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.connection_status_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\020ConnStatusProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _DEVICECONNECTIONSTATUS._serialized_start=51 - _DEVICECONNECTIONSTATUS._serialized_end=356 - _WIFICONNECTIONSTATUS._serialized_start=358 - _WIFICONNECTIONSTATUS._serialized_end=461 - _ETHERNETCONNECTIONSTATUS._serialized_start=463 - _ETHERNETCONNECTIONSTATUS._serialized_end=542 - _NETWORKCONNECTIONSTATUS._serialized_start=544 - _NETWORKCONNECTIONSTATUS._serialized_end=667 - _BLUETOOTHCONNECTIONSTATUS._serialized_start=669 - _BLUETOOTHCONNECTIONSTATUS._serialized_end=745 - _SERIALCONNECTIONSTATUS._serialized_start=747 - _SERIALCONNECTIONSTATUS._serialized_end=807 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/deviceonly_pb2.py b/meshtastic/deviceonly_pb2.py deleted file mode 100644 index 02dc0f8..0000000 --- a/meshtastic/deviceonly_pb2.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/deviceonly.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from meshtastic import channel_pb2 as meshtastic_dot_channel__pb2 -from meshtastic import localonly_pb2 as meshtastic_dot_localonly__pb2 -from meshtastic import mesh_pb2 as meshtastic_dot_mesh__pb2 -from meshtastic import module_config_pb2 as meshtastic_dot_module__config__pb2 -from meshtastic import telemetry_pb2 as meshtastic_dot_telemetry__pb2 -from . import nanopb_pb2 as nanopb__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bmeshtastic/deviceonly.proto\x12\nmeshtastic\x1a\x18meshtastic/channel.proto\x1a\x1ameshtastic/localonly.proto\x1a\x15meshtastic/mesh.proto\x1a\x1emeshtastic/module_config.proto\x1a\x1ameshtastic/telemetry.proto\x1a\x0cnanopb.proto\"\x90\x01\n\x0cPositionLite\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\x0c\n\x04time\x18\x04 \x01(\x07\x12\x37\n\x0flocation_source\x18\x05 \x01(\x0e\x32\x1e.meshtastic.Position.LocSource\"\x86\x02\n\x0cNodeInfoLite\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1e\n\x04user\x18\x02 \x01(\x0b\x32\x10.meshtastic.User\x12*\n\x08position\x18\x03 \x01(\x0b\x32\x18.meshtastic.PositionLite\x12\x0b\n\x03snr\x18\x04 \x01(\x02\x12\x12\n\nlast_heard\x18\x05 \x01(\x07\x12\x31\n\x0e\x64\x65vice_metrics\x18\x06 \x01(\x0b\x32\x19.meshtastic.DeviceMetrics\x12\x0f\n\x07\x63hannel\x18\x07 \x01(\r\x12\x10\n\x08via_mqtt\x18\x08 \x01(\x08\x12\x11\n\thops_away\x18\t \x01(\r\x12\x13\n\x0bis_favorite\x18\n \x01(\x08\"\xc3\x03\n\x0b\x44\x65viceState\x12\'\n\x07my_node\x18\x02 \x01(\x0b\x32\x16.meshtastic.MyNodeInfo\x12\x1f\n\x05owner\x18\x03 \x01(\x0b\x32\x10.meshtastic.User\x12-\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x16.meshtastic.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12/\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x16.meshtastic.MeshPacket\x12\x13\n\x07no_save\x18\t \x01(\x08\x42\x02\x18\x01\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12+\n\x0brx_waypoint\x18\x0c \x01(\x0b\x32\x16.meshtastic.MeshPacket\x12\x44\n\x19node_remote_hardware_pins\x18\r \x03(\x0b\x32!.meshtastic.NodeRemoteHardwarePin\x12Z\n\x0cnode_db_lite\x18\x0e \x03(\x0b\x32\x18.meshtastic.NodeInfoLiteB*\x92?\'\x92\x01$std::vector\"E\n\x0b\x43hannelFile\x12%\n\x08\x63hannels\x18\x01 \x03(\x0b\x32\x13.meshtastic.Channel\x12\x0f\n\x07version\x18\x02 \x01(\r\"\x97\x02\n\x08OEMStore\x12\x16\n\x0eoem_icon_width\x18\x01 \x01(\r\x12\x17\n\x0foem_icon_height\x18\x02 \x01(\r\x12\x15\n\roem_icon_bits\x18\x03 \x01(\x0c\x12)\n\x08oem_font\x18\x04 \x01(\x0e\x32\x17.meshtastic.ScreenFonts\x12\x10\n\x08oem_text\x18\x05 \x01(\t\x12\x13\n\x0boem_aes_key\x18\x06 \x01(\x0c\x12\x31\n\x10oem_local_config\x18\x07 \x01(\x0b\x32\x17.meshtastic.LocalConfig\x12>\n\x17oem_local_module_config\x18\x08 \x01(\x0b\x32\x1d.meshtastic.LocalModuleConfig*>\n\x0bScreenFonts\x12\x0e\n\nFONT_SMALL\x10\x00\x12\x0f\n\x0b\x46ONT_MEDIUM\x10\x01\x12\x0e\n\nFONT_LARGE\x10\x02\x42m\n\x13\x63om.geeksville.meshB\nDeviceOnlyZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x92?\x0b\xc2\x01\x08b\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.deviceonly_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\nDeviceOnlyZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000\222?\013\302\001\010' - _DEVICESTATE.fields_by_name['no_save']._options = None - _DEVICESTATE.fields_by_name['no_save']._serialized_options = b'\030\001' - _DEVICESTATE.fields_by_name['node_db_lite']._options = None - _DEVICESTATE.fields_by_name['node_db_lite']._serialized_options = b'\222?\'\222\001$std::vector' - _SCREENFONTS._serialized_start=1413 - _SCREENFONTS._serialized_end=1475 - _POSITIONLITE._serialized_start=195 - _POSITIONLITE._serialized_end=339 - _NODEINFOLITE._serialized_start=342 - _NODEINFOLITE._serialized_end=604 - _DEVICESTATE._serialized_start=607 - _DEVICESTATE._serialized_end=1058 - _CHANNELFILE._serialized_start=1060 - _CHANNELFILE._serialized_end=1129 - _OEMSTORE._serialized_start=1132 - _OEMSTORE._serialized_end=1411 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/localonly_pb2.py b/meshtastic/localonly_pb2.py deleted file mode 100644 index 324aaad..0000000 --- a/meshtastic/localonly_pb2.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/localonly.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from meshtastic import config_pb2 as meshtastic_dot_config__pb2 -from meshtastic import module_config_pb2 as meshtastic_dot_module__config__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ameshtastic/localonly.proto\x12\nmeshtastic\x1a\x17meshtastic/config.proto\x1a\x1emeshtastic/module_config.proto\"\xfd\x02\n\x0bLocalConfig\x12/\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x1f.meshtastic.Config.DeviceConfig\x12\x33\n\x08position\x18\x02 \x01(\x0b\x32!.meshtastic.Config.PositionConfig\x12-\n\x05power\x18\x03 \x01(\x0b\x32\x1e.meshtastic.Config.PowerConfig\x12\x31\n\x07network\x18\x04 \x01(\x0b\x32 .meshtastic.Config.NetworkConfig\x12\x31\n\x07\x64isplay\x18\x05 \x01(\x0b\x32 .meshtastic.Config.DisplayConfig\x12+\n\x04lora\x18\x06 \x01(\x0b\x32\x1d.meshtastic.Config.LoRaConfig\x12\x35\n\tbluetooth\x18\x07 \x01(\x0b\x32\".meshtastic.Config.BluetoothConfig\x12\x0f\n\x07version\x18\x08 \x01(\r\"\xfb\x06\n\x11LocalModuleConfig\x12\x31\n\x04mqtt\x18\x01 \x01(\x0b\x32#.meshtastic.ModuleConfig.MQTTConfig\x12\x35\n\x06serial\x18\x02 \x01(\x0b\x32%.meshtastic.ModuleConfig.SerialConfig\x12R\n\x15\x65xternal_notification\x18\x03 \x01(\x0b\x32\x33.meshtastic.ModuleConfig.ExternalNotificationConfig\x12\x42\n\rstore_forward\x18\x04 \x01(\x0b\x32+.meshtastic.ModuleConfig.StoreForwardConfig\x12<\n\nrange_test\x18\x05 \x01(\x0b\x32(.meshtastic.ModuleConfig.RangeTestConfig\x12;\n\ttelemetry\x18\x06 \x01(\x0b\x32(.meshtastic.ModuleConfig.TelemetryConfig\x12\x44\n\x0e\x63\x61nned_message\x18\x07 \x01(\x0b\x32,.meshtastic.ModuleConfig.CannedMessageConfig\x12\x33\n\x05\x61udio\x18\t \x01(\x0b\x32$.meshtastic.ModuleConfig.AudioConfig\x12\x46\n\x0fremote_hardware\x18\n \x01(\x0b\x32-.meshtastic.ModuleConfig.RemoteHardwareConfig\x12\x42\n\rneighbor_info\x18\x0b \x01(\x0b\x32+.meshtastic.ModuleConfig.NeighborInfoConfig\x12H\n\x10\x61mbient_lighting\x18\x0c \x01(\x0b\x32..meshtastic.ModuleConfig.AmbientLightingConfig\x12H\n\x10\x64\x65tection_sensor\x18\r \x01(\x0b\x32..meshtastic.ModuleConfig.DetectionSensorConfig\x12=\n\npaxcounter\x18\x0e \x01(\x0b\x32).meshtastic.ModuleConfig.PaxcounterConfig\x12\x0f\n\x07version\x18\x08 \x01(\rBd\n\x13\x63om.geeksville.meshB\x0fLocalOnlyProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.localonly_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\017LocalOnlyProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _LOCALCONFIG._serialized_start=100 - _LOCALCONFIG._serialized_end=481 - _LOCALMODULECONFIG._serialized_start=484 - _LOCALMODULECONFIG._serialized_end=1375 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/localonly_pb2.pyi b/meshtastic/localonly_pb2.pyi deleted file mode 100644 index 19cdc02..0000000 --- a/meshtastic/localonly_pb2.pyi +++ /dev/null @@ -1,204 +0,0 @@ -""" -@generated by mypy-protobuf. Do not edit manually! -isort:skip_file -""" -import builtins -import google.protobuf.descriptor -import google.protobuf.message -import meshtastic.config_pb2 -import meshtastic.module_config_pb2 -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor - -@typing_extensions.final -class LocalConfig(google.protobuf.message.Message): - """ - Protobuf structures common to apponly.proto and deviceonly.proto - This is never sent over the wire, only for local use - """ - - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - DEVICE_FIELD_NUMBER: builtins.int - POSITION_FIELD_NUMBER: builtins.int - POWER_FIELD_NUMBER: builtins.int - NETWORK_FIELD_NUMBER: builtins.int - DISPLAY_FIELD_NUMBER: builtins.int - LORA_FIELD_NUMBER: builtins.int - BLUETOOTH_FIELD_NUMBER: builtins.int - VERSION_FIELD_NUMBER: builtins.int - @property - def device(self) -> meshtastic.config_pb2.Config.DeviceConfig: - """ - The part of the config that is specific to the Device - """ - @property - def position(self) -> meshtastic.config_pb2.Config.PositionConfig: - """ - The part of the config that is specific to the GPS Position - """ - @property - def power(self) -> meshtastic.config_pb2.Config.PowerConfig: - """ - The part of the config that is specific to the Power settings - """ - @property - def network(self) -> meshtastic.config_pb2.Config.NetworkConfig: - """ - The part of the config that is specific to the Wifi Settings - """ - @property - def display(self) -> meshtastic.config_pb2.Config.DisplayConfig: - """ - The part of the config that is specific to the Display - """ - @property - def lora(self) -> meshtastic.config_pb2.Config.LoRaConfig: - """ - The part of the config that is specific to the Lora Radio - """ - @property - def bluetooth(self) -> meshtastic.config_pb2.Config.BluetoothConfig: - """ - The part of the config that is specific to the Bluetooth settings - """ - version: builtins.int - """ - A version integer used to invalidate old save files when we make - incompatible changes This integer is set at build time and is private to - NodeDB.cpp in the device code. - """ - def __init__( - self, - *, - device: meshtastic.config_pb2.Config.DeviceConfig | None = ..., - position: meshtastic.config_pb2.Config.PositionConfig | None = ..., - power: meshtastic.config_pb2.Config.PowerConfig | None = ..., - network: meshtastic.config_pb2.Config.NetworkConfig | None = ..., - display: meshtastic.config_pb2.Config.DisplayConfig | None = ..., - lora: meshtastic.config_pb2.Config.LoRaConfig | None = ..., - bluetooth: meshtastic.config_pb2.Config.BluetoothConfig | None = ..., - version: builtins.int = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["bluetooth", b"bluetooth", "device", b"device", "display", b"display", "lora", b"lora", "network", b"network", "position", b"position", "power", b"power"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["bluetooth", b"bluetooth", "device", b"device", "display", b"display", "lora", b"lora", "network", b"network", "position", b"position", "power", b"power", "version", b"version"]) -> None: ... - -global___LocalConfig = LocalConfig - -@typing_extensions.final -class LocalModuleConfig(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - MQTT_FIELD_NUMBER: builtins.int - SERIAL_FIELD_NUMBER: builtins.int - EXTERNAL_NOTIFICATION_FIELD_NUMBER: builtins.int - STORE_FORWARD_FIELD_NUMBER: builtins.int - RANGE_TEST_FIELD_NUMBER: builtins.int - TELEMETRY_FIELD_NUMBER: builtins.int - CANNED_MESSAGE_FIELD_NUMBER: builtins.int - AUDIO_FIELD_NUMBER: builtins.int - REMOTE_HARDWARE_FIELD_NUMBER: builtins.int - NEIGHBOR_INFO_FIELD_NUMBER: builtins.int - AMBIENT_LIGHTING_FIELD_NUMBER: builtins.int - DETECTION_SENSOR_FIELD_NUMBER: builtins.int - PAXCOUNTER_FIELD_NUMBER: builtins.int - VERSION_FIELD_NUMBER: builtins.int - @property - def mqtt(self) -> meshtastic.module_config_pb2.ModuleConfig.MQTTConfig: - """ - The part of the config that is specific to the MQTT module - """ - @property - def serial(self) -> meshtastic.module_config_pb2.ModuleConfig.SerialConfig: - """ - The part of the config that is specific to the Serial module - """ - @property - def external_notification(self) -> meshtastic.module_config_pb2.ModuleConfig.ExternalNotificationConfig: - """ - The part of the config that is specific to the ExternalNotification module - """ - @property - def store_forward(self) -> meshtastic.module_config_pb2.ModuleConfig.StoreForwardConfig: - """ - The part of the config that is specific to the Store & Forward module - """ - @property - def range_test(self) -> meshtastic.module_config_pb2.ModuleConfig.RangeTestConfig: - """ - The part of the config that is specific to the RangeTest module - """ - @property - def telemetry(self) -> meshtastic.module_config_pb2.ModuleConfig.TelemetryConfig: - """ - The part of the config that is specific to the Telemetry module - """ - @property - def canned_message(self) -> meshtastic.module_config_pb2.ModuleConfig.CannedMessageConfig: - """ - The part of the config that is specific to the Canned Message module - """ - @property - def audio(self) -> meshtastic.module_config_pb2.ModuleConfig.AudioConfig: - """ - The part of the config that is specific to the Audio module - """ - @property - def remote_hardware(self) -> meshtastic.module_config_pb2.ModuleConfig.RemoteHardwareConfig: - """ - The part of the config that is specific to the Remote Hardware module - """ - @property - def neighbor_info(self) -> meshtastic.module_config_pb2.ModuleConfig.NeighborInfoConfig: - """ - The part of the config that is specific to the Neighbor Info module - """ - @property - def ambient_lighting(self) -> meshtastic.module_config_pb2.ModuleConfig.AmbientLightingConfig: - """ - The part of the config that is specific to the Ambient Lighting module - """ - @property - def detection_sensor(self) -> meshtastic.module_config_pb2.ModuleConfig.DetectionSensorConfig: - """ - The part of the config that is specific to the Detection Sensor module - """ - @property - def paxcounter(self) -> meshtastic.module_config_pb2.ModuleConfig.PaxcounterConfig: - """ - Paxcounter Config - """ - version: builtins.int - """ - A version integer used to invalidate old save files when we make - incompatible changes This integer is set at build time and is private to - NodeDB.cpp in the device code. - """ - def __init__( - self, - *, - mqtt: meshtastic.module_config_pb2.ModuleConfig.MQTTConfig | None = ..., - serial: meshtastic.module_config_pb2.ModuleConfig.SerialConfig | None = ..., - external_notification: meshtastic.module_config_pb2.ModuleConfig.ExternalNotificationConfig | None = ..., - store_forward: meshtastic.module_config_pb2.ModuleConfig.StoreForwardConfig | None = ..., - range_test: meshtastic.module_config_pb2.ModuleConfig.RangeTestConfig | None = ..., - telemetry: meshtastic.module_config_pb2.ModuleConfig.TelemetryConfig | None = ..., - canned_message: meshtastic.module_config_pb2.ModuleConfig.CannedMessageConfig | None = ..., - audio: meshtastic.module_config_pb2.ModuleConfig.AudioConfig | None = ..., - remote_hardware: meshtastic.module_config_pb2.ModuleConfig.RemoteHardwareConfig | None = ..., - neighbor_info: meshtastic.module_config_pb2.ModuleConfig.NeighborInfoConfig | None = ..., - ambient_lighting: meshtastic.module_config_pb2.ModuleConfig.AmbientLightingConfig | None = ..., - detection_sensor: meshtastic.module_config_pb2.ModuleConfig.DetectionSensorConfig | None = ..., - paxcounter: meshtastic.module_config_pb2.ModuleConfig.PaxcounterConfig | None = ..., - version: builtins.int = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["ambient_lighting", b"ambient_lighting", "audio", b"audio", "canned_message", b"canned_message", "detection_sensor", b"detection_sensor", "external_notification", b"external_notification", "mqtt", b"mqtt", "neighbor_info", b"neighbor_info", "paxcounter", b"paxcounter", "range_test", b"range_test", "remote_hardware", b"remote_hardware", "serial", b"serial", "store_forward", b"store_forward", "telemetry", b"telemetry"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["ambient_lighting", b"ambient_lighting", "audio", b"audio", "canned_message", b"canned_message", "detection_sensor", b"detection_sensor", "external_notification", b"external_notification", "mqtt", b"mqtt", "neighbor_info", b"neighbor_info", "paxcounter", b"paxcounter", "range_test", b"range_test", "remote_hardware", b"remote_hardware", "serial", b"serial", "store_forward", b"store_forward", "telemetry", b"telemetry", "version", b"version"]) -> None: ... - -global___LocalModuleConfig = LocalModuleConfig diff --git a/meshtastic/mesh_interface.py b/meshtastic/mesh_interface.py index 57a2390..af76714 100644 --- a/meshtastic/mesh_interface.py +++ b/meshtastic/mesh_interface.py @@ -18,10 +18,13 @@ from pubsub import pub # type: ignore[import-untyped] from tabulate import tabulate import meshtastic.node -from meshtastic import ( + +from meshtastic.protobuf import ( mesh_pb2, portnums_pb2, telemetry_pb2, +) +from meshtastic import ( BROADCAST_ADDR, BROADCAST_NUM, LOCAL_ADDR, diff --git a/meshtastic/mesh_pb2.py b/meshtastic/mesh_pb2.py deleted file mode 100644 index 29cfeb2..0000000 --- a/meshtastic/mesh_pb2.py +++ /dev/null @@ -1,98 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/mesh.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from meshtastic import channel_pb2 as meshtastic_dot_channel__pb2 -from meshtastic import config_pb2 as meshtastic_dot_config__pb2 -from meshtastic import module_config_pb2 as meshtastic_dot_module__config__pb2 -from meshtastic import portnums_pb2 as meshtastic_dot_portnums__pb2 -from meshtastic import telemetry_pb2 as meshtastic_dot_telemetry__pb2 -from meshtastic import xmodem_pb2 as meshtastic_dot_xmodem__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15meshtastic/mesh.proto\x12\nmeshtastic\x1a\x18meshtastic/channel.proto\x1a\x17meshtastic/config.proto\x1a\x1emeshtastic/module_config.proto\x1a\x19meshtastic/portnums.proto\x1a\x1ameshtastic/telemetry.proto\x1a\x17meshtastic/xmodem.proto\"\xe5\x05\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\x0c\n\x04time\x18\x04 \x01(\x07\x12\x37\n\x0flocation_source\x18\x05 \x01(\x0e\x32\x1e.meshtastic.Position.LocSource\x12\x37\n\x0f\x61ltitude_source\x18\x06 \x01(\x0e\x32\x1e.meshtastic.Position.AltSource\x12\x11\n\ttimestamp\x18\x07 \x01(\x07\x12\x1f\n\x17timestamp_millis_adjust\x18\x08 \x01(\x05\x12\x14\n\x0c\x61ltitude_hae\x18\t \x01(\x11\x12#\n\x1b\x61ltitude_geoidal_separation\x18\n \x01(\x11\x12\x0c\n\x04PDOP\x18\x0b \x01(\r\x12\x0c\n\x04HDOP\x18\x0c \x01(\r\x12\x0c\n\x04VDOP\x18\r \x01(\r\x12\x14\n\x0cgps_accuracy\x18\x0e \x01(\r\x12\x14\n\x0cground_speed\x18\x0f \x01(\r\x12\x14\n\x0cground_track\x18\x10 \x01(\r\x12\x13\n\x0b\x66ix_quality\x18\x11 \x01(\r\x12\x10\n\x08\x66ix_type\x18\x12 \x01(\r\x12\x14\n\x0csats_in_view\x18\x13 \x01(\r\x12\x11\n\tsensor_id\x18\x14 \x01(\r\x12\x13\n\x0bnext_update\x18\x15 \x01(\r\x12\x12\n\nseq_number\x18\x16 \x01(\r\x12\x16\n\x0eprecision_bits\x18\x17 \x01(\r\"N\n\tLocSource\x12\r\n\tLOC_UNSET\x10\x00\x12\x0e\n\nLOC_MANUAL\x10\x01\x12\x10\n\x0cLOC_INTERNAL\x10\x02\x12\x10\n\x0cLOC_EXTERNAL\x10\x03\"b\n\tAltSource\x12\r\n\tALT_UNSET\x10\x00\x12\x0e\n\nALT_MANUAL\x10\x01\x12\x10\n\x0c\x41LT_INTERNAL\x10\x02\x12\x10\n\x0c\x41LT_EXTERNAL\x10\x03\x12\x12\n\x0e\x41LT_BAROMETRIC\x10\x04\"\xc4\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\x13\n\x07macaddr\x18\x04 \x01(\x0c\x42\x02\x18\x01\x12+\n\x08hw_model\x18\x05 \x01(\x0e\x32\x19.meshtastic.HardwareModel\x12\x13\n\x0bis_licensed\x18\x06 \x01(\x08\x12\x32\n\x04role\x18\x07 \x01(\x0e\x32$.meshtastic.Config.DeviceConfig.Role\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x01 \x03(\x07\"\xfc\x02\n\x07Routing\x12\x33\n\rroute_request\x18\x01 \x01(\x0b\x32\x1a.meshtastic.RouteDiscoveryH\x00\x12\x31\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x1a.meshtastic.RouteDiscoveryH\x00\x12\x31\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x19.meshtastic.Routing.ErrorH\x00\"\xca\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\x14\n\x10\x44UTY_CYCLE_LIMIT\x10\t\x12\x0f\n\x0b\x42\x41\x44_REQUEST\x10 \x12\x12\n\x0eNOT_AUTHORIZED\x10!B\t\n\x07variant\"\xa7\x01\n\x04\x44\x61ta\x12$\n\x07portnum\x18\x01 \x01(\x0e\x32\x13.meshtastic.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\x12\x10\n\x08reply_id\x18\x07 \x01(\x07\x12\r\n\x05\x65moji\x18\x08 \x01(\x07\"\x93\x01\n\x08Waypoint\x12\n\n\x02id\x18\x01 \x01(\r\x12\x12\n\nlatitude_i\x18\x02 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x03 \x01(\x0f\x12\x0e\n\x06\x65xpire\x18\x04 \x01(\r\x12\x11\n\tlocked_to\x18\x05 \x01(\r\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x0c\n\x04icon\x18\x08 \x01(\x07\"l\n\x16MqttClientProxyMessage\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x0e\n\x04\x64\x61ta\x18\x02 \x01(\x0cH\x00\x12\x0e\n\x04text\x18\x03 \x01(\tH\x00\x12\x10\n\x08retained\x18\x04 \x01(\x08\x42\x11\n\x0fpayload_variant\"\x95\x04\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#\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x10.meshtastic.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\t \x01(\r\x12\x10\n\x08want_ack\x18\n \x01(\x08\x12\x31\n\x08priority\x18\x0b \x01(\x0e\x32\x1f.meshtastic.MeshPacket.Priority\x12\x0f\n\x07rx_rssi\x18\x0c \x01(\x05\x12\x33\n\x07\x64\x65layed\x18\r \x01(\x0e\x32\x1e.meshtastic.MeshPacket.DelayedB\x02\x18\x01\x12\x10\n\x08via_mqtt\x18\x0e \x01(\x08\x12\x11\n\thop_start\x18\x0f \x01(\r\"[\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\"B\n\x07\x44\x65layed\x12\x0c\n\x08NO_DELAY\x10\x00\x12\x15\n\x11\x44\x45LAYED_BROADCAST\x10\x01\x12\x12\n\x0e\x44\x45LAYED_DIRECT\x10\x02\x42\x11\n\x0fpayload_variant\"\xfe\x01\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1e\n\x04user\x18\x02 \x01(\x0b\x32\x10.meshtastic.User\x12&\n\x08position\x18\x03 \x01(\x0b\x32\x14.meshtastic.Position\x12\x0b\n\x03snr\x18\x04 \x01(\x02\x12\x12\n\nlast_heard\x18\x05 \x01(\x07\x12\x31\n\x0e\x64\x65vice_metrics\x18\x06 \x01(\x0b\x32\x19.meshtastic.DeviceMetrics\x12\x0f\n\x07\x63hannel\x18\x07 \x01(\r\x12\x10\n\x08via_mqtt\x18\x08 \x01(\x08\x12\x11\n\thops_away\x18\t \x01(\r\x12\x13\n\x0bis_favorite\x18\n \x01(\x08\"P\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x14\n\x0creboot_count\x18\x08 \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0b \x01(\r\"\xc0\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*\n\x05level\x18\x04 \x01(\x0e\x32\x1b.meshtastic.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\"P\n\x0bQueueStatus\x12\x0b\n\x03res\x18\x01 \x01(\x05\x12\x0c\n\x04\x66ree\x18\x02 \x01(\r\x12\x0e\n\x06maxlen\x18\x03 \x01(\r\x12\x16\n\x0emesh_packet_id\x18\x04 \x01(\r\"\xdb\x04\n\tFromRadio\x12\n\n\x02id\x18\x01 \x01(\r\x12(\n\x06packet\x18\x02 \x01(\x0b\x32\x16.meshtastic.MeshPacketH\x00\x12)\n\x07my_info\x18\x03 \x01(\x0b\x32\x16.meshtastic.MyNodeInfoH\x00\x12)\n\tnode_info\x18\x04 \x01(\x0b\x32\x14.meshtastic.NodeInfoH\x00\x12$\n\x06\x63onfig\x18\x05 \x01(\x0b\x32\x12.meshtastic.ConfigH\x00\x12+\n\nlog_record\x18\x06 \x01(\x0b\x32\x15.meshtastic.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x07 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\x08 \x01(\x08H\x00\x12\x30\n\x0cmoduleConfig\x18\t \x01(\x0b\x32\x18.meshtastic.ModuleConfigH\x00\x12&\n\x07\x63hannel\x18\n \x01(\x0b\x32\x13.meshtastic.ChannelH\x00\x12.\n\x0bqueueStatus\x18\x0b \x01(\x0b\x32\x17.meshtastic.QueueStatusH\x00\x12*\n\x0cxmodemPacket\x18\x0c \x01(\x0b\x32\x12.meshtastic.XModemH\x00\x12.\n\x08metadata\x18\r \x01(\x0b\x32\x1a.meshtastic.DeviceMetadataH\x00\x12\x44\n\x16mqttClientProxyMessage\x18\x0e \x01(\x0b\x32\".meshtastic.MqttClientProxyMessageH\x00\x42\x11\n\x0fpayload_variant\"\x94\x02\n\x07ToRadio\x12(\n\x06packet\x18\x01 \x01(\x0b\x32\x16.meshtastic.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x03 \x01(\rH\x00\x12\x14\n\ndisconnect\x18\x04 \x01(\x08H\x00\x12*\n\x0cxmodemPacket\x18\x05 \x01(\x0b\x32\x12.meshtastic.XModemH\x00\x12\x44\n\x16mqttClientProxyMessage\x18\x06 \x01(\x0b\x32\".meshtastic.MqttClientProxyMessageH\x00\x12*\n\theartbeat\x18\x07 \x01(\x0b\x32\x15.meshtastic.HeartbeatH\x00\x42\x11\n\x0fpayload_variant\"@\n\nCompressed\x12$\n\x07portnum\x18\x01 \x01(\x0e\x32\x13.meshtastic.PortNum\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x87\x01\n\x0cNeighborInfo\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x17\n\x0flast_sent_by_id\x18\x02 \x01(\r\x12$\n\x1cnode_broadcast_interval_secs\x18\x03 \x01(\r\x12\'\n\tneighbors\x18\x04 \x03(\x0b\x32\x14.meshtastic.Neighbor\"d\n\x08Neighbor\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0b\n\x03snr\x18\x02 \x01(\x02\x12\x14\n\x0clast_rx_time\x18\x03 \x01(\x07\x12$\n\x1cnode_broadcast_interval_secs\x18\x04 \x01(\r\"\xad\x02\n\x0e\x44\x65viceMetadata\x12\x18\n\x10\x66irmware_version\x18\x01 \x01(\t\x12\x1c\n\x14\x64\x65vice_state_version\x18\x02 \x01(\r\x12\x13\n\x0b\x63\x61nShutdown\x18\x03 \x01(\x08\x12\x0f\n\x07hasWifi\x18\x04 \x01(\x08\x12\x14\n\x0chasBluetooth\x18\x05 \x01(\x08\x12\x13\n\x0bhasEthernet\x18\x06 \x01(\x08\x12\x32\n\x04role\x18\x07 \x01(\x0e\x32$.meshtastic.Config.DeviceConfig.Role\x12\x16\n\x0eposition_flags\x18\x08 \x01(\r\x12+\n\x08hw_model\x18\t \x01(\x0e\x32\x19.meshtastic.HardwareModel\x12\x19\n\x11hasRemoteHardware\x18\n \x01(\x08\"\x0b\n\tHeartbeat\"U\n\x15NodeRemoteHardwarePin\x12\x10\n\x08node_num\x18\x01 \x01(\r\x12*\n\x03pin\x18\x02 \x01(\x0b\x32\x1d.meshtastic.RemoteHardwarePin\"e\n\x0e\x43hunkedPayload\x12\x12\n\npayload_id\x18\x01 \x01(\r\x12\x13\n\x0b\x63hunk_count\x18\x02 \x01(\r\x12\x13\n\x0b\x63hunk_index\x18\x03 \x01(\r\x12\x15\n\rpayload_chunk\x18\x04 \x01(\x0c\"\x1f\n\rresend_chunks\x12\x0e\n\x06\x63hunks\x18\x01 \x03(\r\"\xaa\x01\n\x16\x43hunkedPayloadResponse\x12\x12\n\npayload_id\x18\x01 \x01(\r\x12\x1a\n\x10request_transfer\x18\x02 \x01(\x08H\x00\x12\x19\n\x0f\x61\x63\x63\x65pt_transfer\x18\x03 \x01(\x08H\x00\x12\x32\n\rresend_chunks\x18\x04 \x01(\x0b\x32\x19.meshtastic.resend_chunksH\x00\x42\x11\n\x0fpayload_variant*\xeb\x08\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\x0e\n\nTBEAM_V0P7\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\r\n\tHELTEC_V1\x10\x0b\x12\x18\n\x14LILYGO_TBEAM_S3_CORE\x10\x0c\x12\x0c\n\x08RAK11200\x10\r\x12\x0b\n\x07NANO_G1\x10\x0e\x12\x12\n\x0eTLORA_V2_1_1P8\x10\x0f\x12\x0f\n\x0bTLORA_T3_S3\x10\x10\x12\x14\n\x10NANO_G1_EXPLORER\x10\x11\x12\x11\n\rNANO_G2_ULTRA\x10\x12\x12\r\n\tLORA_TYPE\x10\x13\x12\x0b\n\x07WIPHONE\x10\x14\x12\x0e\n\nWIO_WM1110\x10\x15\x12\x0e\n\nSTATION_G1\x10\x19\x12\x0c\n\x08RAK11310\x10\x1a\x12\x14\n\x10SENSELORA_RP2040\x10\x1b\x12\x10\n\x0cSENSELORA_S3\x10\x1c\x12\r\n\tCANARYONE\x10\x1d\x12\x0f\n\x0bRP2040_LORA\x10\x1e\x12\x0e\n\nSTATION_G2\x10\x1f\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\'\x12\x15\n\x11NRF52840_PCA10059\x10(\x12\n\n\x06\x44R_DEV\x10)\x12\x0b\n\x07M5STACK\x10*\x12\r\n\tHELTEC_V3\x10+\x12\x11\n\rHELTEC_WSL_V3\x10,\x12\x13\n\x0f\x42\x45TAFPV_2400_TX\x10-\x12\x17\n\x13\x42\x45TAFPV_900_NANO_TX\x10.\x12\x0c\n\x08RPI_PICO\x10/\x12\x1b\n\x17HELTEC_WIRELESS_TRACKER\x10\x30\x12\x19\n\x15HELTEC_WIRELESS_PAPER\x10\x31\x12\n\n\x06T_DECK\x10\x32\x12\x0e\n\nT_WATCH_S3\x10\x33\x12\x11\n\rPICOMPUTER_S3\x10\x34\x12\x0f\n\x0bHELTEC_HT62\x10\x35\x12\x12\n\x0e\x45\x42YTE_ESP32_S3\x10\x36\x12\x11\n\rESP32_S3_PICO\x10\x37\x12\r\n\tCHATTER_2\x10\x38\x12\x1e\n\x1aHELTEC_WIRELESS_PAPER_V1_0\x10\x39\x12 \n\x1cHELTEC_WIRELESS_TRACKER_V1_0\x10:\x12\x0b\n\x07UNPHONE\x10;\x12\x0c\n\x08TD_LORAC\x10<\x12\x13\n\x0f\x43\x44\x45\x42YTE_EORA_S3\x10=\x12\x0f\n\x0bTWC_MESH_V4\x10>\x12\x16\n\x12NRF52_PROMICRO_DIY\x10?\x12\x1f\n\x1bRADIOMASTER_900_BANDIT_NANO\x10@\x12\x0f\n\nPRIVATE_HW\x10\xff\x01*,\n\tConstants\x12\x08\n\x04ZERO\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xed\x01*\xee\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04NONE\x10\x00\x12\x0f\n\x0bTX_WATCHDOG\x10\x01\x12\x14\n\x10SLEEP_ENTER_WAIT\x10\x02\x12\x0c\n\x08NO_RADIO\x10\x03\x12\x0f\n\x0bUNSPECIFIED\x10\x04\x12\x15\n\x11UBLOX_UNIT_FAILED\x10\x05\x12\r\n\tNO_AXP192\x10\x06\x12\x19\n\x15INVALID_RADIO_SETTING\x10\x07\x12\x13\n\x0fTRANSMIT_FAILED\x10\x08\x12\x0c\n\x08\x42ROWNOUT\x10\t\x12\x12\n\x0eSX1262_FAILURE\x10\n\x12\x11\n\rRADIO_SPI_BUG\x10\x0b\x42_\n\x13\x63om.geeksville.meshB\nMeshProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.mesh_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\nMeshProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _USER.fields_by_name['macaddr']._options = None - _USER.fields_by_name['macaddr']._serialized_options = b'\030\001' - _MESHPACKET.fields_by_name['delayed']._options = None - _MESHPACKET.fields_by_name['delayed']._serialized_options = b'\030\001' - _HARDWAREMODEL._serialized_start=5046 - _HARDWAREMODEL._serialized_end=6177 - _CONSTANTS._serialized_start=6179 - _CONSTANTS._serialized_end=6223 - _CRITICALERRORCODE._serialized_start=6226 - _CRITICALERRORCODE._serialized_end=6464 - _POSITION._serialized_start=201 - _POSITION._serialized_end=942 - _POSITION_LOCSOURCE._serialized_start=764 - _POSITION_LOCSOURCE._serialized_end=842 - _POSITION_ALTSOURCE._serialized_start=844 - _POSITION_ALTSOURCE._serialized_end=942 - _USER._serialized_start=945 - _USER._serialized_end=1141 - _ROUTEDISCOVERY._serialized_start=1143 - _ROUTEDISCOVERY._serialized_end=1174 - _ROUTING._serialized_start=1177 - _ROUTING._serialized_end=1557 - _ROUTING_ERROR._serialized_start=1344 - _ROUTING_ERROR._serialized_end=1546 - _DATA._serialized_start=1560 - _DATA._serialized_end=1727 - _WAYPOINT._serialized_start=1730 - _WAYPOINT._serialized_end=1877 - _MQTTCLIENTPROXYMESSAGE._serialized_start=1879 - _MQTTCLIENTPROXYMESSAGE._serialized_end=1987 - _MESHPACKET._serialized_start=1990 - _MESHPACKET._serialized_end=2523 - _MESHPACKET_PRIORITY._serialized_start=2345 - _MESHPACKET_PRIORITY._serialized_end=2436 - _MESHPACKET_DELAYED._serialized_start=2438 - _MESHPACKET_DELAYED._serialized_end=2504 - _NODEINFO._serialized_start=2526 - _NODEINFO._serialized_end=2780 - _MYNODEINFO._serialized_start=2782 - _MYNODEINFO._serialized_end=2862 - _LOGRECORD._serialized_start=2865 - _LOGRECORD._serialized_end=3057 - _LOGRECORD_LEVEL._serialized_start=2969 - _LOGRECORD_LEVEL._serialized_end=3057 - _QUEUESTATUS._serialized_start=3059 - _QUEUESTATUS._serialized_end=3139 - _FROMRADIO._serialized_start=3142 - _FROMRADIO._serialized_end=3745 - _TORADIO._serialized_start=3748 - _TORADIO._serialized_end=4024 - _COMPRESSED._serialized_start=4026 - _COMPRESSED._serialized_end=4090 - _NEIGHBORINFO._serialized_start=4093 - _NEIGHBORINFO._serialized_end=4228 - _NEIGHBOR._serialized_start=4230 - _NEIGHBOR._serialized_end=4330 - _DEVICEMETADATA._serialized_start=4333 - _DEVICEMETADATA._serialized_end=4634 - _HEARTBEAT._serialized_start=4636 - _HEARTBEAT._serialized_end=4647 - _NODEREMOTEHARDWAREPIN._serialized_start=4649 - _NODEREMOTEHARDWAREPIN._serialized_end=4734 - _CHUNKEDPAYLOAD._serialized_start=4736 - _CHUNKEDPAYLOAD._serialized_end=4837 - _RESEND_CHUNKS._serialized_start=4839 - _RESEND_CHUNKS._serialized_end=4870 - _CHUNKEDPAYLOADRESPONSE._serialized_start=4873 - _CHUNKEDPAYLOADRESPONSE._serialized_end=5043 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/module_config_pb2.py b/meshtastic/module_config_pb2.py deleted file mode 100644 index b1085e6..0000000 --- a/meshtastic/module_config_pb2.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/module_config.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emeshtastic/module_config.proto\x12\nmeshtastic\"\xd3\"\n\x0cModuleConfig\x12\x33\n\x04mqtt\x18\x01 \x01(\x0b\x32#.meshtastic.ModuleConfig.MQTTConfigH\x00\x12\x37\n\x06serial\x18\x02 \x01(\x0b\x32%.meshtastic.ModuleConfig.SerialConfigH\x00\x12T\n\x15\x65xternal_notification\x18\x03 \x01(\x0b\x32\x33.meshtastic.ModuleConfig.ExternalNotificationConfigH\x00\x12\x44\n\rstore_forward\x18\x04 \x01(\x0b\x32+.meshtastic.ModuleConfig.StoreForwardConfigH\x00\x12>\n\nrange_test\x18\x05 \x01(\x0b\x32(.meshtastic.ModuleConfig.RangeTestConfigH\x00\x12=\n\ttelemetry\x18\x06 \x01(\x0b\x32(.meshtastic.ModuleConfig.TelemetryConfigH\x00\x12\x46\n\x0e\x63\x61nned_message\x18\x07 \x01(\x0b\x32,.meshtastic.ModuleConfig.CannedMessageConfigH\x00\x12\x35\n\x05\x61udio\x18\x08 \x01(\x0b\x32$.meshtastic.ModuleConfig.AudioConfigH\x00\x12H\n\x0fremote_hardware\x18\t \x01(\x0b\x32-.meshtastic.ModuleConfig.RemoteHardwareConfigH\x00\x12\x44\n\rneighbor_info\x18\n \x01(\x0b\x32+.meshtastic.ModuleConfig.NeighborInfoConfigH\x00\x12J\n\x10\x61mbient_lighting\x18\x0b \x01(\x0b\x32..meshtastic.ModuleConfig.AmbientLightingConfigH\x00\x12J\n\x10\x64\x65tection_sensor\x18\x0c \x01(\x0b\x32..meshtastic.ModuleConfig.DetectionSensorConfigH\x00\x12?\n\npaxcounter\x18\r \x01(\x0b\x32).meshtastic.ModuleConfig.PaxcounterConfigH\x00\x1a\xb0\x02\n\nMQTTConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x10\n\x08username\x18\x03 \x01(\t\x12\x10\n\x08password\x18\x04 \x01(\t\x12\x1a\n\x12\x65ncryption_enabled\x18\x05 \x01(\x08\x12\x14\n\x0cjson_enabled\x18\x06 \x01(\x08\x12\x13\n\x0btls_enabled\x18\x07 \x01(\x08\x12\x0c\n\x04root\x18\x08 \x01(\t\x12\x1f\n\x17proxy_to_client_enabled\x18\t \x01(\x08\x12\x1d\n\x15map_reporting_enabled\x18\n \x01(\x08\x12G\n\x13map_report_settings\x18\x0b \x01(\x0b\x32*.meshtastic.ModuleConfig.MapReportSettings\x1aN\n\x11MapReportSettings\x12\x1d\n\x15publish_interval_secs\x18\x01 \x01(\r\x12\x1a\n\x12position_precision\x18\x02 \x01(\r\x1a\x82\x01\n\x14RemoteHardwareConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\"\n\x1a\x61llow_undefined_pin_access\x18\x02 \x01(\x08\x12\x35\n\x0e\x61vailable_pins\x18\x03 \x03(\x0b\x32\x1d.meshtastic.RemoteHardwarePin\x1a>\n\x12NeighborInfoConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x17\n\x0fupdate_interval\x18\x02 \x01(\r\x1a\xd2\x01\n\x15\x44\x65tectionSensorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x16minimum_broadcast_secs\x18\x02 \x01(\r\x12\x1c\n\x14state_broadcast_secs\x18\x03 \x01(\r\x12\x11\n\tsend_bell\x18\x04 \x01(\x08\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x13\n\x0bmonitor_pin\x18\x06 \x01(\r\x12 \n\x18\x64\x65tection_triggered_high\x18\x07 \x01(\x08\x12\x12\n\nuse_pullup\x18\x08 \x01(\x08\x1a\xe4\x02\n\x0b\x41udioConfig\x12\x16\n\x0e\x63odec2_enabled\x18\x01 \x01(\x08\x12\x0f\n\x07ptt_pin\x18\x02 \x01(\r\x12@\n\x07\x62itrate\x18\x03 \x01(\x0e\x32/.meshtastic.ModuleConfig.AudioConfig.Audio_Baud\x12\x0e\n\x06i2s_ws\x18\x04 \x01(\r\x12\x0e\n\x06i2s_sd\x18\x05 \x01(\r\x12\x0f\n\x07i2s_din\x18\x06 \x01(\r\x12\x0f\n\x07i2s_sck\x18\x07 \x01(\r\"\xa7\x01\n\nAudio_Baud\x12\x12\n\x0e\x43ODEC2_DEFAULT\x10\x00\x12\x0f\n\x0b\x43ODEC2_3200\x10\x01\x12\x0f\n\x0b\x43ODEC2_2400\x10\x02\x12\x0f\n\x0b\x43ODEC2_1600\x10\x03\x12\x0f\n\x0b\x43ODEC2_1400\x10\x04\x12\x0f\n\x0b\x43ODEC2_1300\x10\x05\x12\x0f\n\x0b\x43ODEC2_1200\x10\x06\x12\x0e\n\nCODEC2_700\x10\x07\x12\x0f\n\x0b\x43ODEC2_700B\x10\x08\x1av\n\x10PaxcounterConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\"\n\x1apaxcounter_update_interval\x18\x02 \x01(\r\x12\x16\n\x0ewifi_threshold\x18\x03 \x01(\x05\x12\x15\n\rble_threshold\x18\x04 \x01(\x05\x1a\xe4\x04\n\x0cSerialConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0c\n\x04\x65\x63ho\x18\x02 \x01(\x08\x12\x0b\n\x03rxd\x18\x03 \x01(\r\x12\x0b\n\x03txd\x18\x04 \x01(\r\x12?\n\x04\x62\x61ud\x18\x05 \x01(\x0e\x32\x31.meshtastic.ModuleConfig.SerialConfig.Serial_Baud\x12\x0f\n\x07timeout\x18\x06 \x01(\r\x12?\n\x04mode\x18\x07 \x01(\x0e\x32\x31.meshtastic.ModuleConfig.SerialConfig.Serial_Mode\x12$\n\x1coverride_console_serial_port\x18\x08 \x01(\x08\"\x8a\x02\n\x0bSerial_Baud\x12\x10\n\x0c\x42\x41UD_DEFAULT\x10\x00\x12\x0c\n\x08\x42\x41UD_110\x10\x01\x12\x0c\n\x08\x42\x41UD_300\x10\x02\x12\x0c\n\x08\x42\x41UD_600\x10\x03\x12\r\n\tBAUD_1200\x10\x04\x12\r\n\tBAUD_2400\x10\x05\x12\r\n\tBAUD_4800\x10\x06\x12\r\n\tBAUD_9600\x10\x07\x12\x0e\n\nBAUD_19200\x10\x08\x12\x0e\n\nBAUD_38400\x10\t\x12\x0e\n\nBAUD_57600\x10\n\x12\x0f\n\x0b\x42\x41UD_115200\x10\x0b\x12\x0f\n\x0b\x42\x41UD_230400\x10\x0c\x12\x0f\n\x0b\x42\x41UD_460800\x10\r\x12\x0f\n\x0b\x42\x41UD_576000\x10\x0e\x12\x0f\n\x0b\x42\x41UD_921600\x10\x0f\"U\n\x0bSerial_Mode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\n\n\x06SIMPLE\x10\x01\x12\t\n\x05PROTO\x10\x02\x12\x0b\n\x07TEXTMSG\x10\x03\x12\x08\n\x04NMEA\x10\x04\x12\x0b\n\x07\x43\x41LTOPO\x10\x05\x1a\xe9\x02\n\x1a\x45xternalNotificationConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x11\n\toutput_ms\x18\x02 \x01(\r\x12\x0e\n\x06output\x18\x03 \x01(\r\x12\x14\n\x0coutput_vibra\x18\x08 \x01(\r\x12\x15\n\routput_buzzer\x18\t \x01(\r\x12\x0e\n\x06\x61\x63tive\x18\x04 \x01(\x08\x12\x15\n\ralert_message\x18\x05 \x01(\x08\x12\x1b\n\x13\x61lert_message_vibra\x18\n \x01(\x08\x12\x1c\n\x14\x61lert_message_buzzer\x18\x0b \x01(\x08\x12\x12\n\nalert_bell\x18\x06 \x01(\x08\x12\x18\n\x10\x61lert_bell_vibra\x18\x0c \x01(\x08\x12\x19\n\x11\x61lert_bell_buzzer\x18\r \x01(\x08\x12\x0f\n\x07use_pwm\x18\x07 \x01(\x08\x12\x13\n\x0bnag_timeout\x18\x0e \x01(\r\x12\x19\n\x11use_i2s_as_buzzer\x18\x0f \x01(\x08\x1a\x84\x01\n\x12StoreForwardConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x11\n\theartbeat\x18\x02 \x01(\x08\x12\x0f\n\x07records\x18\x03 \x01(\r\x12\x1a\n\x12history_return_max\x18\x04 \x01(\r\x12\x1d\n\x15history_return_window\x18\x05 \x01(\r\x1a@\n\x0fRangeTestConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0e\n\x06sender\x18\x02 \x01(\r\x12\x0c\n\x04save\x18\x03 \x01(\x08\x1a\xe6\x02\n\x0fTelemetryConfig\x12\x1e\n\x16\x64\x65vice_update_interval\x18\x01 \x01(\r\x12#\n\x1b\x65nvironment_update_interval\x18\x02 \x01(\r\x12\'\n\x1f\x65nvironment_measurement_enabled\x18\x03 \x01(\x08\x12\"\n\x1a\x65nvironment_screen_enabled\x18\x04 \x01(\x08\x12&\n\x1e\x65nvironment_display_fahrenheit\x18\x05 \x01(\x08\x12\x1b\n\x13\x61ir_quality_enabled\x18\x06 \x01(\x08\x12\x1c\n\x14\x61ir_quality_interval\x18\x07 \x01(\r\x12!\n\x19power_measurement_enabled\x18\x08 \x01(\x08\x12\x1d\n\x15power_update_interval\x18\t \x01(\r\x12\x1c\n\x14power_screen_enabled\x18\n \x01(\x08\x1a\xd6\x04\n\x13\x43\x61nnedMessageConfig\x12\x17\n\x0frotary1_enabled\x18\x01 \x01(\x08\x12\x19\n\x11inputbroker_pin_a\x18\x02 \x01(\r\x12\x19\n\x11inputbroker_pin_b\x18\x03 \x01(\r\x12\x1d\n\x15inputbroker_pin_press\x18\x04 \x01(\r\x12Y\n\x14inputbroker_event_cw\x18\x05 \x01(\x0e\x32;.meshtastic.ModuleConfig.CannedMessageConfig.InputEventChar\x12Z\n\x15inputbroker_event_ccw\x18\x06 \x01(\x0e\x32;.meshtastic.ModuleConfig.CannedMessageConfig.InputEventChar\x12\\\n\x17inputbroker_event_press\x18\x07 \x01(\x0e\x32;.meshtastic.ModuleConfig.CannedMessageConfig.InputEventChar\x12\x17\n\x0fupdown1_enabled\x18\x08 \x01(\x08\x12\x0f\n\x07\x65nabled\x18\t \x01(\x08\x12\x1a\n\x12\x61llow_input_source\x18\n \x01(\t\x12\x11\n\tsend_bell\x18\x0b \x01(\x08\"c\n\x0eInputEventChar\x12\x08\n\x04NONE\x10\x00\x12\x06\n\x02UP\x10\x11\x12\x08\n\x04\x44OWN\x10\x12\x12\x08\n\x04LEFT\x10\x13\x12\t\n\x05RIGHT\x10\x14\x12\n\n\x06SELECT\x10\n\x12\x08\n\x04\x42\x41\x43K\x10\x1b\x12\n\n\x06\x43\x41NCEL\x10\x18\x1a\x65\n\x15\x41mbientLightingConfig\x12\x11\n\tled_state\x18\x01 \x01(\x08\x12\x0f\n\x07\x63urrent\x18\x02 \x01(\r\x12\x0b\n\x03red\x18\x03 \x01(\r\x12\r\n\x05green\x18\x04 \x01(\r\x12\x0c\n\x04\x62lue\x18\x05 \x01(\rB\x11\n\x0fpayload_variant\"d\n\x11RemoteHardwarePin\x12\x10\n\x08gpio_pin\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12/\n\x04type\x18\x03 \x01(\x0e\x32!.meshtastic.RemoteHardwarePinType*I\n\x15RemoteHardwarePinType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0c\x44IGITAL_READ\x10\x01\x12\x11\n\rDIGITAL_WRITE\x10\x02\x42g\n\x13\x63om.geeksville.meshB\x12ModuleConfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.module_config_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\022ModuleConfigProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _REMOTEHARDWAREPINTYPE._serialized_start=4586 - _REMOTEHARDWAREPINTYPE._serialized_end=4659 - _MODULECONFIG._serialized_start=47 - _MODULECONFIG._serialized_end=4482 - _MODULECONFIG_MQTTCONFIG._serialized_start=945 - _MODULECONFIG_MQTTCONFIG._serialized_end=1249 - _MODULECONFIG_MAPREPORTSETTINGS._serialized_start=1251 - _MODULECONFIG_MAPREPORTSETTINGS._serialized_end=1329 - _MODULECONFIG_REMOTEHARDWARECONFIG._serialized_start=1332 - _MODULECONFIG_REMOTEHARDWARECONFIG._serialized_end=1462 - _MODULECONFIG_NEIGHBORINFOCONFIG._serialized_start=1464 - _MODULECONFIG_NEIGHBORINFOCONFIG._serialized_end=1526 - _MODULECONFIG_DETECTIONSENSORCONFIG._serialized_start=1529 - _MODULECONFIG_DETECTIONSENSORCONFIG._serialized_end=1739 - _MODULECONFIG_AUDIOCONFIG._serialized_start=1742 - _MODULECONFIG_AUDIOCONFIG._serialized_end=2098 - _MODULECONFIG_AUDIOCONFIG_AUDIO_BAUD._serialized_start=1931 - _MODULECONFIG_AUDIOCONFIG_AUDIO_BAUD._serialized_end=2098 - _MODULECONFIG_PAXCOUNTERCONFIG._serialized_start=2100 - _MODULECONFIG_PAXCOUNTERCONFIG._serialized_end=2218 - _MODULECONFIG_SERIALCONFIG._serialized_start=2221 - _MODULECONFIG_SERIALCONFIG._serialized_end=2833 - _MODULECONFIG_SERIALCONFIG_SERIAL_BAUD._serialized_start=2480 - _MODULECONFIG_SERIALCONFIG_SERIAL_BAUD._serialized_end=2746 - _MODULECONFIG_SERIALCONFIG_SERIAL_MODE._serialized_start=2748 - _MODULECONFIG_SERIALCONFIG_SERIAL_MODE._serialized_end=2833 - _MODULECONFIG_EXTERNALNOTIFICATIONCONFIG._serialized_start=2836 - _MODULECONFIG_EXTERNALNOTIFICATIONCONFIG._serialized_end=3197 - _MODULECONFIG_STOREFORWARDCONFIG._serialized_start=3200 - _MODULECONFIG_STOREFORWARDCONFIG._serialized_end=3332 - _MODULECONFIG_RANGETESTCONFIG._serialized_start=3334 - _MODULECONFIG_RANGETESTCONFIG._serialized_end=3398 - _MODULECONFIG_TELEMETRYCONFIG._serialized_start=3401 - _MODULECONFIG_TELEMETRYCONFIG._serialized_end=3759 - _MODULECONFIG_CANNEDMESSAGECONFIG._serialized_start=3762 - _MODULECONFIG_CANNEDMESSAGECONFIG._serialized_end=4360 - _MODULECONFIG_CANNEDMESSAGECONFIG_INPUTEVENTCHAR._serialized_start=4261 - _MODULECONFIG_CANNEDMESSAGECONFIG_INPUTEVENTCHAR._serialized_end=4360 - _MODULECONFIG_AMBIENTLIGHTINGCONFIG._serialized_start=4362 - _MODULECONFIG_AMBIENTLIGHTINGCONFIG._serialized_end=4463 - _REMOTEHARDWAREPIN._serialized_start=4484 - _REMOTEHARDWAREPIN._serialized_end=4584 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/mqtt_pb2.py b/meshtastic/mqtt_pb2.py deleted file mode 100644 index e4ba9e7..0000000 --- a/meshtastic/mqtt_pb2.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/mqtt.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from meshtastic import config_pb2 as meshtastic_dot_config__pb2 -from meshtastic import mesh_pb2 as meshtastic_dot_mesh__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15meshtastic/mqtt.proto\x12\nmeshtastic\x1a\x17meshtastic/config.proto\x1a\x15meshtastic/mesh.proto\"a\n\x0fServiceEnvelope\x12&\n\x06packet\x18\x01 \x01(\x0b\x32\x16.meshtastic.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\t\"\xbc\x03\n\tMapReport\x12\x11\n\tlong_name\x18\x01 \x01(\t\x12\x12\n\nshort_name\x18\x02 \x01(\t\x12\x32\n\x04role\x18\x03 \x01(\x0e\x32$.meshtastic.Config.DeviceConfig.Role\x12+\n\x08hw_model\x18\x04 \x01(\x0e\x32\x19.meshtastic.HardwareModel\x12\x18\n\x10\x66irmware_version\x18\x05 \x01(\t\x12\x38\n\x06region\x18\x06 \x01(\x0e\x32(.meshtastic.Config.LoRaConfig.RegionCode\x12?\n\x0cmodem_preset\x18\x07 \x01(\x0e\x32).meshtastic.Config.LoRaConfig.ModemPreset\x12\x1b\n\x13has_default_channel\x18\x08 \x01(\x08\x12\x12\n\nlatitude_i\x18\t \x01(\x0f\x12\x13\n\x0blongitude_i\x18\n \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x0b \x01(\x05\x12\x1a\n\x12position_precision\x18\x0c \x01(\r\x12\x1e\n\x16num_online_local_nodes\x18\r \x01(\rB_\n\x13\x63om.geeksville.meshB\nMQTTProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.mqtt_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\nMQTTProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _SERVICEENVELOPE._serialized_start=85 - _SERVICEENVELOPE._serialized_end=182 - _MAPREPORT._serialized_start=185 - _MAPREPORT._serialized_end=629 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/nanopb_pb2.py b/meshtastic/nanopb_pb2.py deleted file mode 100644 index eea6b3e..0000000 --- a/meshtastic/nanopb_pb2.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: nanopb.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cnanopb.proto\x1a google/protobuf/descriptor.proto\"\xa4\x07\n\rNanoPBOptions\x12\x10\n\x08max_size\x18\x01 \x01(\x05\x12\x12\n\nmax_length\x18\x0e \x01(\x05\x12\x11\n\tmax_count\x18\x02 \x01(\x05\x12&\n\x08int_size\x18\x07 \x01(\x0e\x32\x08.IntSize:\nIS_DEFAULT\x12$\n\x04type\x18\x03 \x01(\x0e\x32\n.FieldType:\nFT_DEFAULT\x12\x18\n\nlong_names\x18\x04 \x01(\x08:\x04true\x12\x1c\n\rpacked_struct\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0bpacked_enum\x18\n \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0cskip_message\x18\x06 \x01(\x08:\x05\x66\x61lse\x12\x18\n\tno_unions\x18\x08 \x01(\x08:\x05\x66\x61lse\x12\r\n\x05msgid\x18\t \x01(\r\x12\x1e\n\x0f\x61nonymous_oneof\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x15\n\x06proto3\x18\x0c \x01(\x08:\x05\x66\x61lse\x12#\n\x14proto3_singular_msgs\x18\x15 \x01(\x08:\x05\x66\x61lse\x12\x1d\n\x0e\x65num_to_string\x18\r \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0c\x66ixed_length\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0b\x66ixed_count\x18\x10 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x0fsubmsg_callback\x18\x16 \x01(\x08:\x05\x66\x61lse\x12/\n\x0cmangle_names\x18\x11 \x01(\x0e\x32\x11.TypenameMangling:\x06M_NONE\x12(\n\x11\x63\x61llback_datatype\x18\x12 \x01(\t:\rpb_callback_t\x12\x34\n\x11\x63\x61llback_function\x18\x13 \x01(\t:\x19pb_default_field_callback\x12\x30\n\x0e\x64\x65scriptorsize\x18\x14 \x01(\x0e\x32\x0f.DescriptorSize:\x07\x44S_AUTO\x12\x1a\n\x0b\x64\x65\x66\x61ult_has\x18\x17 \x01(\x08:\x05\x66\x61lse\x12\x0f\n\x07include\x18\x18 \x03(\t\x12\x0f\n\x07\x65xclude\x18\x1a \x03(\t\x12\x0f\n\x07package\x18\x19 \x01(\t\x12\x41\n\rtype_override\x18\x1b \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.Type\x12\x19\n\x0bsort_by_tag\x18\x1c \x01(\x08:\x04true\x12.\n\rfallback_type\x18\x1d \x01(\x0e\x32\n.FieldType:\x0b\x46T_CALLBACK*i\n\tFieldType\x12\x0e\n\nFT_DEFAULT\x10\x00\x12\x0f\n\x0b\x46T_CALLBACK\x10\x01\x12\x0e\n\nFT_POINTER\x10\x04\x12\r\n\tFT_STATIC\x10\x02\x12\r\n\tFT_IGNORE\x10\x03\x12\r\n\tFT_INLINE\x10\x05*D\n\x07IntSize\x12\x0e\n\nIS_DEFAULT\x10\x00\x12\x08\n\x04IS_8\x10\x08\x12\t\n\x05IS_16\x10\x10\x12\t\n\x05IS_32\x10 \x12\t\n\x05IS_64\x10@*Z\n\x10TypenameMangling\x12\n\n\x06M_NONE\x10\x00\x12\x13\n\x0fM_STRIP_PACKAGE\x10\x01\x12\r\n\tM_FLATTEN\x10\x02\x12\x16\n\x12M_PACKAGE_INITIALS\x10\x03*E\n\x0e\x44\x65scriptorSize\x12\x0b\n\x07\x44S_AUTO\x10\x00\x12\x08\n\x04\x44S_1\x10\x01\x12\x08\n\x04\x44S_2\x10\x02\x12\x08\n\x04\x44S_4\x10\x04\x12\x08\n\x04\x44S_8\x10\x08:E\n\x0enanopb_fileopt\x12\x1c.google.protobuf.FileOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:G\n\rnanopb_msgopt\x12\x1f.google.protobuf.MessageOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:E\n\x0enanopb_enumopt\x12\x1c.google.protobuf.EnumOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:>\n\x06nanopb\x12\x1d.google.protobuf.FieldOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptionsB\x1a\n\x18\x66i.kapsi.koti.jpa.nanopb') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nanopb_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(nanopb_fileopt) - google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(nanopb_msgopt) - google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(nanopb_enumopt) - google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(nanopb) - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\030fi.kapsi.koti.jpa.nanopb' - _FIELDTYPE._serialized_start=985 - _FIELDTYPE._serialized_end=1090 - _INTSIZE._serialized_start=1092 - _INTSIZE._serialized_end=1160 - _TYPENAMEMANGLING._serialized_start=1162 - _TYPENAMEMANGLING._serialized_end=1252 - _DESCRIPTORSIZE._serialized_start=1254 - _DESCRIPTORSIZE._serialized_end=1323 - _NANOPBOPTIONS._serialized_start=51 - _NANOPBOPTIONS._serialized_end=983 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/nanopb_pb2.pyi b/meshtastic/nanopb_pb2.pyi deleted file mode 100644 index 840d1e6..0000000 --- a/meshtastic/nanopb_pb2.pyi +++ /dev/null @@ -1,321 +0,0 @@ -""" -@generated by mypy-protobuf. Do not edit manually! -isort:skip_file -Custom options for defining: -- Maximum size of string/bytes -- Maximum number of elements in array - -These are used by nanopb to generate statically allocable structures -for memory-limited environments. -""" -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.descriptor_pb2 -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.internal.extension_dict -import google.protobuf.message -import sys -import typing - -if sys.version_info >= (3, 10): - import typing as typing_extensions -else: - import typing_extensions - -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor - -class _FieldType: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType - -class _FieldTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_FieldType.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor - FT_DEFAULT: _FieldType.ValueType # 0 - """Automatically decide field type, generate static field if possible.""" - FT_CALLBACK: _FieldType.ValueType # 1 - """Always generate a callback field.""" - FT_POINTER: _FieldType.ValueType # 4 - """Always generate a dynamically allocated field.""" - FT_STATIC: _FieldType.ValueType # 2 - """Generate a static field or raise an exception if not possible.""" - FT_IGNORE: _FieldType.ValueType # 3 - """Ignore the field completely.""" - FT_INLINE: _FieldType.ValueType # 5 - """Legacy option, use the separate 'fixed_length' option instead""" - -class FieldType(_FieldType, metaclass=_FieldTypeEnumTypeWrapper): ... - -FT_DEFAULT: FieldType.ValueType # 0 -"""Automatically decide field type, generate static field if possible.""" -FT_CALLBACK: FieldType.ValueType # 1 -"""Always generate a callback field.""" -FT_POINTER: FieldType.ValueType # 4 -"""Always generate a dynamically allocated field.""" -FT_STATIC: FieldType.ValueType # 2 -"""Generate a static field or raise an exception if not possible.""" -FT_IGNORE: FieldType.ValueType # 3 -"""Ignore the field completely.""" -FT_INLINE: FieldType.ValueType # 5 -"""Legacy option, use the separate 'fixed_length' option instead""" -global___FieldType = FieldType - -class _IntSize: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType - -class _IntSizeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_IntSize.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor - IS_DEFAULT: _IntSize.ValueType # 0 - """Default, 32/64bit based on type in .proto""" - IS_8: _IntSize.ValueType # 8 - IS_16: _IntSize.ValueType # 16 - IS_32: _IntSize.ValueType # 32 - IS_64: _IntSize.ValueType # 64 - -class IntSize(_IntSize, metaclass=_IntSizeEnumTypeWrapper): ... - -IS_DEFAULT: IntSize.ValueType # 0 -"""Default, 32/64bit based on type in .proto""" -IS_8: IntSize.ValueType # 8 -IS_16: IntSize.ValueType # 16 -IS_32: IntSize.ValueType # 32 -IS_64: IntSize.ValueType # 64 -global___IntSize = IntSize - -class _TypenameMangling: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType - -class _TypenameManglingEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_TypenameMangling.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor - M_NONE: _TypenameMangling.ValueType # 0 - """Default, no typename mangling""" - M_STRIP_PACKAGE: _TypenameMangling.ValueType # 1 - """Strip current package name""" - M_FLATTEN: _TypenameMangling.ValueType # 2 - """Only use last path component""" - M_PACKAGE_INITIALS: _TypenameMangling.ValueType # 3 - """Replace the package name by the initials""" - -class TypenameMangling(_TypenameMangling, metaclass=_TypenameManglingEnumTypeWrapper): ... - -M_NONE: TypenameMangling.ValueType # 0 -"""Default, no typename mangling""" -M_STRIP_PACKAGE: TypenameMangling.ValueType # 1 -"""Strip current package name""" -M_FLATTEN: TypenameMangling.ValueType # 2 -"""Only use last path component""" -M_PACKAGE_INITIALS: TypenameMangling.ValueType # 3 -"""Replace the package name by the initials""" -global___TypenameMangling = TypenameMangling - -class _DescriptorSize: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType - -class _DescriptorSizeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_DescriptorSize.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor - DS_AUTO: _DescriptorSize.ValueType # 0 - """Select minimal size based on field type""" - DS_1: _DescriptorSize.ValueType # 1 - """1 word; up to 15 byte fields, no arrays""" - DS_2: _DescriptorSize.ValueType # 2 - """2 words; up to 4095 byte fields, 4095 entry arrays""" - DS_4: _DescriptorSize.ValueType # 4 - """4 words; up to 2^32-1 byte fields, 2^16-1 entry arrays""" - DS_8: _DescriptorSize.ValueType # 8 - """8 words; up to 2^32-1 entry arrays""" - -class DescriptorSize(_DescriptorSize, metaclass=_DescriptorSizeEnumTypeWrapper): ... - -DS_AUTO: DescriptorSize.ValueType # 0 -"""Select minimal size based on field type""" -DS_1: DescriptorSize.ValueType # 1 -"""1 word; up to 15 byte fields, no arrays""" -DS_2: DescriptorSize.ValueType # 2 -"""2 words; up to 4095 byte fields, 4095 entry arrays""" -DS_4: DescriptorSize.ValueType # 4 -"""4 words; up to 2^32-1 byte fields, 2^16-1 entry arrays""" -DS_8: DescriptorSize.ValueType # 8 -"""8 words; up to 2^32-1 entry arrays""" -global___DescriptorSize = DescriptorSize - -@typing_extensions.final -class NanoPBOptions(google.protobuf.message.Message): - """This is the inner options message, which basically defines options for - a field. When it is used in message or file scope, it applies to all - fields. - """ - - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - MAX_SIZE_FIELD_NUMBER: builtins.int - MAX_LENGTH_FIELD_NUMBER: builtins.int - MAX_COUNT_FIELD_NUMBER: builtins.int - INT_SIZE_FIELD_NUMBER: builtins.int - TYPE_FIELD_NUMBER: builtins.int - LONG_NAMES_FIELD_NUMBER: builtins.int - PACKED_STRUCT_FIELD_NUMBER: builtins.int - PACKED_ENUM_FIELD_NUMBER: builtins.int - SKIP_MESSAGE_FIELD_NUMBER: builtins.int - NO_UNIONS_FIELD_NUMBER: builtins.int - MSGID_FIELD_NUMBER: builtins.int - ANONYMOUS_ONEOF_FIELD_NUMBER: builtins.int - PROTO3_FIELD_NUMBER: builtins.int - PROTO3_SINGULAR_MSGS_FIELD_NUMBER: builtins.int - ENUM_TO_STRING_FIELD_NUMBER: builtins.int - FIXED_LENGTH_FIELD_NUMBER: builtins.int - FIXED_COUNT_FIELD_NUMBER: builtins.int - SUBMSG_CALLBACK_FIELD_NUMBER: builtins.int - MANGLE_NAMES_FIELD_NUMBER: builtins.int - CALLBACK_DATATYPE_FIELD_NUMBER: builtins.int - CALLBACK_FUNCTION_FIELD_NUMBER: builtins.int - DESCRIPTORSIZE_FIELD_NUMBER: builtins.int - DEFAULT_HAS_FIELD_NUMBER: builtins.int - INCLUDE_FIELD_NUMBER: builtins.int - EXCLUDE_FIELD_NUMBER: builtins.int - PACKAGE_FIELD_NUMBER: builtins.int - TYPE_OVERRIDE_FIELD_NUMBER: builtins.int - SORT_BY_TAG_FIELD_NUMBER: builtins.int - FALLBACK_TYPE_FIELD_NUMBER: builtins.int - max_size: builtins.int - """Allocated size for 'bytes' and 'string' fields. - For string fields, this should include the space for null terminator. - """ - max_length: builtins.int - """Maximum length for 'string' fields. Setting this is equivalent - to setting max_size to a value of length+1. - """ - max_count: builtins.int - """Allocated number of entries in arrays ('repeated' fields)""" - int_size: global___IntSize.ValueType - """Size of integer fields. Can save some memory if you don't need - full 32 bits for the value. - """ - type: global___FieldType.ValueType - """Force type of field (callback or static allocation)""" - long_names: builtins.bool - """Use long names for enums, i.e. EnumName_EnumValue.""" - packed_struct: builtins.bool - """Add 'packed' attribute to generated structs. - Note: this cannot be used on CPUs that break on unaligned - accesses to variables. - """ - packed_enum: builtins.bool - """Add 'packed' attribute to generated enums.""" - skip_message: builtins.bool - """Skip this message""" - no_unions: builtins.bool - """Generate oneof fields as normal optional fields instead of union.""" - msgid: builtins.int - """integer type tag for a message""" - anonymous_oneof: builtins.bool - """decode oneof as anonymous union""" - proto3: builtins.bool - """Proto3 singular field does not generate a "has_" flag""" - proto3_singular_msgs: builtins.bool - """Force proto3 messages to have no "has_" flag. - This was default behavior until nanopb-0.4.0. - """ - enum_to_string: builtins.bool - """Generate an enum->string mapping function (can take up lots of space).""" - fixed_length: builtins.bool - """Generate bytes arrays with fixed length""" - fixed_count: builtins.bool - """Generate repeated field with fixed count""" - submsg_callback: builtins.bool - """Generate message-level callback that is called before decoding submessages. - This can be used to set callback fields for submsgs inside oneofs. - """ - mangle_names: global___TypenameMangling.ValueType - """Shorten or remove package names from type names. - This option applies only on the file level. - """ - callback_datatype: builtins.str - """Data type for storage associated with callback fields.""" - callback_function: builtins.str - """Callback function used for encoding and decoding. - Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t - structure. This is still supported, but does not work inside e.g. oneof or pointer - fields. Instead, a new method allows specifying a per-message callback that - will be called for all callback fields in a message type. - """ - descriptorsize: global___DescriptorSize.ValueType - """Select the size of field descriptors. This option has to be defined - for the whole message, not per-field. Usually automatic selection is - ok, but if it results in compilation errors you can increase the field - size here. - """ - default_has: builtins.bool - """Set default value for has_ fields.""" - @property - def include(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: - """Extra files to include in generated `.pb.h`""" - @property - def exclude(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: - """Automatic includes to exclude from generated `.pb.h` - Same as nanopb_generator.py command line flag -x. - """ - package: builtins.str - """Package name that applies only for nanopb.""" - type_override: google.protobuf.descriptor_pb2.FieldDescriptorProto.Type.ValueType - """Override type of the field in generated C code. Only to be used with related field types""" - sort_by_tag: builtins.bool - """Due to historical reasons, nanopb orders fields in structs by their tag number - instead of the order in .proto. Set this to false to keep the .proto order. - The default value will probably change to false in nanopb-0.5.0. - """ - fallback_type: global___FieldType.ValueType - """Set the FT_DEFAULT field conversion strategy. - A field that can become a static member of a c struct (e.g. int, bool, etc) - will be a a static field. - Fields with dynamic length are converted to either a pointer or a callback. - """ - def __init__( - self, - *, - max_size: builtins.int | None = ..., - max_length: builtins.int | None = ..., - max_count: builtins.int | None = ..., - int_size: global___IntSize.ValueType | None = ..., - type: global___FieldType.ValueType | None = ..., - long_names: builtins.bool | None = ..., - packed_struct: builtins.bool | None = ..., - packed_enum: builtins.bool | None = ..., - skip_message: builtins.bool | None = ..., - no_unions: builtins.bool | None = ..., - msgid: builtins.int | None = ..., - anonymous_oneof: builtins.bool | None = ..., - proto3: builtins.bool | None = ..., - proto3_singular_msgs: builtins.bool | None = ..., - enum_to_string: builtins.bool | None = ..., - fixed_length: builtins.bool | None = ..., - fixed_count: builtins.bool | None = ..., - submsg_callback: builtins.bool | None = ..., - mangle_names: global___TypenameMangling.ValueType | None = ..., - callback_datatype: builtins.str | None = ..., - callback_function: builtins.str | None = ..., - descriptorsize: global___DescriptorSize.ValueType | None = ..., - default_has: builtins.bool | None = ..., - include: collections.abc.Iterable[builtins.str] | None = ..., - exclude: collections.abc.Iterable[builtins.str] | None = ..., - package: builtins.str | None = ..., - type_override: google.protobuf.descriptor_pb2.FieldDescriptorProto.Type.ValueType | None = ..., - sort_by_tag: builtins.bool | None = ..., - fallback_type: global___FieldType.ValueType | None = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["anonymous_oneof", b"anonymous_oneof", "callback_datatype", b"callback_datatype", "callback_function", b"callback_function", "default_has", b"default_has", "descriptorsize", b"descriptorsize", "enum_to_string", b"enum_to_string", "fallback_type", b"fallback_type", "fixed_count", b"fixed_count", "fixed_length", b"fixed_length", "int_size", b"int_size", "long_names", b"long_names", "mangle_names", b"mangle_names", "max_count", b"max_count", "max_length", b"max_length", "max_size", b"max_size", "msgid", b"msgid", "no_unions", b"no_unions", "package", b"package", "packed_enum", b"packed_enum", "packed_struct", b"packed_struct", "proto3", b"proto3", "proto3_singular_msgs", b"proto3_singular_msgs", "skip_message", b"skip_message", "sort_by_tag", b"sort_by_tag", "submsg_callback", b"submsg_callback", "type", b"type", "type_override", b"type_override"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["anonymous_oneof", b"anonymous_oneof", "callback_datatype", b"callback_datatype", "callback_function", b"callback_function", "default_has", b"default_has", "descriptorsize", b"descriptorsize", "enum_to_string", b"enum_to_string", "exclude", b"exclude", "fallback_type", b"fallback_type", "fixed_count", b"fixed_count", "fixed_length", b"fixed_length", "include", b"include", "int_size", b"int_size", "long_names", b"long_names", "mangle_names", b"mangle_names", "max_count", b"max_count", "max_length", b"max_length", "max_size", b"max_size", "msgid", b"msgid", "no_unions", b"no_unions", "package", b"package", "packed_enum", b"packed_enum", "packed_struct", b"packed_struct", "proto3", b"proto3", "proto3_singular_msgs", b"proto3_singular_msgs", "skip_message", b"skip_message", "sort_by_tag", b"sort_by_tag", "submsg_callback", b"submsg_callback", "type", b"type", "type_override", b"type_override"]) -> None: ... - -global___NanoPBOptions = NanoPBOptions - -NANOPB_FILEOPT_FIELD_NUMBER: builtins.int -NANOPB_MSGOPT_FIELD_NUMBER: builtins.int -NANOPB_ENUMOPT_FIELD_NUMBER: builtins.int -NANOPB_FIELD_NUMBER: builtins.int -nanopb_fileopt: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.FileOptions, global___NanoPBOptions] -nanopb_msgopt: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.MessageOptions, global___NanoPBOptions] -nanopb_enumopt: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.EnumOptions, global___NanoPBOptions] -nanopb: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.FieldOptions, global___NanoPBOptions] diff --git a/meshtastic/node.py b/meshtastic/node.py index 419b712..31a5b03 100644 --- a/meshtastic/node.py +++ b/meshtastic/node.py @@ -7,7 +7,7 @@ import time from typing import Union -from meshtastic import admin_pb2, apponly_pb2, channel_pb2, localonly_pb2, mesh_pb2, portnums_pb2 +from meshtastic.protobuf import admin_pb2, apponly_pb2, channel_pb2, localonly_pb2, mesh_pb2, portnums_pb2 from meshtastic.util import ( Timeout, camel_to_snake, diff --git a/meshtastic/portnums_pb2.py b/meshtastic/portnums_pb2.py deleted file mode 100644 index 77b164a..0000000 --- a/meshtastic/portnums_pb2.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/portnums.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19meshtastic/portnums.proto\x12\nmeshtastic*\x8d\x04\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\x1f\n\x1bTEXT_MESSAGE_COMPRESSED_APP\x10\x07\x12\x10\n\x0cWAYPOINT_APP\x10\x08\x12\r\n\tAUDIO_APP\x10\t\x12\x18\n\x14\x44\x45TECTION_SENSOR_APP\x10\n\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x12\n\x0ePAXCOUNTER_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x11\n\rTELEMETRY_APP\x10\x43\x12\x0b\n\x07ZPS_APP\x10\x44\x12\x11\n\rSIMULATOR_APP\x10\x45\x12\x12\n\x0eTRACEROUTE_APP\x10\x46\x12\x14\n\x10NEIGHBORINFO_APP\x10G\x12\x0f\n\x0b\x41TAK_PLUGIN\x10H\x12\x12\n\x0eMAP_REPORT_APP\x10I\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42]\n\x13\x63om.geeksville.meshB\x08PortnumsZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.portnums_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\010PortnumsZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _PORTNUM._serialized_start=42 - _PORTNUM._serialized_end=567 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/protobuf/__init__.py b/meshtastic/protobuf/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/meshtastic/protobuf/admin_pb2.py b/meshtastic/protobuf/admin_pb2.py new file mode 100644 index 0000000..1429f1e --- /dev/null +++ b/meshtastic/protobuf/admin_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/admin.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from meshtastic.protobuf import channel_pb2 as meshtastic_dot_protobuf_dot_channel__pb2 +from meshtastic.protobuf import config_pb2 as meshtastic_dot_protobuf_dot_config__pb2 +from meshtastic.protobuf import connection_status_pb2 as meshtastic_dot_protobuf_dot_connection__status__pb2 +from meshtastic.protobuf import mesh_pb2 as meshtastic_dot_protobuf_dot_mesh__pb2 +from meshtastic.protobuf import module_config_pb2 as meshtastic_dot_protobuf_dot_module__config__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fmeshtastic/protobuf/admin.proto\x12\x13meshtastic.protobuf\x1a!meshtastic/protobuf/channel.proto\x1a meshtastic/protobuf/config.proto\x1a+meshtastic/protobuf/connection_status.proto\x1a\x1emeshtastic/protobuf/mesh.proto\x1a\'meshtastic/protobuf/module_config.proto\"\xd5\x12\n\x0c\x41\x64minMessage\x12\x1d\n\x13get_channel_request\x18\x01 \x01(\rH\x00\x12<\n\x14get_channel_response\x18\x02 \x01(\x0b\x32\x1c.meshtastic.protobuf.ChannelH\x00\x12\x1b\n\x11get_owner_request\x18\x03 \x01(\x08H\x00\x12\x37\n\x12get_owner_response\x18\x04 \x01(\x0b\x32\x19.meshtastic.protobuf.UserH\x00\x12J\n\x12get_config_request\x18\x05 \x01(\x0e\x32,.meshtastic.protobuf.AdminMessage.ConfigTypeH\x00\x12:\n\x13get_config_response\x18\x06 \x01(\x0b\x32\x1b.meshtastic.protobuf.ConfigH\x00\x12W\n\x19get_module_config_request\x18\x07 \x01(\x0e\x32\x32.meshtastic.protobuf.AdminMessage.ModuleConfigTypeH\x00\x12G\n\x1aget_module_config_response\x18\x08 \x01(\x0b\x32!.meshtastic.protobuf.ModuleConfigH\x00\x12\x34\n*get_canned_message_module_messages_request\x18\n \x01(\x08H\x00\x12\x35\n+get_canned_message_module_messages_response\x18\x0b \x01(\tH\x00\x12%\n\x1bget_device_metadata_request\x18\x0c \x01(\x08H\x00\x12K\n\x1cget_device_metadata_response\x18\r \x01(\x0b\x32#.meshtastic.protobuf.DeviceMetadataH\x00\x12\x1e\n\x14get_ringtone_request\x18\x0e \x01(\x08H\x00\x12\x1f\n\x15get_ringtone_response\x18\x0f \x01(\tH\x00\x12.\n$get_device_connection_status_request\x18\x10 \x01(\x08H\x00\x12\\\n%get_device_connection_status_response\x18\x11 \x01(\x0b\x32+.meshtastic.protobuf.DeviceConnectionStatusH\x00\x12:\n\x0cset_ham_mode\x18\x12 \x01(\x0b\x32\".meshtastic.protobuf.HamParametersH\x00\x12/\n%get_node_remote_hardware_pins_request\x18\x13 \x01(\x08H\x00\x12\x65\n&get_node_remote_hardware_pins_response\x18\x14 \x01(\x0b\x32\x33.meshtastic.protobuf.NodeRemoteHardwarePinsResponseH\x00\x12 \n\x16\x65nter_dfu_mode_request\x18\x15 \x01(\x08H\x00\x12\x1d\n\x13\x64\x65lete_file_request\x18\x16 \x01(\tH\x00\x12.\n\tset_owner\x18 \x01(\x0b\x32\x19.meshtastic.protobuf.UserH\x00\x12\x33\n\x0bset_channel\x18! \x01(\x0b\x32\x1c.meshtastic.protobuf.ChannelH\x00\x12\x31\n\nset_config\x18\" \x01(\x0b\x32\x1b.meshtastic.protobuf.ConfigH\x00\x12>\n\x11set_module_config\x18# \x01(\x0b\x32!.meshtastic.protobuf.ModuleConfigH\x00\x12,\n\"set_canned_message_module_messages\x18$ \x01(\tH\x00\x12\x1e\n\x14set_ringtone_message\x18% \x01(\tH\x00\x12\x1b\n\x11remove_by_nodenum\x18& \x01(\rH\x00\x12\x1b\n\x11set_favorite_node\x18\' \x01(\rH\x00\x12\x1e\n\x14remove_favorite_node\x18( \x01(\rH\x00\x12;\n\x12set_fixed_position\x18) \x01(\x0b\x32\x1d.meshtastic.protobuf.PositionH\x00\x12\x1f\n\x15remove_fixed_position\x18* \x01(\x08H\x00\x12\x1d\n\x13\x62\x65gin_edit_settings\x18@ \x01(\x08H\x00\x12\x1e\n\x14\x63ommit_edit_settings\x18\x41 \x01(\x08H\x00\x12\x1c\n\x12reboot_ota_seconds\x18_ \x01(\x05H\x00\x12\x18\n\x0e\x65xit_simulator\x18` \x01(\x08H\x00\x12\x18\n\x0ereboot_seconds\x18\x61 \x01(\x05H\x00\x12\x1a\n\x10shutdown_seconds\x18\x62 \x01(\x05H\x00\x12\x17\n\rfactory_reset\x18\x63 \x01(\x05H\x00\x12\x16\n\x0cnodedb_reset\x18\x64 \x01(\x05H\x00\"\x95\x01\n\nConfigType\x12\x11\n\rDEVICE_CONFIG\x10\x00\x12\x13\n\x0fPOSITION_CONFIG\x10\x01\x12\x10\n\x0cPOWER_CONFIG\x10\x02\x12\x12\n\x0eNETWORK_CONFIG\x10\x03\x12\x12\n\x0e\x44ISPLAY_CONFIG\x10\x04\x12\x0f\n\x0bLORA_CONFIG\x10\x05\x12\x14\n\x10\x42LUETOOTH_CONFIG\x10\x06\"\xbb\x02\n\x10ModuleConfigType\x12\x0f\n\x0bMQTT_CONFIG\x10\x00\x12\x11\n\rSERIAL_CONFIG\x10\x01\x12\x13\n\x0f\x45XTNOTIF_CONFIG\x10\x02\x12\x17\n\x13STOREFORWARD_CONFIG\x10\x03\x12\x14\n\x10RANGETEST_CONFIG\x10\x04\x12\x14\n\x10TELEMETRY_CONFIG\x10\x05\x12\x14\n\x10\x43\x41NNEDMSG_CONFIG\x10\x06\x12\x10\n\x0c\x41UDIO_CONFIG\x10\x07\x12\x19\n\x15REMOTEHARDWARE_CONFIG\x10\x08\x12\x17\n\x13NEIGHBORINFO_CONFIG\x10\t\x12\x1a\n\x16\x41MBIENTLIGHTING_CONFIG\x10\n\x12\x1a\n\x16\x44\x45TECTIONSENSOR_CONFIG\x10\x0b\x12\x15\n\x11PAXCOUNTER_CONFIG\x10\x0c\x42\x11\n\x0fpayload_variant\"[\n\rHamParameters\x12\x11\n\tcall_sign\x18\x01 \x01(\t\x12\x10\n\x08tx_power\x18\x02 \x01(\x05\x12\x11\n\tfrequency\x18\x03 \x01(\x02\x12\x12\n\nshort_name\x18\x04 \x01(\t\"o\n\x1eNodeRemoteHardwarePinsResponse\x12M\n\x19node_remote_hardware_pins\x18\x01 \x03(\x0b\x32*.meshtastic.protobuf.NodeRemoteHardwarePinB`\n\x13\x63om.geeksville.meshB\x0b\x41\x64minProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.admin_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\013AdminProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_ADMINMESSAGE']._serialized_start=244 + _globals['_ADMINMESSAGE']._serialized_end=2633 + _globals['_ADMINMESSAGE_CONFIGTYPE']._serialized_start=2147 + _globals['_ADMINMESSAGE_CONFIGTYPE']._serialized_end=2296 + _globals['_ADMINMESSAGE_MODULECONFIGTYPE']._serialized_start=2299 + _globals['_ADMINMESSAGE_MODULECONFIGTYPE']._serialized_end=2614 + _globals['_HAMPARAMETERS']._serialized_start=2635 + _globals['_HAMPARAMETERS']._serialized_end=2726 + _globals['_NODEREMOTEHARDWAREPINSRESPONSE']._serialized_start=2728 + _globals['_NODEREMOTEHARDWAREPINSRESPONSE']._serialized_end=2839 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/admin_pb2.pyi b/meshtastic/protobuf/admin_pb2.pyi similarity index 68% rename from meshtastic/admin_pb2.pyi rename to meshtastic/protobuf/admin_pb2.pyi index 8488f5b..cdfc6b7 100644 --- a/meshtastic/admin_pb2.pyi +++ b/meshtastic/protobuf/admin_pb2.pyi @@ -2,17 +2,18 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message -import meshtastic.channel_pb2 -import meshtastic.config_pb2 -import meshtastic.connection_status_pb2 -import meshtastic.mesh_pb2 -import meshtastic.module_config_pb2 +import meshtastic.protobuf.channel_pb2 +import meshtastic.protobuf.config_pb2 +import meshtastic.protobuf.connection_status_pb2 +import meshtastic.protobuf.mesh_pb2 +import meshtastic.protobuf.module_config_pb2 import sys import typing @@ -23,7 +24,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class AdminMessage(google.protobuf.message.Message): """ This message is handled by the Admin module and is responsible for all settings/channel read/write operations. @@ -264,38 +265,18 @@ class AdminMessage(google.protobuf.message.Message): Send the specified channel in the response to this message NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present) """ - @property - def get_channel_response(self) -> meshtastic.channel_pb2.Channel: - """ - TODO: REPLACE - """ get_owner_request: builtins.bool """ Send the current owner data in the response to this message. """ - @property - def get_owner_response(self) -> meshtastic.mesh_pb2.User: - """ - TODO: REPLACE - """ get_config_request: global___AdminMessage.ConfigType.ValueType """ Ask for the following config data to be sent """ - @property - def get_config_response(self) -> meshtastic.config_pb2.Config: - """ - Send the current Config in the response to this message. - """ get_module_config_request: global___AdminMessage.ModuleConfigType.ValueType """ Ask for the following config data to be sent """ - @property - def get_module_config_response(self) -> meshtastic.module_config_pb2.ModuleConfig: - """ - Send the current Config in the response to this message. - """ get_canned_message_module_messages_request: builtins.bool """ Get the Canned Message Module messages in the response to this message. @@ -308,11 +289,6 @@ class AdminMessage(google.protobuf.message.Message): """ Request the node to send device metadata (firmware, protobuf version, etc) """ - @property - def get_device_metadata_response(self) -> meshtastic.mesh_pb2.DeviceMetadata: - """ - Device metadata response - """ get_ringtone_request: builtins.bool """ Get the Ringtone in the response to this message. @@ -325,25 +301,10 @@ class AdminMessage(google.protobuf.message.Message): """ Request the node to send it's connection status """ - @property - def get_device_connection_status_response(self) -> meshtastic.connection_status_pb2.DeviceConnectionStatus: - """ - Device connection status response - """ - @property - def set_ham_mode(self) -> global___HamParameters: - """ - Setup a node for licensed amateur (ham) radio operation - """ get_node_remote_hardware_pins_request: builtins.bool """ Get the mesh's nodes with their available gpio pins for RemoteHardware module use """ - @property - def get_node_remote_hardware_pins_response(self) -> global___NodeRemoteHardwarePinsResponse: - """ - Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use - """ enter_dfu_mode_request: builtins.bool """ Enter (UF2) DFU mode @@ -353,30 +314,6 @@ class AdminMessage(google.protobuf.message.Message): """ Delete the file by the specified path from the device """ - @property - def set_owner(self) -> meshtastic.mesh_pb2.User: - """ - Set the owner for this node - """ - @property - def set_channel(self) -> meshtastic.channel_pb2.Channel: - """ - Set channels (using the new API). - A special channel is the "primary channel". - The other records are secondary channels. - Note: only one channel can be marked as primary. - If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically. - """ - @property - def set_config(self) -> meshtastic.config_pb2.Config: - """ - Set the current Config - """ - @property - def set_module_config(self) -> meshtastic.module_config_pb2.ModuleConfig: - """ - Set the current Config - """ set_canned_message_module_messages: builtins.str """ Set the Canned Message Module messages text. @@ -397,11 +334,6 @@ class AdminMessage(google.protobuf.message.Message): """ Set specified node-num to be un-favorited on the NodeDB on the device """ - @property - def set_fixed_position(self) -> meshtastic.mesh_pb2.Position: - """ - Set fixed position data on the node and then set the position.fixed_position = true - """ remove_fixed_position: builtins.bool """ Clear fixed position coordinates and then set position.fixed_position = false @@ -441,40 +373,122 @@ class AdminMessage(google.protobuf.message.Message): """ Tell the node to reset the nodedb. """ + @property + def get_channel_response(self) -> meshtastic.protobuf.channel_pb2.Channel: + """ + TODO: REPLACE + """ + + @property + def get_owner_response(self) -> meshtastic.protobuf.mesh_pb2.User: + """ + TODO: REPLACE + """ + + @property + def get_config_response(self) -> meshtastic.protobuf.config_pb2.Config: + """ + Send the current Config in the response to this message. + """ + + @property + def get_module_config_response(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig: + """ + Send the current Config in the response to this message. + """ + + @property + def get_device_metadata_response(self) -> meshtastic.protobuf.mesh_pb2.DeviceMetadata: + """ + Device metadata response + """ + + @property + def get_device_connection_status_response(self) -> meshtastic.protobuf.connection_status_pb2.DeviceConnectionStatus: + """ + Device connection status response + """ + + @property + def set_ham_mode(self) -> global___HamParameters: + """ + Setup a node for licensed amateur (ham) radio operation + """ + + @property + def get_node_remote_hardware_pins_response(self) -> global___NodeRemoteHardwarePinsResponse: + """ + Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use + """ + + @property + def set_owner(self) -> meshtastic.protobuf.mesh_pb2.User: + """ + Set the owner for this node + """ + + @property + def set_channel(self) -> meshtastic.protobuf.channel_pb2.Channel: + """ + Set channels (using the new API). + A special channel is the "primary channel". + The other records are secondary channels. + Note: only one channel can be marked as primary. + If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically. + """ + + @property + def set_config(self) -> meshtastic.protobuf.config_pb2.Config: + """ + Set the current Config + """ + + @property + def set_module_config(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig: + """ + Set the current Config + """ + + @property + def set_fixed_position(self) -> meshtastic.protobuf.mesh_pb2.Position: + """ + Set fixed position data on the node and then set the position.fixed_position = true + """ + def __init__( self, *, get_channel_request: builtins.int = ..., - get_channel_response: meshtastic.channel_pb2.Channel | None = ..., + get_channel_response: meshtastic.protobuf.channel_pb2.Channel | None = ..., get_owner_request: builtins.bool = ..., - get_owner_response: meshtastic.mesh_pb2.User | None = ..., + get_owner_response: meshtastic.protobuf.mesh_pb2.User | None = ..., get_config_request: global___AdminMessage.ConfigType.ValueType = ..., - get_config_response: meshtastic.config_pb2.Config | None = ..., + get_config_response: meshtastic.protobuf.config_pb2.Config | None = ..., get_module_config_request: global___AdminMessage.ModuleConfigType.ValueType = ..., - get_module_config_response: meshtastic.module_config_pb2.ModuleConfig | None = ..., + get_module_config_response: meshtastic.protobuf.module_config_pb2.ModuleConfig | None = ..., get_canned_message_module_messages_request: builtins.bool = ..., get_canned_message_module_messages_response: builtins.str = ..., get_device_metadata_request: builtins.bool = ..., - get_device_metadata_response: meshtastic.mesh_pb2.DeviceMetadata | None = ..., + get_device_metadata_response: meshtastic.protobuf.mesh_pb2.DeviceMetadata | None = ..., get_ringtone_request: builtins.bool = ..., get_ringtone_response: builtins.str = ..., get_device_connection_status_request: builtins.bool = ..., - get_device_connection_status_response: meshtastic.connection_status_pb2.DeviceConnectionStatus | None = ..., + get_device_connection_status_response: meshtastic.protobuf.connection_status_pb2.DeviceConnectionStatus | None = ..., set_ham_mode: global___HamParameters | None = ..., get_node_remote_hardware_pins_request: builtins.bool = ..., get_node_remote_hardware_pins_response: global___NodeRemoteHardwarePinsResponse | None = ..., enter_dfu_mode_request: builtins.bool = ..., delete_file_request: builtins.str = ..., - set_owner: meshtastic.mesh_pb2.User | None = ..., - set_channel: meshtastic.channel_pb2.Channel | None = ..., - set_config: meshtastic.config_pb2.Config | None = ..., - set_module_config: meshtastic.module_config_pb2.ModuleConfig | None = ..., + set_owner: meshtastic.protobuf.mesh_pb2.User | None = ..., + set_channel: meshtastic.protobuf.channel_pb2.Channel | None = ..., + set_config: meshtastic.protobuf.config_pb2.Config | None = ..., + set_module_config: meshtastic.protobuf.module_config_pb2.ModuleConfig | None = ..., set_canned_message_module_messages: builtins.str = ..., set_ringtone_message: builtins.str = ..., remove_by_nodenum: builtins.int = ..., set_favorite_node: builtins.int = ..., remove_favorite_node: builtins.int = ..., - set_fixed_position: meshtastic.mesh_pb2.Position | None = ..., + set_fixed_position: meshtastic.protobuf.mesh_pb2.Position | None = ..., remove_fixed_position: builtins.bool = ..., begin_edit_settings: builtins.bool = ..., commit_edit_settings: builtins.bool = ..., @@ -485,13 +499,13 @@ class AdminMessage(google.protobuf.message.Message): factory_reset: builtins.int = ..., nodedb_reset: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["begin_edit_settings", b"begin_edit_settings", "commit_edit_settings", b"commit_edit_settings", "delete_file_request", b"delete_file_request", "enter_dfu_mode_request", b"enter_dfu_mode_request", "exit_simulator", b"exit_simulator", "factory_reset", b"factory_reset", "get_canned_message_module_messages_request", b"get_canned_message_module_messages_request", "get_canned_message_module_messages_response", b"get_canned_message_module_messages_response", "get_channel_request", b"get_channel_request", "get_channel_response", b"get_channel_response", "get_config_request", b"get_config_request", "get_config_response", b"get_config_response", "get_device_connection_status_request", b"get_device_connection_status_request", "get_device_connection_status_response", b"get_device_connection_status_response", "get_device_metadata_request", b"get_device_metadata_request", "get_device_metadata_response", b"get_device_metadata_response", "get_module_config_request", b"get_module_config_request", "get_module_config_response", b"get_module_config_response", "get_node_remote_hardware_pins_request", b"get_node_remote_hardware_pins_request", "get_node_remote_hardware_pins_response", b"get_node_remote_hardware_pins_response", "get_owner_request", b"get_owner_request", "get_owner_response", b"get_owner_response", "get_ringtone_request", b"get_ringtone_request", "get_ringtone_response", b"get_ringtone_response", "nodedb_reset", b"nodedb_reset", "payload_variant", b"payload_variant", "reboot_ota_seconds", b"reboot_ota_seconds", "reboot_seconds", b"reboot_seconds", "remove_by_nodenum", b"remove_by_nodenum", "remove_favorite_node", b"remove_favorite_node", "remove_fixed_position", b"remove_fixed_position", "set_canned_message_module_messages", b"set_canned_message_module_messages", "set_channel", b"set_channel", "set_config", b"set_config", "set_favorite_node", b"set_favorite_node", "set_fixed_position", b"set_fixed_position", "set_ham_mode", b"set_ham_mode", "set_module_config", b"set_module_config", "set_owner", b"set_owner", "set_ringtone_message", b"set_ringtone_message", "shutdown_seconds", b"shutdown_seconds"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["begin_edit_settings", b"begin_edit_settings", "commit_edit_settings", b"commit_edit_settings", "delete_file_request", b"delete_file_request", "enter_dfu_mode_request", b"enter_dfu_mode_request", "exit_simulator", b"exit_simulator", "factory_reset", b"factory_reset", "get_canned_message_module_messages_request", b"get_canned_message_module_messages_request", "get_canned_message_module_messages_response", b"get_canned_message_module_messages_response", "get_channel_request", b"get_channel_request", "get_channel_response", b"get_channel_response", "get_config_request", b"get_config_request", "get_config_response", b"get_config_response", "get_device_connection_status_request", b"get_device_connection_status_request", "get_device_connection_status_response", b"get_device_connection_status_response", "get_device_metadata_request", b"get_device_metadata_request", "get_device_metadata_response", b"get_device_metadata_response", "get_module_config_request", b"get_module_config_request", "get_module_config_response", b"get_module_config_response", "get_node_remote_hardware_pins_request", b"get_node_remote_hardware_pins_request", "get_node_remote_hardware_pins_response", b"get_node_remote_hardware_pins_response", "get_owner_request", b"get_owner_request", "get_owner_response", b"get_owner_response", "get_ringtone_request", b"get_ringtone_request", "get_ringtone_response", b"get_ringtone_response", "nodedb_reset", b"nodedb_reset", "payload_variant", b"payload_variant", "reboot_ota_seconds", b"reboot_ota_seconds", "reboot_seconds", b"reboot_seconds", "remove_by_nodenum", b"remove_by_nodenum", "remove_favorite_node", b"remove_favorite_node", "remove_fixed_position", b"remove_fixed_position", "set_canned_message_module_messages", b"set_canned_message_module_messages", "set_channel", b"set_channel", "set_config", b"set_config", "set_favorite_node", b"set_favorite_node", "set_fixed_position", b"set_fixed_position", "set_ham_mode", b"set_ham_mode", "set_module_config", b"set_module_config", "set_owner", b"set_owner", "set_ringtone_message", b"set_ringtone_message", "shutdown_seconds", b"shutdown_seconds"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["payload_variant", b"payload_variant"]) -> typing_extensions.Literal["get_channel_request", "get_channel_response", "get_owner_request", "get_owner_response", "get_config_request", "get_config_response", "get_module_config_request", "get_module_config_response", "get_canned_message_module_messages_request", "get_canned_message_module_messages_response", "get_device_metadata_request", "get_device_metadata_response", "get_ringtone_request", "get_ringtone_response", "get_device_connection_status_request", "get_device_connection_status_response", "set_ham_mode", "get_node_remote_hardware_pins_request", "get_node_remote_hardware_pins_response", "enter_dfu_mode_request", "delete_file_request", "set_owner", "set_channel", "set_config", "set_module_config", "set_canned_message_module_messages", "set_ringtone_message", "remove_by_nodenum", "set_favorite_node", "remove_favorite_node", "set_fixed_position", "remove_fixed_position", "begin_edit_settings", "commit_edit_settings", "reboot_ota_seconds", "exit_simulator", "reboot_seconds", "shutdown_seconds", "factory_reset", "nodedb_reset"] | None: ... + def HasField(self, field_name: typing.Literal["begin_edit_settings", b"begin_edit_settings", "commit_edit_settings", b"commit_edit_settings", "delete_file_request", b"delete_file_request", "enter_dfu_mode_request", b"enter_dfu_mode_request", "exit_simulator", b"exit_simulator", "factory_reset", b"factory_reset", "get_canned_message_module_messages_request", b"get_canned_message_module_messages_request", "get_canned_message_module_messages_response", b"get_canned_message_module_messages_response", "get_channel_request", b"get_channel_request", "get_channel_response", b"get_channel_response", "get_config_request", b"get_config_request", "get_config_response", b"get_config_response", "get_device_connection_status_request", b"get_device_connection_status_request", "get_device_connection_status_response", b"get_device_connection_status_response", "get_device_metadata_request", b"get_device_metadata_request", "get_device_metadata_response", b"get_device_metadata_response", "get_module_config_request", b"get_module_config_request", "get_module_config_response", b"get_module_config_response", "get_node_remote_hardware_pins_request", b"get_node_remote_hardware_pins_request", "get_node_remote_hardware_pins_response", b"get_node_remote_hardware_pins_response", "get_owner_request", b"get_owner_request", "get_owner_response", b"get_owner_response", "get_ringtone_request", b"get_ringtone_request", "get_ringtone_response", b"get_ringtone_response", "nodedb_reset", b"nodedb_reset", "payload_variant", b"payload_variant", "reboot_ota_seconds", b"reboot_ota_seconds", "reboot_seconds", b"reboot_seconds", "remove_by_nodenum", b"remove_by_nodenum", "remove_favorite_node", b"remove_favorite_node", "remove_fixed_position", b"remove_fixed_position", "set_canned_message_module_messages", b"set_canned_message_module_messages", "set_channel", b"set_channel", "set_config", b"set_config", "set_favorite_node", b"set_favorite_node", "set_fixed_position", b"set_fixed_position", "set_ham_mode", b"set_ham_mode", "set_module_config", b"set_module_config", "set_owner", b"set_owner", "set_ringtone_message", b"set_ringtone_message", "shutdown_seconds", b"shutdown_seconds"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["begin_edit_settings", b"begin_edit_settings", "commit_edit_settings", b"commit_edit_settings", "delete_file_request", b"delete_file_request", "enter_dfu_mode_request", b"enter_dfu_mode_request", "exit_simulator", b"exit_simulator", "factory_reset", b"factory_reset", "get_canned_message_module_messages_request", b"get_canned_message_module_messages_request", "get_canned_message_module_messages_response", b"get_canned_message_module_messages_response", "get_channel_request", b"get_channel_request", "get_channel_response", b"get_channel_response", "get_config_request", b"get_config_request", "get_config_response", b"get_config_response", "get_device_connection_status_request", b"get_device_connection_status_request", "get_device_connection_status_response", b"get_device_connection_status_response", "get_device_metadata_request", b"get_device_metadata_request", "get_device_metadata_response", b"get_device_metadata_response", "get_module_config_request", b"get_module_config_request", "get_module_config_response", b"get_module_config_response", "get_node_remote_hardware_pins_request", b"get_node_remote_hardware_pins_request", "get_node_remote_hardware_pins_response", b"get_node_remote_hardware_pins_response", "get_owner_request", b"get_owner_request", "get_owner_response", b"get_owner_response", "get_ringtone_request", b"get_ringtone_request", "get_ringtone_response", b"get_ringtone_response", "nodedb_reset", b"nodedb_reset", "payload_variant", b"payload_variant", "reboot_ota_seconds", b"reboot_ota_seconds", "reboot_seconds", b"reboot_seconds", "remove_by_nodenum", b"remove_by_nodenum", "remove_favorite_node", b"remove_favorite_node", "remove_fixed_position", b"remove_fixed_position", "set_canned_message_module_messages", b"set_canned_message_module_messages", "set_channel", b"set_channel", "set_config", b"set_config", "set_favorite_node", b"set_favorite_node", "set_fixed_position", b"set_fixed_position", "set_ham_mode", b"set_ham_mode", "set_module_config", b"set_module_config", "set_owner", b"set_owner", "set_ringtone_message", b"set_ringtone_message", "shutdown_seconds", b"shutdown_seconds"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["payload_variant", b"payload_variant"]) -> typing.Literal["get_channel_request", "get_channel_response", "get_owner_request", "get_owner_response", "get_config_request", "get_config_response", "get_module_config_request", "get_module_config_response", "get_canned_message_module_messages_request", "get_canned_message_module_messages_response", "get_device_metadata_request", "get_device_metadata_response", "get_ringtone_request", "get_ringtone_response", "get_device_connection_status_request", "get_device_connection_status_response", "set_ham_mode", "get_node_remote_hardware_pins_request", "get_node_remote_hardware_pins_response", "enter_dfu_mode_request", "delete_file_request", "set_owner", "set_channel", "set_config", "set_module_config", "set_canned_message_module_messages", "set_ringtone_message", "remove_by_nodenum", "set_favorite_node", "remove_favorite_node", "set_fixed_position", "remove_fixed_position", "begin_edit_settings", "commit_edit_settings", "reboot_ota_seconds", "exit_simulator", "reboot_seconds", "shutdown_seconds", "factory_reset", "nodedb_reset"] | None: ... global___AdminMessage = AdminMessage -@typing_extensions.final +@typing.final class HamParameters(google.protobuf.message.Message): """ Parameters for setting up Meshtastic for ameteur radio usage @@ -529,11 +543,11 @@ class HamParameters(google.protobuf.message.Message): frequency: builtins.float = ..., short_name: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["call_sign", b"call_sign", "frequency", b"frequency", "short_name", b"short_name", "tx_power", b"tx_power"]) -> None: ... + def ClearField(self, field_name: typing.Literal["call_sign", b"call_sign", "frequency", b"frequency", "short_name", b"short_name", "tx_power", b"tx_power"]) -> None: ... global___HamParameters = HamParameters -@typing_extensions.final +@typing.final class NodeRemoteHardwarePinsResponse(google.protobuf.message.Message): """ Response envelope for node_remote_hardware_pins @@ -543,15 +557,16 @@ class NodeRemoteHardwarePinsResponse(google.protobuf.message.Message): NODE_REMOTE_HARDWARE_PINS_FIELD_NUMBER: builtins.int @property - def node_remote_hardware_pins(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[meshtastic.mesh_pb2.NodeRemoteHardwarePin]: + def node_remote_hardware_pins(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[meshtastic.protobuf.mesh_pb2.NodeRemoteHardwarePin]: """ Nodes and their respective remote hardware GPIO pins """ + def __init__( self, *, - node_remote_hardware_pins: collections.abc.Iterable[meshtastic.mesh_pb2.NodeRemoteHardwarePin] | None = ..., + node_remote_hardware_pins: collections.abc.Iterable[meshtastic.protobuf.mesh_pb2.NodeRemoteHardwarePin] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["node_remote_hardware_pins", b"node_remote_hardware_pins"]) -> None: ... + def ClearField(self, field_name: typing.Literal["node_remote_hardware_pins", b"node_remote_hardware_pins"]) -> None: ... global___NodeRemoteHardwarePinsResponse = NodeRemoteHardwarePinsResponse diff --git a/meshtastic/protobuf/apponly_pb2.py b/meshtastic/protobuf/apponly_pb2.py new file mode 100644 index 0000000..151fbf6 --- /dev/null +++ b/meshtastic/protobuf/apponly_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/apponly.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from meshtastic.protobuf import channel_pb2 as meshtastic_dot_protobuf_dot_channel__pb2 +from meshtastic.protobuf import config_pb2 as meshtastic_dot_protobuf_dot_config__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!meshtastic/protobuf/apponly.proto\x12\x13meshtastic.protobuf\x1a!meshtastic/protobuf/channel.proto\x1a meshtastic/protobuf/config.proto\"\x81\x01\n\nChannelSet\x12\x36\n\x08settings\x18\x01 \x03(\x0b\x32$.meshtastic.protobuf.ChannelSettings\x12;\n\x0blora_config\x18\x02 \x01(\x0b\x32&.meshtastic.protobuf.Config.LoRaConfigBb\n\x13\x63om.geeksville.meshB\rAppOnlyProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.apponly_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\rAppOnlyProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_CHANNELSET']._serialized_start=128 + _globals['_CHANNELSET']._serialized_end=257 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/apponly_pb2.pyi b/meshtastic/protobuf/apponly_pb2.pyi similarity index 59% rename from meshtastic/apponly_pb2.pyi rename to meshtastic/protobuf/apponly_pb2.pyi index 0d84ed6..c8a34bc 100644 --- a/meshtastic/apponly_pb2.pyi +++ b/meshtastic/protobuf/apponly_pb2.pyi @@ -2,23 +2,19 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message -import meshtastic.channel_pb2 -import meshtastic.config_pb2 -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import meshtastic.protobuf.channel_pb2 +import meshtastic.protobuf.config_pb2 +import typing DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class ChannelSet(google.protobuf.message.Message): """ This is the most compact possible representation for a set of channels. @@ -33,22 +29,24 @@ class ChannelSet(google.protobuf.message.Message): SETTINGS_FIELD_NUMBER: builtins.int LORA_CONFIG_FIELD_NUMBER: builtins.int @property - def settings(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[meshtastic.channel_pb2.ChannelSettings]: + def settings(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[meshtastic.protobuf.channel_pb2.ChannelSettings]: """ Channel list with settings """ + @property - def lora_config(self) -> meshtastic.config_pb2.Config.LoRaConfig: + def lora_config(self) -> meshtastic.protobuf.config_pb2.Config.LoRaConfig: """ LoRa config """ + def __init__( self, *, - settings: collections.abc.Iterable[meshtastic.channel_pb2.ChannelSettings] | None = ..., - lora_config: meshtastic.config_pb2.Config.LoRaConfig | None = ..., + settings: collections.abc.Iterable[meshtastic.protobuf.channel_pb2.ChannelSettings] | None = ..., + lora_config: meshtastic.protobuf.config_pb2.Config.LoRaConfig | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["lora_config", b"lora_config"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["lora_config", b"lora_config", "settings", b"settings"]) -> None: ... + def HasField(self, field_name: typing.Literal["lora_config", b"lora_config"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["lora_config", b"lora_config", "settings", b"settings"]) -> None: ... global___ChannelSet = ChannelSet diff --git a/meshtastic/protobuf/atak_pb2.py b/meshtastic/protobuf/atak_pb2.py new file mode 100644 index 0000000..aec03c3 --- /dev/null +++ b/meshtastic/protobuf/atak_pb2.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/atak.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emeshtastic/protobuf/atak.proto\x12\x13meshtastic.protobuf\"\x93\x02\n\tTAKPacket\x12\x15\n\ris_compressed\x18\x01 \x01(\x08\x12-\n\x07\x63ontact\x18\x02 \x01(\x0b\x32\x1c.meshtastic.protobuf.Contact\x12)\n\x05group\x18\x03 \x01(\x0b\x32\x1a.meshtastic.protobuf.Group\x12+\n\x06status\x18\x04 \x01(\x0b\x32\x1b.meshtastic.protobuf.Status\x12\'\n\x03pli\x18\x05 \x01(\x0b\x32\x18.meshtastic.protobuf.PLIH\x00\x12,\n\x04\x63hat\x18\x06 \x01(\x0b\x32\x1c.meshtastic.protobuf.GeoChatH\x00\x42\x11\n\x0fpayload_variant\"\\\n\x07GeoChat\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x02to\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bto_callsign\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x05\n\x03_toB\x0e\n\x0c_to_callsign\"_\n\x05Group\x12-\n\x04role\x18\x01 \x01(\x0e\x32\x1f.meshtastic.protobuf.MemberRole\x12\'\n\x04team\x18\x02 \x01(\x0e\x32\x19.meshtastic.protobuf.Team\"\x19\n\x06Status\x12\x0f\n\x07\x62\x61ttery\x18\x01 \x01(\r\"4\n\x07\x43ontact\x12\x10\n\x08\x63\x61llsign\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65vice_callsign\x18\x02 \x01(\t\"_\n\x03PLI\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\r\n\x05speed\x18\x04 \x01(\r\x12\x0e\n\x06\x63ourse\x18\x05 \x01(\r*\xc0\x01\n\x04Team\x12\x14\n\x10Unspecifed_Color\x10\x00\x12\t\n\x05White\x10\x01\x12\n\n\x06Yellow\x10\x02\x12\n\n\x06Orange\x10\x03\x12\x0b\n\x07Magenta\x10\x04\x12\x07\n\x03Red\x10\x05\x12\n\n\x06Maroon\x10\x06\x12\n\n\x06Purple\x10\x07\x12\r\n\tDark_Blue\x10\x08\x12\x08\n\x04\x42lue\x10\t\x12\x08\n\x04\x43yan\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*\x7f\n\nMemberRole\x12\x0e\n\nUnspecifed\x10\x00\x12\x0e\n\nTeamMember\x10\x01\x12\x0c\n\x08TeamLead\x10\x02\x12\x06\n\x02HQ\x10\x03\x12\n\n\x06Sniper\x10\x04\x12\t\n\x05Medic\x10\x05\x12\x13\n\x0f\x46orwardObserver\x10\x06\x12\x07\n\x03RTO\x10\x07\x12\x06\n\x02K9\x10\x08\x42_\n\x13\x63om.geeksville.meshB\nATAKProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.atak_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\nATAKProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_TEAM']._serialized_start=703 + _globals['_TEAM']._serialized_end=895 + _globals['_MEMBERROLE']._serialized_start=897 + _globals['_MEMBERROLE']._serialized_end=1024 + _globals['_TAKPACKET']._serialized_start=56 + _globals['_TAKPACKET']._serialized_end=331 + _globals['_GEOCHAT']._serialized_start=333 + _globals['_GEOCHAT']._serialized_end=425 + _globals['_GROUP']._serialized_start=427 + _globals['_GROUP']._serialized_end=522 + _globals['_STATUS']._serialized_start=524 + _globals['_STATUS']._serialized_end=549 + _globals['_CONTACT']._serialized_start=551 + _globals['_CONTACT']._serialized_end=603 + _globals['_PLI']._serialized_start=605 + _globals['_PLI']._serialized_end=700 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/atak_pb2.pyi b/meshtastic/protobuf/atak_pb2.pyi similarity index 81% rename from meshtastic/atak_pb2.pyi rename to meshtastic/protobuf/atak_pb2.pyi index 0cc35ef..4471e17 100644 --- a/meshtastic/atak_pb2.pyi +++ b/meshtastic/protobuf/atak_pb2.pyi @@ -2,6 +2,7 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.internal.enum_type_wrapper @@ -233,7 +234,7 @@ Doggo """ global___MemberRole = MemberRole -@typing_extensions.final +@typing.final class TAKPacket(google.protobuf.message.Message): """ Packets for the official ATAK Plugin @@ -256,26 +257,31 @@ class TAKPacket(google.protobuf.message.Message): """ The contact / callsign for ATAK user """ + @property def group(self) -> global___Group: """ The group for ATAK user """ + @property def status(self) -> global___Status: """ The status of the ATAK EUD """ + @property def pli(self) -> global___PLI: """ TAK position report """ + @property def chat(self) -> global___GeoChat: """ ATAK GeoChat message """ + def __init__( self, *, @@ -286,13 +292,13 @@ class TAKPacket(google.protobuf.message.Message): pli: global___PLI | None = ..., chat: global___GeoChat | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["chat", b"chat", "contact", b"contact", "group", b"group", "payload_variant", b"payload_variant", "pli", b"pli", "status", b"status"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["chat", b"chat", "contact", b"contact", "group", b"group", "is_compressed", b"is_compressed", "payload_variant", b"payload_variant", "pli", b"pli", "status", b"status"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["payload_variant", b"payload_variant"]) -> typing_extensions.Literal["pli", "chat"] | None: ... + def HasField(self, field_name: typing.Literal["chat", b"chat", "contact", b"contact", "group", b"group", "payload_variant", b"payload_variant", "pli", b"pli", "status", b"status"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["chat", b"chat", "contact", b"contact", "group", b"group", "is_compressed", b"is_compressed", "payload_variant", b"payload_variant", "pli", b"pli", "status", b"status"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["payload_variant", b"payload_variant"]) -> typing.Literal["pli", "chat"] | None: ... global___TAKPacket = TAKPacket -@typing_extensions.final +@typing.final class GeoChat(google.protobuf.message.Message): """ ATAK GeoChat message @@ -322,16 +328,16 @@ class GeoChat(google.protobuf.message.Message): to: builtins.str | None = ..., to_callsign: builtins.str | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_to", b"_to", "_to_callsign", b"_to_callsign", "to", b"to", "to_callsign", b"to_callsign"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_to", b"_to", "_to_callsign", b"_to_callsign", "message", b"message", "to", b"to", "to_callsign", b"to_callsign"]) -> None: ... + def HasField(self, field_name: typing.Literal["_to", b"_to", "_to_callsign", b"_to_callsign", "to", b"to", "to_callsign", b"to_callsign"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_to", b"_to", "_to_callsign", b"_to_callsign", "message", b"message", "to", b"to", "to_callsign", b"to_callsign"]) -> None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_to", b"_to"]) -> typing_extensions.Literal["to"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_to", b"_to"]) -> typing.Literal["to"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_to_callsign", b"_to_callsign"]) -> typing_extensions.Literal["to_callsign"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_to_callsign", b"_to_callsign"]) -> typing.Literal["to_callsign"] | None: ... global___GeoChat = GeoChat -@typing_extensions.final +@typing.final class Group(google.protobuf.message.Message): """ ATAK Group @@ -357,11 +363,11 @@ class Group(google.protobuf.message.Message): role: global___MemberRole.ValueType = ..., team: global___Team.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["role", b"role", "team", b"team"]) -> None: ... + def ClearField(self, field_name: typing.Literal["role", b"role", "team", b"team"]) -> None: ... global___Group = Group -@typing_extensions.final +@typing.final class Status(google.protobuf.message.Message): """ ATAK EUD Status @@ -380,11 +386,11 @@ class Status(google.protobuf.message.Message): *, battery: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["battery", b"battery"]) -> None: ... + def ClearField(self, field_name: typing.Literal["battery", b"battery"]) -> None: ... global___Status = Status -@typing_extensions.final +@typing.final class Contact(google.protobuf.message.Message): """ ATAK Contact @@ -411,11 +417,11 @@ class Contact(google.protobuf.message.Message): callsign: builtins.str = ..., device_callsign: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["callsign", b"callsign", "device_callsign", b"device_callsign"]) -> None: ... + def ClearField(self, field_name: typing.Literal["callsign", b"callsign", "device_callsign", b"device_callsign"]) -> None: ... global___Contact = Contact -@typing_extensions.final +@typing.final class PLI(google.protobuf.message.Message): """ Position Location Information from ATAK @@ -459,6 +465,6 @@ class PLI(google.protobuf.message.Message): speed: builtins.int = ..., course: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["altitude", b"altitude", "course", b"course", "latitude_i", b"latitude_i", "longitude_i", b"longitude_i", "speed", b"speed"]) -> None: ... + def ClearField(self, field_name: typing.Literal["altitude", b"altitude", "course", b"course", "latitude_i", b"latitude_i", "longitude_i", b"longitude_i", "speed", b"speed"]) -> None: ... global___PLI = PLI diff --git a/meshtastic/cannedmessages_pb2.py b/meshtastic/protobuf/cannedmessages_pb2.py similarity index 54% rename from meshtastic/cannedmessages_pb2.py rename to meshtastic/protobuf/cannedmessages_pb2.py index 058f3cf..2b32b47 100644 --- a/meshtastic/cannedmessages_pb2.py +++ b/meshtastic/protobuf/cannedmessages_pb2.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/cannedmessages.proto +# source: meshtastic/protobuf/cannedmessages.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -13,14 +13,14 @@ _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fmeshtastic/cannedmessages.proto\x12\nmeshtastic\"-\n\x19\x43\x61nnedMessageModuleConfig\x12\x10\n\x08messages\x18\x01 \x01(\tBn\n\x13\x63om.geeksville.meshB\x19\x43\x61nnedMessageConfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(meshtastic/protobuf/cannedmessages.proto\x12\x13meshtastic.protobuf\"-\n\x19\x43\x61nnedMessageModuleConfig\x12\x10\n\x08messages\x18\x01 \x01(\tBn\n\x13\x63om.geeksville.meshB\x19\x43\x61nnedMessageConfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.cannedmessages_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.cannedmessages_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\031CannedMessageConfigProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _CANNEDMESSAGEMODULECONFIG._serialized_start=47 - _CANNEDMESSAGEMODULECONFIG._serialized_end=92 + _globals['_CANNEDMESSAGEMODULECONFIG']._serialized_start=65 + _globals['_CANNEDMESSAGEMODULECONFIG']._serialized_end=110 # @@protoc_insertion_point(module_scope) diff --git a/meshtastic/cannedmessages_pb2.pyi b/meshtastic/protobuf/cannedmessages_pb2.pyi similarity index 74% rename from meshtastic/cannedmessages_pb2.pyi rename to meshtastic/protobuf/cannedmessages_pb2.pyi index 9ee96bd..33c5e2b 100644 --- a/meshtastic/cannedmessages_pb2.pyi +++ b/meshtastic/protobuf/cannedmessages_pb2.pyi @@ -2,19 +2,15 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.message -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import typing DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class CannedMessageModuleConfig(google.protobuf.message.Message): """ Canned message module configuration. @@ -32,6 +28,6 @@ class CannedMessageModuleConfig(google.protobuf.message.Message): *, messages: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["messages", b"messages"]) -> None: ... + def ClearField(self, field_name: typing.Literal["messages", b"messages"]) -> None: ... global___CannedMessageModuleConfig = CannedMessageModuleConfig diff --git a/meshtastic/protobuf/channel_pb2.py b/meshtastic/protobuf/channel_pb2.py new file mode 100644 index 0000000..0980137 --- /dev/null +++ b/meshtastic/protobuf/channel_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/channel.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!meshtastic/protobuf/channel.proto\x12\x13meshtastic.protobuf\"\xc1\x01\n\x0f\x43hannelSettings\x12\x17\n\x0b\x63hannel_num\x18\x01 \x01(\rB\x02\x18\x01\x12\x0b\n\x03psk\x18\x02 \x01(\x0c\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\n\n\x02id\x18\x04 \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x05 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x06 \x01(\x08\x12<\n\x0fmodule_settings\x18\x07 \x01(\x0b\x32#.meshtastic.protobuf.ModuleSettings\"E\n\x0eModuleSettings\x12\x1a\n\x12position_precision\x18\x01 \x01(\r\x12\x17\n\x0fis_client_muted\x18\x02 \x01(\x08\"\xb3\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\x05\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32$.meshtastic.protobuf.ChannelSettings\x12/\n\x04role\x18\x03 \x01(\x0e\x32!.meshtastic.protobuf.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\x42\x62\n\x13\x63om.geeksville.meshB\rChannelProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.channel_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\rChannelProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _CHANNELSETTINGS.fields_by_name['channel_num']._options = None + _CHANNELSETTINGS.fields_by_name['channel_num']._serialized_options = b'\030\001' + _globals['_CHANNELSETTINGS']._serialized_start=59 + _globals['_CHANNELSETTINGS']._serialized_end=252 + _globals['_MODULESETTINGS']._serialized_start=254 + _globals['_MODULESETTINGS']._serialized_end=323 + _globals['_CHANNEL']._serialized_start=326 + _globals['_CHANNEL']._serialized_end=505 + _globals['_CHANNEL_ROLE']._serialized_start=457 + _globals['_CHANNEL_ROLE']._serialized_end=505 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/channel_pb2.pyi b/meshtastic/protobuf/channel_pb2.pyi similarity index 91% rename from meshtastic/channel_pb2.pyi rename to meshtastic/protobuf/channel_pb2.pyi index ff23a5f..208ed7b 100644 --- a/meshtastic/channel_pb2.pyi +++ b/meshtastic/protobuf/channel_pb2.pyi @@ -2,6 +2,7 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.internal.enum_type_wrapper @@ -16,7 +17,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class ChannelSettings(google.protobuf.message.Message): """ This information can be encoded as a QRcode/url so that other users can configure @@ -100,6 +101,7 @@ class ChannelSettings(google.protobuf.message.Message): """ Per-channel module settings. """ + def __init__( self, *, @@ -111,12 +113,12 @@ class ChannelSettings(google.protobuf.message.Message): downlink_enabled: builtins.bool = ..., module_settings: global___ModuleSettings | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["module_settings", b"module_settings"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["channel_num", b"channel_num", "downlink_enabled", b"downlink_enabled", "id", b"id", "module_settings", b"module_settings", "name", b"name", "psk", b"psk", "uplink_enabled", b"uplink_enabled"]) -> None: ... + def HasField(self, field_name: typing.Literal["module_settings", b"module_settings"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["channel_num", b"channel_num", "downlink_enabled", b"downlink_enabled", "id", b"id", "module_settings", b"module_settings", "name", b"name", "psk", b"psk", "uplink_enabled", b"uplink_enabled"]) -> None: ... global___ChannelSettings = ChannelSettings -@typing_extensions.final +@typing.final class ModuleSettings(google.protobuf.message.Message): """ This message is specifically for modules to store per-channel configuration data. @@ -141,11 +143,11 @@ class ModuleSettings(google.protobuf.message.Message): position_precision: builtins.int = ..., is_client_muted: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["is_client_muted", b"is_client_muted", "position_precision", b"position_precision"]) -> None: ... + def ClearField(self, field_name: typing.Literal["is_client_muted", b"is_client_muted", "position_precision", b"position_precision"]) -> None: ... global___ModuleSettings = ModuleSettings -@typing_extensions.final +@typing.final class Channel(google.protobuf.message.Message): """ A pair of a channel number, mode and the (sharable) settings for that channel @@ -209,15 +211,16 @@ class Channel(google.protobuf.message.Message): (Someday - not currently implemented) An index of -1 could be used to mean "set by name", in which case the target node will find and set the channel by settings.name. """ + role: global___Channel.Role.ValueType + """ + TODO: REPLACE + """ @property def settings(self) -> global___ChannelSettings: """ The new settings, or NULL to disable that channel """ - role: global___Channel.Role.ValueType - """ - TODO: REPLACE - """ + def __init__( self, *, @@ -225,7 +228,7 @@ class Channel(google.protobuf.message.Message): settings: global___ChannelSettings | None = ..., role: global___Channel.Role.ValueType = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["settings", b"settings"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["index", b"index", "role", b"role", "settings", b"settings"]) -> None: ... + def HasField(self, field_name: typing.Literal["settings", b"settings"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["index", b"index", "role", b"role", "settings", b"settings"]) -> None: ... global___Channel = Channel diff --git a/meshtastic/protobuf/clientonly_pb2.py b/meshtastic/protobuf/clientonly_pb2.py new file mode 100644 index 0000000..702bca7 --- /dev/null +++ b/meshtastic/protobuf/clientonly_pb2.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/clientonly.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from meshtastic.protobuf import localonly_pb2 as meshtastic_dot_protobuf_dot_localonly__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$meshtastic/protobuf/clientonly.proto\x12\x13meshtastic.protobuf\x1a#meshtastic/protobuf/localonly.proto\"\x9f\x02\n\rDeviceProfile\x12\x16\n\tlong_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nshort_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x63hannel_url\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x35\n\x06\x63onfig\x18\x04 \x01(\x0b\x32 .meshtastic.protobuf.LocalConfigH\x03\x88\x01\x01\x12\x42\n\rmodule_config\x18\x05 \x01(\x0b\x32&.meshtastic.protobuf.LocalModuleConfigH\x04\x88\x01\x01\x42\x0c\n\n_long_nameB\r\n\x0b_short_nameB\x0e\n\x0c_channel_urlB\t\n\x07_configB\x10\n\x0e_module_configBe\n\x13\x63om.geeksville.meshB\x10\x43lientOnlyProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.clientonly_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\020ClientOnlyProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_DEVICEPROFILE']._serialized_start=99 + _globals['_DEVICEPROFILE']._serialized_end=386 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/protobuf/clientonly_pb2.pyi b/meshtastic/protobuf/clientonly_pb2.pyi new file mode 100644 index 0000000..7b3028c --- /dev/null +++ b/meshtastic/protobuf/clientonly_pb2.pyi @@ -0,0 +1,74 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import google.protobuf.descriptor +import google.protobuf.message +import meshtastic.protobuf.localonly_pb2 +import typing + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class DeviceProfile(google.protobuf.message.Message): + """ + This abstraction is used to contain any configuration for provisioning a node on any client. + It is useful for importing and exporting configurations. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LONG_NAME_FIELD_NUMBER: builtins.int + SHORT_NAME_FIELD_NUMBER: builtins.int + CHANNEL_URL_FIELD_NUMBER: builtins.int + CONFIG_FIELD_NUMBER: builtins.int + MODULE_CONFIG_FIELD_NUMBER: builtins.int + long_name: builtins.str + """ + Long name for the node + """ + short_name: builtins.str + """ + Short name of the node + """ + channel_url: builtins.str + """ + The url of the channels from our node + """ + @property + def config(self) -> meshtastic.protobuf.localonly_pb2.LocalConfig: + """ + The Config of the node + """ + + @property + def module_config(self) -> meshtastic.protobuf.localonly_pb2.LocalModuleConfig: + """ + The ModuleConfig of the node + """ + + def __init__( + self, + *, + long_name: builtins.str | None = ..., + short_name: builtins.str | None = ..., + channel_url: builtins.str | None = ..., + config: meshtastic.protobuf.localonly_pb2.LocalConfig | None = ..., + module_config: meshtastic.protobuf.localonly_pb2.LocalModuleConfig | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_channel_url", b"_channel_url", "_config", b"_config", "_long_name", b"_long_name", "_module_config", b"_module_config", "_short_name", b"_short_name", "channel_url", b"channel_url", "config", b"config", "long_name", b"long_name", "module_config", b"module_config", "short_name", b"short_name"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_channel_url", b"_channel_url", "_config", b"_config", "_long_name", b"_long_name", "_module_config", b"_module_config", "_short_name", b"_short_name", "channel_url", b"channel_url", "config", b"config", "long_name", b"long_name", "module_config", b"module_config", "short_name", b"short_name"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_channel_url", b"_channel_url"]) -> typing.Literal["channel_url"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_config", b"_config"]) -> typing.Literal["config"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_long_name", b"_long_name"]) -> typing.Literal["long_name"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_module_config", b"_module_config"]) -> typing.Literal["module_config"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_short_name", b"_short_name"]) -> typing.Literal["short_name"] | None: ... + +global___DeviceProfile = DeviceProfile diff --git a/meshtastic/protobuf/config_pb2.py b/meshtastic/protobuf/config_pb2.py new file mode 100644 index 0000000..c385527 --- /dev/null +++ b/meshtastic/protobuf/config_pb2.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/config.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n meshtastic/protobuf/config.proto\x12\x13meshtastic.protobuf\"\xed \n\x06\x43onfig\x12:\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32(.meshtastic.protobuf.Config.DeviceConfigH\x00\x12>\n\x08position\x18\x02 \x01(\x0b\x32*.meshtastic.protobuf.Config.PositionConfigH\x00\x12\x38\n\x05power\x18\x03 \x01(\x0b\x32\'.meshtastic.protobuf.Config.PowerConfigH\x00\x12<\n\x07network\x18\x04 \x01(\x0b\x32).meshtastic.protobuf.Config.NetworkConfigH\x00\x12<\n\x07\x64isplay\x18\x05 \x01(\x0b\x32).meshtastic.protobuf.Config.DisplayConfigH\x00\x12\x36\n\x04lora\x18\x06 \x01(\x0b\x32&.meshtastic.protobuf.Config.LoRaConfigH\x00\x12@\n\tbluetooth\x18\x07 \x01(\x0b\x32+.meshtastic.protobuf.Config.BluetoothConfigH\x00\x1a\xa3\x05\n\x0c\x44\x65viceConfig\x12;\n\x04role\x18\x01 \x01(\x0e\x32-.meshtastic.protobuf.Config.DeviceConfig.Role\x12\x16\n\x0eserial_enabled\x18\x02 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x03 \x01(\x08\x12\x13\n\x0b\x62utton_gpio\x18\x04 \x01(\r\x12\x13\n\x0b\x62uzzer_gpio\x18\x05 \x01(\r\x12R\n\x10rebroadcast_mode\x18\x06 \x01(\x0e\x32\x38.meshtastic.protobuf.Config.DeviceConfig.RebroadcastMode\x12 \n\x18node_info_broadcast_secs\x18\x07 \x01(\r\x12\"\n\x1a\x64ouble_tap_as_button_press\x18\x08 \x01(\x08\x12\x12\n\nis_managed\x18\t \x01(\x08\x12\x1c\n\x14\x64isable_triple_click\x18\n \x01(\x08\x12\r\n\x05tzdef\x18\x0b \x01(\t\x12\x1e\n\x16led_heartbeat_disabled\x18\x0c \x01(\x08\"\xaa\x01\n\x04Role\x12\n\n\x06\x43LIENT\x10\x00\x12\x0f\n\x0b\x43LIENT_MUTE\x10\x01\x12\n\n\x06ROUTER\x10\x02\x12\x11\n\rROUTER_CLIENT\x10\x03\x12\x0c\n\x08REPEATER\x10\x04\x12\x0b\n\x07TRACKER\x10\x05\x12\n\n\x06SENSOR\x10\x06\x12\x07\n\x03TAK\x10\x07\x12\x11\n\rCLIENT_HIDDEN\x10\x08\x12\x12\n\x0eLOST_AND_FOUND\x10\t\x12\x0f\n\x0bTAK_TRACKER\x10\n\"Q\n\x0fRebroadcastMode\x12\x07\n\x03\x41LL\x10\x00\x12\x15\n\x11\x41LL_SKIP_DECODING\x10\x01\x12\x0e\n\nLOCAL_ONLY\x10\x02\x12\x0e\n\nKNOWN_ONLY\x10\x03\x1a\x9a\x05\n\x0ePositionConfig\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12(\n position_broadcast_smart_enabled\x18\x02 \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\x03 \x01(\x08\x12\x17\n\x0bgps_enabled\x18\x04 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x13gps_update_interval\x18\x05 \x01(\r\x12\x1c\n\x10gps_attempt_time\x18\x06 \x01(\rB\x02\x18\x01\x12\x16\n\x0eposition_flags\x18\x07 \x01(\r\x12\x0f\n\x07rx_gpio\x18\x08 \x01(\r\x12\x0f\n\x07tx_gpio\x18\t \x01(\r\x12(\n broadcast_smart_minimum_distance\x18\n \x01(\r\x12-\n%broadcast_smart_minimum_interval_secs\x18\x0b \x01(\r\x12\x13\n\x0bgps_en_gpio\x18\x0c \x01(\r\x12\x44\n\x08gps_mode\x18\r \x01(\x0e\x32\x32.meshtastic.protobuf.Config.PositionConfig.GpsMode\"\xab\x01\n\rPositionFlags\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x41LTITUDE\x10\x01\x12\x10\n\x0c\x41LTITUDE_MSL\x10\x02\x12\x16\n\x12GEOIDAL_SEPARATION\x10\x04\x12\x07\n\x03\x44OP\x10\x08\x12\t\n\x05HVDOP\x10\x10\x12\r\n\tSATINVIEW\x10 \x12\n\n\x06SEQ_NO\x10@\x12\x0e\n\tTIMESTAMP\x10\x80\x01\x12\x0c\n\x07HEADING\x10\x80\x02\x12\n\n\x05SPEED\x10\x80\x04\"5\n\x07GpsMode\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0f\n\x0bNOT_PRESENT\x10\x02\x1a\xea\x01\n\x0bPowerConfig\x12\x17\n\x0fis_power_saving\x18\x01 \x01(\x08\x12&\n\x1eon_battery_shutdown_after_secs\x18\x02 \x01(\r\x12\x1f\n\x17\x61\x64\x63_multiplier_override\x18\x03 \x01(\x02\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x10\n\x08sds_secs\x18\x06 \x01(\r\x12\x0f\n\x07ls_secs\x18\x07 \x01(\r\x12\x15\n\rmin_wake_secs\x18\x08 \x01(\r\x12\"\n\x1a\x64\x65vice_battery_ina_address\x18\t \x01(\r\x1a\x90\x03\n\rNetworkConfig\x12\x14\n\x0cwifi_enabled\x18\x01 \x01(\x08\x12\x11\n\twifi_ssid\x18\x03 \x01(\t\x12\x10\n\x08wifi_psk\x18\x04 \x01(\t\x12\x12\n\nntp_server\x18\x05 \x01(\t\x12\x13\n\x0b\x65th_enabled\x18\x06 \x01(\x08\x12K\n\x0c\x61\x64\x64ress_mode\x18\x07 \x01(\x0e\x32\x35.meshtastic.protobuf.Config.NetworkConfig.AddressMode\x12I\n\x0bipv4_config\x18\x08 \x01(\x0b\x32\x34.meshtastic.protobuf.Config.NetworkConfig.IpV4Config\x12\x16\n\x0ersyslog_server\x18\t \x01(\t\x1a\x46\n\nIpV4Config\x12\n\n\x02ip\x18\x01 \x01(\x07\x12\x0f\n\x07gateway\x18\x02 \x01(\x07\x12\x0e\n\x06subnet\x18\x03 \x01(\x07\x12\x0b\n\x03\x64ns\x18\x04 \x01(\x07\"#\n\x0b\x41\x64\x64ressMode\x12\x08\n\x04\x44HCP\x10\x00\x12\n\n\x06STATIC\x10\x01\x1a\xe2\x05\n\rDisplayConfig\x12\x16\n\x0escreen_on_secs\x18\x01 \x01(\r\x12Q\n\ngps_format\x18\x02 \x01(\x0e\x32=.meshtastic.protobuf.Config.DisplayConfig.GpsCoordinateFormat\x12!\n\x19\x61uto_screen_carousel_secs\x18\x03 \x01(\r\x12\x19\n\x11\x63ompass_north_top\x18\x04 \x01(\x08\x12\x13\n\x0b\x66lip_screen\x18\x05 \x01(\x08\x12\x45\n\x05units\x18\x06 \x01(\x0e\x32\x36.meshtastic.protobuf.Config.DisplayConfig.DisplayUnits\x12@\n\x04oled\x18\x07 \x01(\x0e\x32\x32.meshtastic.protobuf.Config.DisplayConfig.OledType\x12J\n\x0b\x64isplaymode\x18\x08 \x01(\x0e\x32\x35.meshtastic.protobuf.Config.DisplayConfig.DisplayMode\x12\x14\n\x0cheading_bold\x18\t \x01(\x08\x12\x1d\n\x15wake_on_tap_or_motion\x18\n \x01(\x08\"M\n\x13GpsCoordinateFormat\x12\x07\n\x03\x44\x45\x43\x10\x00\x12\x07\n\x03\x44MS\x10\x01\x12\x07\n\x03UTM\x10\x02\x12\x08\n\x04MGRS\x10\x03\x12\x07\n\x03OLC\x10\x04\x12\x08\n\x04OSGR\x10\x05\"(\n\x0c\x44isplayUnits\x12\n\n\x06METRIC\x10\x00\x12\x0c\n\x08IMPERIAL\x10\x01\"M\n\x08OledType\x12\r\n\tOLED_AUTO\x10\x00\x12\x10\n\x0cOLED_SSD1306\x10\x01\x12\x0f\n\x0bOLED_SH1106\x10\x02\x12\x0f\n\x0bOLED_SH1107\x10\x03\"A\n\x0b\x44isplayMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08TWOCOLOR\x10\x01\x12\x0c\n\x08INVERTED\x10\x02\x12\t\n\x05\x43OLOR\x10\x03\x1a\xc2\x06\n\nLoRaConfig\x12\x12\n\nuse_preset\x18\x01 \x01(\x08\x12H\n\x0cmodem_preset\x18\x02 \x01(\x0e\x32\x32.meshtastic.protobuf.Config.LoRaConfig.ModemPreset\x12\x11\n\tbandwidth\x18\x03 \x01(\r\x12\x15\n\rspread_factor\x18\x04 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x05 \x01(\r\x12\x18\n\x10\x66requency_offset\x18\x06 \x01(\x02\x12\x41\n\x06region\x18\x07 \x01(\x0e\x32\x31.meshtastic.protobuf.Config.LoRaConfig.RegionCode\x12\x11\n\thop_limit\x18\x08 \x01(\r\x12\x12\n\ntx_enabled\x18\t \x01(\x08\x12\x10\n\x08tx_power\x18\n \x01(\x05\x12\x13\n\x0b\x63hannel_num\x18\x0b \x01(\r\x12\x1b\n\x13override_duty_cycle\x18\x0c \x01(\x08\x12\x1e\n\x16sx126x_rx_boosted_gain\x18\r \x01(\x08\x12\x1a\n\x12override_frequency\x18\x0e \x01(\x02\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x13\n\x0bignore_mqtt\x18h \x01(\x08\"\xcd\x01\n\nRegionCode\x12\t\n\x05UNSET\x10\x00\x12\x06\n\x02US\x10\x01\x12\n\n\x06\x45U_433\x10\x02\x12\n\n\x06\x45U_868\x10\x03\x12\x06\n\x02\x43N\x10\x04\x12\x06\n\x02JP\x10\x05\x12\x07\n\x03\x41NZ\x10\x06\x12\x06\n\x02KR\x10\x07\x12\x06\n\x02TW\x10\x08\x12\x06\n\x02RU\x10\t\x12\x06\n\x02IN\x10\n\x12\n\n\x06NZ_865\x10\x0b\x12\x06\n\x02TH\x10\x0c\x12\x0b\n\x07LORA_24\x10\r\x12\n\n\x06UA_433\x10\x0e\x12\n\n\x06UA_868\x10\x0f\x12\n\n\x06MY_433\x10\x10\x12\n\n\x06MY_919\x10\x11\x12\n\n\x06SG_923\x10\x12\"\x94\x01\n\x0bModemPreset\x12\r\n\tLONG_FAST\x10\x00\x12\r\n\tLONG_SLOW\x10\x01\x12\x12\n\x0eVERY_LONG_SLOW\x10\x02\x12\x0f\n\x0bMEDIUM_SLOW\x10\x03\x12\x0f\n\x0bMEDIUM_FAST\x10\x04\x12\x0e\n\nSHORT_SLOW\x10\x05\x12\x0e\n\nSHORT_FAST\x10\x06\x12\x11\n\rLONG_MODERATE\x10\x07\x1a\xb6\x01\n\x0f\x42luetoothConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x45\n\x04mode\x18\x02 \x01(\x0e\x32\x37.meshtastic.protobuf.Config.BluetoothConfig.PairingMode\x12\x11\n\tfixed_pin\x18\x03 \x01(\r\"8\n\x0bPairingMode\x12\x0e\n\nRANDOM_PIN\x10\x00\x12\r\n\tFIXED_PIN\x10\x01\x12\n\n\x06NO_PIN\x10\x02\x42\x11\n\x0fpayload_variantBa\n\x13\x63om.geeksville.meshB\x0c\x43onfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.config_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\014ConfigProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _CONFIG_POSITIONCONFIG.fields_by_name['gps_enabled']._options = None + _CONFIG_POSITIONCONFIG.fields_by_name['gps_enabled']._serialized_options = b'\030\001' + _CONFIG_POSITIONCONFIG.fields_by_name['gps_attempt_time']._options = None + _CONFIG_POSITIONCONFIG.fields_by_name['gps_attempt_time']._serialized_options = b'\030\001' + _globals['_CONFIG']._serialized_start=58 + _globals['_CONFIG']._serialized_end=4263 + _globals['_CONFIG_DEVICECONFIG']._serialized_start=497 + _globals['_CONFIG_DEVICECONFIG']._serialized_end=1172 + _globals['_CONFIG_DEVICECONFIG_ROLE']._serialized_start=919 + _globals['_CONFIG_DEVICECONFIG_ROLE']._serialized_end=1089 + _globals['_CONFIG_DEVICECONFIG_REBROADCASTMODE']._serialized_start=1091 + _globals['_CONFIG_DEVICECONFIG_REBROADCASTMODE']._serialized_end=1172 + _globals['_CONFIG_POSITIONCONFIG']._serialized_start=1175 + _globals['_CONFIG_POSITIONCONFIG']._serialized_end=1841 + _globals['_CONFIG_POSITIONCONFIG_POSITIONFLAGS']._serialized_start=1615 + _globals['_CONFIG_POSITIONCONFIG_POSITIONFLAGS']._serialized_end=1786 + _globals['_CONFIG_POSITIONCONFIG_GPSMODE']._serialized_start=1788 + _globals['_CONFIG_POSITIONCONFIG_GPSMODE']._serialized_end=1841 + _globals['_CONFIG_POWERCONFIG']._serialized_start=1844 + _globals['_CONFIG_POWERCONFIG']._serialized_end=2078 + _globals['_CONFIG_NETWORKCONFIG']._serialized_start=2081 + _globals['_CONFIG_NETWORKCONFIG']._serialized_end=2481 + _globals['_CONFIG_NETWORKCONFIG_IPV4CONFIG']._serialized_start=2374 + _globals['_CONFIG_NETWORKCONFIG_IPV4CONFIG']._serialized_end=2444 + _globals['_CONFIG_NETWORKCONFIG_ADDRESSMODE']._serialized_start=2446 + _globals['_CONFIG_NETWORKCONFIG_ADDRESSMODE']._serialized_end=2481 + _globals['_CONFIG_DISPLAYCONFIG']._serialized_start=2484 + _globals['_CONFIG_DISPLAYCONFIG']._serialized_end=3222 + _globals['_CONFIG_DISPLAYCONFIG_GPSCOORDINATEFORMAT']._serialized_start=2957 + _globals['_CONFIG_DISPLAYCONFIG_GPSCOORDINATEFORMAT']._serialized_end=3034 + _globals['_CONFIG_DISPLAYCONFIG_DISPLAYUNITS']._serialized_start=3036 + _globals['_CONFIG_DISPLAYCONFIG_DISPLAYUNITS']._serialized_end=3076 + _globals['_CONFIG_DISPLAYCONFIG_OLEDTYPE']._serialized_start=3078 + _globals['_CONFIG_DISPLAYCONFIG_OLEDTYPE']._serialized_end=3155 + _globals['_CONFIG_DISPLAYCONFIG_DISPLAYMODE']._serialized_start=3157 + _globals['_CONFIG_DISPLAYCONFIG_DISPLAYMODE']._serialized_end=3222 + _globals['_CONFIG_LORACONFIG']._serialized_start=3225 + _globals['_CONFIG_LORACONFIG']._serialized_end=4059 + _globals['_CONFIG_LORACONFIG_REGIONCODE']._serialized_start=3703 + _globals['_CONFIG_LORACONFIG_REGIONCODE']._serialized_end=3908 + _globals['_CONFIG_LORACONFIG_MODEMPRESET']._serialized_start=3911 + _globals['_CONFIG_LORACONFIG_MODEMPRESET']._serialized_end=4059 + _globals['_CONFIG_BLUETOOTHCONFIG']._serialized_start=4062 + _globals['_CONFIG_BLUETOOTHCONFIG']._serialized_end=4244 + _globals['_CONFIG_BLUETOOTHCONFIG_PAIRINGMODE']._serialized_start=4188 + _globals['_CONFIG_BLUETOOTHCONFIG_PAIRINGMODE']._serialized_end=4244 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/config_pb2.pyi b/meshtastic/protobuf/config_pb2.pyi similarity index 93% rename from meshtastic/config_pb2.pyi rename to meshtastic/protobuf/config_pb2.pyi index 4e864f0..49d64de 100644 --- a/meshtastic/config_pb2.pyi +++ b/meshtastic/protobuf/config_pb2.pyi @@ -2,6 +2,7 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import collections.abc import google.protobuf.descriptor @@ -18,11 +19,11 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class Config(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class DeviceConfig(google.protobuf.message.Message): """ Configuration @@ -315,9 +316,9 @@ class Config(google.protobuf.message.Message): tzdef: builtins.str = ..., led_heartbeat_disabled: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["button_gpio", b"button_gpio", "buzzer_gpio", b"buzzer_gpio", "debug_log_enabled", b"debug_log_enabled", "disable_triple_click", b"disable_triple_click", "double_tap_as_button_press", b"double_tap_as_button_press", "is_managed", b"is_managed", "led_heartbeat_disabled", b"led_heartbeat_disabled", "node_info_broadcast_secs", b"node_info_broadcast_secs", "rebroadcast_mode", b"rebroadcast_mode", "role", b"role", "serial_enabled", b"serial_enabled", "tzdef", b"tzdef"]) -> None: ... + def ClearField(self, field_name: typing.Literal["button_gpio", b"button_gpio", "buzzer_gpio", b"buzzer_gpio", "debug_log_enabled", b"debug_log_enabled", "disable_triple_click", b"disable_triple_click", "double_tap_as_button_press", b"double_tap_as_button_press", "is_managed", b"is_managed", "led_heartbeat_disabled", b"led_heartbeat_disabled", "node_info_broadcast_secs", b"node_info_broadcast_secs", "rebroadcast_mode", b"rebroadcast_mode", "role", b"role", "serial_enabled", b"serial_enabled", "tzdef", b"tzdef"]) -> None: ... - @typing_extensions.final + @typing.final class PositionConfig(google.protobuf.message.Message): """ Position Config @@ -560,9 +561,9 @@ class Config(google.protobuf.message.Message): gps_en_gpio: builtins.int = ..., gps_mode: global___Config.PositionConfig.GpsMode.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["broadcast_smart_minimum_distance", b"broadcast_smart_minimum_distance", "broadcast_smart_minimum_interval_secs", b"broadcast_smart_minimum_interval_secs", "fixed_position", b"fixed_position", "gps_attempt_time", b"gps_attempt_time", "gps_en_gpio", b"gps_en_gpio", "gps_enabled", b"gps_enabled", "gps_mode", b"gps_mode", "gps_update_interval", b"gps_update_interval", "position_broadcast_secs", b"position_broadcast_secs", "position_broadcast_smart_enabled", b"position_broadcast_smart_enabled", "position_flags", b"position_flags", "rx_gpio", b"rx_gpio", "tx_gpio", b"tx_gpio"]) -> None: ... + def ClearField(self, field_name: typing.Literal["broadcast_smart_minimum_distance", b"broadcast_smart_minimum_distance", "broadcast_smart_minimum_interval_secs", b"broadcast_smart_minimum_interval_secs", "fixed_position", b"fixed_position", "gps_attempt_time", b"gps_attempt_time", "gps_en_gpio", b"gps_en_gpio", "gps_enabled", b"gps_enabled", "gps_mode", b"gps_mode", "gps_update_interval", b"gps_update_interval", "position_broadcast_secs", b"position_broadcast_secs", "position_broadcast_smart_enabled", b"position_broadcast_smart_enabled", "position_flags", b"position_flags", "rx_gpio", b"rx_gpio", "tx_gpio", b"tx_gpio"]) -> None: ... - @typing_extensions.final + @typing.final class PowerConfig(google.protobuf.message.Message): """ Power Config\\ @@ -634,9 +635,9 @@ class Config(google.protobuf.message.Message): min_wake_secs: builtins.int = ..., device_battery_ina_address: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["adc_multiplier_override", b"adc_multiplier_override", "device_battery_ina_address", b"device_battery_ina_address", "is_power_saving", b"is_power_saving", "ls_secs", b"ls_secs", "min_wake_secs", b"min_wake_secs", "on_battery_shutdown_after_secs", b"on_battery_shutdown_after_secs", "sds_secs", b"sds_secs", "wait_bluetooth_secs", b"wait_bluetooth_secs"]) -> None: ... + def ClearField(self, field_name: typing.Literal["adc_multiplier_override", b"adc_multiplier_override", "device_battery_ina_address", b"device_battery_ina_address", "is_power_saving", b"is_power_saving", "ls_secs", b"ls_secs", "min_wake_secs", b"min_wake_secs", "on_battery_shutdown_after_secs", b"on_battery_shutdown_after_secs", "sds_secs", b"sds_secs", "wait_bluetooth_secs", b"wait_bluetooth_secs"]) -> None: ... - @typing_extensions.final + @typing.final class NetworkConfig(google.protobuf.message.Message): """ Network Config @@ -669,7 +670,7 @@ class Config(google.protobuf.message.Message): use static ip address """ - @typing_extensions.final + @typing.final class IpV4Config(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -701,7 +702,7 @@ class Config(google.protobuf.message.Message): subnet: builtins.int = ..., dns: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["dns", b"dns", "gateway", b"gateway", "ip", b"ip", "subnet", b"subnet"]) -> None: ... + def ClearField(self, field_name: typing.Literal["dns", b"dns", "gateway", b"gateway", "ip", b"ip", "subnet", b"subnet"]) -> None: ... WIFI_ENABLED_FIELD_NUMBER: builtins.int WIFI_SSID_FIELD_NUMBER: builtins.int @@ -736,15 +737,16 @@ class Config(google.protobuf.message.Message): """ acquire an address via DHCP or assign static """ + rsyslog_server: builtins.str + """ + rsyslog Server and Port + """ @property def ipv4_config(self) -> global___Config.NetworkConfig.IpV4Config: """ struct to keep static address """ - rsyslog_server: builtins.str - """ - rsyslog Server and Port - """ + def __init__( self, *, @@ -757,10 +759,10 @@ class Config(google.protobuf.message.Message): ipv4_config: global___Config.NetworkConfig.IpV4Config | None = ..., rsyslog_server: builtins.str = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["ipv4_config", b"ipv4_config"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["address_mode", b"address_mode", "eth_enabled", b"eth_enabled", "ipv4_config", b"ipv4_config", "ntp_server", b"ntp_server", "rsyslog_server", b"rsyslog_server", "wifi_enabled", b"wifi_enabled", "wifi_psk", b"wifi_psk", "wifi_ssid", b"wifi_ssid"]) -> None: ... + def HasField(self, field_name: typing.Literal["ipv4_config", b"ipv4_config"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["address_mode", b"address_mode", "eth_enabled", b"eth_enabled", "ipv4_config", b"ipv4_config", "ntp_server", b"ntp_server", "rsyslog_server", b"rsyslog_server", "wifi_enabled", b"wifi_enabled", "wifi_psk", b"wifi_psk", "wifi_ssid", b"wifi_ssid"]) -> None: ... - @typing_extensions.final + @typing.final class DisplayConfig(google.protobuf.message.Message): """ Display Config @@ -1025,9 +1027,9 @@ class Config(google.protobuf.message.Message): heading_bold: builtins.bool = ..., wake_on_tap_or_motion: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["auto_screen_carousel_secs", b"auto_screen_carousel_secs", "compass_north_top", b"compass_north_top", "displaymode", b"displaymode", "flip_screen", b"flip_screen", "gps_format", b"gps_format", "heading_bold", b"heading_bold", "oled", b"oled", "screen_on_secs", b"screen_on_secs", "units", b"units", "wake_on_tap_or_motion", b"wake_on_tap_or_motion"]) -> None: ... + def ClearField(self, field_name: typing.Literal["auto_screen_carousel_secs", b"auto_screen_carousel_secs", "compass_north_top", b"compass_north_top", "displaymode", b"displaymode", "flip_screen", b"flip_screen", "gps_format", b"gps_format", "heading_bold", b"heading_bold", "oled", b"oled", "screen_on_secs", b"screen_on_secs", "units", b"units", "wake_on_tap_or_motion", b"wake_on_tap_or_motion"]) -> None: ... - @typing_extensions.final + @typing.final class LoRaConfig(google.protobuf.message.Message): """ Lora Config @@ -1375,6 +1377,10 @@ class Config(google.protobuf.message.Message): Please respect your local laws and regulations. If you are a HAM, make sure you enable HAM mode and turn off encryption. """ + ignore_mqtt: builtins.bool + """ + If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it. + """ @property def ignore_incoming(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: """ @@ -1382,10 +1388,7 @@ class Config(google.protobuf.message.Message): particular other nodes (simulating radio out of range). All nodenums listed in ignore_incoming will have packets they send dropped on receive (by router.cpp) """ - ignore_mqtt: builtins.bool - """ - If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it. - """ + def __init__( self, *, @@ -1406,9 +1409,9 @@ class Config(google.protobuf.message.Message): ignore_incoming: collections.abc.Iterable[builtins.int] | None = ..., ignore_mqtt: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["bandwidth", b"bandwidth", "channel_num", b"channel_num", "coding_rate", b"coding_rate", "frequency_offset", b"frequency_offset", "hop_limit", b"hop_limit", "ignore_incoming", b"ignore_incoming", "ignore_mqtt", b"ignore_mqtt", "modem_preset", b"modem_preset", "override_duty_cycle", b"override_duty_cycle", "override_frequency", b"override_frequency", "region", b"region", "spread_factor", b"spread_factor", "sx126x_rx_boosted_gain", b"sx126x_rx_boosted_gain", "tx_enabled", b"tx_enabled", "tx_power", b"tx_power", "use_preset", b"use_preset"]) -> None: ... + def ClearField(self, field_name: typing.Literal["bandwidth", b"bandwidth", "channel_num", b"channel_num", "coding_rate", b"coding_rate", "frequency_offset", b"frequency_offset", "hop_limit", b"hop_limit", "ignore_incoming", b"ignore_incoming", "ignore_mqtt", b"ignore_mqtt", "modem_preset", b"modem_preset", "override_duty_cycle", b"override_duty_cycle", "override_frequency", b"override_frequency", "region", b"region", "spread_factor", b"spread_factor", "sx126x_rx_boosted_gain", b"sx126x_rx_boosted_gain", "tx_enabled", b"tx_enabled", "tx_power", b"tx_power", "use_preset", b"use_preset"]) -> None: ... - @typing_extensions.final + @typing.final class BluetoothConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1467,7 +1470,7 @@ class Config(google.protobuf.message.Message): mode: global___Config.BluetoothConfig.PairingMode.ValueType = ..., fixed_pin: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["enabled", b"enabled", "fixed_pin", b"fixed_pin", "mode", b"mode"]) -> None: ... + def ClearField(self, field_name: typing.Literal["enabled", b"enabled", "fixed_pin", b"fixed_pin", "mode", b"mode"]) -> None: ... DEVICE_FIELD_NUMBER: builtins.int POSITION_FIELD_NUMBER: builtins.int @@ -1501,8 +1504,8 @@ class Config(google.protobuf.message.Message): lora: global___Config.LoRaConfig | None = ..., bluetooth: global___Config.BluetoothConfig | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["bluetooth", b"bluetooth", "device", b"device", "display", b"display", "lora", b"lora", "network", b"network", "payload_variant", b"payload_variant", "position", b"position", "power", b"power"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["bluetooth", b"bluetooth", "device", b"device", "display", b"display", "lora", b"lora", "network", b"network", "payload_variant", b"payload_variant", "position", b"position", "power", b"power"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["payload_variant", b"payload_variant"]) -> typing_extensions.Literal["device", "position", "power", "network", "display", "lora", "bluetooth"] | None: ... + def HasField(self, field_name: typing.Literal["bluetooth", b"bluetooth", "device", b"device", "display", b"display", "lora", b"lora", "network", b"network", "payload_variant", b"payload_variant", "position", b"position", "power", b"power"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["bluetooth", b"bluetooth", "device", b"device", "display", b"display", "lora", b"lora", "network", b"network", "payload_variant", b"payload_variant", "position", b"position", "power", b"power"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["payload_variant", b"payload_variant"]) -> typing.Literal["device", "position", "power", "network", "display", "lora", "bluetooth"] | None: ... global___Config = Config diff --git a/meshtastic/protobuf/connection_status_pb2.py b/meshtastic/protobuf/connection_status_pb2.py new file mode 100644 index 0000000..f5dfa33 --- /dev/null +++ b/meshtastic/protobuf/connection_status_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/connection_status.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n+meshtastic/protobuf/connection_status.proto\x12\x13meshtastic.protobuf\"\xd5\x02\n\x16\x44\x65viceConnectionStatus\x12<\n\x04wifi\x18\x01 \x01(\x0b\x32).meshtastic.protobuf.WifiConnectionStatusH\x00\x88\x01\x01\x12\x44\n\x08\x65thernet\x18\x02 \x01(\x0b\x32-.meshtastic.protobuf.EthernetConnectionStatusH\x01\x88\x01\x01\x12\x46\n\tbluetooth\x18\x03 \x01(\x0b\x32..meshtastic.protobuf.BluetoothConnectionStatusH\x02\x88\x01\x01\x12@\n\x06serial\x18\x04 \x01(\x0b\x32+.meshtastic.protobuf.SerialConnectionStatusH\x03\x88\x01\x01\x42\x07\n\x05_wifiB\x0b\n\t_ethernetB\x0c\n\n_bluetoothB\t\n\x07_serial\"p\n\x14WifiConnectionStatus\x12<\n\x06status\x18\x01 \x01(\x0b\x32,.meshtastic.protobuf.NetworkConnectionStatus\x12\x0c\n\x04ssid\x18\x02 \x01(\t\x12\x0c\n\x04rssi\x18\x03 \x01(\x05\"X\n\x18\x45thernetConnectionStatus\x12<\n\x06status\x18\x01 \x01(\x0b\x32,.meshtastic.protobuf.NetworkConnectionStatus\"{\n\x17NetworkConnectionStatus\x12\x12\n\nip_address\x18\x01 \x01(\x07\x12\x14\n\x0cis_connected\x18\x02 \x01(\x08\x12\x19\n\x11is_mqtt_connected\x18\x03 \x01(\x08\x12\x1b\n\x13is_syslog_connected\x18\x04 \x01(\x08\"L\n\x19\x42luetoothConnectionStatus\x12\x0b\n\x03pin\x18\x01 \x01(\r\x12\x0c\n\x04rssi\x18\x02 \x01(\x05\x12\x14\n\x0cis_connected\x18\x03 \x01(\x08\"<\n\x16SerialConnectionStatus\x12\x0c\n\x04\x62\x61ud\x18\x01 \x01(\r\x12\x14\n\x0cis_connected\x18\x02 \x01(\x08\x42\x65\n\x13\x63om.geeksville.meshB\x10\x43onnStatusProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.connection_status_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\020ConnStatusProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_DEVICECONNECTIONSTATUS']._serialized_start=69 + _globals['_DEVICECONNECTIONSTATUS']._serialized_end=410 + _globals['_WIFICONNECTIONSTATUS']._serialized_start=412 + _globals['_WIFICONNECTIONSTATUS']._serialized_end=524 + _globals['_ETHERNETCONNECTIONSTATUS']._serialized_start=526 + _globals['_ETHERNETCONNECTIONSTATUS']._serialized_end=614 + _globals['_NETWORKCONNECTIONSTATUS']._serialized_start=616 + _globals['_NETWORKCONNECTIONSTATUS']._serialized_end=739 + _globals['_BLUETOOTHCONNECTIONSTATUS']._serialized_start=741 + _globals['_BLUETOOTHCONNECTIONSTATUS']._serialized_end=817 + _globals['_SERIALCONNECTIONSTATUS']._serialized_start=819 + _globals['_SERIALCONNECTIONSTATUS']._serialized_end=879 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/connection_status_pb2.pyi b/meshtastic/protobuf/connection_status_pb2.pyi similarity index 69% rename from meshtastic/connection_status_pb2.pyi rename to meshtastic/protobuf/connection_status_pb2.pyi index 1e56ba3..7b69140 100644 --- a/meshtastic/connection_status_pb2.pyi +++ b/meshtastic/protobuf/connection_status_pb2.pyi @@ -2,20 +2,15 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.message -import sys import typing -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class DeviceConnectionStatus(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -28,21 +23,25 @@ class DeviceConnectionStatus(google.protobuf.message.Message): """ WiFi Status """ + @property def ethernet(self) -> global___EthernetConnectionStatus: """ WiFi Status """ + @property def bluetooth(self) -> global___BluetoothConnectionStatus: """ Bluetooth Status """ + @property def serial(self) -> global___SerialConnectionStatus: """ Serial Status """ + def __init__( self, *, @@ -51,20 +50,20 @@ class DeviceConnectionStatus(google.protobuf.message.Message): bluetooth: global___BluetoothConnectionStatus | None = ..., serial: global___SerialConnectionStatus | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_bluetooth", b"_bluetooth", "_ethernet", b"_ethernet", "_serial", b"_serial", "_wifi", b"_wifi", "bluetooth", b"bluetooth", "ethernet", b"ethernet", "serial", b"serial", "wifi", b"wifi"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_bluetooth", b"_bluetooth", "_ethernet", b"_ethernet", "_serial", b"_serial", "_wifi", b"_wifi", "bluetooth", b"bluetooth", "ethernet", b"ethernet", "serial", b"serial", "wifi", b"wifi"]) -> None: ... + def HasField(self, field_name: typing.Literal["_bluetooth", b"_bluetooth", "_ethernet", b"_ethernet", "_serial", b"_serial", "_wifi", b"_wifi", "bluetooth", b"bluetooth", "ethernet", b"ethernet", "serial", b"serial", "wifi", b"wifi"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_bluetooth", b"_bluetooth", "_ethernet", b"_ethernet", "_serial", b"_serial", "_wifi", b"_wifi", "bluetooth", b"bluetooth", "ethernet", b"ethernet", "serial", b"serial", "wifi", b"wifi"]) -> None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_bluetooth", b"_bluetooth"]) -> typing_extensions.Literal["bluetooth"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_bluetooth", b"_bluetooth"]) -> typing.Literal["bluetooth"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_ethernet", b"_ethernet"]) -> typing_extensions.Literal["ethernet"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_ethernet", b"_ethernet"]) -> typing.Literal["ethernet"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_serial", b"_serial"]) -> typing_extensions.Literal["serial"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_serial", b"_serial"]) -> typing.Literal["serial"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_wifi", b"_wifi"]) -> typing_extensions.Literal["wifi"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_wifi", b"_wifi"]) -> typing.Literal["wifi"] | None: ... global___DeviceConnectionStatus = DeviceConnectionStatus -@typing_extensions.final +@typing.final class WifiConnectionStatus(google.protobuf.message.Message): """ WiFi connection status @@ -75,11 +74,6 @@ class WifiConnectionStatus(google.protobuf.message.Message): STATUS_FIELD_NUMBER: builtins.int SSID_FIELD_NUMBER: builtins.int RSSI_FIELD_NUMBER: builtins.int - @property - def status(self) -> global___NetworkConnectionStatus: - """ - Connection status - """ ssid: builtins.str """ WiFi access point SSID @@ -88,6 +82,12 @@ class WifiConnectionStatus(google.protobuf.message.Message): """ RSSI of wireless connection """ + @property + def status(self) -> global___NetworkConnectionStatus: + """ + Connection status + """ + def __init__( self, *, @@ -95,12 +95,12 @@ class WifiConnectionStatus(google.protobuf.message.Message): ssid: builtins.str = ..., rssi: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["status", b"status"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["rssi", b"rssi", "ssid", b"ssid", "status", b"status"]) -> None: ... + def HasField(self, field_name: typing.Literal["status", b"status"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["rssi", b"rssi", "ssid", b"ssid", "status", b"status"]) -> None: ... global___WifiConnectionStatus = WifiConnectionStatus -@typing_extensions.final +@typing.final class EthernetConnectionStatus(google.protobuf.message.Message): """ Ethernet connection status @@ -114,17 +114,18 @@ class EthernetConnectionStatus(google.protobuf.message.Message): """ Connection status """ + def __init__( self, *, status: global___NetworkConnectionStatus | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["status", b"status"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["status", b"status"]) -> None: ... + def HasField(self, field_name: typing.Literal["status", b"status"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["status", b"status"]) -> None: ... global___EthernetConnectionStatus = EthernetConnectionStatus -@typing_extensions.final +@typing.final class NetworkConnectionStatus(google.protobuf.message.Message): """ Ethernet or WiFi connection status @@ -160,11 +161,11 @@ class NetworkConnectionStatus(google.protobuf.message.Message): is_mqtt_connected: builtins.bool = ..., is_syslog_connected: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["ip_address", b"ip_address", "is_connected", b"is_connected", "is_mqtt_connected", b"is_mqtt_connected", "is_syslog_connected", b"is_syslog_connected"]) -> None: ... + def ClearField(self, field_name: typing.Literal["ip_address", b"ip_address", "is_connected", b"is_connected", "is_mqtt_connected", b"is_mqtt_connected", "is_syslog_connected", b"is_syslog_connected"]) -> None: ... global___NetworkConnectionStatus = NetworkConnectionStatus -@typing_extensions.final +@typing.final class BluetoothConnectionStatus(google.protobuf.message.Message): """ Bluetooth connection status @@ -194,11 +195,11 @@ class BluetoothConnectionStatus(google.protobuf.message.Message): rssi: builtins.int = ..., is_connected: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["is_connected", b"is_connected", "pin", b"pin", "rssi", b"rssi"]) -> None: ... + def ClearField(self, field_name: typing.Literal["is_connected", b"is_connected", "pin", b"pin", "rssi", b"rssi"]) -> None: ... global___BluetoothConnectionStatus = BluetoothConnectionStatus -@typing_extensions.final +@typing.final class SerialConnectionStatus(google.protobuf.message.Message): """ Serial connection status @@ -222,6 +223,6 @@ class SerialConnectionStatus(google.protobuf.message.Message): baud: builtins.int = ..., is_connected: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["baud", b"baud", "is_connected", b"is_connected"]) -> None: ... + def ClearField(self, field_name: typing.Literal["baud", b"baud", "is_connected", b"is_connected"]) -> None: ... global___SerialConnectionStatus = SerialConnectionStatus diff --git a/meshtastic/protobuf/deviceonly_pb2.py b/meshtastic/protobuf/deviceonly_pb2.py new file mode 100644 index 0000000..9e7f9d4 --- /dev/null +++ b/meshtastic/protobuf/deviceonly_pb2.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/deviceonly.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from meshtastic.protobuf import channel_pb2 as meshtastic_dot_protobuf_dot_channel__pb2 +from meshtastic.protobuf import localonly_pb2 as meshtastic_dot_protobuf_dot_localonly__pb2 +from meshtastic.protobuf import mesh_pb2 as meshtastic_dot_protobuf_dot_mesh__pb2 +from meshtastic.protobuf import module_config_pb2 as meshtastic_dot_protobuf_dot_module__config__pb2 +from meshtastic.protobuf import telemetry_pb2 as meshtastic_dot_protobuf_dot_telemetry__pb2 +import nanopb_pb2 as nanopb__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$meshtastic/protobuf/deviceonly.proto\x12\x13meshtastic.protobuf\x1a!meshtastic/protobuf/channel.proto\x1a#meshtastic/protobuf/localonly.proto\x1a\x1emeshtastic/protobuf/mesh.proto\x1a\'meshtastic/protobuf/module_config.proto\x1a#meshtastic/protobuf/telemetry.proto\x1a\x0cnanopb.proto\"\x99\x01\n\x0cPositionLite\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\x0c\n\x04time\x18\x04 \x01(\x07\x12@\n\x0flocation_source\x18\x05 \x01(\x0e\x32\'.meshtastic.protobuf.Position.LocSource\"\xa1\x02\n\x0cNodeInfoLite\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\'\n\x04user\x18\x02 \x01(\x0b\x32\x19.meshtastic.protobuf.User\x12\x33\n\x08position\x18\x03 \x01(\x0b\x32!.meshtastic.protobuf.PositionLite\x12\x0b\n\x03snr\x18\x04 \x01(\x02\x12\x12\n\nlast_heard\x18\x05 \x01(\x07\x12:\n\x0e\x64\x65vice_metrics\x18\x06 \x01(\x0b\x32\".meshtastic.protobuf.DeviceMetrics\x12\x0f\n\x07\x63hannel\x18\x07 \x01(\r\x12\x10\n\x08via_mqtt\x18\x08 \x01(\x08\x12\x11\n\thops_away\x18\t \x01(\r\x12\x13\n\x0bis_favorite\x18\n \x01(\x08\"\x82\x04\n\x0b\x44\x65viceState\x12\x30\n\x07my_node\x18\x02 \x01(\x0b\x32\x1f.meshtastic.protobuf.MyNodeInfo\x12(\n\x05owner\x18\x03 \x01(\x0b\x32\x19.meshtastic.protobuf.User\x12\x36\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x1f.meshtastic.protobuf.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12\x38\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x1f.meshtastic.protobuf.MeshPacket\x12\x13\n\x07no_save\x18\t \x01(\x08\x42\x02\x18\x01\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12\x34\n\x0brx_waypoint\x18\x0c \x01(\x0b\x32\x1f.meshtastic.protobuf.MeshPacket\x12M\n\x19node_remote_hardware_pins\x18\r \x03(\x0b\x32*.meshtastic.protobuf.NodeRemoteHardwarePin\x12\x63\n\x0cnode_db_lite\x18\x0e \x03(\x0b\x32!.meshtastic.protobuf.NodeInfoLiteB*\x92?\'\x92\x01$std::vector\"N\n\x0b\x43hannelFile\x12.\n\x08\x63hannels\x18\x01 \x03(\x0b\x32\x1c.meshtastic.protobuf.Channel\x12\x0f\n\x07version\x18\x02 \x01(\r\"\xb2\x02\n\x08OEMStore\x12\x16\n\x0eoem_icon_width\x18\x01 \x01(\r\x12\x17\n\x0foem_icon_height\x18\x02 \x01(\r\x12\x15\n\roem_icon_bits\x18\x03 \x01(\x0c\x12\x32\n\x08oem_font\x18\x04 \x01(\x0e\x32 .meshtastic.protobuf.ScreenFonts\x12\x10\n\x08oem_text\x18\x05 \x01(\t\x12\x13\n\x0boem_aes_key\x18\x06 \x01(\x0c\x12:\n\x10oem_local_config\x18\x07 \x01(\x0b\x32 .meshtastic.protobuf.LocalConfig\x12G\n\x17oem_local_module_config\x18\x08 \x01(\x0b\x32&.meshtastic.protobuf.LocalModuleConfig*>\n\x0bScreenFonts\x12\x0e\n\nFONT_SMALL\x10\x00\x12\x0f\n\x0b\x46ONT_MEDIUM\x10\x01\x12\x0e\n\nFONT_LARGE\x10\x02\x42m\n\x13\x63om.geeksville.meshB\nDeviceOnlyZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x92?\x0b\xc2\x01\x08b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.deviceonly_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\nDeviceOnlyZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000\222?\013\302\001\010' + _DEVICESTATE.fields_by_name['no_save']._options = None + _DEVICESTATE.fields_by_name['no_save']._serialized_options = b'\030\001' + _DEVICESTATE.fields_by_name['node_db_lite']._options = None + _DEVICESTATE.fields_by_name['node_db_lite']._serialized_options = b'\222?\'\222\001$std::vector' + _globals['_SCREENFONTS']._serialized_start=1611 + _globals['_SCREENFONTS']._serialized_end=1673 + _globals['_POSITIONLITE']._serialized_start=258 + _globals['_POSITIONLITE']._serialized_end=411 + _globals['_NODEINFOLITE']._serialized_start=414 + _globals['_NODEINFOLITE']._serialized_end=703 + _globals['_DEVICESTATE']._serialized_start=706 + _globals['_DEVICESTATE']._serialized_end=1220 + _globals['_CHANNELFILE']._serialized_start=1222 + _globals['_CHANNELFILE']._serialized_end=1300 + _globals['_OEMSTORE']._serialized_start=1303 + _globals['_OEMSTORE']._serialized_end=1609 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/deviceonly_pb2.pyi b/meshtastic/protobuf/deviceonly_pb2.pyi similarity index 72% rename from meshtastic/deviceonly_pb2.pyi rename to meshtastic/protobuf/deviceonly_pb2.pyi index 38e8b9f..c0ca537 100644 --- a/meshtastic/deviceonly_pb2.pyi +++ b/meshtastic/protobuf/deviceonly_pb2.pyi @@ -2,16 +2,17 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message -import meshtastic.channel_pb2 -import meshtastic.localonly_pb2 -import meshtastic.mesh_pb2 -import meshtastic.telemetry_pb2 +import meshtastic.protobuf.channel_pb2 +import meshtastic.protobuf.localonly_pb2 +import meshtastic.protobuf.mesh_pb2 +import meshtastic.protobuf.telemetry_pb2 import sys import typing @@ -60,7 +61,7 @@ TODO: REPLACE """ global___ScreenFonts = ScreenFonts -@typing_extensions.final +@typing.final class PositionLite(google.protobuf.message.Message): """ Position with static location information only for NodeDBLite @@ -94,7 +95,7 @@ class PositionLite(google.protobuf.message.Message): be sent by devices which has a hardware GPS clock. seconds since 1970 """ - location_source: meshtastic.mesh_pb2.Position.LocSource.ValueType + location_source: meshtastic.protobuf.mesh_pb2.Position.LocSource.ValueType """ TODO: REPLACE """ @@ -105,13 +106,13 @@ class PositionLite(google.protobuf.message.Message): longitude_i: builtins.int = ..., altitude: builtins.int = ..., time: builtins.int = ..., - location_source: meshtastic.mesh_pb2.Position.LocSource.ValueType = ..., + location_source: meshtastic.protobuf.mesh_pb2.Position.LocSource.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["altitude", b"altitude", "latitude_i", b"latitude_i", "location_source", b"location_source", "longitude_i", b"longitude_i", "time", b"time"]) -> None: ... + def ClearField(self, field_name: typing.Literal["altitude", b"altitude", "latitude_i", b"latitude_i", "location_source", b"location_source", "longitude_i", b"longitude_i", "time", b"time"]) -> None: ... global___PositionLite = PositionLite -@typing_extensions.final +@typing.final class NodeInfoLite(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -129,17 +130,6 @@ class NodeInfoLite(google.protobuf.message.Message): """ The node number """ - @property - def user(self) -> meshtastic.mesh_pb2.User: - """ - The user info for this node - """ - @property - def position(self) -> global___PositionLite: - """ - This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true. - Position.time now indicates the last time we received a POSITION from that node. - """ snr: builtins.float """ Returns the Signal-to-noise ratio (SNR) of the last received message, @@ -149,11 +139,6 @@ class NodeInfoLite(google.protobuf.message.Message): """ Set to indicate the last time we received a packet from this node """ - @property - def device_metrics(self) -> meshtastic.telemetry_pb2.DeviceMetrics: - """ - The latest device metrics for the node. - """ channel: builtins.int """ local channel index we heard that node on. Only populated if its not the default channel. @@ -171,26 +156,45 @@ class NodeInfoLite(google.protobuf.message.Message): True if node is in our favorites list Persists between NodeDB internal clean ups """ + @property + def user(self) -> meshtastic.protobuf.mesh_pb2.User: + """ + The user info for this node + """ + + @property + def position(self) -> global___PositionLite: + """ + This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true. + Position.time now indicates the last time we received a POSITION from that node. + """ + + @property + def device_metrics(self) -> meshtastic.protobuf.telemetry_pb2.DeviceMetrics: + """ + The latest device metrics for the node. + """ + def __init__( self, *, num: builtins.int = ..., - user: meshtastic.mesh_pb2.User | None = ..., + user: meshtastic.protobuf.mesh_pb2.User | None = ..., position: global___PositionLite | None = ..., snr: builtins.float = ..., last_heard: builtins.int = ..., - device_metrics: meshtastic.telemetry_pb2.DeviceMetrics | None = ..., + device_metrics: meshtastic.protobuf.telemetry_pb2.DeviceMetrics | None = ..., channel: builtins.int = ..., via_mqtt: builtins.bool = ..., hops_away: builtins.int = ..., is_favorite: builtins.bool = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["device_metrics", b"device_metrics", "position", b"position", "user", b"user"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["channel", b"channel", "device_metrics", b"device_metrics", "hops_away", b"hops_away", "is_favorite", b"is_favorite", "last_heard", b"last_heard", "num", b"num", "position", b"position", "snr", b"snr", "user", b"user", "via_mqtt", b"via_mqtt"]) -> None: ... + def HasField(self, field_name: typing.Literal["device_metrics", b"device_metrics", "position", b"position", "user", b"user"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["channel", b"channel", "device_metrics", b"device_metrics", "hops_away", b"hops_away", "is_favorite", b"is_favorite", "last_heard", b"last_heard", "num", b"num", "position", b"position", "snr", b"snr", "user", b"user", "via_mqtt", b"via_mqtt"]) -> None: ... global___NodeInfoLite = NodeInfoLite -@typing_extensions.final +@typing.final class DeviceState(google.protobuf.message.Message): """ This message is never sent over the wire, but it is used for serializing DB @@ -212,34 +216,12 @@ class DeviceState(google.protobuf.message.Message): RX_WAYPOINT_FIELD_NUMBER: builtins.int NODE_REMOTE_HARDWARE_PINS_FIELD_NUMBER: builtins.int NODE_DB_LITE_FIELD_NUMBER: builtins.int - @property - def my_node(self) -> meshtastic.mesh_pb2.MyNodeInfo: - """ - Read only settings/info about this node - """ - @property - def owner(self) -> meshtastic.mesh_pb2.User: - """ - My owner info - """ - @property - def receive_queue(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[meshtastic.mesh_pb2.MeshPacket]: - """ - Received packets saved for delivery to the phone - """ version: builtins.int """ A version integer used to invalidate old save files when we make incompatible changes This integer is set at build time and is private to NodeDB.cpp in the device code. """ - @property - def rx_text_message(self) -> meshtastic.mesh_pb2.MeshPacket: - """ - We keep the last received text message (only) stored in the device flash, - so we can show it on the screen. - Might be null - """ no_save: builtins.bool """ Used only during development. @@ -251,42 +233,71 @@ class DeviceState(google.protobuf.message.Message): Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset. """ @property - def rx_waypoint(self) -> meshtastic.mesh_pb2.MeshPacket: + def my_node(self) -> meshtastic.protobuf.mesh_pb2.MyNodeInfo: + """ + Read only settings/info about this node + """ + + @property + def owner(self) -> meshtastic.protobuf.mesh_pb2.User: + """ + My owner info + """ + + @property + def receive_queue(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[meshtastic.protobuf.mesh_pb2.MeshPacket]: + """ + Received packets saved for delivery to the phone + """ + + @property + def rx_text_message(self) -> meshtastic.protobuf.mesh_pb2.MeshPacket: + """ + We keep the last received text message (only) stored in the device flash, + so we can show it on the screen. + Might be null + """ + + @property + def rx_waypoint(self) -> meshtastic.protobuf.mesh_pb2.MeshPacket: """ We keep the last received waypoint stored in the device flash, so we can show it on the screen. Might be null """ + @property - def node_remote_hardware_pins(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[meshtastic.mesh_pb2.NodeRemoteHardwarePin]: + def node_remote_hardware_pins(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[meshtastic.protobuf.mesh_pb2.NodeRemoteHardwarePin]: """ The mesh's nodes with their available gpio pins for RemoteHardware module """ + @property def node_db_lite(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___NodeInfoLite]: """ New lite version of NodeDB to decrease memory footprint """ + def __init__( self, *, - my_node: meshtastic.mesh_pb2.MyNodeInfo | None = ..., - owner: meshtastic.mesh_pb2.User | None = ..., - receive_queue: collections.abc.Iterable[meshtastic.mesh_pb2.MeshPacket] | None = ..., + my_node: meshtastic.protobuf.mesh_pb2.MyNodeInfo | None = ..., + owner: meshtastic.protobuf.mesh_pb2.User | None = ..., + receive_queue: collections.abc.Iterable[meshtastic.protobuf.mesh_pb2.MeshPacket] | None = ..., version: builtins.int = ..., - rx_text_message: meshtastic.mesh_pb2.MeshPacket | None = ..., + rx_text_message: meshtastic.protobuf.mesh_pb2.MeshPacket | None = ..., no_save: builtins.bool = ..., did_gps_reset: builtins.bool = ..., - rx_waypoint: meshtastic.mesh_pb2.MeshPacket | None = ..., - node_remote_hardware_pins: collections.abc.Iterable[meshtastic.mesh_pb2.NodeRemoteHardwarePin] | None = ..., + rx_waypoint: meshtastic.protobuf.mesh_pb2.MeshPacket | None = ..., + node_remote_hardware_pins: collections.abc.Iterable[meshtastic.protobuf.mesh_pb2.NodeRemoteHardwarePin] | None = ..., node_db_lite: collections.abc.Iterable[global___NodeInfoLite] | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["my_node", b"my_node", "owner", b"owner", "rx_text_message", b"rx_text_message", "rx_waypoint", b"rx_waypoint"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["did_gps_reset", b"did_gps_reset", "my_node", b"my_node", "no_save", b"no_save", "node_db_lite", b"node_db_lite", "node_remote_hardware_pins", b"node_remote_hardware_pins", "owner", b"owner", "receive_queue", b"receive_queue", "rx_text_message", b"rx_text_message", "rx_waypoint", b"rx_waypoint", "version", b"version"]) -> None: ... + def HasField(self, field_name: typing.Literal["my_node", b"my_node", "owner", b"owner", "rx_text_message", b"rx_text_message", "rx_waypoint", b"rx_waypoint"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["did_gps_reset", b"did_gps_reset", "my_node", b"my_node", "no_save", b"no_save", "node_db_lite", b"node_db_lite", "node_remote_hardware_pins", b"node_remote_hardware_pins", "owner", b"owner", "receive_queue", b"receive_queue", "rx_text_message", b"rx_text_message", "rx_waypoint", b"rx_waypoint", "version", b"version"]) -> None: ... global___DeviceState = DeviceState -@typing_extensions.final +@typing.final class ChannelFile(google.protobuf.message.Message): """ The on-disk saved channels @@ -296,28 +307,29 @@ class ChannelFile(google.protobuf.message.Message): CHANNELS_FIELD_NUMBER: builtins.int VERSION_FIELD_NUMBER: builtins.int - @property - def channels(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[meshtastic.channel_pb2.Channel]: - """ - The channels our node knows about - """ version: builtins.int """ A version integer used to invalidate old save files when we make incompatible changes This integer is set at build time and is private to NodeDB.cpp in the device code. """ + @property + def channels(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[meshtastic.protobuf.channel_pb2.Channel]: + """ + The channels our node knows about + """ + def __init__( self, *, - channels: collections.abc.Iterable[meshtastic.channel_pb2.Channel] | None = ..., + channels: collections.abc.Iterable[meshtastic.protobuf.channel_pb2.Channel] | None = ..., version: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["channels", b"channels", "version", b"version"]) -> None: ... + def ClearField(self, field_name: typing.Literal["channels", b"channels", "version", b"version"]) -> None: ... global___ChannelFile = ChannelFile -@typing_extensions.final +@typing.final class OEMStore(google.protobuf.message.Message): """ This can be used for customizing the firmware distribution. If populated, @@ -359,15 +371,17 @@ class OEMStore(google.protobuf.message.Message): The default device encryption key, 16 or 32 byte """ @property - def oem_local_config(self) -> meshtastic.localonly_pb2.LocalConfig: + def oem_local_config(self) -> meshtastic.protobuf.localonly_pb2.LocalConfig: """ A Preset LocalConfig to apply during factory reset """ + @property - def oem_local_module_config(self) -> meshtastic.localonly_pb2.LocalModuleConfig: + def oem_local_module_config(self) -> meshtastic.protobuf.localonly_pb2.LocalModuleConfig: """ A Preset LocalModuleConfig to apply during factory reset """ + def __init__( self, *, @@ -377,10 +391,10 @@ class OEMStore(google.protobuf.message.Message): oem_font: global___ScreenFonts.ValueType = ..., oem_text: builtins.str = ..., oem_aes_key: builtins.bytes = ..., - oem_local_config: meshtastic.localonly_pb2.LocalConfig | None = ..., - oem_local_module_config: meshtastic.localonly_pb2.LocalModuleConfig | None = ..., + oem_local_config: meshtastic.protobuf.localonly_pb2.LocalConfig | None = ..., + oem_local_module_config: meshtastic.protobuf.localonly_pb2.LocalModuleConfig | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["oem_local_config", b"oem_local_config", "oem_local_module_config", b"oem_local_module_config"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["oem_aes_key", b"oem_aes_key", "oem_font", b"oem_font", "oem_icon_bits", b"oem_icon_bits", "oem_icon_height", b"oem_icon_height", "oem_icon_width", b"oem_icon_width", "oem_local_config", b"oem_local_config", "oem_local_module_config", b"oem_local_module_config", "oem_text", b"oem_text"]) -> None: ... + def HasField(self, field_name: typing.Literal["oem_local_config", b"oem_local_config", "oem_local_module_config", b"oem_local_module_config"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["oem_aes_key", b"oem_aes_key", "oem_font", b"oem_font", "oem_icon_bits", b"oem_icon_bits", "oem_icon_height", b"oem_icon_height", "oem_icon_width", b"oem_icon_width", "oem_local_config", b"oem_local_config", "oem_local_module_config", b"oem_local_module_config", "oem_text", b"oem_text"]) -> None: ... global___OEMStore = OEMStore diff --git a/meshtastic/protobuf/localonly_pb2.py b/meshtastic/protobuf/localonly_pb2.py new file mode 100644 index 0000000..f4e4d71 --- /dev/null +++ b/meshtastic/protobuf/localonly_pb2.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/localonly.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from meshtastic.protobuf import config_pb2 as meshtastic_dot_protobuf_dot_config__pb2 +from meshtastic.protobuf import module_config_pb2 as meshtastic_dot_protobuf_dot_module__config__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#meshtastic/protobuf/localonly.proto\x12\x13meshtastic.protobuf\x1a meshtastic/protobuf/config.proto\x1a\'meshtastic/protobuf/module_config.proto\"\xbc\x03\n\x0bLocalConfig\x12\x38\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32(.meshtastic.protobuf.Config.DeviceConfig\x12<\n\x08position\x18\x02 \x01(\x0b\x32*.meshtastic.protobuf.Config.PositionConfig\x12\x36\n\x05power\x18\x03 \x01(\x0b\x32\'.meshtastic.protobuf.Config.PowerConfig\x12:\n\x07network\x18\x04 \x01(\x0b\x32).meshtastic.protobuf.Config.NetworkConfig\x12:\n\x07\x64isplay\x18\x05 \x01(\x0b\x32).meshtastic.protobuf.Config.DisplayConfig\x12\x34\n\x04lora\x18\x06 \x01(\x0b\x32&.meshtastic.protobuf.Config.LoRaConfig\x12>\n\tbluetooth\x18\x07 \x01(\x0b\x32+.meshtastic.protobuf.Config.BluetoothConfig\x12\x0f\n\x07version\x18\x08 \x01(\r\"\xf0\x07\n\x11LocalModuleConfig\x12:\n\x04mqtt\x18\x01 \x01(\x0b\x32,.meshtastic.protobuf.ModuleConfig.MQTTConfig\x12>\n\x06serial\x18\x02 \x01(\x0b\x32..meshtastic.protobuf.ModuleConfig.SerialConfig\x12[\n\x15\x65xternal_notification\x18\x03 \x01(\x0b\x32<.meshtastic.protobuf.ModuleConfig.ExternalNotificationConfig\x12K\n\rstore_forward\x18\x04 \x01(\x0b\x32\x34.meshtastic.protobuf.ModuleConfig.StoreForwardConfig\x12\x45\n\nrange_test\x18\x05 \x01(\x0b\x32\x31.meshtastic.protobuf.ModuleConfig.RangeTestConfig\x12\x44\n\ttelemetry\x18\x06 \x01(\x0b\x32\x31.meshtastic.protobuf.ModuleConfig.TelemetryConfig\x12M\n\x0e\x63\x61nned_message\x18\x07 \x01(\x0b\x32\x35.meshtastic.protobuf.ModuleConfig.CannedMessageConfig\x12<\n\x05\x61udio\x18\t \x01(\x0b\x32-.meshtastic.protobuf.ModuleConfig.AudioConfig\x12O\n\x0fremote_hardware\x18\n \x01(\x0b\x32\x36.meshtastic.protobuf.ModuleConfig.RemoteHardwareConfig\x12K\n\rneighbor_info\x18\x0b \x01(\x0b\x32\x34.meshtastic.protobuf.ModuleConfig.NeighborInfoConfig\x12Q\n\x10\x61mbient_lighting\x18\x0c \x01(\x0b\x32\x37.meshtastic.protobuf.ModuleConfig.AmbientLightingConfig\x12Q\n\x10\x64\x65tection_sensor\x18\r \x01(\x0b\x32\x37.meshtastic.protobuf.ModuleConfig.DetectionSensorConfig\x12\x46\n\npaxcounter\x18\x0e \x01(\x0b\x32\x32.meshtastic.protobuf.ModuleConfig.PaxcounterConfig\x12\x0f\n\x07version\x18\x08 \x01(\rBd\n\x13\x63om.geeksville.meshB\x0fLocalOnlyProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.localonly_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\017LocalOnlyProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_LOCALCONFIG']._serialized_start=136 + _globals['_LOCALCONFIG']._serialized_end=580 + _globals['_LOCALMODULECONFIG']._serialized_start=583 + _globals['_LOCALMODULECONFIG']._serialized_end=1591 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/protobuf/localonly_pb2.pyi b/meshtastic/protobuf/localonly_pb2.pyi new file mode 100644 index 0000000..ca62f18 --- /dev/null +++ b/meshtastic/protobuf/localonly_pb2.pyi @@ -0,0 +1,220 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import google.protobuf.descriptor +import google.protobuf.message +import meshtastic.protobuf.config_pb2 +import meshtastic.protobuf.module_config_pb2 +import typing + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class LocalConfig(google.protobuf.message.Message): + """ + Protobuf structures common to apponly.proto and deviceonly.proto + This is never sent over the wire, only for local use + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DEVICE_FIELD_NUMBER: builtins.int + POSITION_FIELD_NUMBER: builtins.int + POWER_FIELD_NUMBER: builtins.int + NETWORK_FIELD_NUMBER: builtins.int + DISPLAY_FIELD_NUMBER: builtins.int + LORA_FIELD_NUMBER: builtins.int + BLUETOOTH_FIELD_NUMBER: builtins.int + VERSION_FIELD_NUMBER: builtins.int + version: builtins.int + """ + A version integer used to invalidate old save files when we make + incompatible changes This integer is set at build time and is private to + NodeDB.cpp in the device code. + """ + @property + def device(self) -> meshtastic.protobuf.config_pb2.Config.DeviceConfig: + """ + The part of the config that is specific to the Device + """ + + @property + def position(self) -> meshtastic.protobuf.config_pb2.Config.PositionConfig: + """ + The part of the config that is specific to the GPS Position + """ + + @property + def power(self) -> meshtastic.protobuf.config_pb2.Config.PowerConfig: + """ + The part of the config that is specific to the Power settings + """ + + @property + def network(self) -> meshtastic.protobuf.config_pb2.Config.NetworkConfig: + """ + The part of the config that is specific to the Wifi Settings + """ + + @property + def display(self) -> meshtastic.protobuf.config_pb2.Config.DisplayConfig: + """ + The part of the config that is specific to the Display + """ + + @property + def lora(self) -> meshtastic.protobuf.config_pb2.Config.LoRaConfig: + """ + The part of the config that is specific to the Lora Radio + """ + + @property + def bluetooth(self) -> meshtastic.protobuf.config_pb2.Config.BluetoothConfig: + """ + The part of the config that is specific to the Bluetooth settings + """ + + def __init__( + self, + *, + device: meshtastic.protobuf.config_pb2.Config.DeviceConfig | None = ..., + position: meshtastic.protobuf.config_pb2.Config.PositionConfig | None = ..., + power: meshtastic.protobuf.config_pb2.Config.PowerConfig | None = ..., + network: meshtastic.protobuf.config_pb2.Config.NetworkConfig | None = ..., + display: meshtastic.protobuf.config_pb2.Config.DisplayConfig | None = ..., + lora: meshtastic.protobuf.config_pb2.Config.LoRaConfig | None = ..., + bluetooth: meshtastic.protobuf.config_pb2.Config.BluetoothConfig | None = ..., + version: builtins.int = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["bluetooth", b"bluetooth", "device", b"device", "display", b"display", "lora", b"lora", "network", b"network", "position", b"position", "power", b"power"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["bluetooth", b"bluetooth", "device", b"device", "display", b"display", "lora", b"lora", "network", b"network", "position", b"position", "power", b"power", "version", b"version"]) -> None: ... + +global___LocalConfig = LocalConfig + +@typing.final +class LocalModuleConfig(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + MQTT_FIELD_NUMBER: builtins.int + SERIAL_FIELD_NUMBER: builtins.int + EXTERNAL_NOTIFICATION_FIELD_NUMBER: builtins.int + STORE_FORWARD_FIELD_NUMBER: builtins.int + RANGE_TEST_FIELD_NUMBER: builtins.int + TELEMETRY_FIELD_NUMBER: builtins.int + CANNED_MESSAGE_FIELD_NUMBER: builtins.int + AUDIO_FIELD_NUMBER: builtins.int + REMOTE_HARDWARE_FIELD_NUMBER: builtins.int + NEIGHBOR_INFO_FIELD_NUMBER: builtins.int + AMBIENT_LIGHTING_FIELD_NUMBER: builtins.int + DETECTION_SENSOR_FIELD_NUMBER: builtins.int + PAXCOUNTER_FIELD_NUMBER: builtins.int + VERSION_FIELD_NUMBER: builtins.int + version: builtins.int + """ + A version integer used to invalidate old save files when we make + incompatible changes This integer is set at build time and is private to + NodeDB.cpp in the device code. + """ + @property + def mqtt(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.MQTTConfig: + """ + The part of the config that is specific to the MQTT module + """ + + @property + def serial(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.SerialConfig: + """ + The part of the config that is specific to the Serial module + """ + + @property + def external_notification(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.ExternalNotificationConfig: + """ + The part of the config that is specific to the ExternalNotification module + """ + + @property + def store_forward(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.StoreForwardConfig: + """ + The part of the config that is specific to the Store & Forward module + """ + + @property + def range_test(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.RangeTestConfig: + """ + The part of the config that is specific to the RangeTest module + """ + + @property + def telemetry(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.TelemetryConfig: + """ + The part of the config that is specific to the Telemetry module + """ + + @property + def canned_message(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.CannedMessageConfig: + """ + The part of the config that is specific to the Canned Message module + """ + + @property + def audio(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.AudioConfig: + """ + The part of the config that is specific to the Audio module + """ + + @property + def remote_hardware(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.RemoteHardwareConfig: + """ + The part of the config that is specific to the Remote Hardware module + """ + + @property + def neighbor_info(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.NeighborInfoConfig: + """ + The part of the config that is specific to the Neighbor Info module + """ + + @property + def ambient_lighting(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.AmbientLightingConfig: + """ + The part of the config that is specific to the Ambient Lighting module + """ + + @property + def detection_sensor(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.DetectionSensorConfig: + """ + The part of the config that is specific to the Detection Sensor module + """ + + @property + def paxcounter(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig.PaxcounterConfig: + """ + Paxcounter Config + """ + + def __init__( + self, + *, + mqtt: meshtastic.protobuf.module_config_pb2.ModuleConfig.MQTTConfig | None = ..., + serial: meshtastic.protobuf.module_config_pb2.ModuleConfig.SerialConfig | None = ..., + external_notification: meshtastic.protobuf.module_config_pb2.ModuleConfig.ExternalNotificationConfig | None = ..., + store_forward: meshtastic.protobuf.module_config_pb2.ModuleConfig.StoreForwardConfig | None = ..., + range_test: meshtastic.protobuf.module_config_pb2.ModuleConfig.RangeTestConfig | None = ..., + telemetry: meshtastic.protobuf.module_config_pb2.ModuleConfig.TelemetryConfig | None = ..., + canned_message: meshtastic.protobuf.module_config_pb2.ModuleConfig.CannedMessageConfig | None = ..., + audio: meshtastic.protobuf.module_config_pb2.ModuleConfig.AudioConfig | None = ..., + remote_hardware: meshtastic.protobuf.module_config_pb2.ModuleConfig.RemoteHardwareConfig | None = ..., + neighbor_info: meshtastic.protobuf.module_config_pb2.ModuleConfig.NeighborInfoConfig | None = ..., + ambient_lighting: meshtastic.protobuf.module_config_pb2.ModuleConfig.AmbientLightingConfig | None = ..., + detection_sensor: meshtastic.protobuf.module_config_pb2.ModuleConfig.DetectionSensorConfig | None = ..., + paxcounter: meshtastic.protobuf.module_config_pb2.ModuleConfig.PaxcounterConfig | None = ..., + version: builtins.int = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["ambient_lighting", b"ambient_lighting", "audio", b"audio", "canned_message", b"canned_message", "detection_sensor", b"detection_sensor", "external_notification", b"external_notification", "mqtt", b"mqtt", "neighbor_info", b"neighbor_info", "paxcounter", b"paxcounter", "range_test", b"range_test", "remote_hardware", b"remote_hardware", "serial", b"serial", "store_forward", b"store_forward", "telemetry", b"telemetry"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["ambient_lighting", b"ambient_lighting", "audio", b"audio", "canned_message", b"canned_message", "detection_sensor", b"detection_sensor", "external_notification", b"external_notification", "mqtt", b"mqtt", "neighbor_info", b"neighbor_info", "paxcounter", b"paxcounter", "range_test", b"range_test", "remote_hardware", b"remote_hardware", "serial", b"serial", "store_forward", b"store_forward", "telemetry", b"telemetry", "version", b"version"]) -> None: ... + +global___LocalModuleConfig = LocalModuleConfig diff --git a/meshtastic/protobuf/mesh_pb2.py b/meshtastic/protobuf/mesh_pb2.py new file mode 100644 index 0000000..684b513 --- /dev/null +++ b/meshtastic/protobuf/mesh_pb2.py @@ -0,0 +1,98 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/mesh.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from meshtastic.protobuf import channel_pb2 as meshtastic_dot_protobuf_dot_channel__pb2 +from meshtastic.protobuf import config_pb2 as meshtastic_dot_protobuf_dot_config__pb2 +from meshtastic.protobuf import module_config_pb2 as meshtastic_dot_protobuf_dot_module__config__pb2 +from meshtastic.protobuf import portnums_pb2 as meshtastic_dot_protobuf_dot_portnums__pb2 +from meshtastic.protobuf import telemetry_pb2 as meshtastic_dot_protobuf_dot_telemetry__pb2 +from meshtastic.protobuf import xmodem_pb2 as meshtastic_dot_protobuf_dot_xmodem__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emeshtastic/protobuf/mesh.proto\x12\x13meshtastic.protobuf\x1a!meshtastic/protobuf/channel.proto\x1a meshtastic/protobuf/config.proto\x1a\'meshtastic/protobuf/module_config.proto\x1a\"meshtastic/protobuf/portnums.proto\x1a#meshtastic/protobuf/telemetry.proto\x1a meshtastic/protobuf/xmodem.proto\"\xf7\x05\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\x0c\n\x04time\x18\x04 \x01(\x07\x12@\n\x0flocation_source\x18\x05 \x01(\x0e\x32\'.meshtastic.protobuf.Position.LocSource\x12@\n\x0f\x61ltitude_source\x18\x06 \x01(\x0e\x32\'.meshtastic.protobuf.Position.AltSource\x12\x11\n\ttimestamp\x18\x07 \x01(\x07\x12\x1f\n\x17timestamp_millis_adjust\x18\x08 \x01(\x05\x12\x14\n\x0c\x61ltitude_hae\x18\t \x01(\x11\x12#\n\x1b\x61ltitude_geoidal_separation\x18\n \x01(\x11\x12\x0c\n\x04PDOP\x18\x0b \x01(\r\x12\x0c\n\x04HDOP\x18\x0c \x01(\r\x12\x0c\n\x04VDOP\x18\r \x01(\r\x12\x14\n\x0cgps_accuracy\x18\x0e \x01(\r\x12\x14\n\x0cground_speed\x18\x0f \x01(\r\x12\x14\n\x0cground_track\x18\x10 \x01(\r\x12\x13\n\x0b\x66ix_quality\x18\x11 \x01(\r\x12\x10\n\x08\x66ix_type\x18\x12 \x01(\r\x12\x14\n\x0csats_in_view\x18\x13 \x01(\r\x12\x11\n\tsensor_id\x18\x14 \x01(\r\x12\x13\n\x0bnext_update\x18\x15 \x01(\r\x12\x12\n\nseq_number\x18\x16 \x01(\r\x12\x16\n\x0eprecision_bits\x18\x17 \x01(\r\"N\n\tLocSource\x12\r\n\tLOC_UNSET\x10\x00\x12\x0e\n\nLOC_MANUAL\x10\x01\x12\x10\n\x0cLOC_INTERNAL\x10\x02\x12\x10\n\x0cLOC_EXTERNAL\x10\x03\"b\n\tAltSource\x12\r\n\tALT_UNSET\x10\x00\x12\x0e\n\nALT_MANUAL\x10\x01\x12\x10\n\x0c\x41LT_INTERNAL\x10\x02\x12\x10\n\x0c\x41LT_EXTERNAL\x10\x03\x12\x12\n\x0e\x41LT_BAROMETRIC\x10\x04\"\xd6\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\x13\n\x07macaddr\x18\x04 \x01(\x0c\x42\x02\x18\x01\x12\x34\n\x08hw_model\x18\x05 \x01(\x0e\x32\".meshtastic.protobuf.HardwareModel\x12\x13\n\x0bis_licensed\x18\x06 \x01(\x08\x12;\n\x04role\x18\x07 \x01(\x0e\x32-.meshtastic.protobuf.Config.DeviceConfig.Role\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x01 \x03(\x07\"\x97\x03\n\x07Routing\x12<\n\rroute_request\x18\x01 \x01(\x0b\x32#.meshtastic.protobuf.RouteDiscoveryH\x00\x12:\n\x0broute_reply\x18\x02 \x01(\x0b\x32#.meshtastic.protobuf.RouteDiscoveryH\x00\x12:\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\".meshtastic.protobuf.Routing.ErrorH\x00\"\xca\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\x14\n\x10\x44UTY_CYCLE_LIMIT\x10\t\x12\x0f\n\x0b\x42\x41\x44_REQUEST\x10 \x12\x12\n\x0eNOT_AUTHORIZED\x10!B\t\n\x07variant\"\xb0\x01\n\x04\x44\x61ta\x12-\n\x07portnum\x18\x01 \x01(\x0e\x32\x1c.meshtastic.protobuf.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\x12\x10\n\x08reply_id\x18\x07 \x01(\x07\x12\r\n\x05\x65moji\x18\x08 \x01(\x07\"\x93\x01\n\x08Waypoint\x12\n\n\x02id\x18\x01 \x01(\r\x12\x12\n\nlatitude_i\x18\x02 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x03 \x01(\x0f\x12\x0e\n\x06\x65xpire\x18\x04 \x01(\r\x12\x11\n\tlocked_to\x18\x05 \x01(\r\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x0c\n\x04icon\x18\x08 \x01(\x07\"l\n\x16MqttClientProxyMessage\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x0e\n\x04\x64\x61ta\x18\x02 \x01(\x0cH\x00\x12\x0e\n\x04text\x18\x03 \x01(\tH\x00\x12\x10\n\x08retained\x18\x04 \x01(\x08\x42\x11\n\x0fpayload_variant\"\xb0\x04\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,\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x19.meshtastic.protobuf.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\t \x01(\r\x12\x10\n\x08want_ack\x18\n \x01(\x08\x12:\n\x08priority\x18\x0b \x01(\x0e\x32(.meshtastic.protobuf.MeshPacket.Priority\x12\x0f\n\x07rx_rssi\x18\x0c \x01(\x05\x12<\n\x07\x64\x65layed\x18\r \x01(\x0e\x32\'.meshtastic.protobuf.MeshPacket.DelayedB\x02\x18\x01\x12\x10\n\x08via_mqtt\x18\x0e \x01(\x08\x12\x11\n\thop_start\x18\x0f \x01(\r\"[\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\"B\n\x07\x44\x65layed\x12\x0c\n\x08NO_DELAY\x10\x00\x12\x15\n\x11\x44\x45LAYED_BROADCAST\x10\x01\x12\x12\n\x0e\x44\x45LAYED_DIRECT\x10\x02\x42\x11\n\x0fpayload_variant\"\x99\x02\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\'\n\x04user\x18\x02 \x01(\x0b\x32\x19.meshtastic.protobuf.User\x12/\n\x08position\x18\x03 \x01(\x0b\x32\x1d.meshtastic.protobuf.Position\x12\x0b\n\x03snr\x18\x04 \x01(\x02\x12\x12\n\nlast_heard\x18\x05 \x01(\x07\x12:\n\x0e\x64\x65vice_metrics\x18\x06 \x01(\x0b\x32\".meshtastic.protobuf.DeviceMetrics\x12\x0f\n\x07\x63hannel\x18\x07 \x01(\r\x12\x10\n\x08via_mqtt\x18\x08 \x01(\x08\x12\x11\n\thops_away\x18\t \x01(\r\x12\x13\n\x0bis_favorite\x18\n \x01(\x08\"P\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x14\n\x0creboot_count\x18\x08 \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0b \x01(\r\"\xc9\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\x33\n\x05level\x18\x04 \x01(\x0e\x32$.meshtastic.protobuf.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\"P\n\x0bQueueStatus\x12\x0b\n\x03res\x18\x01 \x01(\x05\x12\x0c\n\x04\x66ree\x18\x02 \x01(\r\x12\x0e\n\x06maxlen\x18\x03 \x01(\r\x12\x16\n\x0emesh_packet_id\x18\x04 \x01(\r\"\xbe\x05\n\tFromRadio\x12\n\n\x02id\x18\x01 \x01(\r\x12\x31\n\x06packet\x18\x02 \x01(\x0b\x32\x1f.meshtastic.protobuf.MeshPacketH\x00\x12\x32\n\x07my_info\x18\x03 \x01(\x0b\x32\x1f.meshtastic.protobuf.MyNodeInfoH\x00\x12\x32\n\tnode_info\x18\x04 \x01(\x0b\x32\x1d.meshtastic.protobuf.NodeInfoH\x00\x12-\n\x06\x63onfig\x18\x05 \x01(\x0b\x32\x1b.meshtastic.protobuf.ConfigH\x00\x12\x34\n\nlog_record\x18\x06 \x01(\x0b\x32\x1e.meshtastic.protobuf.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x07 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\x08 \x01(\x08H\x00\x12\x39\n\x0cmoduleConfig\x18\t \x01(\x0b\x32!.meshtastic.protobuf.ModuleConfigH\x00\x12/\n\x07\x63hannel\x18\n \x01(\x0b\x32\x1c.meshtastic.protobuf.ChannelH\x00\x12\x37\n\x0bqueueStatus\x18\x0b \x01(\x0b\x32 .meshtastic.protobuf.QueueStatusH\x00\x12\x33\n\x0cxmodemPacket\x18\x0c \x01(\x0b\x32\x1b.meshtastic.protobuf.XModemH\x00\x12\x37\n\x08metadata\x18\r \x01(\x0b\x32#.meshtastic.protobuf.DeviceMetadataH\x00\x12M\n\x16mqttClientProxyMessage\x18\x0e \x01(\x0b\x32+.meshtastic.protobuf.MqttClientProxyMessageH\x00\x42\x11\n\x0fpayload_variant\"\xb8\x02\n\x07ToRadio\x12\x31\n\x06packet\x18\x01 \x01(\x0b\x32\x1f.meshtastic.protobuf.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x03 \x01(\rH\x00\x12\x14\n\ndisconnect\x18\x04 \x01(\x08H\x00\x12\x33\n\x0cxmodemPacket\x18\x05 \x01(\x0b\x32\x1b.meshtastic.protobuf.XModemH\x00\x12M\n\x16mqttClientProxyMessage\x18\x06 \x01(\x0b\x32+.meshtastic.protobuf.MqttClientProxyMessageH\x00\x12\x33\n\theartbeat\x18\x07 \x01(\x0b\x32\x1e.meshtastic.protobuf.HeartbeatH\x00\x42\x11\n\x0fpayload_variant\"I\n\nCompressed\x12-\n\x07portnum\x18\x01 \x01(\x0e\x32\x1c.meshtastic.protobuf.PortNum\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x90\x01\n\x0cNeighborInfo\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x17\n\x0flast_sent_by_id\x18\x02 \x01(\r\x12$\n\x1cnode_broadcast_interval_secs\x18\x03 \x01(\r\x12\x30\n\tneighbors\x18\x04 \x03(\x0b\x32\x1d.meshtastic.protobuf.Neighbor\"d\n\x08Neighbor\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0b\n\x03snr\x18\x02 \x01(\x02\x12\x14\n\x0clast_rx_time\x18\x03 \x01(\x07\x12$\n\x1cnode_broadcast_interval_secs\x18\x04 \x01(\r\"\xbf\x02\n\x0e\x44\x65viceMetadata\x12\x18\n\x10\x66irmware_version\x18\x01 \x01(\t\x12\x1c\n\x14\x64\x65vice_state_version\x18\x02 \x01(\r\x12\x13\n\x0b\x63\x61nShutdown\x18\x03 \x01(\x08\x12\x0f\n\x07hasWifi\x18\x04 \x01(\x08\x12\x14\n\x0chasBluetooth\x18\x05 \x01(\x08\x12\x13\n\x0bhasEthernet\x18\x06 \x01(\x08\x12;\n\x04role\x18\x07 \x01(\x0e\x32-.meshtastic.protobuf.Config.DeviceConfig.Role\x12\x16\n\x0eposition_flags\x18\x08 \x01(\r\x12\x34\n\x08hw_model\x18\t \x01(\x0e\x32\".meshtastic.protobuf.HardwareModel\x12\x19\n\x11hasRemoteHardware\x18\n \x01(\x08\"\x0b\n\tHeartbeat\"^\n\x15NodeRemoteHardwarePin\x12\x10\n\x08node_num\x18\x01 \x01(\r\x12\x33\n\x03pin\x18\x02 \x01(\x0b\x32&.meshtastic.protobuf.RemoteHardwarePin\"e\n\x0e\x43hunkedPayload\x12\x12\n\npayload_id\x18\x01 \x01(\r\x12\x13\n\x0b\x63hunk_count\x18\x02 \x01(\r\x12\x13\n\x0b\x63hunk_index\x18\x03 \x01(\r\x12\x15\n\rpayload_chunk\x18\x04 \x01(\x0c\"\x1f\n\rresend_chunks\x12\x0e\n\x06\x63hunks\x18\x01 \x03(\r\"\xb3\x01\n\x16\x43hunkedPayloadResponse\x12\x12\n\npayload_id\x18\x01 \x01(\r\x12\x1a\n\x10request_transfer\x18\x02 \x01(\x08H\x00\x12\x19\n\x0f\x61\x63\x63\x65pt_transfer\x18\x03 \x01(\x08H\x00\x12;\n\rresend_chunks\x18\x04 \x01(\x0b\x32\".meshtastic.protobuf.resend_chunksH\x00\x42\x11\n\x0fpayload_variant*\xeb\x08\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\x0e\n\nTBEAM_V0P7\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\r\n\tHELTEC_V1\x10\x0b\x12\x18\n\x14LILYGO_TBEAM_S3_CORE\x10\x0c\x12\x0c\n\x08RAK11200\x10\r\x12\x0b\n\x07NANO_G1\x10\x0e\x12\x12\n\x0eTLORA_V2_1_1P8\x10\x0f\x12\x0f\n\x0bTLORA_T3_S3\x10\x10\x12\x14\n\x10NANO_G1_EXPLORER\x10\x11\x12\x11\n\rNANO_G2_ULTRA\x10\x12\x12\r\n\tLORA_TYPE\x10\x13\x12\x0b\n\x07WIPHONE\x10\x14\x12\x0e\n\nWIO_WM1110\x10\x15\x12\x0e\n\nSTATION_G1\x10\x19\x12\x0c\n\x08RAK11310\x10\x1a\x12\x14\n\x10SENSELORA_RP2040\x10\x1b\x12\x10\n\x0cSENSELORA_S3\x10\x1c\x12\r\n\tCANARYONE\x10\x1d\x12\x0f\n\x0bRP2040_LORA\x10\x1e\x12\x0e\n\nSTATION_G2\x10\x1f\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\'\x12\x15\n\x11NRF52840_PCA10059\x10(\x12\n\n\x06\x44R_DEV\x10)\x12\x0b\n\x07M5STACK\x10*\x12\r\n\tHELTEC_V3\x10+\x12\x11\n\rHELTEC_WSL_V3\x10,\x12\x13\n\x0f\x42\x45TAFPV_2400_TX\x10-\x12\x17\n\x13\x42\x45TAFPV_900_NANO_TX\x10.\x12\x0c\n\x08RPI_PICO\x10/\x12\x1b\n\x17HELTEC_WIRELESS_TRACKER\x10\x30\x12\x19\n\x15HELTEC_WIRELESS_PAPER\x10\x31\x12\n\n\x06T_DECK\x10\x32\x12\x0e\n\nT_WATCH_S3\x10\x33\x12\x11\n\rPICOMPUTER_S3\x10\x34\x12\x0f\n\x0bHELTEC_HT62\x10\x35\x12\x12\n\x0e\x45\x42YTE_ESP32_S3\x10\x36\x12\x11\n\rESP32_S3_PICO\x10\x37\x12\r\n\tCHATTER_2\x10\x38\x12\x1e\n\x1aHELTEC_WIRELESS_PAPER_V1_0\x10\x39\x12 \n\x1cHELTEC_WIRELESS_TRACKER_V1_0\x10:\x12\x0b\n\x07UNPHONE\x10;\x12\x0c\n\x08TD_LORAC\x10<\x12\x13\n\x0f\x43\x44\x45\x42YTE_EORA_S3\x10=\x12\x0f\n\x0bTWC_MESH_V4\x10>\x12\x16\n\x12NRF52_PROMICRO_DIY\x10?\x12\x1f\n\x1bRADIOMASTER_900_BANDIT_NANO\x10@\x12\x0f\n\nPRIVATE_HW\x10\xff\x01*,\n\tConstants\x12\x08\n\x04ZERO\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xed\x01*\xee\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04NONE\x10\x00\x12\x0f\n\x0bTX_WATCHDOG\x10\x01\x12\x14\n\x10SLEEP_ENTER_WAIT\x10\x02\x12\x0c\n\x08NO_RADIO\x10\x03\x12\x0f\n\x0bUNSPECIFIED\x10\x04\x12\x15\n\x11UBLOX_UNIT_FAILED\x10\x05\x12\r\n\tNO_AXP192\x10\x06\x12\x19\n\x15INVALID_RADIO_SETTING\x10\x07\x12\x13\n\x0fTRANSMIT_FAILED\x10\x08\x12\x0c\n\x08\x42ROWNOUT\x10\t\x12\x12\n\x0eSX1262_FAILURE\x10\n\x12\x11\n\rRADIO_SPI_BUG\x10\x0b\x42_\n\x13\x63om.geeksville.meshB\nMeshProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.mesh_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\nMeshProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _USER.fields_by_name['macaddr']._options = None + _USER.fields_by_name['macaddr']._serialized_options = b'\030\001' + _MESHPACKET.fields_by_name['delayed']._options = None + _MESHPACKET.fields_by_name['delayed']._serialized_options = b'\030\001' + _globals['_HARDWAREMODEL']._serialized_start=5442 + _globals['_HARDWAREMODEL']._serialized_end=6573 + _globals['_CONSTANTS']._serialized_start=6575 + _globals['_CONSTANTS']._serialized_end=6619 + _globals['_CRITICALERRORCODE']._serialized_start=6622 + _globals['_CRITICALERRORCODE']._serialized_end=6860 + _globals['_POSITION']._serialized_start=273 + _globals['_POSITION']._serialized_end=1032 + _globals['_POSITION_LOCSOURCE']._serialized_start=854 + _globals['_POSITION_LOCSOURCE']._serialized_end=932 + _globals['_POSITION_ALTSOURCE']._serialized_start=934 + _globals['_POSITION_ALTSOURCE']._serialized_end=1032 + _globals['_USER']._serialized_start=1035 + _globals['_USER']._serialized_end=1249 + _globals['_ROUTEDISCOVERY']._serialized_start=1251 + _globals['_ROUTEDISCOVERY']._serialized_end=1282 + _globals['_ROUTING']._serialized_start=1285 + _globals['_ROUTING']._serialized_end=1692 + _globals['_ROUTING_ERROR']._serialized_start=1479 + _globals['_ROUTING_ERROR']._serialized_end=1681 + _globals['_DATA']._serialized_start=1695 + _globals['_DATA']._serialized_end=1871 + _globals['_WAYPOINT']._serialized_start=1874 + _globals['_WAYPOINT']._serialized_end=2021 + _globals['_MQTTCLIENTPROXYMESSAGE']._serialized_start=2023 + _globals['_MQTTCLIENTPROXYMESSAGE']._serialized_end=2131 + _globals['_MESHPACKET']._serialized_start=2134 + _globals['_MESHPACKET']._serialized_end=2694 + _globals['_MESHPACKET_PRIORITY']._serialized_start=2516 + _globals['_MESHPACKET_PRIORITY']._serialized_end=2607 + _globals['_MESHPACKET_DELAYED']._serialized_start=2609 + _globals['_MESHPACKET_DELAYED']._serialized_end=2675 + _globals['_NODEINFO']._serialized_start=2697 + _globals['_NODEINFO']._serialized_end=2978 + _globals['_MYNODEINFO']._serialized_start=2980 + _globals['_MYNODEINFO']._serialized_end=3060 + _globals['_LOGRECORD']._serialized_start=3063 + _globals['_LOGRECORD']._serialized_end=3264 + _globals['_LOGRECORD_LEVEL']._serialized_start=3176 + _globals['_LOGRECORD_LEVEL']._serialized_end=3264 + _globals['_QUEUESTATUS']._serialized_start=3266 + _globals['_QUEUESTATUS']._serialized_end=3346 + _globals['_FROMRADIO']._serialized_start=3349 + _globals['_FROMRADIO']._serialized_end=4051 + _globals['_TORADIO']._serialized_start=4054 + _globals['_TORADIO']._serialized_end=4366 + _globals['_COMPRESSED']._serialized_start=4368 + _globals['_COMPRESSED']._serialized_end=4441 + _globals['_NEIGHBORINFO']._serialized_start=4444 + _globals['_NEIGHBORINFO']._serialized_end=4588 + _globals['_NEIGHBOR']._serialized_start=4590 + _globals['_NEIGHBOR']._serialized_end=4690 + _globals['_DEVICEMETADATA']._serialized_start=4693 + _globals['_DEVICEMETADATA']._serialized_end=5012 + _globals['_HEARTBEAT']._serialized_start=5014 + _globals['_HEARTBEAT']._serialized_end=5025 + _globals['_NODEREMOTEHARDWAREPIN']._serialized_start=5027 + _globals['_NODEREMOTEHARDWAREPIN']._serialized_end=5121 + _globals['_CHUNKEDPAYLOAD']._serialized_start=5123 + _globals['_CHUNKEDPAYLOAD']._serialized_end=5224 + _globals['_RESEND_CHUNKS']._serialized_start=5226 + _globals['_RESEND_CHUNKS']._serialized_end=5257 + _globals['_CHUNKEDPAYLOADRESPONSE']._serialized_start=5260 + _globals['_CHUNKEDPAYLOADRESPONSE']._serialized_end=5439 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/mesh_pb2.pyi b/meshtastic/protobuf/mesh_pb2.pyi similarity index 87% rename from meshtastic/mesh_pb2.pyi rename to meshtastic/protobuf/mesh_pb2.pyi index 391aae7..89b0a75 100644 --- a/meshtastic/mesh_pb2.pyi +++ b/meshtastic/protobuf/mesh_pb2.pyi @@ -2,18 +2,19 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message -import meshtastic.channel_pb2 -import meshtastic.config_pb2 -import meshtastic.module_config_pb2 -import meshtastic.portnums_pb2 -import meshtastic.telemetry_pb2 -import meshtastic.xmodem_pb2 +import meshtastic.protobuf.channel_pb2 +import meshtastic.protobuf.config_pb2 +import meshtastic.protobuf.module_config_pb2 +import meshtastic.protobuf.portnums_pb2 +import meshtastic.protobuf.telemetry_pb2 +import meshtastic.protobuf.xmodem_pb2 import sys import typing @@ -732,7 +733,7 @@ If this occurs on your board, please post in the forum so that we can ask you to """ global___CriticalErrorCode = CriticalErrorCode -@typing_extensions.final +@typing.final class Position(google.protobuf.message.Message): """ a gps position @@ -1000,11 +1001,11 @@ class Position(google.protobuf.message.Message): seq_number: builtins.int = ..., precision_bits: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["HDOP", b"HDOP", "PDOP", b"PDOP", "VDOP", b"VDOP", "altitude", b"altitude", "altitude_geoidal_separation", b"altitude_geoidal_separation", "altitude_hae", b"altitude_hae", "altitude_source", b"altitude_source", "fix_quality", b"fix_quality", "fix_type", b"fix_type", "gps_accuracy", b"gps_accuracy", "ground_speed", b"ground_speed", "ground_track", b"ground_track", "latitude_i", b"latitude_i", "location_source", b"location_source", "longitude_i", b"longitude_i", "next_update", b"next_update", "precision_bits", b"precision_bits", "sats_in_view", b"sats_in_view", "sensor_id", b"sensor_id", "seq_number", b"seq_number", "time", b"time", "timestamp", b"timestamp", "timestamp_millis_adjust", b"timestamp_millis_adjust"]) -> None: ... + def ClearField(self, field_name: typing.Literal["HDOP", b"HDOP", "PDOP", b"PDOP", "VDOP", b"VDOP", "altitude", b"altitude", "altitude_geoidal_separation", b"altitude_geoidal_separation", "altitude_hae", b"altitude_hae", "altitude_source", b"altitude_source", "fix_quality", b"fix_quality", "fix_type", b"fix_type", "gps_accuracy", b"gps_accuracy", "ground_speed", b"ground_speed", "ground_track", b"ground_track", "latitude_i", b"latitude_i", "location_source", b"location_source", "longitude_i", b"longitude_i", "next_update", b"next_update", "precision_bits", b"precision_bits", "sats_in_view", b"sats_in_view", "sensor_id", b"sensor_id", "seq_number", b"seq_number", "time", b"time", "timestamp", b"timestamp", "timestamp_millis_adjust", b"timestamp_millis_adjust"]) -> None: ... global___Position = Position -@typing_extensions.final +@typing.final class User(google.protobuf.message.Message): """ Broadcast when a newly powered mesh node wants to find a node num it can use @@ -1073,7 +1074,7 @@ class User(google.protobuf.message.Message): If this user is a licensed operator, set this flag. Also, "long_name" should be their licence number. """ - role: meshtastic.config_pb2.Config.DeviceConfig.Role.ValueType + role: meshtastic.protobuf.config_pb2.Config.DeviceConfig.Role.ValueType """ Indicates that the user's role in the mesh """ @@ -1086,13 +1087,13 @@ class User(google.protobuf.message.Message): macaddr: builtins.bytes = ..., hw_model: global___HardwareModel.ValueType = ..., is_licensed: builtins.bool = ..., - role: meshtastic.config_pb2.Config.DeviceConfig.Role.ValueType = ..., + role: meshtastic.protobuf.config_pb2.Config.DeviceConfig.Role.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["hw_model", b"hw_model", "id", b"id", "is_licensed", b"is_licensed", "long_name", b"long_name", "macaddr", b"macaddr", "role", b"role", "short_name", b"short_name"]) -> None: ... + def ClearField(self, field_name: typing.Literal["hw_model", b"hw_model", "id", b"id", "is_licensed", b"is_licensed", "long_name", b"long_name", "macaddr", b"macaddr", "role", b"role", "short_name", b"short_name"]) -> None: ... global___User = User -@typing_extensions.final +@typing.final class RouteDiscovery(google.protobuf.message.Message): """ A message used in our Dynamic Source Routing protocol (RFC 4728 based) @@ -1106,16 +1107,17 @@ class RouteDiscovery(google.protobuf.message.Message): """ The list of nodenums this packet has visited so far """ + def __init__( self, *, route: collections.abc.Iterable[builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["route", b"route"]) -> None: ... + def ClearField(self, field_name: typing.Literal["route", b"route"]) -> None: ... global___RouteDiscovery = RouteDiscovery -@typing_extensions.final +@typing.final class Routing(google.protobuf.message.Message): """ A Routing control Data packet handled by the routing module @@ -1240,21 +1242,23 @@ class Routing(google.protobuf.message.Message): ROUTE_REQUEST_FIELD_NUMBER: builtins.int ROUTE_REPLY_FIELD_NUMBER: builtins.int ERROR_REASON_FIELD_NUMBER: builtins.int - @property - def route_request(self) -> global___RouteDiscovery: - """ - A route request going from the requester - """ - @property - def route_reply(self) -> global___RouteDiscovery: - """ - A route reply - """ error_reason: global___Routing.Error.ValueType """ A failure in delivering a message (usually used for routing control messages, but might be provided in addition to ack.fail_id to provide details on the type of failure). """ + @property + def route_request(self) -> global___RouteDiscovery: + """ + A route request going from the requester + """ + + @property + def route_reply(self) -> global___RouteDiscovery: + """ + A route reply + """ + def __init__( self, *, @@ -1262,13 +1266,13 @@ class Routing(google.protobuf.message.Message): route_reply: global___RouteDiscovery | None = ..., error_reason: global___Routing.Error.ValueType = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["error_reason", b"error_reason", "route_reply", b"route_reply", "route_request", b"route_request", "variant", b"variant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["error_reason", b"error_reason", "route_reply", b"route_reply", "route_request", b"route_request", "variant", b"variant"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["variant", b"variant"]) -> typing_extensions.Literal["route_request", "route_reply", "error_reason"] | None: ... + def HasField(self, field_name: typing.Literal["error_reason", b"error_reason", "route_reply", b"route_reply", "route_request", b"route_request", "variant", b"variant"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["error_reason", b"error_reason", "route_reply", b"route_reply", "route_request", b"route_request", "variant", b"variant"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["variant", b"variant"]) -> typing.Literal["route_request", "route_reply", "error_reason"] | None: ... global___Routing = Routing -@typing_extensions.final +@typing.final class Data(google.protobuf.message.Message): """ (Formerly called SubPacket) @@ -1286,7 +1290,7 @@ class Data(google.protobuf.message.Message): REQUEST_ID_FIELD_NUMBER: builtins.int REPLY_ID_FIELD_NUMBER: builtins.int EMOJI_FIELD_NUMBER: builtins.int - portnum: meshtastic.portnums_pb2.PortNum.ValueType + portnum: meshtastic.protobuf.portnums_pb2.PortNum.ValueType """ Formerly named typ and of type Type """ @@ -1331,7 +1335,7 @@ class Data(google.protobuf.message.Message): def __init__( self, *, - portnum: meshtastic.portnums_pb2.PortNum.ValueType = ..., + portnum: meshtastic.protobuf.portnums_pb2.PortNum.ValueType = ..., payload: builtins.bytes = ..., want_response: builtins.bool = ..., dest: builtins.int = ..., @@ -1340,11 +1344,11 @@ class Data(google.protobuf.message.Message): reply_id: builtins.int = ..., emoji: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["dest", b"dest", "emoji", b"emoji", "payload", b"payload", "portnum", b"portnum", "reply_id", b"reply_id", "request_id", b"request_id", "source", b"source", "want_response", b"want_response"]) -> None: ... + def ClearField(self, field_name: typing.Literal["dest", b"dest", "emoji", b"emoji", "payload", b"payload", "portnum", b"portnum", "reply_id", b"reply_id", "request_id", b"request_id", "source", b"source", "want_response", b"want_response"]) -> None: ... global___Data = Data -@typing_extensions.final +@typing.final class Waypoint(google.protobuf.message.Message): """ Waypoint message, used to share arbitrary locations across the mesh @@ -1405,11 +1409,11 @@ class Waypoint(google.protobuf.message.Message): description: builtins.str = ..., icon: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["description", b"description", "expire", b"expire", "icon", b"icon", "id", b"id", "latitude_i", b"latitude_i", "locked_to", b"locked_to", "longitude_i", b"longitude_i", "name", b"name"]) -> None: ... + def ClearField(self, field_name: typing.Literal["description", b"description", "expire", b"expire", "icon", b"icon", "id", b"id", "latitude_i", b"latitude_i", "locked_to", b"locked_to", "longitude_i", b"longitude_i", "name", b"name"]) -> None: ... global___Waypoint = Waypoint -@typing_extensions.final +@typing.final class MqttClientProxyMessage(google.protobuf.message.Message): """ This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server @@ -1445,13 +1449,13 @@ class MqttClientProxyMessage(google.protobuf.message.Message): text: builtins.str = ..., retained: builtins.bool = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["data", b"data", "payload_variant", b"payload_variant", "text", b"text"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["data", b"data", "payload_variant", b"payload_variant", "retained", b"retained", "text", b"text", "topic", b"topic"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["payload_variant", b"payload_variant"]) -> typing_extensions.Literal["data", "text"] | None: ... + def HasField(self, field_name: typing.Literal["data", b"data", "payload_variant", b"payload_variant", "text", b"text"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["data", b"data", "payload_variant", b"payload_variant", "retained", b"retained", "text", b"text", "topic", b"topic"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["payload_variant", b"payload_variant"]) -> typing.Literal["data", "text"] | None: ... global___MqttClientProxyMessage = MqttClientProxyMessage -@typing_extensions.final +@typing.final class MeshPacket(google.protobuf.message.Message): """ A packet envelope sent/received over the mesh @@ -1619,11 +1623,6 @@ class MeshPacket(google.protobuf.message.Message): contains the 'channel hash' instead of the index. This 'trick' is only used while the payload_variant is an 'encrypted'. """ - @property - def decoded(self) -> global___Data: - """ - TODO: REPLACE - """ encrypted: builtins.bytes """ TODO: REPLACE @@ -1693,6 +1692,12 @@ class MeshPacket(google.protobuf.message.Message): Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header. When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled. """ + @property + def decoded(self) -> global___Data: + """ + TODO: REPLACE + """ + def __init__( self, *, @@ -1711,13 +1716,13 @@ class MeshPacket(google.protobuf.message.Message): via_mqtt: builtins.bool = ..., hop_start: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["decoded", b"decoded", "encrypted", b"encrypted", "payload_variant", b"payload_variant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["channel", b"channel", "decoded", b"decoded", "delayed", b"delayed", "encrypted", b"encrypted", "from", b"from", "hop_limit", b"hop_limit", "hop_start", b"hop_start", "id", b"id", "payload_variant", b"payload_variant", "priority", b"priority", "rx_rssi", b"rx_rssi", "rx_snr", b"rx_snr", "rx_time", b"rx_time", "to", b"to", "via_mqtt", b"via_mqtt", "want_ack", b"want_ack"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["payload_variant", b"payload_variant"]) -> typing_extensions.Literal["decoded", "encrypted"] | None: ... + def HasField(self, field_name: typing.Literal["decoded", b"decoded", "encrypted", b"encrypted", "payload_variant", b"payload_variant"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["channel", b"channel", "decoded", b"decoded", "delayed", b"delayed", "encrypted", b"encrypted", "from", b"from", "hop_limit", b"hop_limit", "hop_start", b"hop_start", "id", b"id", "payload_variant", b"payload_variant", "priority", b"priority", "rx_rssi", b"rx_rssi", "rx_snr", b"rx_snr", "rx_time", b"rx_time", "to", b"to", "via_mqtt", b"via_mqtt", "want_ack", b"want_ack"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["payload_variant", b"payload_variant"]) -> typing.Literal["decoded", "encrypted"] | None: ... global___MeshPacket = MeshPacket -@typing_extensions.final +@typing.final class NodeInfo(google.protobuf.message.Message): """ The bluetooth to device link: @@ -1754,17 +1759,6 @@ class NodeInfo(google.protobuf.message.Message): """ The node number """ - @property - def user(self) -> global___User: - """ - The user info for this node - """ - @property - def position(self) -> global___Position: - """ - This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true. - Position.time now indicates the last time we received a POSITION from that node. - """ snr: builtins.float """ Returns the Signal-to-noise ratio (SNR) of the last received message, @@ -1780,11 +1774,6 @@ class NodeInfo(google.protobuf.message.Message): Set to indicate the last time we received a packet from this node """ - @property - def device_metrics(self) -> meshtastic.telemetry_pb2.DeviceMetrics: - """ - The latest device metrics for the node. - """ channel: builtins.int """ local channel index we heard that node on. Only populated if its not the default channel. @@ -1802,6 +1791,25 @@ class NodeInfo(google.protobuf.message.Message): True if node is in our favorites list Persists between NodeDB internal clean ups """ + @property + def user(self) -> global___User: + """ + The user info for this node + """ + + @property + def position(self) -> global___Position: + """ + This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true. + Position.time now indicates the last time we received a POSITION from that node. + """ + + @property + def device_metrics(self) -> meshtastic.protobuf.telemetry_pb2.DeviceMetrics: + """ + The latest device metrics for the node. + """ + def __init__( self, *, @@ -1810,18 +1818,18 @@ class NodeInfo(google.protobuf.message.Message): position: global___Position | None = ..., snr: builtins.float = ..., last_heard: builtins.int = ..., - device_metrics: meshtastic.telemetry_pb2.DeviceMetrics | None = ..., + device_metrics: meshtastic.protobuf.telemetry_pb2.DeviceMetrics | None = ..., channel: builtins.int = ..., via_mqtt: builtins.bool = ..., hops_away: builtins.int = ..., is_favorite: builtins.bool = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["device_metrics", b"device_metrics", "position", b"position", "user", b"user"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["channel", b"channel", "device_metrics", b"device_metrics", "hops_away", b"hops_away", "is_favorite", b"is_favorite", "last_heard", b"last_heard", "num", b"num", "position", b"position", "snr", b"snr", "user", b"user", "via_mqtt", b"via_mqtt"]) -> None: ... + def HasField(self, field_name: typing.Literal["device_metrics", b"device_metrics", "position", b"position", "user", b"user"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["channel", b"channel", "device_metrics", b"device_metrics", "hops_away", b"hops_away", "is_favorite", b"is_favorite", "last_heard", b"last_heard", "num", b"num", "position", b"position", "snr", b"snr", "user", b"user", "via_mqtt", b"via_mqtt"]) -> None: ... global___NodeInfo = NodeInfo -@typing_extensions.final +@typing.final class MyNodeInfo(google.protobuf.message.Message): """ Unique local debugging info for this node @@ -1856,11 +1864,11 @@ class MyNodeInfo(google.protobuf.message.Message): reboot_count: builtins.int = ..., min_app_version: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["min_app_version", b"min_app_version", "my_node_num", b"my_node_num", "reboot_count", b"reboot_count"]) -> None: ... + def ClearField(self, field_name: typing.Literal["min_app_version", b"min_app_version", "my_node_num", b"my_node_num", "reboot_count", b"reboot_count"]) -> None: ... global___MyNodeInfo = MyNodeInfo -@typing_extensions.final +@typing.final class LogRecord(google.protobuf.message.Message): """ Debug output from the device. @@ -1969,11 +1977,11 @@ class LogRecord(google.protobuf.message.Message): source: builtins.str = ..., level: global___LogRecord.Level.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["level", b"level", "message", b"message", "source", b"source", "time", b"time"]) -> None: ... + def ClearField(self, field_name: typing.Literal["level", b"level", "message", b"message", "source", b"source", "time", b"time"]) -> None: ... global___LogRecord = LogRecord -@typing_extensions.final +@typing.final class QueueStatus(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1997,11 +2005,11 @@ class QueueStatus(google.protobuf.message.Message): maxlen: builtins.int = ..., mesh_packet_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["free", b"free", "maxlen", b"maxlen", "mesh_packet_id", b"mesh_packet_id", "res", b"res"]) -> None: ... + def ClearField(self, field_name: typing.Literal["free", b"free", "maxlen", b"maxlen", "mesh_packet_id", b"mesh_packet_id", "res", b"res"]) -> None: ... global___QueueStatus = QueueStatus -@typing_extensions.final +@typing.final class FromRadio(google.protobuf.message.Message): """ Packets from the radio to the phone will appear on the fromRadio characteristic. @@ -2031,33 +2039,6 @@ class FromRadio(google.protobuf.message.Message): The packet id, used to allow the phone to request missing read packets from the FIFO, see our bluetooth docs """ - @property - def packet(self) -> global___MeshPacket: - """ - Log levels, chosen to match python logging conventions. - """ - @property - def my_info(self) -> global___MyNodeInfo: - """ - Tells the phone what our node number is, can be -1 if we've not yet joined a mesh. - NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. - """ - @property - def node_info(self) -> global___NodeInfo: - """ - One packet is sent for each node in the on radio DB - starts over with the first node in our DB - """ - @property - def config(self) -> meshtastic.config_pb2.Config: - """ - Include a part of the config (was: RadioConfig radio) - """ - @property - def log_record(self) -> global___LogRecord: - """ - Set to send debug console output over our protobuf stream - """ config_complete_id: builtins.int """ Sent as true once the device has finished sending all of the responses to want_config @@ -2073,35 +2054,73 @@ class FromRadio(google.protobuf.message.Message): NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. """ @property - def moduleConfig(self) -> meshtastic.module_config_pb2.ModuleConfig: + def packet(self) -> global___MeshPacket: + """ + Log levels, chosen to match python logging conventions. + """ + + @property + def my_info(self) -> global___MyNodeInfo: + """ + Tells the phone what our node number is, can be -1 if we've not yet joined a mesh. + NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. + """ + + @property + def node_info(self) -> global___NodeInfo: + """ + One packet is sent for each node in the on radio DB + starts over with the first node in our DB + """ + + @property + def config(self) -> meshtastic.protobuf.config_pb2.Config: + """ + Include a part of the config (was: RadioConfig radio) + """ + + @property + def log_record(self) -> global___LogRecord: + """ + Set to send debug console output over our protobuf stream + """ + + @property + def moduleConfig(self) -> meshtastic.protobuf.module_config_pb2.ModuleConfig: """ Include module config """ + @property - def channel(self) -> meshtastic.channel_pb2.Channel: + def channel(self) -> meshtastic.protobuf.channel_pb2.Channel: """ One packet is sent for each channel """ + @property def queueStatus(self) -> global___QueueStatus: """ Queue status info """ + @property - def xmodemPacket(self) -> meshtastic.xmodem_pb2.XModem: + def xmodemPacket(self) -> meshtastic.protobuf.xmodem_pb2.XModem: """ File Transfer Chunk """ + @property def metadata(self) -> global___DeviceMetadata: """ Device metadata message """ + @property def mqttClientProxyMessage(self) -> global___MqttClientProxyMessage: """ MQTT Client Proxy Message (device sending to client / phone for publishing to MQTT) """ + def __init__( self, *, @@ -2109,24 +2128,24 @@ class FromRadio(google.protobuf.message.Message): packet: global___MeshPacket | None = ..., my_info: global___MyNodeInfo | None = ..., node_info: global___NodeInfo | None = ..., - config: meshtastic.config_pb2.Config | None = ..., + config: meshtastic.protobuf.config_pb2.Config | None = ..., log_record: global___LogRecord | None = ..., config_complete_id: builtins.int = ..., rebooted: builtins.bool = ..., - moduleConfig: meshtastic.module_config_pb2.ModuleConfig | None = ..., - channel: meshtastic.channel_pb2.Channel | None = ..., + moduleConfig: meshtastic.protobuf.module_config_pb2.ModuleConfig | None = ..., + channel: meshtastic.protobuf.channel_pb2.Channel | None = ..., queueStatus: global___QueueStatus | None = ..., - xmodemPacket: meshtastic.xmodem_pb2.XModem | None = ..., + xmodemPacket: meshtastic.protobuf.xmodem_pb2.XModem | None = ..., metadata: global___DeviceMetadata | None = ..., mqttClientProxyMessage: global___MqttClientProxyMessage | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["channel", b"channel", "config", b"config", "config_complete_id", b"config_complete_id", "log_record", b"log_record", "metadata", b"metadata", "moduleConfig", b"moduleConfig", "mqttClientProxyMessage", b"mqttClientProxyMessage", "my_info", b"my_info", "node_info", b"node_info", "packet", b"packet", "payload_variant", b"payload_variant", "queueStatus", b"queueStatus", "rebooted", b"rebooted", "xmodemPacket", b"xmodemPacket"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["channel", b"channel", "config", b"config", "config_complete_id", b"config_complete_id", "id", b"id", "log_record", b"log_record", "metadata", b"metadata", "moduleConfig", b"moduleConfig", "mqttClientProxyMessage", b"mqttClientProxyMessage", "my_info", b"my_info", "node_info", b"node_info", "packet", b"packet", "payload_variant", b"payload_variant", "queueStatus", b"queueStatus", "rebooted", b"rebooted", "xmodemPacket", b"xmodemPacket"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["payload_variant", b"payload_variant"]) -> typing_extensions.Literal["packet", "my_info", "node_info", "config", "log_record", "config_complete_id", "rebooted", "moduleConfig", "channel", "queueStatus", "xmodemPacket", "metadata", "mqttClientProxyMessage"] | None: ... + def HasField(self, field_name: typing.Literal["channel", b"channel", "config", b"config", "config_complete_id", b"config_complete_id", "log_record", b"log_record", "metadata", b"metadata", "moduleConfig", b"moduleConfig", "mqttClientProxyMessage", b"mqttClientProxyMessage", "my_info", b"my_info", "node_info", b"node_info", "packet", b"packet", "payload_variant", b"payload_variant", "queueStatus", b"queueStatus", "rebooted", b"rebooted", "xmodemPacket", b"xmodemPacket"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["channel", b"channel", "config", b"config", "config_complete_id", b"config_complete_id", "id", b"id", "log_record", b"log_record", "metadata", b"metadata", "moduleConfig", b"moduleConfig", "mqttClientProxyMessage", b"mqttClientProxyMessage", "my_info", b"my_info", "node_info", b"node_info", "packet", b"packet", "payload_variant", b"payload_variant", "queueStatus", b"queueStatus", "rebooted", b"rebooted", "xmodemPacket", b"xmodemPacket"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["payload_variant", b"payload_variant"]) -> typing.Literal["packet", "my_info", "node_info", "config", "log_record", "config_complete_id", "rebooted", "moduleConfig", "channel", "queueStatus", "xmodemPacket", "metadata", "mqttClientProxyMessage"] | None: ... global___FromRadio = FromRadio -@typing_extensions.final +@typing.final class ToRadio(google.protobuf.message.Message): """ Packets/commands to the radio will be written (reliably) to the toRadio characteristic. @@ -2141,11 +2160,6 @@ class ToRadio(google.protobuf.message.Message): XMODEMPACKET_FIELD_NUMBER: builtins.int MQTTCLIENTPROXYMESSAGE_FIELD_NUMBER: builtins.int HEARTBEAT_FIELD_NUMBER: builtins.int - @property - def packet(self) -> global___MeshPacket: - """ - Send this packet on the mesh - """ want_config_id: builtins.int """ Phone wants radio to send full node db to the phone, This is @@ -2164,37 +2178,46 @@ class ToRadio(google.protobuf.message.Message): (Sending this message is optional for clients) """ @property - def xmodemPacket(self) -> meshtastic.xmodem_pb2.XModem: + def packet(self) -> global___MeshPacket: + """ + Send this packet on the mesh + """ + + @property + def xmodemPacket(self) -> meshtastic.protobuf.xmodem_pb2.XModem: """ File Transfer Chunk """ + @property def mqttClientProxyMessage(self) -> global___MqttClientProxyMessage: """ MQTT Client Proxy Message (for client / phone subscribed to MQTT sending to device) """ + @property def heartbeat(self) -> global___Heartbeat: """ Heartbeat message (used to keep the device connection awake on serial) """ + def __init__( self, *, packet: global___MeshPacket | None = ..., want_config_id: builtins.int = ..., disconnect: builtins.bool = ..., - xmodemPacket: meshtastic.xmodem_pb2.XModem | None = ..., + xmodemPacket: meshtastic.protobuf.xmodem_pb2.XModem | None = ..., mqttClientProxyMessage: global___MqttClientProxyMessage | None = ..., heartbeat: global___Heartbeat | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["disconnect", b"disconnect", "heartbeat", b"heartbeat", "mqttClientProxyMessage", b"mqttClientProxyMessage", "packet", b"packet", "payload_variant", b"payload_variant", "want_config_id", b"want_config_id", "xmodemPacket", b"xmodemPacket"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["disconnect", b"disconnect", "heartbeat", b"heartbeat", "mqttClientProxyMessage", b"mqttClientProxyMessage", "packet", b"packet", "payload_variant", b"payload_variant", "want_config_id", b"want_config_id", "xmodemPacket", b"xmodemPacket"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["payload_variant", b"payload_variant"]) -> typing_extensions.Literal["packet", "want_config_id", "disconnect", "xmodemPacket", "mqttClientProxyMessage", "heartbeat"] | None: ... + def HasField(self, field_name: typing.Literal["disconnect", b"disconnect", "heartbeat", b"heartbeat", "mqttClientProxyMessage", b"mqttClientProxyMessage", "packet", b"packet", "payload_variant", b"payload_variant", "want_config_id", b"want_config_id", "xmodemPacket", b"xmodemPacket"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["disconnect", b"disconnect", "heartbeat", b"heartbeat", "mqttClientProxyMessage", b"mqttClientProxyMessage", "packet", b"packet", "payload_variant", b"payload_variant", "want_config_id", b"want_config_id", "xmodemPacket", b"xmodemPacket"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["payload_variant", b"payload_variant"]) -> typing.Literal["packet", "want_config_id", "disconnect", "xmodemPacket", "mqttClientProxyMessage", "heartbeat"] | None: ... global___ToRadio = ToRadio -@typing_extensions.final +@typing.final class Compressed(google.protobuf.message.Message): """ Compressed message payload @@ -2204,7 +2227,7 @@ class Compressed(google.protobuf.message.Message): PORTNUM_FIELD_NUMBER: builtins.int DATA_FIELD_NUMBER: builtins.int - portnum: meshtastic.portnums_pb2.PortNum.ValueType + portnum: meshtastic.protobuf.portnums_pb2.PortNum.ValueType """ PortNum to determine the how to handle the compressed payload. """ @@ -2215,14 +2238,14 @@ class Compressed(google.protobuf.message.Message): def __init__( self, *, - portnum: meshtastic.portnums_pb2.PortNum.ValueType = ..., + portnum: meshtastic.protobuf.portnums_pb2.PortNum.ValueType = ..., data: builtins.bytes = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["data", b"data", "portnum", b"portnum"]) -> None: ... + def ClearField(self, field_name: typing.Literal["data", b"data", "portnum", b"portnum"]) -> None: ... global___Compressed = Compressed -@typing_extensions.final +@typing.final class NeighborInfo(google.protobuf.message.Message): """ Full info on edges for a single node @@ -2251,6 +2274,7 @@ class NeighborInfo(google.protobuf.message.Message): """ The list of out edges from this node """ + def __init__( self, *, @@ -2259,11 +2283,11 @@ class NeighborInfo(google.protobuf.message.Message): node_broadcast_interval_secs: builtins.int = ..., neighbors: collections.abc.Iterable[global___Neighbor] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["last_sent_by_id", b"last_sent_by_id", "neighbors", b"neighbors", "node_broadcast_interval_secs", b"node_broadcast_interval_secs", "node_id", b"node_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["last_sent_by_id", b"last_sent_by_id", "neighbors", b"neighbors", "node_broadcast_interval_secs", b"node_broadcast_interval_secs", "node_id", b"node_id"]) -> None: ... global___NeighborInfo = NeighborInfo -@typing_extensions.final +@typing.final class Neighbor(google.protobuf.message.Message): """ A single edge in the mesh @@ -2301,11 +2325,11 @@ class Neighbor(google.protobuf.message.Message): last_rx_time: builtins.int = ..., node_broadcast_interval_secs: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["last_rx_time", b"last_rx_time", "node_broadcast_interval_secs", b"node_broadcast_interval_secs", "node_id", b"node_id", "snr", b"snr"]) -> None: ... + def ClearField(self, field_name: typing.Literal["last_rx_time", b"last_rx_time", "node_broadcast_interval_secs", b"node_broadcast_interval_secs", "node_id", b"node_id", "snr", b"snr"]) -> None: ... global___Neighbor = Neighbor -@typing_extensions.final +@typing.final class DeviceMetadata(google.protobuf.message.Message): """ Device metadata response @@ -2347,7 +2371,7 @@ class DeviceMetadata(google.protobuf.message.Message): """ Indicates that the device has an ethernet peripheral """ - role: meshtastic.config_pb2.Config.DeviceConfig.Role.ValueType + role: meshtastic.protobuf.config_pb2.Config.DeviceConfig.Role.ValueType """ Indicates that the device's role in the mesh """ @@ -2372,16 +2396,16 @@ class DeviceMetadata(google.protobuf.message.Message): hasWifi: builtins.bool = ..., hasBluetooth: builtins.bool = ..., hasEthernet: builtins.bool = ..., - role: meshtastic.config_pb2.Config.DeviceConfig.Role.ValueType = ..., + role: meshtastic.protobuf.config_pb2.Config.DeviceConfig.Role.ValueType = ..., position_flags: builtins.int = ..., hw_model: global___HardwareModel.ValueType = ..., hasRemoteHardware: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["canShutdown", b"canShutdown", "device_state_version", b"device_state_version", "firmware_version", b"firmware_version", "hasBluetooth", b"hasBluetooth", "hasEthernet", b"hasEthernet", "hasRemoteHardware", b"hasRemoteHardware", "hasWifi", b"hasWifi", "hw_model", b"hw_model", "position_flags", b"position_flags", "role", b"role"]) -> None: ... + def ClearField(self, field_name: typing.Literal["canShutdown", b"canShutdown", "device_state_version", b"device_state_version", "firmware_version", b"firmware_version", "hasBluetooth", b"hasBluetooth", "hasEthernet", b"hasEthernet", "hasRemoteHardware", b"hasRemoteHardware", "hasWifi", b"hasWifi", "hw_model", b"hw_model", "position_flags", b"position_flags", "role", b"role"]) -> None: ... global___DeviceMetadata = DeviceMetadata -@typing_extensions.final +@typing.final class Heartbeat(google.protobuf.message.Message): """ A heartbeat message is sent to the node from the client to keep the connection alive. @@ -2396,7 +2420,7 @@ class Heartbeat(google.protobuf.message.Message): global___Heartbeat = Heartbeat -@typing_extensions.final +@typing.final class NodeRemoteHardwarePin(google.protobuf.message.Message): """ RemoteHardwarePins associated with a node @@ -2411,22 +2435,23 @@ class NodeRemoteHardwarePin(google.protobuf.message.Message): The node_num exposing the available gpio pin """ @property - def pin(self) -> meshtastic.module_config_pb2.RemoteHardwarePin: + def pin(self) -> meshtastic.protobuf.module_config_pb2.RemoteHardwarePin: """ The the available gpio pin for usage with RemoteHardware module """ + def __init__( self, *, node_num: builtins.int = ..., - pin: meshtastic.module_config_pb2.RemoteHardwarePin | None = ..., + pin: meshtastic.protobuf.module_config_pb2.RemoteHardwarePin | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["pin", b"pin"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["node_num", b"node_num", "pin", b"pin"]) -> None: ... + def HasField(self, field_name: typing.Literal["pin", b"pin"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["node_num", b"node_num", "pin", b"pin"]) -> None: ... global___NodeRemoteHardwarePin = NodeRemoteHardwarePin -@typing_extensions.final +@typing.final class ChunkedPayload(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2458,11 +2483,11 @@ class ChunkedPayload(google.protobuf.message.Message): chunk_index: builtins.int = ..., payload_chunk: builtins.bytes = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["chunk_count", b"chunk_count", "chunk_index", b"chunk_index", "payload_chunk", b"payload_chunk", "payload_id", b"payload_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["chunk_count", b"chunk_count", "chunk_index", b"chunk_index", "payload_chunk", b"payload_chunk", "payload_id", b"payload_id"]) -> None: ... global___ChunkedPayload = ChunkedPayload -@typing_extensions.final +@typing.final class resend_chunks(google.protobuf.message.Message): """ Wrapper message for broken repeated oneof support @@ -2478,11 +2503,11 @@ class resend_chunks(google.protobuf.message.Message): *, chunks: collections.abc.Iterable[builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["chunks", b"chunks"]) -> None: ... + def ClearField(self, field_name: typing.Literal["chunks", b"chunks"]) -> None: ... global___resend_chunks = resend_chunks -@typing_extensions.final +@typing.final class ChunkedPayloadResponse(google.protobuf.message.Message): """ Responses to a ChunkedPayload request @@ -2511,6 +2536,7 @@ class ChunkedPayloadResponse(google.protobuf.message.Message): """ Request missing indexes in the chunked payload """ + def __init__( self, *, @@ -2519,8 +2545,8 @@ class ChunkedPayloadResponse(google.protobuf.message.Message): accept_transfer: builtins.bool = ..., resend_chunks: global___resend_chunks | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["accept_transfer", b"accept_transfer", "payload_variant", b"payload_variant", "request_transfer", b"request_transfer", "resend_chunks", b"resend_chunks"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["accept_transfer", b"accept_transfer", "payload_id", b"payload_id", "payload_variant", b"payload_variant", "request_transfer", b"request_transfer", "resend_chunks", b"resend_chunks"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["payload_variant", b"payload_variant"]) -> typing_extensions.Literal["request_transfer", "accept_transfer", "resend_chunks"] | None: ... + def HasField(self, field_name: typing.Literal["accept_transfer", b"accept_transfer", "payload_variant", b"payload_variant", "request_transfer", b"request_transfer", "resend_chunks", b"resend_chunks"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["accept_transfer", b"accept_transfer", "payload_id", b"payload_id", "payload_variant", b"payload_variant", "request_transfer", b"request_transfer", "resend_chunks", b"resend_chunks"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["payload_variant", b"payload_variant"]) -> typing.Literal["request_transfer", "accept_transfer", "resend_chunks"] | None: ... global___ChunkedPayloadResponse = ChunkedPayloadResponse diff --git a/meshtastic/protobuf/module_config_pb2.py b/meshtastic/protobuf/module_config_pb2.py new file mode 100644 index 0000000..b75bbfa --- /dev/null +++ b/meshtastic/protobuf/module_config_pb2.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/module_config.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'meshtastic/protobuf/module_config.proto\x12\x13meshtastic.protobuf\"\x90$\n\x0cModuleConfig\x12<\n\x04mqtt\x18\x01 \x01(\x0b\x32,.meshtastic.protobuf.ModuleConfig.MQTTConfigH\x00\x12@\n\x06serial\x18\x02 \x01(\x0b\x32..meshtastic.protobuf.ModuleConfig.SerialConfigH\x00\x12]\n\x15\x65xternal_notification\x18\x03 \x01(\x0b\x32<.meshtastic.protobuf.ModuleConfig.ExternalNotificationConfigH\x00\x12M\n\rstore_forward\x18\x04 \x01(\x0b\x32\x34.meshtastic.protobuf.ModuleConfig.StoreForwardConfigH\x00\x12G\n\nrange_test\x18\x05 \x01(\x0b\x32\x31.meshtastic.protobuf.ModuleConfig.RangeTestConfigH\x00\x12\x46\n\ttelemetry\x18\x06 \x01(\x0b\x32\x31.meshtastic.protobuf.ModuleConfig.TelemetryConfigH\x00\x12O\n\x0e\x63\x61nned_message\x18\x07 \x01(\x0b\x32\x35.meshtastic.protobuf.ModuleConfig.CannedMessageConfigH\x00\x12>\n\x05\x61udio\x18\x08 \x01(\x0b\x32-.meshtastic.protobuf.ModuleConfig.AudioConfigH\x00\x12Q\n\x0fremote_hardware\x18\t \x01(\x0b\x32\x36.meshtastic.protobuf.ModuleConfig.RemoteHardwareConfigH\x00\x12M\n\rneighbor_info\x18\n \x01(\x0b\x32\x34.meshtastic.protobuf.ModuleConfig.NeighborInfoConfigH\x00\x12S\n\x10\x61mbient_lighting\x18\x0b \x01(\x0b\x32\x37.meshtastic.protobuf.ModuleConfig.AmbientLightingConfigH\x00\x12S\n\x10\x64\x65tection_sensor\x18\x0c \x01(\x0b\x32\x37.meshtastic.protobuf.ModuleConfig.DetectionSensorConfigH\x00\x12H\n\npaxcounter\x18\r \x01(\x0b\x32\x32.meshtastic.protobuf.ModuleConfig.PaxcounterConfigH\x00\x1a\xb9\x02\n\nMQTTConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x10\n\x08username\x18\x03 \x01(\t\x12\x10\n\x08password\x18\x04 \x01(\t\x12\x1a\n\x12\x65ncryption_enabled\x18\x05 \x01(\x08\x12\x14\n\x0cjson_enabled\x18\x06 \x01(\x08\x12\x13\n\x0btls_enabled\x18\x07 \x01(\x08\x12\x0c\n\x04root\x18\x08 \x01(\t\x12\x1f\n\x17proxy_to_client_enabled\x18\t \x01(\x08\x12\x1d\n\x15map_reporting_enabled\x18\n \x01(\x08\x12P\n\x13map_report_settings\x18\x0b \x01(\x0b\x32\x33.meshtastic.protobuf.ModuleConfig.MapReportSettings\x1aN\n\x11MapReportSettings\x12\x1d\n\x15publish_interval_secs\x18\x01 \x01(\r\x12\x1a\n\x12position_precision\x18\x02 \x01(\r\x1a\x8b\x01\n\x14RemoteHardwareConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\"\n\x1a\x61llow_undefined_pin_access\x18\x02 \x01(\x08\x12>\n\x0e\x61vailable_pins\x18\x03 \x03(\x0b\x32&.meshtastic.protobuf.RemoteHardwarePin\x1a>\n\x12NeighborInfoConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x17\n\x0fupdate_interval\x18\x02 \x01(\r\x1a\xd2\x01\n\x15\x44\x65tectionSensorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x16minimum_broadcast_secs\x18\x02 \x01(\r\x12\x1c\n\x14state_broadcast_secs\x18\x03 \x01(\r\x12\x11\n\tsend_bell\x18\x04 \x01(\x08\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x13\n\x0bmonitor_pin\x18\x06 \x01(\r\x12 \n\x18\x64\x65tection_triggered_high\x18\x07 \x01(\x08\x12\x12\n\nuse_pullup\x18\x08 \x01(\x08\x1a\xed\x02\n\x0b\x41udioConfig\x12\x16\n\x0e\x63odec2_enabled\x18\x01 \x01(\x08\x12\x0f\n\x07ptt_pin\x18\x02 \x01(\r\x12I\n\x07\x62itrate\x18\x03 \x01(\x0e\x32\x38.meshtastic.protobuf.ModuleConfig.AudioConfig.Audio_Baud\x12\x0e\n\x06i2s_ws\x18\x04 \x01(\r\x12\x0e\n\x06i2s_sd\x18\x05 \x01(\r\x12\x0f\n\x07i2s_din\x18\x06 \x01(\r\x12\x0f\n\x07i2s_sck\x18\x07 \x01(\r\"\xa7\x01\n\nAudio_Baud\x12\x12\n\x0e\x43ODEC2_DEFAULT\x10\x00\x12\x0f\n\x0b\x43ODEC2_3200\x10\x01\x12\x0f\n\x0b\x43ODEC2_2400\x10\x02\x12\x0f\n\x0b\x43ODEC2_1600\x10\x03\x12\x0f\n\x0b\x43ODEC2_1400\x10\x04\x12\x0f\n\x0b\x43ODEC2_1300\x10\x05\x12\x0f\n\x0b\x43ODEC2_1200\x10\x06\x12\x0e\n\nCODEC2_700\x10\x07\x12\x0f\n\x0b\x43ODEC2_700B\x10\x08\x1av\n\x10PaxcounterConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\"\n\x1apaxcounter_update_interval\x18\x02 \x01(\r\x12\x16\n\x0ewifi_threshold\x18\x03 \x01(\x05\x12\x15\n\rble_threshold\x18\x04 \x01(\x05\x1a\xf6\x04\n\x0cSerialConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0c\n\x04\x65\x63ho\x18\x02 \x01(\x08\x12\x0b\n\x03rxd\x18\x03 \x01(\r\x12\x0b\n\x03txd\x18\x04 \x01(\r\x12H\n\x04\x62\x61ud\x18\x05 \x01(\x0e\x32:.meshtastic.protobuf.ModuleConfig.SerialConfig.Serial_Baud\x12\x0f\n\x07timeout\x18\x06 \x01(\r\x12H\n\x04mode\x18\x07 \x01(\x0e\x32:.meshtastic.protobuf.ModuleConfig.SerialConfig.Serial_Mode\x12$\n\x1coverride_console_serial_port\x18\x08 \x01(\x08\"\x8a\x02\n\x0bSerial_Baud\x12\x10\n\x0c\x42\x41UD_DEFAULT\x10\x00\x12\x0c\n\x08\x42\x41UD_110\x10\x01\x12\x0c\n\x08\x42\x41UD_300\x10\x02\x12\x0c\n\x08\x42\x41UD_600\x10\x03\x12\r\n\tBAUD_1200\x10\x04\x12\r\n\tBAUD_2400\x10\x05\x12\r\n\tBAUD_4800\x10\x06\x12\r\n\tBAUD_9600\x10\x07\x12\x0e\n\nBAUD_19200\x10\x08\x12\x0e\n\nBAUD_38400\x10\t\x12\x0e\n\nBAUD_57600\x10\n\x12\x0f\n\x0b\x42\x41UD_115200\x10\x0b\x12\x0f\n\x0b\x42\x41UD_230400\x10\x0c\x12\x0f\n\x0b\x42\x41UD_460800\x10\r\x12\x0f\n\x0b\x42\x41UD_576000\x10\x0e\x12\x0f\n\x0b\x42\x41UD_921600\x10\x0f\"U\n\x0bSerial_Mode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\n\n\x06SIMPLE\x10\x01\x12\t\n\x05PROTO\x10\x02\x12\x0b\n\x07TEXTMSG\x10\x03\x12\x08\n\x04NMEA\x10\x04\x12\x0b\n\x07\x43\x41LTOPO\x10\x05\x1a\xe9\x02\n\x1a\x45xternalNotificationConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x11\n\toutput_ms\x18\x02 \x01(\r\x12\x0e\n\x06output\x18\x03 \x01(\r\x12\x14\n\x0coutput_vibra\x18\x08 \x01(\r\x12\x15\n\routput_buzzer\x18\t \x01(\r\x12\x0e\n\x06\x61\x63tive\x18\x04 \x01(\x08\x12\x15\n\ralert_message\x18\x05 \x01(\x08\x12\x1b\n\x13\x61lert_message_vibra\x18\n \x01(\x08\x12\x1c\n\x14\x61lert_message_buzzer\x18\x0b \x01(\x08\x12\x12\n\nalert_bell\x18\x06 \x01(\x08\x12\x18\n\x10\x61lert_bell_vibra\x18\x0c \x01(\x08\x12\x19\n\x11\x61lert_bell_buzzer\x18\r \x01(\x08\x12\x0f\n\x07use_pwm\x18\x07 \x01(\x08\x12\x13\n\x0bnag_timeout\x18\x0e \x01(\r\x12\x19\n\x11use_i2s_as_buzzer\x18\x0f \x01(\x08\x1a\x84\x01\n\x12StoreForwardConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x11\n\theartbeat\x18\x02 \x01(\x08\x12\x0f\n\x07records\x18\x03 \x01(\r\x12\x1a\n\x12history_return_max\x18\x04 \x01(\r\x12\x1d\n\x15history_return_window\x18\x05 \x01(\r\x1a@\n\x0fRangeTestConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0e\n\x06sender\x18\x02 \x01(\r\x12\x0c\n\x04save\x18\x03 \x01(\x08\x1a\xe6\x02\n\x0fTelemetryConfig\x12\x1e\n\x16\x64\x65vice_update_interval\x18\x01 \x01(\r\x12#\n\x1b\x65nvironment_update_interval\x18\x02 \x01(\r\x12\'\n\x1f\x65nvironment_measurement_enabled\x18\x03 \x01(\x08\x12\"\n\x1a\x65nvironment_screen_enabled\x18\x04 \x01(\x08\x12&\n\x1e\x65nvironment_display_fahrenheit\x18\x05 \x01(\x08\x12\x1b\n\x13\x61ir_quality_enabled\x18\x06 \x01(\x08\x12\x1c\n\x14\x61ir_quality_interval\x18\x07 \x01(\r\x12!\n\x19power_measurement_enabled\x18\x08 \x01(\x08\x12\x1d\n\x15power_update_interval\x18\t \x01(\r\x12\x1c\n\x14power_screen_enabled\x18\n \x01(\x08\x1a\xf1\x04\n\x13\x43\x61nnedMessageConfig\x12\x17\n\x0frotary1_enabled\x18\x01 \x01(\x08\x12\x19\n\x11inputbroker_pin_a\x18\x02 \x01(\r\x12\x19\n\x11inputbroker_pin_b\x18\x03 \x01(\r\x12\x1d\n\x15inputbroker_pin_press\x18\x04 \x01(\r\x12\x62\n\x14inputbroker_event_cw\x18\x05 \x01(\x0e\x32\x44.meshtastic.protobuf.ModuleConfig.CannedMessageConfig.InputEventChar\x12\x63\n\x15inputbroker_event_ccw\x18\x06 \x01(\x0e\x32\x44.meshtastic.protobuf.ModuleConfig.CannedMessageConfig.InputEventChar\x12\x65\n\x17inputbroker_event_press\x18\x07 \x01(\x0e\x32\x44.meshtastic.protobuf.ModuleConfig.CannedMessageConfig.InputEventChar\x12\x17\n\x0fupdown1_enabled\x18\x08 \x01(\x08\x12\x0f\n\x07\x65nabled\x18\t \x01(\x08\x12\x1a\n\x12\x61llow_input_source\x18\n \x01(\t\x12\x11\n\tsend_bell\x18\x0b \x01(\x08\"c\n\x0eInputEventChar\x12\x08\n\x04NONE\x10\x00\x12\x06\n\x02UP\x10\x11\x12\x08\n\x04\x44OWN\x10\x12\x12\x08\n\x04LEFT\x10\x13\x12\t\n\x05RIGHT\x10\x14\x12\n\n\x06SELECT\x10\n\x12\x08\n\x04\x42\x41\x43K\x10\x1b\x12\n\n\x06\x43\x41NCEL\x10\x18\x1a\x65\n\x15\x41mbientLightingConfig\x12\x11\n\tled_state\x18\x01 \x01(\x08\x12\x0f\n\x07\x63urrent\x18\x02 \x01(\r\x12\x0b\n\x03red\x18\x03 \x01(\r\x12\r\n\x05green\x18\x04 \x01(\r\x12\x0c\n\x04\x62lue\x18\x05 \x01(\rB\x11\n\x0fpayload_variant\"m\n\x11RemoteHardwarePin\x12\x10\n\x08gpio_pin\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x38\n\x04type\x18\x03 \x01(\x0e\x32*.meshtastic.protobuf.RemoteHardwarePinType*I\n\x15RemoteHardwarePinType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0c\x44IGITAL_READ\x10\x01\x12\x11\n\rDIGITAL_WRITE\x10\x02\x42g\n\x13\x63om.geeksville.meshB\x12ModuleConfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.module_config_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\022ModuleConfigProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_REMOTEHARDWAREPINTYPE']._serialized_start=4802 + _globals['_REMOTEHARDWAREPINTYPE']._serialized_end=4875 + _globals['_MODULECONFIG']._serialized_start=65 + _globals['_MODULECONFIG']._serialized_end=4689 + _globals['_MODULECONFIG_MQTTCONFIG']._serialized_start=1080 + _globals['_MODULECONFIG_MQTTCONFIG']._serialized_end=1393 + _globals['_MODULECONFIG_MAPREPORTSETTINGS']._serialized_start=1395 + _globals['_MODULECONFIG_MAPREPORTSETTINGS']._serialized_end=1473 + _globals['_MODULECONFIG_REMOTEHARDWARECONFIG']._serialized_start=1476 + _globals['_MODULECONFIG_REMOTEHARDWARECONFIG']._serialized_end=1615 + _globals['_MODULECONFIG_NEIGHBORINFOCONFIG']._serialized_start=1617 + _globals['_MODULECONFIG_NEIGHBORINFOCONFIG']._serialized_end=1679 + _globals['_MODULECONFIG_DETECTIONSENSORCONFIG']._serialized_start=1682 + _globals['_MODULECONFIG_DETECTIONSENSORCONFIG']._serialized_end=1892 + _globals['_MODULECONFIG_AUDIOCONFIG']._serialized_start=1895 + _globals['_MODULECONFIG_AUDIOCONFIG']._serialized_end=2260 + _globals['_MODULECONFIG_AUDIOCONFIG_AUDIO_BAUD']._serialized_start=2093 + _globals['_MODULECONFIG_AUDIOCONFIG_AUDIO_BAUD']._serialized_end=2260 + _globals['_MODULECONFIG_PAXCOUNTERCONFIG']._serialized_start=2262 + _globals['_MODULECONFIG_PAXCOUNTERCONFIG']._serialized_end=2380 + _globals['_MODULECONFIG_SERIALCONFIG']._serialized_start=2383 + _globals['_MODULECONFIG_SERIALCONFIG']._serialized_end=3013 + _globals['_MODULECONFIG_SERIALCONFIG_SERIAL_BAUD']._serialized_start=2660 + _globals['_MODULECONFIG_SERIALCONFIG_SERIAL_BAUD']._serialized_end=2926 + _globals['_MODULECONFIG_SERIALCONFIG_SERIAL_MODE']._serialized_start=2928 + _globals['_MODULECONFIG_SERIALCONFIG_SERIAL_MODE']._serialized_end=3013 + _globals['_MODULECONFIG_EXTERNALNOTIFICATIONCONFIG']._serialized_start=3016 + _globals['_MODULECONFIG_EXTERNALNOTIFICATIONCONFIG']._serialized_end=3377 + _globals['_MODULECONFIG_STOREFORWARDCONFIG']._serialized_start=3380 + _globals['_MODULECONFIG_STOREFORWARDCONFIG']._serialized_end=3512 + _globals['_MODULECONFIG_RANGETESTCONFIG']._serialized_start=3514 + _globals['_MODULECONFIG_RANGETESTCONFIG']._serialized_end=3578 + _globals['_MODULECONFIG_TELEMETRYCONFIG']._serialized_start=3581 + _globals['_MODULECONFIG_TELEMETRYCONFIG']._serialized_end=3939 + _globals['_MODULECONFIG_CANNEDMESSAGECONFIG']._serialized_start=3942 + _globals['_MODULECONFIG_CANNEDMESSAGECONFIG']._serialized_end=4567 + _globals['_MODULECONFIG_CANNEDMESSAGECONFIG_INPUTEVENTCHAR']._serialized_start=4468 + _globals['_MODULECONFIG_CANNEDMESSAGECONFIG_INPUTEVENTCHAR']._serialized_end=4567 + _globals['_MODULECONFIG_AMBIENTLIGHTINGCONFIG']._serialized_start=4569 + _globals['_MODULECONFIG_AMBIENTLIGHTINGCONFIG']._serialized_end=4670 + _globals['_REMOTEHARDWAREPIN']._serialized_start=4691 + _globals['_REMOTEHARDWAREPIN']._serialized_end=4800 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/module_config_pb2.pyi b/meshtastic/protobuf/module_config_pb2.pyi similarity index 86% rename from meshtastic/module_config_pb2.pyi rename to meshtastic/protobuf/module_config_pb2.pyi index 67bb608..eb4f986 100644 --- a/meshtastic/module_config_pb2.pyi +++ b/meshtastic/protobuf/module_config_pb2.pyi @@ -2,6 +2,7 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import collections.abc import google.protobuf.descriptor @@ -53,7 +54,7 @@ GPIO pin can be written to (high / low) """ global___RemoteHardwarePinType = RemoteHardwarePinType -@typing_extensions.final +@typing.final class ModuleConfig(google.protobuf.message.Message): """ Module Config @@ -61,7 +62,7 @@ class ModuleConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class MQTTConfig(google.protobuf.message.Message): """ MQTT Client Config @@ -135,6 +136,7 @@ class ModuleConfig(google.protobuf.message.Message): """ Settings for reporting information about our node to a map via MQTT """ + def __init__( self, *, @@ -150,10 +152,10 @@ class ModuleConfig(google.protobuf.message.Message): map_reporting_enabled: builtins.bool = ..., map_report_settings: global___ModuleConfig.MapReportSettings | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["map_report_settings", b"map_report_settings"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["address", b"address", "enabled", b"enabled", "encryption_enabled", b"encryption_enabled", "json_enabled", b"json_enabled", "map_report_settings", b"map_report_settings", "map_reporting_enabled", b"map_reporting_enabled", "password", b"password", "proxy_to_client_enabled", b"proxy_to_client_enabled", "root", b"root", "tls_enabled", b"tls_enabled", "username", b"username"]) -> None: ... + def HasField(self, field_name: typing.Literal["map_report_settings", b"map_report_settings"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["address", b"address", "enabled", b"enabled", "encryption_enabled", b"encryption_enabled", "json_enabled", b"json_enabled", "map_report_settings", b"map_report_settings", "map_reporting_enabled", b"map_reporting_enabled", "password", b"password", "proxy_to_client_enabled", b"proxy_to_client_enabled", "root", b"root", "tls_enabled", b"tls_enabled", "username", b"username"]) -> None: ... - @typing_extensions.final + @typing.final class MapReportSettings(google.protobuf.message.Message): """ Settings for reporting unencrypted information about our node to a map via MQTT @@ -177,9 +179,9 @@ class ModuleConfig(google.protobuf.message.Message): publish_interval_secs: builtins.int = ..., position_precision: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["position_precision", b"position_precision", "publish_interval_secs", b"publish_interval_secs"]) -> None: ... + def ClearField(self, field_name: typing.Literal["position_precision", b"position_precision", "publish_interval_secs", b"publish_interval_secs"]) -> None: ... - @typing_extensions.final + @typing.final class RemoteHardwareConfig(google.protobuf.message.Message): """ RemoteHardwareModule Config @@ -203,6 +205,7 @@ class ModuleConfig(google.protobuf.message.Message): """ Exposes the available pins to the mesh for reading and writing """ + def __init__( self, *, @@ -210,9 +213,9 @@ class ModuleConfig(google.protobuf.message.Message): allow_undefined_pin_access: builtins.bool = ..., available_pins: collections.abc.Iterable[global___RemoteHardwarePin] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["allow_undefined_pin_access", b"allow_undefined_pin_access", "available_pins", b"available_pins", "enabled", b"enabled"]) -> None: ... + def ClearField(self, field_name: typing.Literal["allow_undefined_pin_access", b"allow_undefined_pin_access", "available_pins", b"available_pins", "enabled", b"enabled"]) -> None: ... - @typing_extensions.final + @typing.final class NeighborInfoConfig(google.protobuf.message.Message): """ NeighborInfoModule Config @@ -237,9 +240,9 @@ class ModuleConfig(google.protobuf.message.Message): enabled: builtins.bool = ..., update_interval: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["enabled", b"enabled", "update_interval", b"update_interval"]) -> None: ... + def ClearField(self, field_name: typing.Literal["enabled", b"enabled", "update_interval", b"update_interval"]) -> None: ... - @typing_extensions.final + @typing.final class DetectionSensorConfig(google.protobuf.message.Message): """ Detection Sensor Module Config @@ -306,9 +309,9 @@ class ModuleConfig(google.protobuf.message.Message): detection_triggered_high: builtins.bool = ..., use_pullup: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["detection_triggered_high", b"detection_triggered_high", "enabled", b"enabled", "minimum_broadcast_secs", b"minimum_broadcast_secs", "monitor_pin", b"monitor_pin", "name", b"name", "send_bell", b"send_bell", "state_broadcast_secs", b"state_broadcast_secs", "use_pullup", b"use_pullup"]) -> None: ... + def ClearField(self, field_name: typing.Literal["detection_triggered_high", b"detection_triggered_high", "enabled", b"enabled", "minimum_broadcast_secs", b"minimum_broadcast_secs", "monitor_pin", b"monitor_pin", "name", b"name", "send_bell", b"send_bell", "state_broadcast_secs", b"state_broadcast_secs", "use_pullup", b"use_pullup"]) -> None: ... - @typing_extensions.final + @typing.final class AudioConfig(google.protobuf.message.Message): """ Audio Config for codec2 voice @@ -393,9 +396,9 @@ class ModuleConfig(google.protobuf.message.Message): i2s_din: builtins.int = ..., i2s_sck: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["bitrate", b"bitrate", "codec2_enabled", b"codec2_enabled", "i2s_din", b"i2s_din", "i2s_sck", b"i2s_sck", "i2s_sd", b"i2s_sd", "i2s_ws", b"i2s_ws", "ptt_pin", b"ptt_pin"]) -> None: ... + def ClearField(self, field_name: typing.Literal["bitrate", b"bitrate", "codec2_enabled", b"codec2_enabled", "i2s_din", b"i2s_din", "i2s_sck", b"i2s_sck", "i2s_sd", b"i2s_sd", "i2s_ws", b"i2s_ws", "ptt_pin", b"ptt_pin"]) -> None: ... - @typing_extensions.final + @typing.final class PaxcounterConfig(google.protobuf.message.Message): """ Config for the Paxcounter Module @@ -432,9 +435,9 @@ class ModuleConfig(google.protobuf.message.Message): wifi_threshold: builtins.int = ..., ble_threshold: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["ble_threshold", b"ble_threshold", "enabled", b"enabled", "paxcounter_update_interval", b"paxcounter_update_interval", "wifi_threshold", b"wifi_threshold"]) -> None: ... + def ClearField(self, field_name: typing.Literal["ble_threshold", b"ble_threshold", "enabled", b"enabled", "paxcounter_update_interval", b"paxcounter_update_interval", "wifi_threshold", b"wifi_threshold"]) -> None: ... - @typing_extensions.final + @typing.final class SerialConfig(google.protobuf.message.Message): """ Serial Config @@ -568,9 +571,9 @@ class ModuleConfig(google.protobuf.message.Message): mode: global___ModuleConfig.SerialConfig.Serial_Mode.ValueType = ..., override_console_serial_port: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["baud", b"baud", "echo", b"echo", "enabled", b"enabled", "mode", b"mode", "override_console_serial_port", b"override_console_serial_port", "rxd", b"rxd", "timeout", b"timeout", "txd", b"txd"]) -> None: ... + def ClearField(self, field_name: typing.Literal["baud", b"baud", "echo", b"echo", "enabled", b"enabled", "mode", b"mode", "override_console_serial_port", b"override_console_serial_port", "rxd", b"rxd", "timeout", b"timeout", "txd", b"txd"]) -> None: ... - @typing_extensions.final + @typing.final class ExternalNotificationConfig(google.protobuf.message.Message): """ External Notifications Config @@ -683,9 +686,9 @@ class ModuleConfig(google.protobuf.message.Message): nag_timeout: builtins.int = ..., use_i2s_as_buzzer: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["active", b"active", "alert_bell", b"alert_bell", "alert_bell_buzzer", b"alert_bell_buzzer", "alert_bell_vibra", b"alert_bell_vibra", "alert_message", b"alert_message", "alert_message_buzzer", b"alert_message_buzzer", "alert_message_vibra", b"alert_message_vibra", "enabled", b"enabled", "nag_timeout", b"nag_timeout", "output", b"output", "output_buzzer", b"output_buzzer", "output_ms", b"output_ms", "output_vibra", b"output_vibra", "use_i2s_as_buzzer", b"use_i2s_as_buzzer", "use_pwm", b"use_pwm"]) -> None: ... + def ClearField(self, field_name: typing.Literal["active", b"active", "alert_bell", b"alert_bell", "alert_bell_buzzer", b"alert_bell_buzzer", "alert_bell_vibra", b"alert_bell_vibra", "alert_message", b"alert_message", "alert_message_buzzer", b"alert_message_buzzer", "alert_message_vibra", b"alert_message_vibra", "enabled", b"enabled", "nag_timeout", b"nag_timeout", "output", b"output", "output_buzzer", b"output_buzzer", "output_ms", b"output_ms", "output_vibra", b"output_vibra", "use_i2s_as_buzzer", b"use_i2s_as_buzzer", "use_pwm", b"use_pwm"]) -> None: ... - @typing_extensions.final + @typing.final class StoreForwardConfig(google.protobuf.message.Message): """ Store and Forward Module Config @@ -727,9 +730,9 @@ class ModuleConfig(google.protobuf.message.Message): history_return_max: builtins.int = ..., history_return_window: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["enabled", b"enabled", "heartbeat", b"heartbeat", "history_return_max", b"history_return_max", "history_return_window", b"history_return_window", "records", b"records"]) -> None: ... + def ClearField(self, field_name: typing.Literal["enabled", b"enabled", "heartbeat", b"heartbeat", "history_return_max", b"history_return_max", "history_return_window", b"history_return_window", "records", b"records"]) -> None: ... - @typing_extensions.final + @typing.final class RangeTestConfig(google.protobuf.message.Message): """ Preferences for the RangeTestModule @@ -760,9 +763,9 @@ class ModuleConfig(google.protobuf.message.Message): sender: builtins.int = ..., save: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["enabled", b"enabled", "save", b"save", "sender", b"sender"]) -> None: ... + def ClearField(self, field_name: typing.Literal["enabled", b"enabled", "save", b"save", "sender", b"sender"]) -> None: ... - @typing_extensions.final + @typing.final class TelemetryConfig(google.protobuf.message.Message): """ Configuration for both device and environment metrics @@ -842,9 +845,9 @@ class ModuleConfig(google.protobuf.message.Message): power_update_interval: builtins.int = ..., power_screen_enabled: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["air_quality_enabled", b"air_quality_enabled", "air_quality_interval", b"air_quality_interval", "device_update_interval", b"device_update_interval", "environment_display_fahrenheit", b"environment_display_fahrenheit", "environment_measurement_enabled", b"environment_measurement_enabled", "environment_screen_enabled", b"environment_screen_enabled", "environment_update_interval", b"environment_update_interval", "power_measurement_enabled", b"power_measurement_enabled", "power_screen_enabled", b"power_screen_enabled", "power_update_interval", b"power_update_interval"]) -> None: ... + def ClearField(self, field_name: typing.Literal["air_quality_enabled", b"air_quality_enabled", "air_quality_interval", b"air_quality_interval", "device_update_interval", b"device_update_interval", "environment_display_fahrenheit", b"environment_display_fahrenheit", "environment_measurement_enabled", b"environment_measurement_enabled", "environment_screen_enabled", b"environment_screen_enabled", "environment_update_interval", b"environment_update_interval", "power_measurement_enabled", b"power_measurement_enabled", "power_screen_enabled", b"power_screen_enabled", "power_update_interval", b"power_update_interval"]) -> None: ... - @typing_extensions.final + @typing.final class CannedMessageConfig(google.protobuf.message.Message): """ TODO: REPLACE @@ -1001,9 +1004,9 @@ class ModuleConfig(google.protobuf.message.Message): allow_input_source: builtins.str = ..., send_bell: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["allow_input_source", b"allow_input_source", "enabled", b"enabled", "inputbroker_event_ccw", b"inputbroker_event_ccw", "inputbroker_event_cw", b"inputbroker_event_cw", "inputbroker_event_press", b"inputbroker_event_press", "inputbroker_pin_a", b"inputbroker_pin_a", "inputbroker_pin_b", b"inputbroker_pin_b", "inputbroker_pin_press", b"inputbroker_pin_press", "rotary1_enabled", b"rotary1_enabled", "send_bell", b"send_bell", "updown1_enabled", b"updown1_enabled"]) -> None: ... + def ClearField(self, field_name: typing.Literal["allow_input_source", b"allow_input_source", "enabled", b"enabled", "inputbroker_event_ccw", b"inputbroker_event_ccw", "inputbroker_event_cw", b"inputbroker_event_cw", "inputbroker_event_press", b"inputbroker_event_press", "inputbroker_pin_a", b"inputbroker_pin_a", "inputbroker_pin_b", b"inputbroker_pin_b", "inputbroker_pin_press", b"inputbroker_pin_press", "rotary1_enabled", b"rotary1_enabled", "send_bell", b"send_bell", "updown1_enabled", b"updown1_enabled"]) -> None: ... - @typing_extensions.final + @typing.final class AmbientLightingConfig(google.protobuf.message.Message): """ Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. @@ -1046,7 +1049,7 @@ class ModuleConfig(google.protobuf.message.Message): green: builtins.int = ..., blue: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["blue", b"blue", "current", b"current", "green", b"green", "led_state", b"led_state", "red", b"red"]) -> None: ... + def ClearField(self, field_name: typing.Literal["blue", b"blue", "current", b"current", "green", b"green", "led_state", b"led_state", "red", b"red"]) -> None: ... MQTT_FIELD_NUMBER: builtins.int SERIAL_FIELD_NUMBER: builtins.int @@ -1066,66 +1069,79 @@ class ModuleConfig(google.protobuf.message.Message): """ TODO: REPLACE """ + @property def serial(self) -> global___ModuleConfig.SerialConfig: """ TODO: REPLACE """ + @property def external_notification(self) -> global___ModuleConfig.ExternalNotificationConfig: """ TODO: REPLACE """ + @property def store_forward(self) -> global___ModuleConfig.StoreForwardConfig: """ TODO: REPLACE """ + @property def range_test(self) -> global___ModuleConfig.RangeTestConfig: """ TODO: REPLACE """ + @property def telemetry(self) -> global___ModuleConfig.TelemetryConfig: """ TODO: REPLACE """ + @property def canned_message(self) -> global___ModuleConfig.CannedMessageConfig: """ TODO: REPLACE """ + @property def audio(self) -> global___ModuleConfig.AudioConfig: """ TODO: REPLACE """ + @property def remote_hardware(self) -> global___ModuleConfig.RemoteHardwareConfig: """ TODO: REPLACE """ + @property def neighbor_info(self) -> global___ModuleConfig.NeighborInfoConfig: """ TODO: REPLACE """ + @property def ambient_lighting(self) -> global___ModuleConfig.AmbientLightingConfig: """ TODO: REPLACE """ + @property def detection_sensor(self) -> global___ModuleConfig.DetectionSensorConfig: """ TODO: REPLACE """ + @property def paxcounter(self) -> global___ModuleConfig.PaxcounterConfig: """ TODO: REPLACE """ + def __init__( self, *, @@ -1143,13 +1159,13 @@ class ModuleConfig(google.protobuf.message.Message): detection_sensor: global___ModuleConfig.DetectionSensorConfig | None = ..., paxcounter: global___ModuleConfig.PaxcounterConfig | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["ambient_lighting", b"ambient_lighting", "audio", b"audio", "canned_message", b"canned_message", "detection_sensor", b"detection_sensor", "external_notification", b"external_notification", "mqtt", b"mqtt", "neighbor_info", b"neighbor_info", "paxcounter", b"paxcounter", "payload_variant", b"payload_variant", "range_test", b"range_test", "remote_hardware", b"remote_hardware", "serial", b"serial", "store_forward", b"store_forward", "telemetry", b"telemetry"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["ambient_lighting", b"ambient_lighting", "audio", b"audio", "canned_message", b"canned_message", "detection_sensor", b"detection_sensor", "external_notification", b"external_notification", "mqtt", b"mqtt", "neighbor_info", b"neighbor_info", "paxcounter", b"paxcounter", "payload_variant", b"payload_variant", "range_test", b"range_test", "remote_hardware", b"remote_hardware", "serial", b"serial", "store_forward", b"store_forward", "telemetry", b"telemetry"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["payload_variant", b"payload_variant"]) -> typing_extensions.Literal["mqtt", "serial", "external_notification", "store_forward", "range_test", "telemetry", "canned_message", "audio", "remote_hardware", "neighbor_info", "ambient_lighting", "detection_sensor", "paxcounter"] | None: ... + def HasField(self, field_name: typing.Literal["ambient_lighting", b"ambient_lighting", "audio", b"audio", "canned_message", b"canned_message", "detection_sensor", b"detection_sensor", "external_notification", b"external_notification", "mqtt", b"mqtt", "neighbor_info", b"neighbor_info", "paxcounter", b"paxcounter", "payload_variant", b"payload_variant", "range_test", b"range_test", "remote_hardware", b"remote_hardware", "serial", b"serial", "store_forward", b"store_forward", "telemetry", b"telemetry"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["ambient_lighting", b"ambient_lighting", "audio", b"audio", "canned_message", b"canned_message", "detection_sensor", b"detection_sensor", "external_notification", b"external_notification", "mqtt", b"mqtt", "neighbor_info", b"neighbor_info", "paxcounter", b"paxcounter", "payload_variant", b"payload_variant", "range_test", b"range_test", "remote_hardware", b"remote_hardware", "serial", b"serial", "store_forward", b"store_forward", "telemetry", b"telemetry"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["payload_variant", b"payload_variant"]) -> typing.Literal["mqtt", "serial", "external_notification", "store_forward", "range_test", "telemetry", "canned_message", "audio", "remote_hardware", "neighbor_info", "ambient_lighting", "detection_sensor", "paxcounter"] | None: ... global___ModuleConfig = ModuleConfig -@typing_extensions.final +@typing.final class RemoteHardwarePin(google.protobuf.message.Message): """ A GPIO pin definition for remote hardware module @@ -1179,6 +1195,6 @@ class RemoteHardwarePin(google.protobuf.message.Message): name: builtins.str = ..., type: global___RemoteHardwarePinType.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["gpio_pin", b"gpio_pin", "name", b"name", "type", b"type"]) -> None: ... + def ClearField(self, field_name: typing.Literal["gpio_pin", b"gpio_pin", "name", b"name", "type", b"type"]) -> None: ... global___RemoteHardwarePin = RemoteHardwarePin diff --git a/meshtastic/protobuf/mqtt_pb2.py b/meshtastic/protobuf/mqtt_pb2.py new file mode 100644 index 0000000..8286250 --- /dev/null +++ b/meshtastic/protobuf/mqtt_pb2.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/mqtt.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from meshtastic.protobuf import config_pb2 as meshtastic_dot_protobuf_dot_config__pb2 +from meshtastic.protobuf import mesh_pb2 as meshtastic_dot_protobuf_dot_mesh__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emeshtastic/protobuf/mqtt.proto\x12\x13meshtastic.protobuf\x1a meshtastic/protobuf/config.proto\x1a\x1emeshtastic/protobuf/mesh.proto\"j\n\x0fServiceEnvelope\x12/\n\x06packet\x18\x01 \x01(\x0b\x32\x1f.meshtastic.protobuf.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\t\"\xe0\x03\n\tMapReport\x12\x11\n\tlong_name\x18\x01 \x01(\t\x12\x12\n\nshort_name\x18\x02 \x01(\t\x12;\n\x04role\x18\x03 \x01(\x0e\x32-.meshtastic.protobuf.Config.DeviceConfig.Role\x12\x34\n\x08hw_model\x18\x04 \x01(\x0e\x32\".meshtastic.protobuf.HardwareModel\x12\x18\n\x10\x66irmware_version\x18\x05 \x01(\t\x12\x41\n\x06region\x18\x06 \x01(\x0e\x32\x31.meshtastic.protobuf.Config.LoRaConfig.RegionCode\x12H\n\x0cmodem_preset\x18\x07 \x01(\x0e\x32\x32.meshtastic.protobuf.Config.LoRaConfig.ModemPreset\x12\x1b\n\x13has_default_channel\x18\x08 \x01(\x08\x12\x12\n\nlatitude_i\x18\t \x01(\x0f\x12\x13\n\x0blongitude_i\x18\n \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x0b \x01(\x05\x12\x1a\n\x12position_precision\x18\x0c \x01(\r\x12\x1e\n\x16num_online_local_nodes\x18\r \x01(\rB_\n\x13\x63om.geeksville.meshB\nMQTTProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.mqtt_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\nMQTTProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_SERVICEENVELOPE']._serialized_start=121 + _globals['_SERVICEENVELOPE']._serialized_end=227 + _globals['_MAPREPORT']._serialized_start=230 + _globals['_MAPREPORT']._serialized_end=710 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/mqtt_pb2.pyi b/meshtastic/protobuf/mqtt_pb2.pyi similarity index 70% rename from meshtastic/mqtt_pb2.pyi rename to meshtastic/protobuf/mqtt_pb2.pyi index ed2b834..7c03e6d 100644 --- a/meshtastic/mqtt_pb2.pyi +++ b/meshtastic/protobuf/mqtt_pb2.pyi @@ -2,21 +2,17 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.message -import meshtastic.config_pb2 -import meshtastic.mesh_pb2 -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import meshtastic.protobuf.config_pb2 +import meshtastic.protobuf.mesh_pb2 +import typing DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class ServiceEnvelope(google.protobuf.message.Message): """ This message wraps a MeshPacket with extra metadata about the sender and how it arrived. @@ -27,11 +23,6 @@ class ServiceEnvelope(google.protobuf.message.Message): PACKET_FIELD_NUMBER: builtins.int CHANNEL_ID_FIELD_NUMBER: builtins.int GATEWAY_ID_FIELD_NUMBER: builtins.int - @property - def packet(self) -> meshtastic.mesh_pb2.MeshPacket: - """ - The (probably encrypted) packet - """ channel_id: builtins.str """ The global channel ID it was sent on @@ -42,19 +33,25 @@ class ServiceEnvelope(google.protobuf.message.Message): nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as the globally trusted nodenum """ + @property + def packet(self) -> meshtastic.protobuf.mesh_pb2.MeshPacket: + """ + The (probably encrypted) packet + """ + def __init__( self, *, - packet: meshtastic.mesh_pb2.MeshPacket | None = ..., + packet: meshtastic.protobuf.mesh_pb2.MeshPacket | None = ..., channel_id: builtins.str = ..., gateway_id: builtins.str = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["packet", b"packet"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["channel_id", b"channel_id", "gateway_id", b"gateway_id", "packet", b"packet"]) -> None: ... + def HasField(self, field_name: typing.Literal["packet", b"packet"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["channel_id", b"channel_id", "gateway_id", b"gateway_id", "packet", b"packet"]) -> None: ... global___ServiceEnvelope = ServiceEnvelope -@typing_extensions.final +@typing.final class MapReport(google.protobuf.message.Message): """ Information about a node intended to be reported unencrypted to a map using MQTT. @@ -84,11 +81,11 @@ class MapReport(google.protobuf.message.Message): A VERY short name, ideally two characters. Suitable for a tiny OLED screen """ - role: meshtastic.config_pb2.Config.DeviceConfig.Role.ValueType + role: meshtastic.protobuf.config_pb2.Config.DeviceConfig.Role.ValueType """ Role of the node that applies specific settings for a particular use-case """ - hw_model: meshtastic.mesh_pb2.HardwareModel.ValueType + hw_model: meshtastic.protobuf.mesh_pb2.HardwareModel.ValueType """ Hardware model of the node, i.e. T-Beam, Heltec V3, etc... """ @@ -96,11 +93,11 @@ class MapReport(google.protobuf.message.Message): """ Device firmware version string """ - region: meshtastic.config_pb2.Config.LoRaConfig.RegionCode.ValueType + region: meshtastic.protobuf.config_pb2.Config.LoRaConfig.RegionCode.ValueType """ The region code for the radio (US, CN, EU433, etc...) """ - modem_preset: meshtastic.config_pb2.Config.LoRaConfig.ModemPreset.ValueType + modem_preset: meshtastic.protobuf.config_pb2.Config.LoRaConfig.ModemPreset.ValueType """ Modem preset used by the radio (LongFast, MediumSlow, etc...) """ @@ -134,11 +131,11 @@ class MapReport(google.protobuf.message.Message): *, long_name: builtins.str = ..., short_name: builtins.str = ..., - role: meshtastic.config_pb2.Config.DeviceConfig.Role.ValueType = ..., - hw_model: meshtastic.mesh_pb2.HardwareModel.ValueType = ..., + role: meshtastic.protobuf.config_pb2.Config.DeviceConfig.Role.ValueType = ..., + hw_model: meshtastic.protobuf.mesh_pb2.HardwareModel.ValueType = ..., firmware_version: builtins.str = ..., - region: meshtastic.config_pb2.Config.LoRaConfig.RegionCode.ValueType = ..., - modem_preset: meshtastic.config_pb2.Config.LoRaConfig.ModemPreset.ValueType = ..., + region: meshtastic.protobuf.config_pb2.Config.LoRaConfig.RegionCode.ValueType = ..., + modem_preset: meshtastic.protobuf.config_pb2.Config.LoRaConfig.ModemPreset.ValueType = ..., has_default_channel: builtins.bool = ..., latitude_i: builtins.int = ..., longitude_i: builtins.int = ..., @@ -146,6 +143,6 @@ class MapReport(google.protobuf.message.Message): position_precision: builtins.int = ..., num_online_local_nodes: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["altitude", b"altitude", "firmware_version", b"firmware_version", "has_default_channel", b"has_default_channel", "hw_model", b"hw_model", "latitude_i", b"latitude_i", "long_name", b"long_name", "longitude_i", b"longitude_i", "modem_preset", b"modem_preset", "num_online_local_nodes", b"num_online_local_nodes", "position_precision", b"position_precision", "region", b"region", "role", b"role", "short_name", b"short_name"]) -> None: ... + def ClearField(self, field_name: typing.Literal["altitude", b"altitude", "firmware_version", b"firmware_version", "has_default_channel", b"has_default_channel", "hw_model", b"hw_model", "latitude_i", b"latitude_i", "long_name", b"long_name", "longitude_i", b"longitude_i", "modem_preset", b"modem_preset", "num_online_local_nodes", b"num_online_local_nodes", "position_precision", b"position_precision", "region", b"region", "role", b"role", "short_name", b"short_name"]) -> None: ... global___MapReport = MapReport diff --git a/meshtastic/paxcount_pb2.py b/meshtastic/protobuf/paxcount_pb2.py similarity index 54% rename from meshtastic/paxcount_pb2.py rename to meshtastic/protobuf/paxcount_pb2.py index 890258f..79353b5 100644 --- a/meshtastic/paxcount_pb2.py +++ b/meshtastic/protobuf/paxcount_pb2.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/paxcount.proto +# source: meshtastic/protobuf/paxcount.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -13,14 +13,14 @@ _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19meshtastic/paxcount.proto\x12\nmeshtastic\"5\n\x08Paxcount\x12\x0c\n\x04wifi\x18\x01 \x01(\r\x12\x0b\n\x03\x62le\x18\x02 \x01(\r\x12\x0e\n\x06uptime\x18\x03 \x01(\rBc\n\x13\x63om.geeksville.meshB\x0ePaxcountProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"meshtastic/protobuf/paxcount.proto\x12\x13meshtastic.protobuf\"5\n\x08Paxcount\x12\x0c\n\x04wifi\x18\x01 \x01(\r\x12\x0b\n\x03\x62le\x18\x02 \x01(\r\x12\x0e\n\x06uptime\x18\x03 \x01(\rBc\n\x13\x63om.geeksville.meshB\x0ePaxcountProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.paxcount_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.paxcount_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\016PaxcountProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _PAXCOUNT._serialized_start=41 - _PAXCOUNT._serialized_end=94 + _globals['_PAXCOUNT']._serialized_start=59 + _globals['_PAXCOUNT']._serialized_end=112 # @@protoc_insertion_point(module_scope) diff --git a/meshtastic/paxcount_pb2.pyi b/meshtastic/protobuf/paxcount_pb2.pyi similarity index 75% rename from meshtastic/paxcount_pb2.pyi rename to meshtastic/protobuf/paxcount_pb2.pyi index f4377a1..cc7ed0d 100644 --- a/meshtastic/paxcount_pb2.pyi +++ b/meshtastic/protobuf/paxcount_pb2.pyi @@ -2,19 +2,15 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.message -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import typing DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class Paxcount(google.protobuf.message.Message): """ TODO: REPLACE @@ -44,6 +40,6 @@ class Paxcount(google.protobuf.message.Message): ble: builtins.int = ..., uptime: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["ble", b"ble", "uptime", b"uptime", "wifi", b"wifi"]) -> None: ... + def ClearField(self, field_name: typing.Literal["ble", b"ble", "uptime", b"uptime", "wifi", b"wifi"]) -> None: ... global___Paxcount = Paxcount diff --git a/meshtastic/protobuf/portnums_pb2.py b/meshtastic/protobuf/portnums_pb2.py new file mode 100644 index 0000000..bb0cd07 --- /dev/null +++ b/meshtastic/protobuf/portnums_pb2.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/portnums.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"meshtastic/protobuf/portnums.proto\x12\x13meshtastic.protobuf*\x8d\x04\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\x1f\n\x1bTEXT_MESSAGE_COMPRESSED_APP\x10\x07\x12\x10\n\x0cWAYPOINT_APP\x10\x08\x12\r\n\tAUDIO_APP\x10\t\x12\x18\n\x14\x44\x45TECTION_SENSOR_APP\x10\n\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x12\n\x0ePAXCOUNTER_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x11\n\rTELEMETRY_APP\x10\x43\x12\x0b\n\x07ZPS_APP\x10\x44\x12\x11\n\rSIMULATOR_APP\x10\x45\x12\x12\n\x0eTRACEROUTE_APP\x10\x46\x12\x14\n\x10NEIGHBORINFO_APP\x10G\x12\x0f\n\x0b\x41TAK_PLUGIN\x10H\x12\x12\n\x0eMAP_REPORT_APP\x10I\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42]\n\x13\x63om.geeksville.meshB\x08PortnumsZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.portnums_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\010PortnumsZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_PORTNUM']._serialized_start=60 + _globals['_PORTNUM']._serialized_end=585 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/portnums_pb2.pyi b/meshtastic/protobuf/portnums_pb2.pyi similarity index 99% rename from meshtastic/portnums_pb2.pyi rename to meshtastic/protobuf/portnums_pb2.pyi index a546cfa..fda2e89 100644 --- a/meshtastic/portnums_pb2.pyi +++ b/meshtastic/protobuf/portnums_pb2.pyi @@ -2,6 +2,7 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.internal.enum_type_wrapper diff --git a/meshtastic/protobuf/remote_hardware_pb2.py b/meshtastic/protobuf/remote_hardware_pb2.py new file mode 100644 index 0000000..8f43c83 --- /dev/null +++ b/meshtastic/protobuf/remote_hardware_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/remote_hardware.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)meshtastic/protobuf/remote_hardware.proto\x12\x13meshtastic.protobuf\"\xdf\x01\n\x0fHardwareMessage\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).meshtastic.protobuf.HardwareMessage.Type\x12\x11\n\tgpio_mask\x18\x02 \x01(\x04\x12\x12\n\ngpio_value\x18\x03 \x01(\x04\"l\n\x04Type\x12\t\n\x05UNSET\x10\x00\x12\x0f\n\x0bWRITE_GPIOS\x10\x01\x12\x0f\n\x0bWATCH_GPIOS\x10\x02\x12\x11\n\rGPIOS_CHANGED\x10\x03\x12\x0e\n\nREAD_GPIOS\x10\x04\x12\x14\n\x10READ_GPIOS_REPLY\x10\x05\x42\x63\n\x13\x63om.geeksville.meshB\x0eRemoteHardwareZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.remote_hardware_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\016RemoteHardwareZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_HARDWAREMESSAGE']._serialized_start=67 + _globals['_HARDWAREMESSAGE']._serialized_end=290 + _globals['_HARDWAREMESSAGE_TYPE']._serialized_start=182 + _globals['_HARDWAREMESSAGE_TYPE']._serialized_end=290 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/remote_hardware_pb2.pyi b/meshtastic/protobuf/remote_hardware_pb2.pyi similarity index 96% rename from meshtastic/remote_hardware_pb2.pyi rename to meshtastic/protobuf/remote_hardware_pb2.pyi index ff4fd83..c2f7afa 100644 --- a/meshtastic/remote_hardware_pb2.pyi +++ b/meshtastic/protobuf/remote_hardware_pb2.pyi @@ -2,6 +2,7 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.internal.enum_type_wrapper @@ -16,7 +17,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class HardwareMessage(google.protobuf.message.Message): """ An example app to show off the module system. This message is used for @@ -120,6 +121,6 @@ class HardwareMessage(google.protobuf.message.Message): gpio_mask: builtins.int = ..., gpio_value: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["gpio_mask", b"gpio_mask", "gpio_value", b"gpio_value", "type", b"type"]) -> None: ... + def ClearField(self, field_name: typing.Literal["gpio_mask", b"gpio_mask", "gpio_value", b"gpio_value", "type", b"type"]) -> None: ... global___HardwareMessage = HardwareMessage diff --git a/meshtastic/rtttl_pb2.py b/meshtastic/protobuf/rtttl_pb2.py similarity index 61% rename from meshtastic/rtttl_pb2.py rename to meshtastic/protobuf/rtttl_pb2.py index a69b868..07c480d 100644 --- a/meshtastic/rtttl_pb2.py +++ b/meshtastic/protobuf/rtttl_pb2.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/rtttl.proto +# source: meshtastic/protobuf/rtttl.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -13,14 +13,14 @@ _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16meshtastic/rtttl.proto\x12\nmeshtastic\"\x1f\n\x0bRTTTLConfig\x12\x10\n\x08ringtone\x18\x01 \x01(\tBf\n\x13\x63om.geeksville.meshB\x11RTTTLConfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fmeshtastic/protobuf/rtttl.proto\x12\x13meshtastic.protobuf\"\x1f\n\x0bRTTTLConfig\x12\x10\n\x08ringtone\x18\x01 \x01(\tBf\n\x13\x63om.geeksville.meshB\x11RTTTLConfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.rtttl_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.rtttl_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\021RTTTLConfigProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _RTTTLCONFIG._serialized_start=38 - _RTTTLCONFIG._serialized_end=69 + _globals['_RTTTLCONFIG']._serialized_start=56 + _globals['_RTTTLCONFIG']._serialized_end=87 # @@protoc_insertion_point(module_scope) diff --git a/meshtastic/rtttl_pb2.pyi b/meshtastic/protobuf/rtttl_pb2.pyi similarity index 72% rename from meshtastic/rtttl_pb2.pyi rename to meshtastic/protobuf/rtttl_pb2.pyi index ddf8591..fe91f94 100644 --- a/meshtastic/rtttl_pb2.pyi +++ b/meshtastic/protobuf/rtttl_pb2.pyi @@ -2,19 +2,15 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.message -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import typing DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class RTTTLConfig(google.protobuf.message.Message): """ Canned message module configuration. @@ -32,6 +28,6 @@ class RTTTLConfig(google.protobuf.message.Message): *, ringtone: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["ringtone", b"ringtone"]) -> None: ... + def ClearField(self, field_name: typing.Literal["ringtone", b"ringtone"]) -> None: ... global___RTTTLConfig = RTTTLConfig diff --git a/meshtastic/protobuf/storeforward_pb2.py b/meshtastic/protobuf/storeforward_pb2.py new file mode 100644 index 0000000..16a152e --- /dev/null +++ b/meshtastic/protobuf/storeforward_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/storeforward.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&meshtastic/protobuf/storeforward.proto\x12\x13meshtastic.protobuf\"\xc0\x07\n\x0fStoreAndForward\x12@\n\x02rr\x18\x01 \x01(\x0e\x32\x34.meshtastic.protobuf.StoreAndForward.RequestResponse\x12@\n\x05stats\x18\x02 \x01(\x0b\x32/.meshtastic.protobuf.StoreAndForward.StatisticsH\x00\x12?\n\x07history\x18\x03 \x01(\x0b\x32,.meshtastic.protobuf.StoreAndForward.HistoryH\x00\x12\x43\n\theartbeat\x18\x04 \x01(\x0b\x32..meshtastic.protobuf.StoreAndForward.HeartbeatH\x00\x12\x0e\n\x04text\x18\x05 \x01(\x0cH\x00\x1a\xcd\x01\n\nStatistics\x12\x16\n\x0emessages_total\x18\x01 \x01(\r\x12\x16\n\x0emessages_saved\x18\x02 \x01(\r\x12\x14\n\x0cmessages_max\x18\x03 \x01(\r\x12\x0f\n\x07up_time\x18\x04 \x01(\r\x12\x10\n\x08requests\x18\x05 \x01(\r\x12\x18\n\x10requests_history\x18\x06 \x01(\r\x12\x11\n\theartbeat\x18\x07 \x01(\x08\x12\x12\n\nreturn_max\x18\x08 \x01(\r\x12\x15\n\rreturn_window\x18\t \x01(\r\x1aI\n\x07History\x12\x18\n\x10history_messages\x18\x01 \x01(\r\x12\x0e\n\x06window\x18\x02 \x01(\r\x12\x14\n\x0clast_request\x18\x03 \x01(\r\x1a.\n\tHeartbeat\x12\x0e\n\x06period\x18\x01 \x01(\r\x12\x11\n\tsecondary\x18\x02 \x01(\r\"\xbc\x02\n\x0fRequestResponse\x12\t\n\x05UNSET\x10\x00\x12\x10\n\x0cROUTER_ERROR\x10\x01\x12\x14\n\x10ROUTER_HEARTBEAT\x10\x02\x12\x0f\n\x0bROUTER_PING\x10\x03\x12\x0f\n\x0bROUTER_PONG\x10\x04\x12\x0f\n\x0bROUTER_BUSY\x10\x05\x12\x12\n\x0eROUTER_HISTORY\x10\x06\x12\x10\n\x0cROUTER_STATS\x10\x07\x12\x16\n\x12ROUTER_TEXT_DIRECT\x10\x08\x12\x19\n\x15ROUTER_TEXT_BROADCAST\x10\t\x12\x10\n\x0c\x43LIENT_ERROR\x10@\x12\x12\n\x0e\x43LIENT_HISTORY\x10\x41\x12\x10\n\x0c\x43LIENT_STATS\x10\x42\x12\x0f\n\x0b\x43LIENT_PING\x10\x43\x12\x0f\n\x0b\x43LIENT_PONG\x10\x44\x12\x10\n\x0c\x43LIENT_ABORT\x10jB\t\n\x07variantBj\n\x13\x63om.geeksville.meshB\x15StoreAndForwardProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.storeforward_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\025StoreAndForwardProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_STOREANDFORWARD']._serialized_start=64 + _globals['_STOREANDFORWARD']._serialized_end=1024 + _globals['_STOREANDFORWARD_STATISTICS']._serialized_start=366 + _globals['_STOREANDFORWARD_STATISTICS']._serialized_end=571 + _globals['_STOREANDFORWARD_HISTORY']._serialized_start=573 + _globals['_STOREANDFORWARD_HISTORY']._serialized_end=646 + _globals['_STOREANDFORWARD_HEARTBEAT']._serialized_start=648 + _globals['_STOREANDFORWARD_HEARTBEAT']._serialized_end=694 + _globals['_STOREANDFORWARD_REQUESTRESPONSE']._serialized_start=697 + _globals['_STOREANDFORWARD_REQUESTRESPONSE']._serialized_end=1013 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/storeforward_pb2.pyi b/meshtastic/protobuf/storeforward_pb2.pyi similarity index 88% rename from meshtastic/storeforward_pb2.pyi rename to meshtastic/protobuf/storeforward_pb2.pyi index cd2d751..aff4f74 100644 --- a/meshtastic/storeforward_pb2.pyi +++ b/meshtastic/protobuf/storeforward_pb2.pyi @@ -2,6 +2,7 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.internal.enum_type_wrapper @@ -16,7 +17,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class StoreAndForward(google.protobuf.message.Message): """ TODO: REPLACE @@ -170,7 +171,7 @@ class StoreAndForward(google.protobuf.message.Message): Client has requested that the router abort processing the client's request """ - @typing_extensions.final + @typing.final class Statistics(google.protobuf.message.Message): """ TODO: REPLACE @@ -236,9 +237,9 @@ class StoreAndForward(google.protobuf.message.Message): return_max: builtins.int = ..., return_window: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["heartbeat", b"heartbeat", "messages_max", b"messages_max", "messages_saved", b"messages_saved", "messages_total", b"messages_total", "requests", b"requests", "requests_history", b"requests_history", "return_max", b"return_max", "return_window", b"return_window", "up_time", b"up_time"]) -> None: ... + def ClearField(self, field_name: typing.Literal["heartbeat", b"heartbeat", "messages_max", b"messages_max", "messages_saved", b"messages_saved", "messages_total", b"messages_total", "requests", b"requests", "requests_history", b"requests_history", "return_max", b"return_max", "return_window", b"return_window", "up_time", b"up_time"]) -> None: ... - @typing_extensions.final + @typing.final class History(google.protobuf.message.Message): """ TODO: REPLACE @@ -269,9 +270,9 @@ class StoreAndForward(google.protobuf.message.Message): window: builtins.int = ..., last_request: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["history_messages", b"history_messages", "last_request", b"last_request", "window", b"window"]) -> None: ... + def ClearField(self, field_name: typing.Literal["history_messages", b"history_messages", "last_request", b"last_request", "window", b"window"]) -> None: ... - @typing_extensions.final + @typing.final class Heartbeat(google.protobuf.message.Message): """ TODO: REPLACE @@ -295,7 +296,7 @@ class StoreAndForward(google.protobuf.message.Message): period: builtins.int = ..., secondary: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["period", b"period", "secondary", b"secondary"]) -> None: ... + def ClearField(self, field_name: typing.Literal["period", b"period", "secondary", b"secondary"]) -> None: ... RR_FIELD_NUMBER: builtins.int STATS_FIELD_NUMBER: builtins.int @@ -306,25 +307,28 @@ class StoreAndForward(google.protobuf.message.Message): """ TODO: REPLACE """ + text: builtins.bytes + """ + Text from history message. + """ @property def stats(self) -> global___StoreAndForward.Statistics: """ TODO: REPLACE """ + @property def history(self) -> global___StoreAndForward.History: """ TODO: REPLACE """ + @property def heartbeat(self) -> global___StoreAndForward.Heartbeat: """ TODO: REPLACE """ - text: builtins.bytes - """ - Text from history message. - """ + def __init__( self, *, @@ -334,8 +338,8 @@ class StoreAndForward(google.protobuf.message.Message): heartbeat: global___StoreAndForward.Heartbeat | None = ..., text: builtins.bytes = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["heartbeat", b"heartbeat", "history", b"history", "stats", b"stats", "text", b"text", "variant", b"variant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["heartbeat", b"heartbeat", "history", b"history", "rr", b"rr", "stats", b"stats", "text", b"text", "variant", b"variant"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["variant", b"variant"]) -> typing_extensions.Literal["stats", "history", "heartbeat", "text"] | None: ... + def HasField(self, field_name: typing.Literal["heartbeat", b"heartbeat", "history", b"history", "stats", b"stats", "text", b"text", "variant", b"variant"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["heartbeat", b"heartbeat", "history", b"history", "rr", b"rr", "stats", b"stats", "text", b"text", "variant", b"variant"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["variant", b"variant"]) -> typing.Literal["stats", "history", "heartbeat", "text"] | None: ... global___StoreAndForward = StoreAndForward diff --git a/meshtastic/protobuf/telemetry_pb2.py b/meshtastic/protobuf/telemetry_pb2.py new file mode 100644 index 0000000..9c2cf4e --- /dev/null +++ b/meshtastic/protobuf/telemetry_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/telemetry.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#meshtastic/protobuf/telemetry.proto\x12\x13meshtastic.protobuf\"\x81\x01\n\rDeviceMetrics\x12\x15\n\rbattery_level\x18\x01 \x01(\r\x12\x0f\n\x07voltage\x18\x02 \x01(\x02\x12\x1b\n\x13\x63hannel_utilization\x18\x03 \x01(\x02\x12\x13\n\x0b\x61ir_util_tx\x18\x04 \x01(\x02\x12\x16\n\x0euptime_seconds\x18\x05 \x01(\r\"\xa6\x02\n\x12\x45nvironmentMetrics\x12\x13\n\x0btemperature\x18\x01 \x01(\x02\x12\x19\n\x11relative_humidity\x18\x02 \x01(\x02\x12\x1b\n\x13\x62\x61rometric_pressure\x18\x03 \x01(\x02\x12\x16\n\x0egas_resistance\x18\x04 \x01(\x02\x12\x0f\n\x07voltage\x18\x05 \x01(\x02\x12\x0f\n\x07\x63urrent\x18\x06 \x01(\x02\x12\x0b\n\x03iaq\x18\x07 \x01(\r\x12\x10\n\x08\x64istance\x18\x08 \x01(\x02\x12\x0b\n\x03lux\x18\t \x01(\x02\x12\x11\n\twhite_lux\x18\n \x01(\x02\x12\x0e\n\x06ir_lux\x18\x0b \x01(\x02\x12\x0e\n\x06uv_lux\x18\x0c \x01(\x02\x12\x16\n\x0ewind_direction\x18\r \x01(\r\x12\x12\n\nwind_speed\x18\x0e \x01(\x02\"\x8c\x01\n\x0cPowerMetrics\x12\x13\n\x0b\x63h1_voltage\x18\x01 \x01(\x02\x12\x13\n\x0b\x63h1_current\x18\x02 \x01(\x02\x12\x13\n\x0b\x63h2_voltage\x18\x03 \x01(\x02\x12\x13\n\x0b\x63h2_current\x18\x04 \x01(\x02\x12\x13\n\x0b\x63h3_voltage\x18\x05 \x01(\x02\x12\x13\n\x0b\x63h3_current\x18\x06 \x01(\x02\"\xbf\x02\n\x11\x41irQualityMetrics\x12\x15\n\rpm10_standard\x18\x01 \x01(\r\x12\x15\n\rpm25_standard\x18\x02 \x01(\r\x12\x16\n\x0epm100_standard\x18\x03 \x01(\r\x12\x1a\n\x12pm10_environmental\x18\x04 \x01(\r\x12\x1a\n\x12pm25_environmental\x18\x05 \x01(\r\x12\x1b\n\x13pm100_environmental\x18\x06 \x01(\r\x12\x16\n\x0eparticles_03um\x18\x07 \x01(\r\x12\x16\n\x0eparticles_05um\x18\x08 \x01(\r\x12\x16\n\x0eparticles_10um\x18\t \x01(\r\x12\x16\n\x0eparticles_25um\x18\n \x01(\r\x12\x16\n\x0eparticles_50um\x18\x0b \x01(\r\x12\x17\n\x0fparticles_100um\x18\x0c \x01(\r\"\xad\x02\n\tTelemetry\x12\x0c\n\x04time\x18\x01 \x01(\x07\x12<\n\x0e\x64\x65vice_metrics\x18\x02 \x01(\x0b\x32\".meshtastic.protobuf.DeviceMetricsH\x00\x12\x46\n\x13\x65nvironment_metrics\x18\x03 \x01(\x0b\x32\'.meshtastic.protobuf.EnvironmentMetricsH\x00\x12\x45\n\x13\x61ir_quality_metrics\x18\x04 \x01(\x0b\x32&.meshtastic.protobuf.AirQualityMetricsH\x00\x12:\n\rpower_metrics\x18\x05 \x01(\x0b\x32!.meshtastic.protobuf.PowerMetricsH\x00\x42\t\n\x07variant*\xdd\x02\n\x13TelemetrySensorType\x12\x10\n\x0cSENSOR_UNSET\x10\x00\x12\n\n\x06\x42ME280\x10\x01\x12\n\n\x06\x42ME680\x10\x02\x12\x0b\n\x07MCP9808\x10\x03\x12\n\n\x06INA260\x10\x04\x12\n\n\x06INA219\x10\x05\x12\n\n\x06\x42MP280\x10\x06\x12\t\n\x05SHTC3\x10\x07\x12\t\n\x05LPS22\x10\x08\x12\x0b\n\x07QMC6310\x10\t\x12\x0b\n\x07QMI8658\x10\n\x12\x0c\n\x08QMC5883L\x10\x0b\x12\t\n\x05SHT31\x10\x0c\x12\x0c\n\x08PMSA003I\x10\r\x12\x0b\n\x07INA3221\x10\x0e\x12\n\n\x06\x42MP085\x10\x0f\x12\x0c\n\x08RCWL9620\x10\x10\x12\t\n\x05SHT4X\x10\x11\x12\x0c\n\x08VEML7700\x10\x12\x12\x0c\n\x08MLX90632\x10\x13\x12\x0b\n\x07OPT3001\x10\x14\x12\x0c\n\x08LTR390UV\x10\x15\x12\x0e\n\nTSL25911FN\x10\x16\x12\t\n\x05\x41HT10\x10\x17\x12\x10\n\x0c\x44\x46ROBOT_LARK\x10\x18\x42\x64\n\x13\x63om.geeksville.meshB\x0fTelemetryProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.telemetry_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\017TelemetryProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_TELEMETRYSENSORTYPE']._serialized_start=1259 + _globals['_TELEMETRYSENSORTYPE']._serialized_end=1608 + _globals['_DEVICEMETRICS']._serialized_start=61 + _globals['_DEVICEMETRICS']._serialized_end=190 + _globals['_ENVIRONMENTMETRICS']._serialized_start=193 + _globals['_ENVIRONMENTMETRICS']._serialized_end=487 + _globals['_POWERMETRICS']._serialized_start=490 + _globals['_POWERMETRICS']._serialized_end=630 + _globals['_AIRQUALITYMETRICS']._serialized_start=633 + _globals['_AIRQUALITYMETRICS']._serialized_end=952 + _globals['_TELEMETRY']._serialized_start=955 + _globals['_TELEMETRY']._serialized_end=1256 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/telemetry_pb2.pyi b/meshtastic/protobuf/telemetry_pb2.pyi similarity index 86% rename from meshtastic/telemetry_pb2.pyi rename to meshtastic/protobuf/telemetry_pb2.pyi index 552d51b..aba51c8 100644 --- a/meshtastic/telemetry_pb2.pyi +++ b/meshtastic/protobuf/telemetry_pb2.pyi @@ -2,6 +2,7 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.internal.enum_type_wrapper @@ -230,7 +231,7 @@ DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and di """ global___TelemetrySensorType = TelemetrySensorType -@typing_extensions.final +@typing.final class DeviceMetrics(google.protobuf.message.Message): """ Key native device metrics such as battery level @@ -272,11 +273,11 @@ class DeviceMetrics(google.protobuf.message.Message): air_util_tx: builtins.float = ..., uptime_seconds: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["air_util_tx", b"air_util_tx", "battery_level", b"battery_level", "channel_utilization", b"channel_utilization", "uptime_seconds", b"uptime_seconds", "voltage", b"voltage"]) -> None: ... + def ClearField(self, field_name: typing.Literal["air_util_tx", b"air_util_tx", "battery_level", b"battery_level", "channel_utilization", b"channel_utilization", "uptime_seconds", b"uptime_seconds", "voltage", b"voltage"]) -> None: ... global___DeviceMetrics = DeviceMetrics -@typing_extensions.final +@typing.final class EnvironmentMetrics(google.protobuf.message.Message): """ Weather station or other environmental metrics @@ -374,11 +375,11 @@ class EnvironmentMetrics(google.protobuf.message.Message): wind_direction: builtins.int = ..., wind_speed: builtins.float = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["barometric_pressure", b"barometric_pressure", "current", b"current", "distance", b"distance", "gas_resistance", b"gas_resistance", "iaq", b"iaq", "ir_lux", b"ir_lux", "lux", b"lux", "relative_humidity", b"relative_humidity", "temperature", b"temperature", "uv_lux", b"uv_lux", "voltage", b"voltage", "white_lux", b"white_lux", "wind_direction", b"wind_direction", "wind_speed", b"wind_speed"]) -> None: ... + def ClearField(self, field_name: typing.Literal["barometric_pressure", b"barometric_pressure", "current", b"current", "distance", b"distance", "gas_resistance", b"gas_resistance", "iaq", b"iaq", "ir_lux", b"ir_lux", "lux", b"lux", "relative_humidity", b"relative_humidity", "temperature", b"temperature", "uv_lux", b"uv_lux", "voltage", b"voltage", "white_lux", b"white_lux", "wind_direction", b"wind_direction", "wind_speed", b"wind_speed"]) -> None: ... global___EnvironmentMetrics = EnvironmentMetrics -@typing_extensions.final +@typing.final class PowerMetrics(google.protobuf.message.Message): """ Power Metrics (voltage / current / etc) @@ -426,11 +427,11 @@ class PowerMetrics(google.protobuf.message.Message): ch3_voltage: builtins.float = ..., ch3_current: builtins.float = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["ch1_current", b"ch1_current", "ch1_voltage", b"ch1_voltage", "ch2_current", b"ch2_current", "ch2_voltage", b"ch2_voltage", "ch3_current", b"ch3_current", "ch3_voltage", b"ch3_voltage"]) -> None: ... + def ClearField(self, field_name: typing.Literal["ch1_current", b"ch1_current", "ch1_voltage", b"ch1_voltage", "ch2_current", b"ch2_current", "ch2_voltage", b"ch2_voltage", "ch3_current", b"ch3_current", "ch3_voltage", b"ch3_voltage"]) -> None: ... global___PowerMetrics = PowerMetrics -@typing_extensions.final +@typing.final class AirQualityMetrics(google.protobuf.message.Message): """ Air quality metrics @@ -514,11 +515,11 @@ class AirQualityMetrics(google.protobuf.message.Message): particles_50um: builtins.int = ..., particles_100um: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["particles_03um", b"particles_03um", "particles_05um", b"particles_05um", "particles_100um", b"particles_100um", "particles_10um", b"particles_10um", "particles_25um", b"particles_25um", "particles_50um", b"particles_50um", "pm100_environmental", b"pm100_environmental", "pm100_standard", b"pm100_standard", "pm10_environmental", b"pm10_environmental", "pm10_standard", b"pm10_standard", "pm25_environmental", b"pm25_environmental", "pm25_standard", b"pm25_standard"]) -> None: ... + def ClearField(self, field_name: typing.Literal["particles_03um", b"particles_03um", "particles_05um", b"particles_05um", "particles_100um", b"particles_100um", "particles_10um", b"particles_10um", "particles_25um", b"particles_25um", "particles_50um", b"particles_50um", "pm100_environmental", b"pm100_environmental", "pm100_standard", b"pm100_standard", "pm10_environmental", b"pm10_environmental", "pm10_standard", b"pm10_standard", "pm25_environmental", b"pm25_environmental", "pm25_standard", b"pm25_standard"]) -> None: ... global___AirQualityMetrics = AirQualityMetrics -@typing_extensions.final +@typing.final class Telemetry(google.protobuf.message.Message): """ Types of Measurements the telemetry module is equipped to handle @@ -540,21 +541,25 @@ class Telemetry(google.protobuf.message.Message): """ Key native device metrics such as battery level """ + @property def environment_metrics(self) -> global___EnvironmentMetrics: """ Weather station or other environmental metrics """ + @property def air_quality_metrics(self) -> global___AirQualityMetrics: """ Air quality metrics """ + @property def power_metrics(self) -> global___PowerMetrics: """ Power Metrics """ + def __init__( self, *, @@ -564,8 +569,8 @@ class Telemetry(google.protobuf.message.Message): air_quality_metrics: global___AirQualityMetrics | None = ..., power_metrics: global___PowerMetrics | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["air_quality_metrics", b"air_quality_metrics", "device_metrics", b"device_metrics", "environment_metrics", b"environment_metrics", "power_metrics", b"power_metrics", "variant", b"variant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["air_quality_metrics", b"air_quality_metrics", "device_metrics", b"device_metrics", "environment_metrics", b"environment_metrics", "power_metrics", b"power_metrics", "time", b"time", "variant", b"variant"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["variant", b"variant"]) -> typing_extensions.Literal["device_metrics", "environment_metrics", "air_quality_metrics", "power_metrics"] | None: ... + def HasField(self, field_name: typing.Literal["air_quality_metrics", b"air_quality_metrics", "device_metrics", b"device_metrics", "environment_metrics", b"environment_metrics", "power_metrics", b"power_metrics", "variant", b"variant"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["air_quality_metrics", b"air_quality_metrics", "device_metrics", b"device_metrics", "environment_metrics", b"environment_metrics", "power_metrics", b"power_metrics", "time", b"time", "variant", b"variant"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["variant", b"variant"]) -> typing.Literal["device_metrics", "environment_metrics", "air_quality_metrics", "power_metrics"] | None: ... global___Telemetry = Telemetry diff --git a/meshtastic/protobuf/xmodem_pb2.py b/meshtastic/protobuf/xmodem_pb2.py new file mode 100644 index 0000000..fc179f6 --- /dev/null +++ b/meshtastic/protobuf/xmodem_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshtastic/protobuf/xmodem.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n meshtastic/protobuf/xmodem.proto\x12\x13meshtastic.protobuf\"\xbf\x01\n\x06XModem\x12\x34\n\x07\x63ontrol\x18\x01 \x01(\x0e\x32#.meshtastic.protobuf.XModem.Control\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\r\n\x05\x63rc16\x18\x03 \x01(\r\x12\x0e\n\x06\x62uffer\x18\x04 \x01(\x0c\"S\n\x07\x43ontrol\x12\x07\n\x03NUL\x10\x00\x12\x07\n\x03SOH\x10\x01\x12\x07\n\x03STX\x10\x02\x12\x07\n\x03\x45OT\x10\x04\x12\x07\n\x03\x41\x43K\x10\x06\x12\x07\n\x03NAK\x10\x15\x12\x07\n\x03\x43\x41N\x10\x18\x12\t\n\x05\x43TRLZ\x10\x1a\x42\x61\n\x13\x63om.geeksville.meshB\x0cXmodemProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.xmodem_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\014XmodemProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' + _globals['_XMODEM']._serialized_start=58 + _globals['_XMODEM']._serialized_end=249 + _globals['_XMODEM_CONTROL']._serialized_start=166 + _globals['_XMODEM_CONTROL']._serialized_end=249 +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/xmodem_pb2.pyi b/meshtastic/protobuf/xmodem_pb2.pyi similarity index 92% rename from meshtastic/xmodem_pb2.pyi rename to meshtastic/protobuf/xmodem_pb2.pyi index 07d76bd..d362ad0 100644 --- a/meshtastic/xmodem_pb2.pyi +++ b/meshtastic/protobuf/xmodem_pb2.pyi @@ -2,6 +2,7 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import google.protobuf.descriptor import google.protobuf.internal.enum_type_wrapper @@ -16,7 +17,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class XModem(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -61,6 +62,6 @@ class XModem(google.protobuf.message.Message): crc16: builtins.int = ..., buffer: builtins.bytes = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["buffer", b"buffer", "control", b"control", "crc16", b"crc16", "seq", b"seq"]) -> None: ... + def ClearField(self, field_name: typing.Literal["buffer", b"buffer", "control", b"control", "crc16", b"crc16", "seq", b"seq"]) -> None: ... global___XModem = XModem diff --git a/meshtastic/remote_hardware.py b/meshtastic/remote_hardware.py index 55c8c18..73836f3 100644 --- a/meshtastic/remote_hardware.py +++ b/meshtastic/remote_hardware.py @@ -4,7 +4,7 @@ import logging from pubsub import pub # type: ignore[import-untyped] -from meshtastic import portnums_pb2, remote_hardware_pb2 +from meshtastic.protobuf import portnums_pb2, remote_hardware_pb2 from meshtastic.util import our_exit diff --git a/meshtastic/remote_hardware_pb2.py b/meshtastic/remote_hardware_pb2.py deleted file mode 100644 index c1365ff..0000000 --- a/meshtastic/remote_hardware_pb2.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/remote_hardware.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n meshtastic/remote_hardware.proto\x12\nmeshtastic\"\xd6\x01\n\x0fHardwareMessage\x12.\n\x04type\x18\x01 \x01(\x0e\x32 .meshtastic.HardwareMessage.Type\x12\x11\n\tgpio_mask\x18\x02 \x01(\x04\x12\x12\n\ngpio_value\x18\x03 \x01(\x04\"l\n\x04Type\x12\t\n\x05UNSET\x10\x00\x12\x0f\n\x0bWRITE_GPIOS\x10\x01\x12\x0f\n\x0bWATCH_GPIOS\x10\x02\x12\x11\n\rGPIOS_CHANGED\x10\x03\x12\x0e\n\nREAD_GPIOS\x10\x04\x12\x14\n\x10READ_GPIOS_REPLY\x10\x05\x42\x63\n\x13\x63om.geeksville.meshB\x0eRemoteHardwareZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.remote_hardware_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\016RemoteHardwareZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _HARDWAREMESSAGE._serialized_start=49 - _HARDWAREMESSAGE._serialized_end=263 - _HARDWAREMESSAGE_TYPE._serialized_start=155 - _HARDWAREMESSAGE_TYPE._serialized_end=263 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/storeforward_pb2.py b/meshtastic/storeforward_pb2.py deleted file mode 100644 index b81fd73..0000000 --- a/meshtastic/storeforward_pb2.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/storeforward.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dmeshtastic/storeforward.proto\x12\nmeshtastic\"\x9c\x07\n\x0fStoreAndForward\x12\x37\n\x02rr\x18\x01 \x01(\x0e\x32+.meshtastic.StoreAndForward.RequestResponse\x12\x37\n\x05stats\x18\x02 \x01(\x0b\x32&.meshtastic.StoreAndForward.StatisticsH\x00\x12\x36\n\x07history\x18\x03 \x01(\x0b\x32#.meshtastic.StoreAndForward.HistoryH\x00\x12:\n\theartbeat\x18\x04 \x01(\x0b\x32%.meshtastic.StoreAndForward.HeartbeatH\x00\x12\x0e\n\x04text\x18\x05 \x01(\x0cH\x00\x1a\xcd\x01\n\nStatistics\x12\x16\n\x0emessages_total\x18\x01 \x01(\r\x12\x16\n\x0emessages_saved\x18\x02 \x01(\r\x12\x14\n\x0cmessages_max\x18\x03 \x01(\r\x12\x0f\n\x07up_time\x18\x04 \x01(\r\x12\x10\n\x08requests\x18\x05 \x01(\r\x12\x18\n\x10requests_history\x18\x06 \x01(\r\x12\x11\n\theartbeat\x18\x07 \x01(\x08\x12\x12\n\nreturn_max\x18\x08 \x01(\r\x12\x15\n\rreturn_window\x18\t \x01(\r\x1aI\n\x07History\x12\x18\n\x10history_messages\x18\x01 \x01(\r\x12\x0e\n\x06window\x18\x02 \x01(\r\x12\x14\n\x0clast_request\x18\x03 \x01(\r\x1a.\n\tHeartbeat\x12\x0e\n\x06period\x18\x01 \x01(\r\x12\x11\n\tsecondary\x18\x02 \x01(\r\"\xbc\x02\n\x0fRequestResponse\x12\t\n\x05UNSET\x10\x00\x12\x10\n\x0cROUTER_ERROR\x10\x01\x12\x14\n\x10ROUTER_HEARTBEAT\x10\x02\x12\x0f\n\x0bROUTER_PING\x10\x03\x12\x0f\n\x0bROUTER_PONG\x10\x04\x12\x0f\n\x0bROUTER_BUSY\x10\x05\x12\x12\n\x0eROUTER_HISTORY\x10\x06\x12\x10\n\x0cROUTER_STATS\x10\x07\x12\x16\n\x12ROUTER_TEXT_DIRECT\x10\x08\x12\x19\n\x15ROUTER_TEXT_BROADCAST\x10\t\x12\x10\n\x0c\x43LIENT_ERROR\x10@\x12\x12\n\x0e\x43LIENT_HISTORY\x10\x41\x12\x10\n\x0c\x43LIENT_STATS\x10\x42\x12\x0f\n\x0b\x43LIENT_PING\x10\x43\x12\x0f\n\x0b\x43LIENT_PONG\x10\x44\x12\x10\n\x0c\x43LIENT_ABORT\x10jB\t\n\x07variantBj\n\x13\x63om.geeksville.meshB\x15StoreAndForwardProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.storeforward_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\025StoreAndForwardProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _STOREANDFORWARD._serialized_start=46 - _STOREANDFORWARD._serialized_end=970 - _STOREANDFORWARD_STATISTICS._serialized_start=312 - _STOREANDFORWARD_STATISTICS._serialized_end=517 - _STOREANDFORWARD_HISTORY._serialized_start=519 - _STOREANDFORWARD_HISTORY._serialized_end=592 - _STOREANDFORWARD_HEARTBEAT._serialized_start=594 - _STOREANDFORWARD_HEARTBEAT._serialized_end=640 - _STOREANDFORWARD_REQUESTRESPONSE._serialized_start=643 - _STOREANDFORWARD_REQUESTRESPONSE._serialized_end=959 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/telemetry_pb2.py b/meshtastic/telemetry_pb2.py deleted file mode 100644 index b3c16e8..0000000 --- a/meshtastic/telemetry_pb2.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/telemetry.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ameshtastic/telemetry.proto\x12\nmeshtastic\"\x81\x01\n\rDeviceMetrics\x12\x15\n\rbattery_level\x18\x01 \x01(\r\x12\x0f\n\x07voltage\x18\x02 \x01(\x02\x12\x1b\n\x13\x63hannel_utilization\x18\x03 \x01(\x02\x12\x13\n\x0b\x61ir_util_tx\x18\x04 \x01(\x02\x12\x16\n\x0euptime_seconds\x18\x05 \x01(\r\"\xa6\x02\n\x12\x45nvironmentMetrics\x12\x13\n\x0btemperature\x18\x01 \x01(\x02\x12\x19\n\x11relative_humidity\x18\x02 \x01(\x02\x12\x1b\n\x13\x62\x61rometric_pressure\x18\x03 \x01(\x02\x12\x16\n\x0egas_resistance\x18\x04 \x01(\x02\x12\x0f\n\x07voltage\x18\x05 \x01(\x02\x12\x0f\n\x07\x63urrent\x18\x06 \x01(\x02\x12\x0b\n\x03iaq\x18\x07 \x01(\r\x12\x10\n\x08\x64istance\x18\x08 \x01(\x02\x12\x0b\n\x03lux\x18\t \x01(\x02\x12\x11\n\twhite_lux\x18\n \x01(\x02\x12\x0e\n\x06ir_lux\x18\x0b \x01(\x02\x12\x0e\n\x06uv_lux\x18\x0c \x01(\x02\x12\x16\n\x0ewind_direction\x18\r \x01(\r\x12\x12\n\nwind_speed\x18\x0e \x01(\x02\"\x8c\x01\n\x0cPowerMetrics\x12\x13\n\x0b\x63h1_voltage\x18\x01 \x01(\x02\x12\x13\n\x0b\x63h1_current\x18\x02 \x01(\x02\x12\x13\n\x0b\x63h2_voltage\x18\x03 \x01(\x02\x12\x13\n\x0b\x63h2_current\x18\x04 \x01(\x02\x12\x13\n\x0b\x63h3_voltage\x18\x05 \x01(\x02\x12\x13\n\x0b\x63h3_current\x18\x06 \x01(\x02\"\xbf\x02\n\x11\x41irQualityMetrics\x12\x15\n\rpm10_standard\x18\x01 \x01(\r\x12\x15\n\rpm25_standard\x18\x02 \x01(\r\x12\x16\n\x0epm100_standard\x18\x03 \x01(\r\x12\x1a\n\x12pm10_environmental\x18\x04 \x01(\r\x12\x1a\n\x12pm25_environmental\x18\x05 \x01(\r\x12\x1b\n\x13pm100_environmental\x18\x06 \x01(\r\x12\x16\n\x0eparticles_03um\x18\x07 \x01(\r\x12\x16\n\x0eparticles_05um\x18\x08 \x01(\r\x12\x16\n\x0eparticles_10um\x18\t \x01(\r\x12\x16\n\x0eparticles_25um\x18\n \x01(\r\x12\x16\n\x0eparticles_50um\x18\x0b \x01(\r\x12\x17\n\x0fparticles_100um\x18\x0c \x01(\r\"\x89\x02\n\tTelemetry\x12\x0c\n\x04time\x18\x01 \x01(\x07\x12\x33\n\x0e\x64\x65vice_metrics\x18\x02 \x01(\x0b\x32\x19.meshtastic.DeviceMetricsH\x00\x12=\n\x13\x65nvironment_metrics\x18\x03 \x01(\x0b\x32\x1e.meshtastic.EnvironmentMetricsH\x00\x12<\n\x13\x61ir_quality_metrics\x18\x04 \x01(\x0b\x32\x1d.meshtastic.AirQualityMetricsH\x00\x12\x31\n\rpower_metrics\x18\x05 \x01(\x0b\x32\x18.meshtastic.PowerMetricsH\x00\x42\t\n\x07variant*\xdd\x02\n\x13TelemetrySensorType\x12\x10\n\x0cSENSOR_UNSET\x10\x00\x12\n\n\x06\x42ME280\x10\x01\x12\n\n\x06\x42ME680\x10\x02\x12\x0b\n\x07MCP9808\x10\x03\x12\n\n\x06INA260\x10\x04\x12\n\n\x06INA219\x10\x05\x12\n\n\x06\x42MP280\x10\x06\x12\t\n\x05SHTC3\x10\x07\x12\t\n\x05LPS22\x10\x08\x12\x0b\n\x07QMC6310\x10\t\x12\x0b\n\x07QMI8658\x10\n\x12\x0c\n\x08QMC5883L\x10\x0b\x12\t\n\x05SHT31\x10\x0c\x12\x0c\n\x08PMSA003I\x10\r\x12\x0b\n\x07INA3221\x10\x0e\x12\n\n\x06\x42MP085\x10\x0f\x12\x0c\n\x08RCWL9620\x10\x10\x12\t\n\x05SHT4X\x10\x11\x12\x0c\n\x08VEML7700\x10\x12\x12\x0c\n\x08MLX90632\x10\x13\x12\x0b\n\x07OPT3001\x10\x14\x12\x0c\n\x08LTR390UV\x10\x15\x12\x0e\n\nTSL25911FN\x10\x16\x12\t\n\x05\x41HT10\x10\x17\x12\x10\n\x0c\x44\x46ROBOT_LARK\x10\x18\x42\x64\n\x13\x63om.geeksville.meshB\x0fTelemetryProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.telemetry_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\017TelemetryProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _TELEMETRYSENSORTYPE._serialized_start=1205 - _TELEMETRYSENSORTYPE._serialized_end=1554 - _DEVICEMETRICS._serialized_start=43 - _DEVICEMETRICS._serialized_end=172 - _ENVIRONMENTMETRICS._serialized_start=175 - _ENVIRONMENTMETRICS._serialized_end=469 - _POWERMETRICS._serialized_start=472 - _POWERMETRICS._serialized_end=612 - _AIRQUALITYMETRICS._serialized_start=615 - _AIRQUALITYMETRICS._serialized_end=934 - _TELEMETRY._serialized_start=937 - _TELEMETRY._serialized_end=1202 -# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/tests/test_main.py b/meshtastic/tests/test_main.py index 18fa497..6f2dd26 100644 --- a/meshtastic/tests/test_main.py +++ b/meshtastic/tests/test_main.py @@ -21,7 +21,7 @@ from meshtastic.__main__ import ( ) from meshtastic import mt_config -from ..channel_pb2 import Channel # pylint: disable=E0611 +from ..protobuf.channel_pb2 import Channel # pylint: disable=E0611 # from ..ble_interface import BLEInterface from ..node import Node diff --git a/meshtastic/tests/test_mesh_interface.py b/meshtastic/tests/test_mesh_interface.py index 5e8441c..2f8dc83 100644 --- a/meshtastic/tests/test_mesh_interface.py +++ b/meshtastic/tests/test_mesh_interface.py @@ -7,7 +7,8 @@ from unittest.mock import MagicMock, patch import pytest from hypothesis import given, strategies as st -from .. import mesh_pb2, config_pb2, BROADCAST_ADDR, LOCAL_ADDR +from ..protobuf import mesh_pb2, config_pb2 +from .. import BROADCAST_ADDR, LOCAL_ADDR from ..mesh_interface import MeshInterface, _timeago from ..node import Node diff --git a/meshtastic/tests/test_node.py b/meshtastic/tests/test_node.py index 5bacd9d..df3dffb 100644 --- a/meshtastic/tests/test_node.py +++ b/meshtastic/tests/test_node.py @@ -6,8 +6,8 @@ from unittest.mock import MagicMock, patch import pytest -from .. import localonly_pb2, config_pb2 -from ..channel_pb2 import Channel # pylint: disable=E0611 +from ..protobuf import localonly_pb2, config_pb2 +from ..protobuf.channel_pb2 import Channel # pylint: disable=E0611 from ..node import Node from ..serial_interface import SerialInterface from ..mesh_interface import MeshInterface diff --git a/meshtastic/tests/test_serial_interface.py b/meshtastic/tests/test_serial_interface.py index 739380c..797c6d7 100644 --- a/meshtastic/tests/test_serial_interface.py +++ b/meshtastic/tests/test_serial_interface.py @@ -6,7 +6,7 @@ from unittest.mock import mock_open, patch import pytest from ..serial_interface import SerialInterface -from .. import config_pb2 +from ..protobuf import config_pb2 @pytest.mark.unit diff --git a/meshtastic/tests/test_tcp_interface.py b/meshtastic/tests/test_tcp_interface.py index 03d317c..44e79de 100644 --- a/meshtastic/tests/test_tcp_interface.py +++ b/meshtastic/tests/test_tcp_interface.py @@ -5,7 +5,7 @@ from unittest.mock import patch import pytest -from .. import config_pb2 +from ..protobuf import config_pb2 from ..tcp_interface import TCPInterface diff --git a/meshtastic/tests/test_util.py b/meshtastic/tests/test_util.py index 74f66d9..1ea80da 100644 --- a/meshtastic/tests/test_util.py +++ b/meshtastic/tests/test_util.py @@ -9,7 +9,7 @@ import pytest from hypothesis import given, strategies as st from meshtastic.supported_device import SupportedDevice -from meshtastic.mesh_pb2 import MyNodeInfo +from meshtastic.protobuf import mesh_pb2 from meshtastic.util import ( Timeout, active_ports_on_supported_devices, @@ -555,7 +555,7 @@ def test_active_ports_on_supported_devices_mac_duplicates_check(mock_platform, m @pytest.mark.unit def test_message_to_json_shows_all(): """Test that message_to_json prints fields that aren't included in data passed in""" - actual = json.loads(message_to_json(MyNodeInfo())) + actual = json.loads(message_to_json(mesh_pb2.MyNodeInfo())) expected = { "myNodeNum": 0, "rebootCount": 0, "minAppVersion": 0 } assert actual == expected diff --git a/meshtastic/tunnel.py b/meshtastic/tunnel.py index 40a1c2e..409e3d4 100644 --- a/meshtastic/tunnel.py +++ b/meshtastic/tunnel.py @@ -22,7 +22,8 @@ import threading from pubsub import pub # type: ignore[import-untyped] from pytap2 import TapDevice -from meshtastic import portnums_pb2, mt_config +from meshtastic.protobuf import portnums_pb2 +from meshtastic import mt_config from meshtastic.util import ipstr, readnet_u16 diff --git a/meshtastic/xmodem_pb2.py b/meshtastic/xmodem_pb2.py deleted file mode 100644 index a352c63..0000000 --- a/meshtastic/xmodem_pb2.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: meshtastic/xmodem.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17meshtastic/xmodem.proto\x12\nmeshtastic\"\xb6\x01\n\x06XModem\x12+\n\x07\x63ontrol\x18\x01 \x01(\x0e\x32\x1a.meshtastic.XModem.Control\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\r\n\x05\x63rc16\x18\x03 \x01(\r\x12\x0e\n\x06\x62uffer\x18\x04 \x01(\x0c\"S\n\x07\x43ontrol\x12\x07\n\x03NUL\x10\x00\x12\x07\n\x03SOH\x10\x01\x12\x07\n\x03STX\x10\x02\x12\x07\n\x03\x45OT\x10\x04\x12\x07\n\x03\x41\x43K\x10\x06\x12\x07\n\x03NAK\x10\x15\x12\x07\n\x03\x43\x41N\x10\x18\x12\t\n\x05\x43TRLZ\x10\x1a\x42\x61\n\x13\x63om.geeksville.meshB\x0cXmodemProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.xmodem_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\014XmodemProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000' - _XMODEM._serialized_start=40 - _XMODEM._serialized_end=222 - _XMODEM_CONTROL._serialized_start=139 - _XMODEM_CONTROL._serialized_end=222 -# @@protoc_insertion_point(module_scope) diff --git a/poetry.lock b/poetry.lock index 0a28180..8e0d8cd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2940,13 +2940,13 @@ test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0, [[package]] name = "types-protobuf" -version = "5.26.0.20240422" +version = "5.27.0.20240626" description = "Typing stubs for protobuf" optional = false python-versions = ">=3.8" files = [ - {file = "types-protobuf-5.26.0.20240422.tar.gz", hash = "sha256:e6074178109f97efe9f0b20a035ba61d7c3b03e867eb47d254d2b2ab6a805e36"}, - {file = "types_protobuf-5.26.0.20240422-py3-none-any.whl", hash = "sha256:e4dc2554d342501d5aebc3c71203868b51118340e105fc190e3a64ca1be43831"}, + {file = "types-protobuf-5.27.0.20240626.tar.gz", hash = "sha256:683ba14043bade6785e3f937a7498f243b37881a91ac8d81b9202ecf8b191e9c"}, + {file = "types_protobuf-5.27.0.20240626-py3-none-any.whl", hash = "sha256:688e8f7e8d9295db26bc560df01fb731b27a25b77cbe4c1ce945647f7024f5c1"}, ] [[package]]