From 58da532d32a17bfad96c95c18abc1e637ced8af4 Mon Sep 17 00:00:00 2001 From: Blake McAnally Date: Fri, 7 Jun 2024 22:09:20 -0500 Subject: [PATCH] Extract the generated protobufs into its own Swift package This change modifies the process for generating and integrating the Meshtastic protobufs into the client application. * The generated Swift code is now in a local SPM package `MeshtasticProtobufs` * An Xcode Workspace file `Meshtastic.xcworkspace` was created to more easily manage the new build targets. * The code generation script for the protos was modified to generate the Swift code into the new location. * The README.md was updated to reflect these changes. NOTE: After merging this PR, do not open the project file `Meshtastic.xcodeproj`. You must use the workspace `Meshtastic.xcworkspace` Extracting out the generated protobuf code into its own library enables several opportunities for the project. This is just a first step, but with some more modularization, a standalone Apple Watch app or other targets starts to become a little bit more achievable to implement. After extracting the protobufs into a Swift package, I validate these changes by building and running the Meshtastic app to an iPhone 15 Pro Max, and tried changing some settings on a local node. I then messaged back and forth using two local nodes connected to two different iOS devices. --- .swiftlint.yml | 2 +- Meshtastic.xcodeproj/project.pbxproj | 307 +------ .../xcshareddata/swiftpm/Package.resolved | 6 +- .../xcschemes/WidgetsExtension.xcscheme | 1 - .../contents.xcworkspacedata | 13 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/swiftpm/Package.resolved | 51 ++ Meshtastic/Enums/BluetoothModes.swift | 1 + .../Enums/CannedMessagesConfigEnums.swift | 1 + Meshtastic/Enums/ChannelRoles.swift | 1 + Meshtastic/Enums/DeviceEnums.swift | 1 + Meshtastic/Enums/DisplayEnums.swift | 1 + Meshtastic/Enums/EthernetModes.swift | 1 + Meshtastic/Enums/LoraConfigEnums.swift | 1 + Meshtastic/Enums/PositionConfigEnums.swift | 1 + Meshtastic/Enums/RoutingError.swift | 1 + Meshtastic/Enums/SerialConfigEnums.swift | 1 + .../CoreData/ChannelEntityExtension.swift | 2 + .../DeviceMetadataEntityExtension.swift | 25 + ...nalNotificationConfigEntityExtension.swift | 44 + .../CoreData/MQTTConfigEntityExtension.swift | 38 + .../CoreData/PositionEntityExtension.swift | 1 + .../RangeTestConfigEntityExtension.swift | 20 + .../SerialConfigEntityExtension.swift | 28 + .../StoreForwardConfigEntityExtension.swift | 24 + .../CoreData/UserEntityExtension.swift | 1 + .../Protobufs/NodeInfoExtensions.swift | 12 + Meshtastic/Helpers/BLEManager.swift | 1 + Meshtastic/Helpers/Logger.swift | 19 + Meshtastic/Helpers/MeshPackets.swift | 1 + Meshtastic/Helpers/NetworkManager.swift | 28 - Meshtastic/Persistence/UpdateCoreData.swift | 33 +- .../Views/MapKitMap/WaypointFormMapKit.swift | 3 +- .../Views/Messages/ChannelMessageList.swift | 3 +- Meshtastic/Views/Messages/MessageText.swift | 3 +- .../Views/Nodes/DetectionSensorLog.swift | 1 + .../Nodes/Helpers/Map/WaypointForm.swift | 5 +- Meshtastic/Views/Settings/Channels.swift | 3 +- .../Settings/Config/BluetoothConfig.swift | 1 + .../Views/Settings/Config/DeviceConfig.swift | 4 +- .../Views/Settings/Config/DisplayConfig.swift | 3 +- .../Views/Settings/Config/LoRaConfig.swift | 1 + .../Config/Module/AmbientLightingConfig.swift | 3 +- .../Config/Module/CannedMessagesConfig.swift | 3 +- .../Config/Module/DetectionSensorConfig.swift | 3 +- .../Module/ExternalNotificationConfig.swift | 3 +- .../Settings/Config/Module/MQTTConfig.swift | 3 +- .../Config/Module/PaxCounterConfig.swift | 1 + .../Config/Module/RangeTestConfig.swift | 3 +- .../Settings/Config/Module/SerialConfig.swift | 3 +- .../Config/Module/StoreForwardConfig.swift | 4 +- .../Config/Module/TelemetryConfig.swift | 3 +- .../Views/Settings/Config/NetworkConfig.swift | 4 +- .../Settings/Config/PositionConfig.swift | 1 + .../Views/Settings/Config/PowerConfig.swift | 1 + Meshtastic/Views/Settings/ShareChannels.swift | 2 + Meshtastic/Views/Settings/UserConfig.swift | 3 +- MeshtasticProtobufs/.gitignore | 8 + MeshtasticProtobufs/Package.swift | 24 + .../Sources}/meshtastic/admin.pb.swift | 174 ++-- .../Sources}/meshtastic/apponly.pb.swift | 24 +- .../Sources}/meshtastic/atak.pb.swift | 188 ++-- .../meshtastic/cannedmessages.pb.swift | 18 +- .../Sources}/meshtastic/channel.pb.swift | 94 +- .../Sources}/meshtastic/clientonly.pb.swift | 46 +- .../Sources}/meshtastic/config.pb.swift | 507 ++++++----- .../meshtastic/connection_status.pb.swift | 154 ++-- .../Sources}/meshtastic/deviceonly.pb.swift | 200 ++--- .../Sources}/meshtastic/localonly.pb.swift | 156 ++-- .../Sources}/meshtastic/mesh.pb.swift | 828 +++++++++--------- .../meshtastic/module_config.pb.swift | 556 ++++++------ .../Sources}/meshtastic/mqtt.pb.swift | 68 +- .../Sources}/meshtastic/paxcount.pb.swift | 22 +- .../Sources}/meshtastic/portnums.pb.swift | 14 +- .../Sources}/meshtastic/powermon.pb.swift | 0 .../meshtastic/remote_hardware.pb.swift | 36 +- .../Sources}/meshtastic/rtttl.pb.swift | 18 +- .../Sources}/meshtastic/storeforward.pb.swift | 122 +-- .../Sources}/meshtastic/telemetry.pb.swift | 216 ++--- .../Sources}/meshtastic/xmodem.pb.swift | 38 +- MeshtasticTests/Info.plist | 22 - MeshtasticTests/MeshtasticTests.swift | 37 - MeshtasticUITests/Info.plist | 22 - MeshtasticUITests/MeshtasticUITests.swift | 42 - README.md | 52 +- gen_protos.sh => scripts/gen_protos.sh | 2 +- thebenternify.sh => scripts/thebenternify.sh | 0 .../unthebenternify.sh | 0 88 files changed, 2218 insertions(+), 2212 deletions(-) create mode 100644 Meshtastic.xcworkspace/contents.xcworkspacedata create mode 100644 Meshtastic.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Meshtastic.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 Meshtastic/Extensions/CoreData/DeviceMetadataEntityExtension.swift create mode 100644 Meshtastic/Extensions/CoreData/ExternalNotificationConfigEntityExtension.swift create mode 100644 Meshtastic/Extensions/CoreData/MQTTConfigEntityExtension.swift create mode 100644 Meshtastic/Extensions/CoreData/RangeTestConfigEntityExtension.swift create mode 100644 Meshtastic/Extensions/CoreData/SerialConfigEntityExtension.swift create mode 100644 Meshtastic/Extensions/CoreData/StoreForwardConfigEntityExtension.swift create mode 100644 Meshtastic/Extensions/Protobufs/NodeInfoExtensions.swift create mode 100644 Meshtastic/Helpers/Logger.swift delete mode 100644 Meshtastic/Helpers/NetworkManager.swift create mode 100644 MeshtasticProtobufs/.gitignore create mode 100644 MeshtasticProtobufs/Package.swift rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/admin.pb.swift (93%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/apponly.pb.swift (87%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/atak.pb.swift (81%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/cannedmessages.pb.swift (80%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/channel.pb.swift (85%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/clientonly.pb.swift (80%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/config.pb.swift (86%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/connection_status.pb.swift (76%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/deviceonly.pb.swift (84%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/localonly.pb.swift (82%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/mesh.pb.swift (88%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/module_config.pb.swift (83%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/mqtt.pb.swift (84%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/paxcount.pb.swift (83%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/portnums.pb.swift (97%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/powermon.pb.swift (100%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/remote_hardware.pb.swift (86%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/rtttl.pb.swift (81%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/storeforward.pb.swift (85%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/telemetry.pb.swift (85%) rename {Meshtastic/Protobufs => MeshtasticProtobufs/Sources}/meshtastic/xmodem.pb.swift (83%) delete mode 100644 MeshtasticTests/Info.plist delete mode 100644 MeshtasticTests/MeshtasticTests.swift delete mode 100644 MeshtasticUITests/Info.plist delete mode 100644 MeshtasticUITests/MeshtasticUITests.swift rename gen_protos.sh => scripts/gen_protos.sh (76%) rename thebenternify.sh => scripts/thebenternify.sh (100%) rename unthebenternify.sh => scripts/unthebenternify.sh (100%) diff --git a/.swiftlint.yml b/.swiftlint.yml index f5682e26..9471fd63 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -1,6 +1,6 @@ # Exclude automatically generated Swift files excluded: - - Meshtastic/Protobufs + - MeshtasticProtobufs line_length: 400 diff --git a/Meshtastic.xcodeproj/project.pbxproj b/Meshtastic.xcodeproj/project.pbxproj index 782719df..a068f0c9 100644 --- a/Meshtastic.xcodeproj/project.pbxproj +++ b/Meshtastic.xcodeproj/project.pbxproj @@ -3,10 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 55; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ + 259792252C2F114500AD1659 /* ChannelEntityExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD58C5F12919AD3C00D5BEFB /* ChannelEntityExtension.swift */; }; + 259792262C2F114500AD1659 /* PositionEntityExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5394FD276BA0EF00AD86B1 /* PositionEntityExtension.swift */; }; + 259792272C2F114500AD1659 /* TraceRouteEntityExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDE5B4052B227E3200FCDD05 /* TraceRouteEntityExtension.swift */; }; + 259792282C2F114500AD1659 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25183D452C0A6D97001E31D5 /* Logger.swift */; }; + 25A978BA2C13F8ED0003AAE7 /* MeshtasticProtobufs in Frameworks */ = {isa = PBXBuildFile; productRef = 25A978B92C13F8ED0003AAE7 /* MeshtasticProtobufs */; }; + 25A978BC2C13F90D0003AAE7 /* MeshtasticProtobufs in Frameworks */ = {isa = PBXBuildFile; productRef = 25A978BB2C13F90D0003AAE7 /* MeshtasticProtobufs */; }; 6DA39D8E2A92DC52007E311C /* MeshtasticAppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA39D8D2A92DC52007E311C /* MeshtasticAppDelegate.swift */; }; 6DEDA55A2A957B8E00321D2E /* DetectionSensorLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DEDA5592A957B8E00321D2E /* DetectionSensorLog.swift */; }; 6DEDA55C2A9592F900321D2E /* MessageEntityExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DEDA55B2A9592F900321D2E /* MessageEntityExtension.swift */; }; @@ -28,9 +34,6 @@ DD007BAE2AA4E91200F5FA12 /* MyInfoEntityExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD007BAD2AA4E91200F5FA12 /* MyInfoEntityExtension.swift */; }; DD007BB02AA5981000F5FA12 /* NodeInfoEntityExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD007BAF2AA5981000F5FA12 /* NodeInfoEntityExtension.swift */; }; DD0D3D222A55CEB10066DB71 /* CocoaMQTT in Frameworks */ = {isa = PBXBuildFile; productRef = DD0D3D212A55CEB10066DB71 /* CocoaMQTT */; }; - DD0E20FC2B87090400F2D100 /* atak.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0E20F92B87090400F2D100 /* atak.pb.swift */; }; - DD0E20FD2B87090400F2D100 /* clientonly.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0E20FA2B87090400F2D100 /* clientonly.pb.swift */; }; - DD0E20FE2B87090400F2D100 /* paxcount.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0E20FB2B87090400F2D100 /* paxcount.pb.swift */; }; DD0E21012B8A6F1300F2D100 /* DeviceHardware.json in Resources */ = {isa = PBXBuildFile; fileRef = DD0E21002B8A6BC500F2D100 /* DeviceHardware.json */; }; DD13AA492AB73BF400BA0C98 /* PositionPopover.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD13AA482AB73BF400BA0C98 /* PositionPopover.swift */; }; DD15E4F32B8BA56E00654F61 /* PaxCounterConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD15E4F22B8BA56E00654F61 /* PaxCounterConfig.swift */; }; @@ -66,27 +69,7 @@ DD4975A52B147BA90026544E /* AmbientLightingConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4975A42B147BA90026544E /* AmbientLightingConfig.swift */; }; DD4A911E2708C65400501B7E /* AppSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4A911D2708C65400501B7E /* AppSettings.swift */; }; DD4F23CD28779A3C001D37CB /* EnvironmentMetricsLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4F23CC28779A3C001D37CB /* EnvironmentMetricsLog.swift */; }; - DD5394FC276993AD00AD86B1 /* SwiftProtobuf in Frameworks */ = {isa = PBXBuildFile; productRef = DD5394FB276993AD00AD86B1 /* SwiftProtobuf */; }; - DD5394FE276BA0EF00AD86B1 /* PositionEntityExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5394FD276BA0EF00AD86B1 /* PositionEntityExtension.swift */; }; - DD58C5F22919AD3C00D5BEFB /* ChannelEntityExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD58C5F12919AD3C00D5BEFB /* ChannelEntityExtension.swift */; }; DD5D0A9C2931B9F200F7EA61 /* EthernetModes.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5D0A9B2931B9F200F7EA61 /* EthernetModes.swift */; }; - DD5E5202298EE33B00D21B61 /* admin.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51F0298EE33B00D21B61 /* admin.pb.swift */; }; - DD5E5203298EE33B00D21B61 /* config.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51F1298EE33B00D21B61 /* config.pb.swift */; }; - DD5E5204298EE33B00D21B61 /* xmodem.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51F2298EE33B00D21B61 /* xmodem.pb.swift */; }; - DD5E5205298EE33B00D21B61 /* mesh.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51F3298EE33B00D21B61 /* mesh.pb.swift */; }; - DD5E5206298EE33B00D21B61 /* localonly.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51F4298EE33B00D21B61 /* localonly.pb.swift */; }; - DD5E5207298EE33B00D21B61 /* connection_status.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51F5298EE33B00D21B61 /* connection_status.pb.swift */; }; - DD5E5208298EE33B00D21B61 /* rtttl.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51F6298EE33B00D21B61 /* rtttl.pb.swift */; }; - DD5E5209298EE33B00D21B61 /* module_config.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51F7298EE33B00D21B61 /* module_config.pb.swift */; }; - DD5E520A298EE33B00D21B61 /* channel.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51F8298EE33B00D21B61 /* channel.pb.swift */; }; - DD5E520C298EE33B00D21B61 /* portnums.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51FA298EE33B00D21B61 /* portnums.pb.swift */; }; - DD5E520D298EE33B00D21B61 /* storeforward.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51FB298EE33B00D21B61 /* storeforward.pb.swift */; }; - DD5E520E298EE33B00D21B61 /* mqtt.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51FC298EE33B00D21B61 /* mqtt.pb.swift */; }; - DD5E520F298EE33B00D21B61 /* cannedmessages.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51FD298EE33B00D21B61 /* cannedmessages.pb.swift */; }; - DD5E5210298EE33B00D21B61 /* telemetry.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51FE298EE33B00D21B61 /* telemetry.pb.swift */; }; - DD5E5211298EE33B00D21B61 /* remote_hardware.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51FF298EE33B00D21B61 /* remote_hardware.pb.swift */; }; - DD5E5212298EE33B00D21B61 /* apponly.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E5200298EE33B00D21B61 /* apponly.pb.swift */; }; - DD5E5213298EE33B00D21B61 /* deviceonly.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E5201298EE33B00D21B61 /* deviceonly.pb.swift */; }; DD5E523F298F5A9E00D21B61 /* AirQualityIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E523E298F5A9E00D21B61 /* AirQualityIndex.swift */; }; DD6193752862F6E600E59241 /* ExternalNotificationConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6193742862F6E600E59241 /* ExternalNotificationConfig.swift */; }; DD6193772862F90F00E59241 /* CannedMessagesConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6193762862F90F00E59241 /* CannedMessagesConfig.swift */; }; @@ -154,7 +137,6 @@ DDC2E15826CE248E0042C5E4 /* MeshtasticApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC2E15726CE248E0042C5E4 /* MeshtasticApp.swift */; }; DDC2E15C26CE248F0042C5E4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DDC2E15B26CE248F0042C5E4 /* Assets.xcassets */; }; DDC2E15F26CE248F0042C5E4 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DDC2E15E26CE248F0042C5E4 /* Preview Assets.xcassets */; }; - DDC2E17A26CE248F0042C5E4 /* MeshtasticUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC2E17926CE248F0042C5E4 /* MeshtasticUITests.swift */; }; DDC2E18F26CE25FE0042C5E4 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC2E18E26CE25FE0042C5E4 /* ContentView.swift */; }; DDC2E1A726CEB3400042C5E4 /* LocationHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC2E1A626CEB3400042C5E4 /* LocationHelper.swift */; }; DDC3B274283F411B00AC321C /* LastHeardText.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC3B273283F411B00AC321C /* LastHeardText.swift */; }; @@ -180,7 +162,6 @@ DDDB26462AACC0B7003AFCB7 /* NodeInfoItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDB26452AACC0B7003AFCB7 /* NodeInfoItem.swift */; }; DDDB26482AACD6D1003AFCB7 /* NodeMapMapkit.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDB26472AACD6D1003AFCB7 /* NodeMapMapkit.swift */; }; DDDB443629F6287000EE2349 /* MapButtons.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDB443529F6287000EE2349 /* MapButtons.swift */; }; - DDDB443D29F6592F00EE2349 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDB443C29F6592F00EE2349 /* NetworkManager.swift */; }; DDDB444029F79AB000EE2349 /* UserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDB443F29F79AB000EE2349 /* UserDefaults.swift */; }; DDDB444229F8A88700EE2349 /* Double.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDB444129F8A88700EE2349 /* Double.swift */; }; DDDB444429F8A8DD00EE2349 /* Float.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDB444329F8A8DD00EE2349 /* Float.swift */; }; @@ -206,7 +187,6 @@ DDDE5A1429AFEAB900490C6C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DDDE5A1229AFEAB900490C6C /* Assets.xcassets */; }; DDE0F7C5295F77B700B8AAB3 /* AppSettingsEnums.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDE0F7C4295F77B700B8AAB3 /* AppSettingsEnums.swift */; }; DDE5B4042B2279A700FCDD05 /* TraceRouteLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDE5B4032B2279A700FCDD05 /* TraceRouteLog.swift */; }; - DDE5B4062B227E3200FCDD05 /* TraceRouteEntityExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDE5B4052B227E3200FCDD05 /* TraceRouteEntityExtension.swift */; }; DDE9659C2B1C3B6A00531070 /* RouteRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDE9659B2B1C3B6A00531070 /* RouteRecorder.swift */; }; DDF45C342BC1A48E005ED5F2 /* MQTTIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF45C332BC1A48E005ED5F2 /* MQTTIcon.swift */; }; DDF45C372BC46A5A005ED5F2 /* TimeZone.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF45C362BC46A5A005ED5F2 /* TimeZone.swift */; }; @@ -217,13 +197,6 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - DDC2E17626CE248F0042C5E4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = DDC2E14C26CE248E0042C5E4 /* Project object */; - proxyType = 1; - remoteGlobalIDString = DDC2E15326CE248E0042C5E4; - remoteInfo = MeshtasticClient; - }; DDDE5A0129AF163E00490C6C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = DDC2E14C26CE248E0042C5E4 /* Project object */; @@ -270,9 +243,6 @@ DD007BAD2AA4E91200F5FA12 /* MyInfoEntityExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyInfoEntityExtension.swift; sourceTree = ""; }; DD007BAF2AA5981000F5FA12 /* NodeInfoEntityExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeInfoEntityExtension.swift; sourceTree = ""; }; DD05296F2B77F454008E44CD /* MeshtasticDataModelV 26.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MeshtasticDataModelV 26.xcdatamodel"; sourceTree = ""; }; - DD0E20F92B87090400F2D100 /* atak.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = atak.pb.swift; sourceTree = ""; }; - DD0E20FA2B87090400F2D100 /* clientonly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = clientonly.pb.swift; sourceTree = ""; }; - DD0E20FB2B87090400F2D100 /* paxcount.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = paxcount.pb.swift; sourceTree = ""; }; DD0E20FF2B892E1300F2D100 /* MeshtasticDataModelV 28.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MeshtasticDataModelV 28.xcdatamodel"; sourceTree = ""; }; DD0E21002B8A6BC500F2D100 /* DeviceHardware.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = DeviceHardware.json; sourceTree = ""; }; DD0E9C222A30CE3A00580CBB /* MeshtasticDataModelV14.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MeshtasticDataModelV14.xcdatamodel; sourceTree = ""; }; @@ -328,23 +298,6 @@ DD5D0A9A2931AD6B00F7EA61 /* MeshtasticDataModelV2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MeshtasticDataModelV2.xcdatamodel; sourceTree = ""; }; DD5D0A9B2931B9F200F7EA61 /* EthernetModes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EthernetModes.swift; sourceTree = ""; }; DD5E51CC2986643400D21B61 /* MeshtasticDataModelV7.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MeshtasticDataModelV7.xcdatamodel; sourceTree = ""; }; - DD5E51F0298EE33B00D21B61 /* admin.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = admin.pb.swift; sourceTree = ""; }; - DD5E51F1298EE33B00D21B61 /* config.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = config.pb.swift; sourceTree = ""; }; - DD5E51F2298EE33B00D21B61 /* xmodem.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = xmodem.pb.swift; sourceTree = ""; }; - DD5E51F3298EE33B00D21B61 /* mesh.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = mesh.pb.swift; sourceTree = ""; }; - DD5E51F4298EE33B00D21B61 /* localonly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = localonly.pb.swift; sourceTree = ""; }; - DD5E51F5298EE33B00D21B61 /* connection_status.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = connection_status.pb.swift; sourceTree = ""; }; - DD5E51F6298EE33B00D21B61 /* rtttl.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = rtttl.pb.swift; sourceTree = ""; }; - DD5E51F7298EE33B00D21B61 /* module_config.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = module_config.pb.swift; sourceTree = ""; }; - DD5E51F8298EE33B00D21B61 /* channel.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = channel.pb.swift; sourceTree = ""; }; - DD5E51FA298EE33B00D21B61 /* portnums.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = portnums.pb.swift; sourceTree = ""; }; - DD5E51FB298EE33B00D21B61 /* storeforward.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = storeforward.pb.swift; sourceTree = ""; }; - DD5E51FC298EE33B00D21B61 /* mqtt.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = mqtt.pb.swift; sourceTree = ""; }; - DD5E51FD298EE33B00D21B61 /* cannedmessages.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = cannedmessages.pb.swift; sourceTree = ""; }; - DD5E51FE298EE33B00D21B61 /* telemetry.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = telemetry.pb.swift; sourceTree = ""; }; - DD5E51FF298EE33B00D21B61 /* remote_hardware.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = remote_hardware.pb.swift; sourceTree = ""; }; - DD5E5200298EE33B00D21B61 /* apponly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = apponly.pb.swift; sourceTree = ""; }; - DD5E5201298EE33B00D21B61 /* deviceonly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = deviceonly.pb.swift; sourceTree = ""; }; DD5E523E298F5A9E00D21B61 /* AirQualityIndex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AirQualityIndex.swift; sourceTree = ""; }; DD6193742862F6E600E59241 /* ExternalNotificationConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalNotificationConfig.swift; sourceTree = ""; }; DD6193762862F90F00E59241 /* CannedMessagesConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CannedMessagesConfig.swift; sourceTree = ""; }; @@ -423,10 +376,6 @@ DDC2E15B26CE248F0042C5E4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = ../Assets.xcassets; sourceTree = ""; }; DDC2E15E26CE248F0042C5E4 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; DDC2E16526CE248F0042C5E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DDC2E17026CE248F0042C5E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DDC2E17526CE248F0042C5E4 /* MeshtasticUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeshtasticUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - DDC2E17926CE248F0042C5E4 /* MeshtasticUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeshtasticUITests.swift; sourceTree = ""; }; - DDC2E17B26CE248F0042C5E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DDC2E18E26CE25FE0042C5E4 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; DDC2E1A626CEB3400042C5E4 /* LocationHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationHelper.swift; sourceTree = ""; }; DDC3B273283F411B00AC321C /* LastHeardText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LastHeardText.swift; sourceTree = ""; }; @@ -442,7 +391,6 @@ DDCE4E2B2869F92900BE9F8F /* UserConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserConfig.swift; sourceTree = ""; }; DDD28D362C0CCCD10063CFA3 /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/Localizable.strings"; sourceTree = ""; }; DDD28D372C0CD2670063CFA3 /* MeshtasticDataModelV 37.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MeshtasticDataModelV 37.xcdatamodel"; sourceTree = ""; }; - DDD3BBD4292D763200D609B3 /* MeshtasticTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeshtasticTests.swift; sourceTree = ""; }; DDD43FE22A78C8900083A3E9 /* MqttClientProxyManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MqttClientProxyManager.swift; sourceTree = ""; }; DDD5BB082C285DDC007E03CA /* AppLog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLog.swift; sourceTree = ""; }; DDD5BB0A2C285E45007E03CA /* LogDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogDetail.swift; sourceTree = ""; }; @@ -460,7 +408,6 @@ DDDB26472AACD6D1003AFCB7 /* NodeMapMapkit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeMapMapkit.swift; sourceTree = ""; }; DDDB26492AAD743E003AFCB7 /* MeshtasticDataModelV18.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MeshtasticDataModelV18.xcdatamodel; sourceTree = ""; }; DDDB443529F6287000EE2349 /* MapButtons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapButtons.swift; sourceTree = ""; }; - DDDB443C29F6592F00EE2349 /* NetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = ""; }; DDDB443F29F79AB000EE2349 /* UserDefaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaults.swift; sourceTree = ""; }; DDDB444129F8A88700EE2349 /* Double.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Double.swift; sourceTree = ""; }; DDDB444329F8A8DD00EE2349 /* Float.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Float.swift; sourceTree = ""; }; @@ -510,16 +457,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 25A978BA2C13F8ED0003AAE7 /* MeshtasticProtobufs in Frameworks */, C9697FA527933B8C00250207 /* SQLite in Frameworks */, DD0D3D222A55CEB10066DB71 /* CocoaMQTT in Frameworks */, - DD5394FC276993AD00AD86B1 /* SwiftProtobuf in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DDC2E17226CE248F0042C5E4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( ); runOnlyForDeploymentPostprocessing = 0; }; @@ -529,6 +469,7 @@ files = ( DDDE59F629AF163D00490C6C /* SwiftUI.framework in Frameworks */, DDDE59F529AF163D00490C6C /* WidgetKit.framework in Frameworks */, + 25A978BC2C13F90D0003AAE7 /* MeshtasticProtobufs in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -635,33 +576,6 @@ path = Settings; sourceTree = ""; }; - DD5E51EF298EE33B00D21B61 /* meshtastic */ = { - isa = PBXGroup; - children = ( - DD0E20F92B87090400F2D100 /* atak.pb.swift */, - DD0E20FA2B87090400F2D100 /* clientonly.pb.swift */, - DD0E20FB2B87090400F2D100 /* paxcount.pb.swift */, - DD5E51F0298EE33B00D21B61 /* admin.pb.swift */, - DD5E51F1298EE33B00D21B61 /* config.pb.swift */, - DD5E51F2298EE33B00D21B61 /* xmodem.pb.swift */, - DD5E51F3298EE33B00D21B61 /* mesh.pb.swift */, - DD5E51F4298EE33B00D21B61 /* localonly.pb.swift */, - DD5E51F5298EE33B00D21B61 /* connection_status.pb.swift */, - DD5E51F6298EE33B00D21B61 /* rtttl.pb.swift */, - DD5E51F7298EE33B00D21B61 /* module_config.pb.swift */, - DD5E51F8298EE33B00D21B61 /* channel.pb.swift */, - DD5E51FA298EE33B00D21B61 /* portnums.pb.swift */, - DD5E51FB298EE33B00D21B61 /* storeforward.pb.swift */, - DD5E51FC298EE33B00D21B61 /* mqtt.pb.swift */, - DD5E51FD298EE33B00D21B61 /* cannedmessages.pb.swift */, - DD5E51FE298EE33B00D21B61 /* telemetry.pb.swift */, - DD5E51FF298EE33B00D21B61 /* remote_hardware.pb.swift */, - DD5E5200298EE33B00D21B61 /* apponly.pb.swift */, - DD5E5201298EE33B00D21B61 /* deviceonly.pb.swift */, - ); - path = meshtastic; - sourceTree = ""; - }; DD5E523D298F5A7D00D21B61 /* Weather */ = { isa = PBXGroup; children = ( @@ -783,14 +697,6 @@ path = Map; sourceTree = ""; }; - DDAF8C5626ED07740058C060 /* Protobufs */ = { - isa = PBXGroup; - children = ( - DD5E51EF298EE33B00D21B61 /* meshtastic */, - ); - path = Protobufs; - sourceTree = ""; - }; DDB75A122A0593CD006ED576 /* Map */ = { isa = PBXGroup; children = ( @@ -807,8 +713,6 @@ DDCDC6CD29481FCC004C1DDA /* Localizable.strings */, DD3CC6BA28E366DF00FA9159 /* Meshtastic.xcdatamodeld */, DDC2E15626CE248E0042C5E4 /* Meshtastic */, - DDC2E16D26CE248F0042C5E4 /* MeshtasticTests */, - DDC2E17826CE248F0042C5E4 /* MeshtasticUITests */, DDDE59F729AF163D00490C6C /* Widgets */, DDC2E15526CE248E0042C5E4 /* Products */, DD8EDE9226F97A2B00A5A10B /* Frameworks */, @@ -820,7 +724,6 @@ isa = PBXGroup; children = ( DDC2E15426CE248E0042C5E4 /* Meshtastic.app */, - DDC2E17526CE248F0042C5E4 /* MeshtasticUITests.xctest */, DDDE59F429AF163D00490C6C /* WidgetsExtension.appex */, ); name = Products; @@ -837,7 +740,6 @@ DDC2E1A526CEB32B0042C5E4 /* Helpers */, DDC2E18826CE24EE0042C5E4 /* Model */, DDC4D5662754996200A4208E /* Persistence */, - DDAF8C5626ED07740058C060 /* Protobufs */, DDC2E18926CE24F70042C5E4 /* Resources */, DDC2E18726CE24E40042C5E4 /* Views */, DDC2E15726CE248E0042C5E4 /* MeshtasticApp.swift */, @@ -856,24 +758,6 @@ path = "Preview Content"; sourceTree = ""; }; - DDC2E16D26CE248F0042C5E4 /* MeshtasticTests */ = { - isa = PBXGroup; - children = ( - DDD3BBD4292D763200D609B3 /* MeshtasticTests.swift */, - DDC2E17026CE248F0042C5E4 /* Info.plist */, - ); - path = MeshtasticTests; - sourceTree = ""; - }; - DDC2E17826CE248F0042C5E4 /* MeshtasticUITests */ = { - isa = PBXGroup; - children = ( - DDC2E17926CE248F0042C5E4 /* MeshtasticUITests.swift */, - DDC2E17B26CE248F0042C5E4 /* Info.plist */, - ); - path = MeshtasticUITests; - sourceTree = ""; - }; DDC2E18726CE24E40042C5E4 /* Views */ = { isa = PBXGroup; children = ( @@ -954,7 +838,6 @@ DD8169F8271F1A6100F4AB02 /* MeshLogger.swift */, DDA6B2E828419CF2003E8C16 /* MeshPackets.swift */, DD964FBC296E6B01007C176F /* EmojiOnlyTextField.swift */, - DDDB443C29F6592F00EE2349 /* NetworkManager.swift */, DD3619142B1EF9F900C41C8C /* LocationsHandler.swift */, ); path = Helpers; @@ -1068,32 +951,14 @@ ); name = Meshtastic; packageProductDependencies = ( - DD5394FB276993AD00AD86B1 /* SwiftProtobuf */, C9697FA427933B8C00250207 /* SQLite */, DD0D3D212A55CEB10066DB71 /* CocoaMQTT */, + 25A978B92C13F8ED0003AAE7 /* MeshtasticProtobufs */, ); productName = MeshtasticClient; productReference = DDC2E15426CE248E0042C5E4 /* Meshtastic.app */; productType = "com.apple.product-type.application"; }; - DDC2E17426CE248F0042C5E4 /* MeshtasticUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = DDC2E18426CE248F0042C5E4 /* Build configuration list for PBXNativeTarget "MeshtasticUITests" */; - buildPhases = ( - DDC2E17126CE248F0042C5E4 /* Sources */, - DDC2E17226CE248F0042C5E4 /* Frameworks */, - DDC2E17326CE248F0042C5E4 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - DDC2E17726CE248F0042C5E4 /* PBXTargetDependency */, - ); - name = MeshtasticUITests; - productName = MeshtasticClientUITests; - productReference = DDC2E17526CE248F0042C5E4 /* MeshtasticUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; DDDE59F329AF163D00490C6C /* WidgetsExtension */ = { isa = PBXNativeTarget; buildConfigurationList = DDDE5A0529AF163F00490C6C /* Build configuration list for PBXNativeTarget "WidgetsExtension" */; @@ -1107,6 +972,9 @@ dependencies = ( ); name = WidgetsExtension; + packageProductDependencies = ( + 25A978BB2C13F90D0003AAE7 /* MeshtasticProtobufs */, + ); productName = WidgetsExtension; productReference = DDDE59F429AF163D00490C6C /* WidgetsExtension.appex */; productType = "com.apple.product-type.app-extension"; @@ -1125,10 +993,6 @@ CreatedOnToolsVersion = 12.5.1; LastSwiftMigration = 1340; }; - DDC2E17426CE248F0042C5E4 = { - CreatedOnToolsVersion = 12.5.1; - TestTargetID = DDC2E15326CE248E0042C5E4; - }; DDDE59F329AF163D00490C6C = { CreatedOnToolsVersion = 14.2; }; @@ -1152,16 +1016,16 @@ ); mainGroup = DDC2E14B26CE248E0042C5E4; packageReferences = ( - DD5394FA276993AD00AD86B1 /* XCRemoteSwiftPackageReference "swift-protobuf" */, C9697FA327933B8C00250207 /* XCRemoteSwiftPackageReference "SQLite.swift" */, DD0D3D202A55CEB10066DB71 /* XCRemoteSwiftPackageReference "CocoaMQTT" */, + 25A978B82C13F8ED0003AAE7 /* XCLocalSwiftPackageReference "MeshtasticProtobufs" */, + 259792242C2F10B600AD1659 /* XCRemoteSwiftPackageReference "swift-protobuf" */, ); productRefGroup = DDC2E15526CE248E0042C5E4 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( DDC2E15326CE248E0042C5E4 /* Meshtastic */, - DDC2E17426CE248F0042C5E4 /* MeshtasticUITests */, DDDE59F329AF163D00490C6C /* WidgetsExtension */, ); }; @@ -1182,13 +1046,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DDC2E17326CE248F0042C5E4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; DDDE59F229AF163D00490C6C /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -1225,14 +1082,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 259792252C2F114500AD1659 /* ChannelEntityExtension.swift in Sources */, + 259792262C2F114500AD1659 /* PositionEntityExtension.swift in Sources */, + 259792272C2F114500AD1659 /* TraceRouteEntityExtension.swift in Sources */, + 259792282C2F114500AD1659 /* Logger.swift in Sources */, DDDB444829F8A9C900EE2349 /* String.swift in Sources */, DDFFA7472B3A7F3C004730DB /* Bundle.swift in Sources */, - DD5E520C298EE33B00D21B61 /* portnums.pb.swift in Sources */, DD457188293C7E63000C49FB /* BLESignalStrengthIndicator.swift in Sources */, DDA9515C2BC6631200CEA535 /* TelemetryEnums.swift in Sources */, DDFEB3BB29900C1200EE7472 /* CurrentConditionsCompact.swift in Sources */, DD836AE726F6B38600ABCC23 /* Connect.swift in Sources */, - DD0E20FD2B87090400F2D100 /* clientonly.pb.swift in Sources */, D93069082B81DF040066FBC8 /* SaveConfigButton.swift in Sources */, DD5E523F298F5A9E00D21B61 /* AirQualityIndex.swift in Sources */, DD964FBF296E76EF007C176F /* WaypointFormMapKit.swift in Sources */, @@ -1241,10 +1100,8 @@ DDDB443629F6287000EE2349 /* MapButtons.swift in Sources */, DD5D0A9C2931B9F200F7EA61 /* EthernetModes.swift in Sources */, 6DEDA55A2A957B8E00321D2E /* DetectionSensorLog.swift in Sources */, - DD5E5203298EE33B00D21B61 /* config.pb.swift in Sources */, DD798B072915928D005217CD /* ChannelMessageList.swift in Sources */, DDC2E1A726CEB3400042C5E4 /* LocationHelper.swift in Sources */, - DD5394FE276BA0EF00AD86B1 /* PositionEntityExtension.swift in Sources */, DD77093D2AA1AFA3007A8BF0 /* ChannelTips.swift in Sources */, DD913639270DFF4C00D7ACF3 /* LocalNotificationManager.swift in Sources */, DDDB444C29F8AAA600EE2349 /* Color.swift in Sources */, @@ -1274,10 +1131,7 @@ DDDB445429F8AD1600EE2349 /* Data.swift in Sources */, DDDB26462AACC0B7003AFCB7 /* NodeInfoItem.swift in Sources */, DD2AD8A8296D2DF9001FF0E7 /* MapViewSwiftUI.swift in Sources */, - DD5E5213298EE33B00D21B61 /* deviceonly.pb.swift in Sources */, DDE5B4042B2279A700FCDD05 /* TraceRouteLog.swift in Sources */, - DD5E5208298EE33B00D21B61 /* rtttl.pb.swift in Sources */, - DDD5BB0D2C285F00007E03CA /* Logger.swift in Sources */, DD6193792863875F00E59241 /* SerialConfig.swift in Sources */, DDDB263F2AABEE20003AFCB7 /* NodeList.swift in Sources */, DDD5BB0B2C285E45007E03CA /* LogDetail.swift in Sources */, @@ -1287,12 +1141,10 @@ DDB8F4102A9EE5B400230ECE /* Messages.swift in Sources */, DDDB26482AACD6D1003AFCB7 /* NodeMapMapkit.swift in Sources */, DD4A911E2708C65400501B7E /* AppSettings.swift in Sources */, - DD5E5209298EE33B00D21B61 /* module_config.pb.swift in Sources */, DD2160AF28C5552500C17253 /* MQTTConfig.swift in Sources */, DD13AA492AB73BF400BA0C98 /* PositionPopover.swift in Sources */, 6DEDA55C2A9592F900321D2E /* MessageEntityExtension.swift in Sources */, DDDB444229F8A88700EE2349 /* Double.swift in Sources */, - DD5E520F298EE33B00D21B61 /* cannedmessages.pb.swift in Sources */, DDF45C342BC1A48E005ED5F2 /* MQTTIcon.swift in Sources */, DDA9515A2BC6624100CEA535 /* TelemetryWeather.swift in Sources */, DDB75A232A13CDA9006ED576 /* BatteryLevelCompact.swift in Sources */, @@ -1308,7 +1160,6 @@ DD33DB622B3D27C7003E1EA0 /* FirmwareApi.swift in Sources */, DD3CC6B528E33FD100FA9159 /* ShareChannels.swift in Sources */, DD1BF2F92776FE2E008C8D2F /* UserMessageList.swift in Sources */, - DD5E5207298EE33B00D21B61 /* connection_status.pb.swift in Sources */, DD3CC6C228EB9D4900FA9159 /* UpdateCoreData.swift in Sources */, DDE0F7C5295F77B700B8AAB3 /* AppSettingsEnums.swift in Sources */, DDB6ABE628B1406100384BA1 /* LoraConfigEnums.swift in Sources */, @@ -1316,19 +1167,14 @@ DDD43FE32A78C8900083A3E9 /* MqttClientProxyManager.swift in Sources */, DD007BB02AA5981000F5FA12 /* NodeInfoEntityExtension.swift in Sources */, DDDB26422AABF655003AFCB7 /* NodeListItem.swift in Sources */, - DD0E20FC2B87090400F2D100 /* atak.pb.swift in Sources */, DDDB444629F8A96500EE2349 /* Character.swift in Sources */, DD23A50F26FD1B4400D9B90C /* PeripheralModel.swift in Sources */, DDB6ABDB28B0AC6000384BA1 /* DistanceText.swift in Sources */, - DD5E520D298EE33B00D21B61 /* storeforward.pb.swift in Sources */, - DDD5BB162C28B1E4007E03CA /* AppData.swift in Sources */, DD94B7402ACCE3BE00DCD1D1 /* MapSettingsForm.swift in Sources */, DD964FC2297272AE007C176F /* WaypointEntityExtension.swift in Sources */, 6DA39D8E2A92DC52007E311C /* MeshtasticAppDelegate.swift in Sources */, D93068DB2B81C85E0066FBC8 /* PowerConfig.swift in Sources */, D93068D32B8129510066FBC8 /* MessageContextMenuItems.swift in Sources */, - DD0E20FE2B87090400F2D100 /* paxcount.pb.swift in Sources */, - DD5E520A298EE33B00D21B61 /* channel.pb.swift in Sources */, DD8EBF43285058FA00426DCA /* DisplayConfig.swift in Sources */, DD964FC42974767D007C176F /* MapViewFitExtension.swift in Sources */, DD47E3D626F17ED900029299 /* CircleText.swift in Sources */, @@ -1346,7 +1192,6 @@ D9BC22DB2B7DE8E2006A37D5 /* TileDownloadStatus.swift in Sources */, DDD5BB092C285DDC007E03CA /* AppLog.swift in Sources */, DD8ED9C8289CE4B900B3B0AB /* RoutingError.swift in Sources */, - DD5E5202298EE33B00D21B61 /* admin.pb.swift in Sources */, DDC1B81A2AB5377B00C71E39 /* MessagesTips.swift in Sources */, DD964FC62975DBFD007C176F /* QueryCoreData.swift in Sources */, DDB75A112A059258006ED576 /* Url.swift in Sources */, @@ -1373,33 +1218,26 @@ D93068D92B81509C0066FBC8 /* TapbackResponses.swift in Sources */, DD86D40A287F04F100BAEB7A /* InvalidVersion.swift in Sources */, DDD94A502845C8F5004A87A0 /* DateTimeText.swift in Sources */, - DD5E5212298EE33B00D21B61 /* apponly.pb.swift in Sources */, DDB6ABE228B13FB500384BA1 /* PositionConfigEnums.swift in Sources */, - DD5E520E298EE33B00D21B61 /* mqtt.pb.swift in Sources */, DD994B69295F88B60013760A /* IntervalEnums.swift in Sources */, DDDCD5702BB26F5C00BE6B60 /* NodeListFilter.swift in Sources */, DD1933762B0835D500771CD5 /* PositionAltitudeChart.swift in Sources */, DD415828285859C4009B0E59 /* TelemetryConfig.swift in Sources */, - DDDB443D29F6592F00EE2349 /* NetworkManager.swift in Sources */, DDB6CCFB2AAF805100945AF6 /* NodeMapSwiftUI.swift in Sources */, DD73FD1128750779000852D6 /* PositionLog.swift in Sources */, - DD5E5206298EE33B00D21B61 /* localonly.pb.swift in Sources */, DD15E4F52B8BFC8E00654F61 /* PaxCounterLog.swift in Sources */, DD3CC6C028E7A60700FA9159 /* MessagingEnums.swift in Sources */, DD97E96628EFD9820056DDA4 /* MeshtasticLogo.swift in Sources */, DDAB580D2B0DAA9E00147258 /* Routes.swift in Sources */, C9697F9D279336B700250207 /* LocalMBTileOverlay.swift in Sources */, D93068D52B812B700066FBC8 /* MessageDestination.swift in Sources */, - DD58C5F22919AD3C00D5BEFB /* ChannelEntityExtension.swift in Sources */, DDA9515E2BC6F56F00CEA535 /* IndoorAirQuality.swift in Sources */, DDDB444E29F8AB0E00EE2349 /* Int.swift in Sources */, DD3CC6BC28E366DF00FA9159 /* Meshtastic.xcdatamodeld in Sources */, DDC4C9FF2A8D982900CE201C /* DetectionSensorConfig.swift in Sources */, D9C983A22B79D1A600BDBE6A /* RequestPositionButton.swift in Sources */, DDDB26442AAC0206003AFCB7 /* NodeDetail.swift in Sources */, - DD5E5210298EE33B00D21B61 /* telemetry.pb.swift in Sources */, DD77093F2AA1B146007A8BF0 /* UIColor.swift in Sources */, - DD5E5205298EE33B00D21B61 /* mesh.pb.swift in Sources */, DDF6B2482A9AEBF500BA6931 /* StoreForwardConfig.swift in Sources */, DD8169F9271F1A6100F4AB02 /* MeshLogger.swift in Sources */, DD93800B2BA3F968008BEC06 /* NodeMapContent.swift in Sources */, @@ -1408,22 +1246,11 @@ DDDB444429F8A8DD00EE2349 /* Float.swift in Sources */, DDAB580F2B0DAFBC00147258 /* LocationEntityExtension.swift in Sources */, B3E905B12B71F7F300654D07 /* TextMessageField.swift in Sources */, - DD5E5211298EE33B00D21B61 /* remote_hardware.pb.swift in Sources */, D93068D72B8146690066FBC8 /* MessageText.swift in Sources */, - DD5E5204298EE33B00D21B61 /* xmodem.pb.swift in Sources */, - DDE5B4062B227E3200FCDD05 /* TraceRouteEntityExtension.swift in Sources */, DDC2E15826CE248E0042C5E4 /* MeshtasticApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - DDC2E17126CE248F0042C5E4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DDC2E17A26CE248F0042C5E4 /* MeshtasticUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; DDDE59F029AF163D00490C6C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1438,11 +1265,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - DDC2E17726CE248F0042C5E4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = DDC2E15326CE248E0042C5E4 /* Meshtastic */; - targetProxy = DDC2E17626CE248F0042C5E4 /* PBXContainerItemProxy */; - }; DDDE5A0229AF163E00490C6C /* PBXTargetDependency */ = { isa = PBXTargetDependency; platformFilter = ios; @@ -1645,12 +1467,12 @@ INFOPLIST_FILE = Meshtastic/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = Meshtastic; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; - IPHONEOS_DEPLOYMENT_TARGET = 16.6; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.3.11; + MARKETING_VERSION = 2.3.12; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; @@ -1660,48 +1482,6 @@ }; name = Release; }; - DDC2E18526CE248F0042C5E4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = GCH7VS5Y9R; - INFOPLIST_FILE = MeshtasticUITests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = Meshtastic; - }; - name = Debug; - }; - DDC2E18626CE248F0042C5E4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = GCH7VS5Y9R; - INFOPLIST_FILE = MeshtasticUITests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = Meshtastic; - }; - name = Release; - }; DDDE5A0629AF163F00490C6C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1789,15 +1569,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - DDC2E18426CE248F0042C5E4 /* Build configuration list for PBXNativeTarget "MeshtasticUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DDC2E18526CE248F0042C5E4 /* Debug */, - DDC2E18626CE248F0042C5E4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; DDDE5A0529AF163F00490C6C /* Build configuration list for PBXNativeTarget "WidgetsExtension" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -1809,7 +1580,22 @@ }; /* End XCConfigurationList section */ +/* Begin XCLocalSwiftPackageReference section */ + 25A978B82C13F8ED0003AAE7 /* XCLocalSwiftPackageReference "MeshtasticProtobufs" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = MeshtasticProtobufs; + }; +/* End XCLocalSwiftPackageReference section */ + /* Begin XCRemoteSwiftPackageReference section */ + 259792242C2F10B600AD1659 /* XCRemoteSwiftPackageReference "swift-protobuf" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/apple/swift-protobuf.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.26.0; + }; + }; C9697FA327933B8C00250207 /* XCRemoteSwiftPackageReference "SQLite.swift" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/stephencelis/SQLite.swift.git"; @@ -1826,17 +1612,17 @@ minimumVersion = 2.0.0; }; }; - DD5394FA276993AD00AD86B1 /* XCRemoteSwiftPackageReference "swift-protobuf" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/apple/swift-protobuf.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.19.0; - }; - }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 25A978B92C13F8ED0003AAE7 /* MeshtasticProtobufs */ = { + isa = XCSwiftPackageProductDependency; + productName = MeshtasticProtobufs; + }; + 25A978BB2C13F90D0003AAE7 /* MeshtasticProtobufs */ = { + isa = XCSwiftPackageProductDependency; + productName = MeshtasticProtobufs; + }; C9697FA427933B8C00250207 /* SQLite */ = { isa = XCSwiftPackageProductDependency; package = C9697FA327933B8C00250207 /* XCRemoteSwiftPackageReference "SQLite.swift" */; @@ -1847,11 +1633,6 @@ package = DD0D3D202A55CEB10066DB71 /* XCRemoteSwiftPackageReference "CocoaMQTT" */; productName = CocoaMQTT; }; - DD5394FB276993AD00AD86B1 /* SwiftProtobuf */ = { - isa = XCSwiftPackageProductDependency; - package = DD5394FA276993AD00AD86B1 /* XCRemoteSwiftPackageReference "swift-protobuf" */; - productName = SwiftProtobuf; - }; /* End XCSwiftPackageProductDependency section */ /* Begin XCVersionGroup section */ diff --git a/Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a62998be..d528f985 100644 --- a/Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "e9855e3a299c14a10f11ee0b8f29e4170b09548533939361223a0f50e7caac8c", + "originHash" : "2d0b85469585b0d6079eac292d63864096062c24848a49380b9d9727f0ceb96c", "pins" : [ { "identity" : "cocoamqtt", @@ -42,8 +42,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "ce20dc083ee485524b802669890291c0d8090170", - "version" : "1.22.1" + "revision" : "9f0c76544701845ad98716f3f6a774a892152bcb", + "version" : "1.26.0" } } ], diff --git a/Meshtastic.xcodeproj/xcshareddata/xcschemes/WidgetsExtension.xcscheme b/Meshtastic.xcodeproj/xcshareddata/xcschemes/WidgetsExtension.xcscheme index decd8381..880339bc 100644 --- a/Meshtastic.xcodeproj/xcshareddata/xcschemes/WidgetsExtension.xcscheme +++ b/Meshtastic.xcodeproj/xcshareddata/xcschemes/WidgetsExtension.xcscheme @@ -89,7 +89,6 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES" - askForAppToLaunch = "Yes" launchAutomaticallySubstyle = "2"> diff --git a/Meshtastic.xcworkspace/contents.xcworkspacedata b/Meshtastic.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..3ffc9ac6 --- /dev/null +++ b/Meshtastic.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/Meshtastic.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meshtastic.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/Meshtastic.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meshtastic.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Meshtastic.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..de090023 --- /dev/null +++ b/Meshtastic.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,51 @@ +{ + "originHash" : "a8b652cbdc560223dff5bdd094d446cf377b06bd42ce7a7bc4c008a659f0097d", + "pins" : [ + { + "identity" : "cocoamqtt", + "kind" : "remoteSourceControl", + "location" : "https://github.com/emqx/CocoaMQTT", + "state" : { + "revision" : "aff43422925cc30b9af319f4c4dce4f52859baf4", + "version" : "2.1.8" + } + }, + { + "identity" : "mqttcocoaasyncsocket", + "kind" : "remoteSourceControl", + "location" : "https://github.com/leeway1208/MqttCocoaAsyncSocket", + "state" : { + "revision" : "ce3e18607fd01079495f86ff6195d8a3ca469f73", + "version" : "1.0.8" + } + }, + { + "identity" : "sqlite.swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/stephencelis/SQLite.swift.git", + "state" : { + "revision" : "a95fc6df17d108bd99210db5e8a9bac90fe984b8", + "version" : "0.15.3" + } + }, + { + "identity" : "starscream", + "kind" : "remoteSourceControl", + "location" : "https://github.com/daltoniam/Starscream.git", + "state" : { + "revision" : "c6bfd1af48efcc9a9ad203665db12375ba6b145a", + "version" : "4.0.8" + } + }, + { + "identity" : "swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-protobuf.git", + "state" : { + "revision" : "9f0c76544701845ad98716f3f6a774a892152bcb", + "version" : "1.26.0" + } + } + ], + "version" : 3 +} diff --git a/Meshtastic/Enums/BluetoothModes.swift b/Meshtastic/Enums/BluetoothModes.swift index d8d7bdf2..c4bdad40 100644 --- a/Meshtastic/Enums/BluetoothModes.swift +++ b/Meshtastic/Enums/BluetoothModes.swift @@ -5,6 +5,7 @@ // Copyright(c) Garth Vander Houwen 8/19/22. // import Foundation +import MeshtasticProtobufs enum BluetoothModes: Int, CaseIterable, Identifiable { diff --git a/Meshtastic/Enums/CannedMessagesConfigEnums.swift b/Meshtastic/Enums/CannedMessagesConfigEnums.swift index cb32f06d..f197eced 100644 --- a/Meshtastic/Enums/CannedMessagesConfigEnums.swift +++ b/Meshtastic/Enums/CannedMessagesConfigEnums.swift @@ -5,6 +5,7 @@ // Copyright(c) Garth Vander Houwen 9/10/22. // import Foundation +import MeshtasticProtobufs // Default of 0 is unset enum ConfigPresets: Int, CaseIterable, Identifiable { diff --git a/Meshtastic/Enums/ChannelRoles.swift b/Meshtastic/Enums/ChannelRoles.swift index 0a1e349e..186cff0b 100644 --- a/Meshtastic/Enums/ChannelRoles.swift +++ b/Meshtastic/Enums/ChannelRoles.swift @@ -5,6 +5,7 @@ // Copyright(c) Garth Vander Houwen 9/21/22. // import Foundation +import MeshtasticProtobufs // Default of 0 is Client enum ChannelRoles: Int, CaseIterable, Identifiable { diff --git a/Meshtastic/Enums/DeviceEnums.swift b/Meshtastic/Enums/DeviceEnums.swift index a17144fa..5c980da0 100644 --- a/Meshtastic/Enums/DeviceEnums.swift +++ b/Meshtastic/Enums/DeviceEnums.swift @@ -6,6 +6,7 @@ // import Foundation +import MeshtasticProtobufs // Default of 0 is Client enum DeviceRoles: Int, CaseIterable, Identifiable { diff --git a/Meshtastic/Enums/DisplayEnums.swift b/Meshtastic/Enums/DisplayEnums.swift index afecb6ec..a540a9d2 100644 --- a/Meshtastic/Enums/DisplayEnums.swift +++ b/Meshtastic/Enums/DisplayEnums.swift @@ -6,6 +6,7 @@ // import Foundation +import MeshtasticProtobufs enum ScreenUnits: Int, CaseIterable, Identifiable { diff --git a/Meshtastic/Enums/EthernetModes.swift b/Meshtastic/Enums/EthernetModes.swift index beff9ea0..9d5207ab 100644 --- a/Meshtastic/Enums/EthernetModes.swift +++ b/Meshtastic/Enums/EthernetModes.swift @@ -6,6 +6,7 @@ // import Foundation +import MeshtasticProtobufs enum EthernetMode: Int, CaseIterable, Identifiable { diff --git a/Meshtastic/Enums/LoraConfigEnums.swift b/Meshtastic/Enums/LoraConfigEnums.swift index 6954dfac..7da6268e 100644 --- a/Meshtastic/Enums/LoraConfigEnums.swift +++ b/Meshtastic/Enums/LoraConfigEnums.swift @@ -6,6 +6,7 @@ // import Foundation +import MeshtasticProtobufs enum RegionCodes: Int, CaseIterable, Identifiable { diff --git a/Meshtastic/Enums/PositionConfigEnums.swift b/Meshtastic/Enums/PositionConfigEnums.swift index 71b6727f..4853d050 100644 --- a/Meshtastic/Enums/PositionConfigEnums.swift +++ b/Meshtastic/Enums/PositionConfigEnums.swift @@ -6,6 +6,7 @@ // import Foundation +import MeshtasticProtobufs enum GpsFormats: Int, CaseIterable, Identifiable { diff --git a/Meshtastic/Enums/RoutingError.swift b/Meshtastic/Enums/RoutingError.swift index 9659d8e1..0773265b 100644 --- a/Meshtastic/Enums/RoutingError.swift +++ b/Meshtastic/Enums/RoutingError.swift @@ -5,6 +5,7 @@ // Copyright(c) Garth Vander Houwen 8/4/22. // import Foundation +import MeshtasticProtobufs enum RoutingError: Int, CaseIterable, Identifiable { diff --git a/Meshtastic/Enums/SerialConfigEnums.swift b/Meshtastic/Enums/SerialConfigEnums.swift index 046860f9..ff937207 100644 --- a/Meshtastic/Enums/SerialConfigEnums.swift +++ b/Meshtastic/Enums/SerialConfigEnums.swift @@ -5,6 +5,7 @@ // Copyright(c) Garth Vander Houwen 9/10/22. // import Foundation +import MeshtasticProtobufs enum SerialBaudRates: Int, CaseIterable, Identifiable { diff --git a/Meshtastic/Extensions/CoreData/ChannelEntityExtension.swift b/Meshtastic/Extensions/CoreData/ChannelEntityExtension.swift index 2568943a..62f7eff0 100644 --- a/Meshtastic/Extensions/CoreData/ChannelEntityExtension.swift +++ b/Meshtastic/Extensions/CoreData/ChannelEntityExtension.swift @@ -5,6 +5,8 @@ // Copyright(c) Garth Vander Houwen 11/7/22. // import Foundation +import CoreData +import MeshtasticProtobufs extension ChannelEntity { diff --git a/Meshtastic/Extensions/CoreData/DeviceMetadataEntityExtension.swift b/Meshtastic/Extensions/CoreData/DeviceMetadataEntityExtension.swift new file mode 100644 index 00000000..d505c4d9 --- /dev/null +++ b/Meshtastic/Extensions/CoreData/DeviceMetadataEntityExtension.swift @@ -0,0 +1,25 @@ +import Foundation +import CoreData +import MeshtasticProtobufs + +extension DeviceMetadataEntity { + convenience init( + context: NSManagedObjectContext, + metadata: DeviceMetadata + ) { + self.init(context: context) + self.time = Date() + self.deviceStateVersion = Int32(metadata.deviceStateVersion) + self.canShutdown = metadata.canShutdown + self.hasWifi = metadata.hasWifi_p + self.hasBluetooth = metadata.hasBluetooth_p + self.hasEthernet = metadata.hasEthernet_p + self.role = Int32(metadata.role.rawValue) + self.positionFlags = Int32(metadata.positionFlags) + // Swift does strings weird, this does work to get the version without the github hash + let lastDotIndex = metadata.firmwareVersion.lastIndex(of: ".") + var version = metadata.firmwareVersion[...(lastDotIndex ?? String.Index(utf16Offset: 6, in: metadata.firmwareVersion))] + version = version.dropLast() + self.firmwareVersion = String(version) + } +} diff --git a/Meshtastic/Extensions/CoreData/ExternalNotificationConfigEntityExtension.swift b/Meshtastic/Extensions/CoreData/ExternalNotificationConfigEntityExtension.swift new file mode 100644 index 00000000..72853b43 --- /dev/null +++ b/Meshtastic/Extensions/CoreData/ExternalNotificationConfigEntityExtension.swift @@ -0,0 +1,44 @@ +import CoreData +import MeshtasticProtobufs + +extension ExternalNotificationConfigEntity { + convenience init( + context: NSManagedObjectContext, + config: ModuleConfig.ExternalNotificationConfig + ) { + self.init(context: context) + self.enabled = config.enabled + self.usePWM = config.usePwm + self.alertBell = config.alertBell + self.alertBellBuzzer = config.alertBellBuzzer + self.alertBellVibra = config.alertBellVibra + self.alertMessage = config.alertMessage + self.alertMessageBuzzer = config.alertMessageBuzzer + self.alertMessageVibra = config.alertMessageVibra + self.active = config.active + self.output = Int32(config.output) + self.outputBuzzer = Int32(config.outputBuzzer) + self.outputVibra = Int32(config.outputVibra) + self.outputMilliseconds = Int32(config.outputMs) + self.nagTimeout = Int32(config.nagTimeout) + self.useI2SAsBuzzer = config.useI2SAsBuzzer + } + + func update(with config: ModuleConfig.ExternalNotificationConfig) { + enabled = config.enabled + usePWM = config.usePwm + alertBell = config.alertBell + alertBellBuzzer = config.alertBellBuzzer + alertBellVibra = config.alertBellVibra + alertMessage = config.alertMessage + alertMessageBuzzer = config.alertMessageBuzzer + alertMessageVibra = config.alertMessageVibra + active = config.active + output = Int32(config.output) + outputBuzzer = Int32(config.outputBuzzer) + outputVibra = Int32(config.outputVibra) + outputMilliseconds = Int32(config.outputMs) + nagTimeout = Int32(config.nagTimeout) + useI2SAsBuzzer = config.useI2SAsBuzzer + } +} diff --git a/Meshtastic/Extensions/CoreData/MQTTConfigEntityExtension.swift b/Meshtastic/Extensions/CoreData/MQTTConfigEntityExtension.swift new file mode 100644 index 00000000..ca01ba91 --- /dev/null +++ b/Meshtastic/Extensions/CoreData/MQTTConfigEntityExtension.swift @@ -0,0 +1,38 @@ +import CoreData +import MeshtasticProtobufs + +extension MQTTConfigEntity { + convenience init( + context: NSManagedObjectContext, + config: ModuleConfig.MQTTConfig + ) { + self.init(context: context) + self.enabled = config.enabled + self.proxyToClientEnabled = config.proxyToClientEnabled + self.address = config.address + self.username = config.username + self.password = config.password + self.root = config.root + self.encryptionEnabled = config.encryptionEnabled + self.jsonEnabled = config.jsonEnabled + self.tlsEnabled = config.tlsEnabled + self.mapReportingEnabled = config.mapReportingEnabled + self.mapPositionPrecision = Int32(config.mapReportSettings.positionPrecision) + self.mapPublishIntervalSecs = Int32(config.mapReportSettings.publishIntervalSecs) + } + + func update(with config: ModuleConfig.MQTTConfig) { + enabled = config.enabled + proxyToClientEnabled = config.proxyToClientEnabled + address = config.address + username = config.username + password = config.password + root = config.root + encryptionEnabled = config.encryptionEnabled + jsonEnabled = config.jsonEnabled + tlsEnabled = config.tlsEnabled + mapReportingEnabled = config.mapReportingEnabled + mapPositionPrecision = Int32(config.mapReportSettings.positionPrecision) + mapPublishIntervalSecs = Int32(config.mapReportSettings.publishIntervalSecs) + } +} diff --git a/Meshtastic/Extensions/CoreData/PositionEntityExtension.swift b/Meshtastic/Extensions/CoreData/PositionEntityExtension.swift index 0c634779..90b15b5e 100644 --- a/Meshtastic/Extensions/CoreData/PositionEntityExtension.swift +++ b/Meshtastic/Extensions/CoreData/PositionEntityExtension.swift @@ -8,6 +8,7 @@ import CoreData import CoreLocation import MapKit +import MeshtasticProtobufs import SwiftUI extension PositionEntity { diff --git a/Meshtastic/Extensions/CoreData/RangeTestConfigEntityExtension.swift b/Meshtastic/Extensions/CoreData/RangeTestConfigEntityExtension.swift new file mode 100644 index 00000000..d85a6ab8 --- /dev/null +++ b/Meshtastic/Extensions/CoreData/RangeTestConfigEntityExtension.swift @@ -0,0 +1,20 @@ +import CoreData +import MeshtasticProtobufs + +extension RangeTestConfigEntity { + convenience init( + context: NSManagedObjectContext, + config: ModuleConfig.RangeTestConfig + ) { + self.init(context: context) + self.sender = Int32(config.sender) + self.enabled = config.enabled + self.save = config.save + } + + func update(with config: ModuleConfig.RangeTestConfig) { + sender = Int32(config.sender) + enabled = config.enabled + save = config.save + } +} diff --git a/Meshtastic/Extensions/CoreData/SerialConfigEntityExtension.swift b/Meshtastic/Extensions/CoreData/SerialConfigEntityExtension.swift new file mode 100644 index 00000000..da48dde2 --- /dev/null +++ b/Meshtastic/Extensions/CoreData/SerialConfigEntityExtension.swift @@ -0,0 +1,28 @@ +import CoreData +import MeshtasticProtobufs + +extension SerialConfigEntity { + convenience init( + context: NSManagedObjectContext, + config: ModuleConfig.SerialConfig + ) { + self.init(context: context) + self.enabled = config.enabled + self.echo = config.echo + self.rxd = Int32(config.rxd) + self.txd = Int32(config.txd) + self.baudRate = Int32(config.baud.rawValue) + self.timeout = Int32(config.timeout) + self.mode = Int32(config.mode.rawValue) + } + + func update(with config: ModuleConfig.SerialConfig) { + enabled = config.enabled + echo = config.echo + rxd = Int32(config.rxd) + txd = Int32(config.txd) + baudRate = Int32(config.baud.rawValue) + timeout = Int32(config.timeout) + mode = Int32(config.mode.rawValue) + } +} diff --git a/Meshtastic/Extensions/CoreData/StoreForwardConfigEntityExtension.swift b/Meshtastic/Extensions/CoreData/StoreForwardConfigEntityExtension.swift new file mode 100644 index 00000000..c44de4f7 --- /dev/null +++ b/Meshtastic/Extensions/CoreData/StoreForwardConfigEntityExtension.swift @@ -0,0 +1,24 @@ +import CoreData +import MeshtasticProtobufs + +extension StoreForwardConfigEntity { + convenience init( + context: NSManagedObjectContext, + config: ModuleConfig.StoreForwardConfig + ) { + self.init(context: context) + self.enabled = config.enabled + self.heartbeat = config.heartbeat + self.records = Int32(config.records) + self.historyReturnMax = Int32(config.historyReturnMax) + self.historyReturnWindow = Int32(config.historyReturnWindow) + } + + func update(with config: ModuleConfig.StoreForwardConfig) { + enabled = config.enabled + heartbeat = config.heartbeat + records = Int32(config.records) + historyReturnMax = Int32(config.historyReturnMax) + historyReturnWindow = Int32(config.historyReturnWindow) + } +} diff --git a/Meshtastic/Extensions/CoreData/UserEntityExtension.swift b/Meshtastic/Extensions/CoreData/UserEntityExtension.swift index 0128cf93..0595e752 100644 --- a/Meshtastic/Extensions/CoreData/UserEntityExtension.swift +++ b/Meshtastic/Extensions/CoreData/UserEntityExtension.swift @@ -7,6 +7,7 @@ import Foundation import CoreData +import MeshtasticProtobufs extension UserEntity { diff --git a/Meshtastic/Extensions/Protobufs/NodeInfoExtensions.swift b/Meshtastic/Extensions/Protobufs/NodeInfoExtensions.swift new file mode 100644 index 00000000..6b00fbd2 --- /dev/null +++ b/Meshtastic/Extensions/Protobufs/NodeInfoExtensions.swift @@ -0,0 +1,12 @@ +import Foundation +import MeshtasticProtobufs + +extension NodeInfo { + var isValidPosition: Bool { + hasPosition && + position.longitudeI != 0 && + position.latitudeI != 0 && + position.latitudeI != 373346000 && + position.longitudeI != -1220090000 + } +} diff --git a/Meshtastic/Helpers/BLEManager.swift b/Meshtastic/Helpers/BLEManager.swift index a5dec13b..08f99339 100644 --- a/Meshtastic/Helpers/BLEManager.swift +++ b/Meshtastic/Helpers/BLEManager.swift @@ -3,6 +3,7 @@ import CoreData import CoreBluetooth import SwiftUI import MapKit +import MeshtasticProtobufs import CocoaMQTT import OSLog import RegexBuilder diff --git a/Meshtastic/Helpers/Logger.swift b/Meshtastic/Helpers/Logger.swift new file mode 100644 index 00000000..35ee7337 --- /dev/null +++ b/Meshtastic/Helpers/Logger.swift @@ -0,0 +1,19 @@ +import OSLog + +extension Logger { + + /// The logger's subsystem. + private static var subsystem = Bundle.main.bundleIdentifier! + + /// All logs related to data such as decoding error, parsing issues, etc. + public static let data = Logger(subsystem: subsystem, category: "🗄️ Data") + + /// All logs related to the mesh + public static let mesh = Logger(subsystem: subsystem, category: "🕸️ Mesh") + + /// All logs related to services such as network calls, location, etc. + public static let services = Logger(subsystem: subsystem, category: "🍏 Services") + + /// All logs related to tracking and analytics. + public static let statistics = Logger(subsystem: subsystem, category: "📈 Stats") +} diff --git a/Meshtastic/Helpers/MeshPackets.swift b/Meshtastic/Helpers/MeshPackets.swift index d10d5cb0..16046a16 100644 --- a/Meshtastic/Helpers/MeshPackets.swift +++ b/Meshtastic/Helpers/MeshPackets.swift @@ -7,6 +7,7 @@ import Foundation import CoreData +import MeshtasticProtobufs import SwiftUI import RegexBuilder import OSLog diff --git a/Meshtastic/Helpers/NetworkManager.swift b/Meshtastic/Helpers/NetworkManager.swift deleted file mode 100644 index 39a66b1d..00000000 --- a/Meshtastic/Helpers/NetworkManager.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// NetworkManager.swift -// Meshtastic -// -// Copyright(c) Garth Vander Houwen on 4/23/23. -// - -import Foundation -import Network -import OSLog - -class NetworkManager { - static let shared = NetworkManager() - // MARK: Public methods - func runIfNetwork(completion: @escaping () -> Void ) { - let pathMonitor = NWPathMonitor() - pathMonitor.pathUpdateHandler = { - guard $0.status == .satisfied else { - // No network available - Logger.services.info("Network Not available") - return pathMonitor.cancel() - } - pathMonitor.cancel() - completion() - } - pathMonitor.start(queue: DispatchQueue.global(qos: .background)) - } -} diff --git a/Meshtastic/Persistence/UpdateCoreData.swift b/Meshtastic/Persistence/UpdateCoreData.swift index db6d4cf4..58cd2cf5 100644 --- a/Meshtastic/Persistence/UpdateCoreData.swift +++ b/Meshtastic/Persistence/UpdateCoreData.swift @@ -5,6 +5,7 @@ // Copyright(c) Garth Vander Houwen 10/3/22. import CoreData +import MeshtasticProtobufs import OSLog public func clearPax(destNum: Int64, context: NSManagedObjectContext) -> Bool { @@ -425,7 +426,7 @@ func upsertBluetoothConfigPacket(config: Config.BluetoothConfig, nodeNum: Int64, } } -func upsertDeviceConfigPacket(config: Meshtastic.Config.DeviceConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertDeviceConfigPacket(config: Config.DeviceConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.device.config %@".localized, String(nodeNum)) MeshLogger.log("📟 \(logString)") @@ -480,7 +481,7 @@ func upsertDeviceConfigPacket(config: Meshtastic.Config.DeviceConfig, nodeNum: I } } -func upsertDisplayConfigPacket(config: Meshtastic.Config.DisplayConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertDisplayConfigPacket(config: Config.DisplayConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.display.config %@".localized, nodeNum.toHex()) MeshLogger.log("🖥️ \(logString)") @@ -546,7 +547,7 @@ func upsertDisplayConfigPacket(config: Meshtastic.Config.DisplayConfig, nodeNum: } } -func upsertLoRaConfigPacket(config: Meshtastic.Config.LoRaConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertLoRaConfigPacket(config: Config.LoRaConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.lora.config %@".localized, nodeNum.toHex()) MeshLogger.log("📻 \(logString)") @@ -613,7 +614,7 @@ func upsertLoRaConfigPacket(config: Meshtastic.Config.LoRaConfig, nodeNum: Int64 } } -func upsertNetworkConfigPacket(config: Meshtastic.Config.NetworkConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertNetworkConfigPacket(config: Config.NetworkConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.network.config %@".localized, String(nodeNum)) MeshLogger.log("🌐 \(logString)") @@ -660,7 +661,7 @@ func upsertNetworkConfigPacket(config: Meshtastic.Config.NetworkConfig, nodeNum: } } -func upsertPositionConfigPacket(config: Meshtastic.Config.PositionConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertPositionConfigPacket(config: Config.PositionConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.position.config %@".localized, String(nodeNum)) MeshLogger.log("🗺️ \(logString)") @@ -723,7 +724,7 @@ func upsertPositionConfigPacket(config: Meshtastic.Config.PositionConfig, nodeNu } } -func upsertPowerConfigPacket(config: Meshtastic.Config.PowerConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertPowerConfigPacket(config: Config.PowerConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.power.config %@".localized, String(nodeNum)) MeshLogger.log("🗺️ \(logString)") @@ -772,7 +773,7 @@ func upsertPowerConfigPacket(config: Meshtastic.Config.PowerConfig, nodeNum: Int } } -func upsertAmbientLightingModuleConfigPacket(config: Meshtastic.ModuleConfig.AmbientLightingConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertAmbientLightingModuleConfigPacket(config: ModuleConfig.AmbientLightingConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.ambientlighting.config %@".localized, String(nodeNum)) MeshLogger.log("🏮 \(logString)") @@ -828,7 +829,7 @@ func upsertAmbientLightingModuleConfigPacket(config: Meshtastic.ModuleConfig.Amb } } -func upsertCannedMessagesModuleConfigPacket(config: Meshtastic.ModuleConfig.CannedMessageConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertCannedMessagesModuleConfigPacket(config: ModuleConfig.CannedMessageConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.cannedmessage.config %@".localized, String(nodeNum)) MeshLogger.log("🥫 \(logString)") @@ -892,7 +893,7 @@ func upsertCannedMessagesModuleConfigPacket(config: Meshtastic.ModuleConfig.Cann } } -func upsertDetectionSensorModuleConfigPacket(config: Meshtastic.ModuleConfig.DetectionSensorConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertDetectionSensorModuleConfigPacket(config: ModuleConfig.DetectionSensorConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.detectionsensor.config %@".localized, String(nodeNum)) MeshLogger.log("🕵️ \(logString)") @@ -953,7 +954,7 @@ func upsertDetectionSensorModuleConfigPacket(config: Meshtastic.ModuleConfig.Det } } -func upsertExternalNotificationModuleConfigPacket(config: Meshtastic.ModuleConfig.ExternalNotificationConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertExternalNotificationModuleConfigPacket(config: ModuleConfig.ExternalNotificationConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.externalnotification.config %@".localized, String(nodeNum)) MeshLogger.log("📣 \(logString)") @@ -1023,7 +1024,7 @@ func upsertExternalNotificationModuleConfigPacket(config: Meshtastic.ModuleConfi } } -func upsertPaxCounterModuleConfigPacket(config: Meshtastic.ModuleConfig.PaxcounterConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertPaxCounterModuleConfigPacket(config: ModuleConfig.PaxcounterConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.paxcounter.config %@".localized, String(nodeNum)) MeshLogger.log("🧑‍🤝‍🧑 \(logString)") @@ -1107,7 +1108,7 @@ func upsertRtttlConfigPacket(ringtone: String, nodeNum: Int64, context: NSManage } } -func upsertMqttModuleConfigPacket(config: Meshtastic.ModuleConfig.MQTTConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertMqttModuleConfigPacket(config: ModuleConfig.MQTTConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.mqtt.config %@".localized, String(nodeNum)) MeshLogger.log("🌉 \(logString)") @@ -1169,7 +1170,7 @@ func upsertMqttModuleConfigPacket(config: Meshtastic.ModuleConfig.MQTTConfig, no } } -func upsertRangeTestModuleConfigPacket(config: Meshtastic.ModuleConfig.RangeTestConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertRangeTestModuleConfigPacket(config: ModuleConfig.RangeTestConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.rangetest.config %@".localized, String(nodeNum)) MeshLogger.log("⛰️ \(logString)") @@ -1212,7 +1213,7 @@ func upsertRangeTestModuleConfigPacket(config: Meshtastic.ModuleConfig.RangeTest } } -func upsertSerialModuleConfigPacket(config: Meshtastic.ModuleConfig.SerialConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertSerialModuleConfigPacket(config: ModuleConfig.SerialConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.serial.config %@".localized, String(nodeNum)) MeshLogger.log("🤖 \(logString)") @@ -1271,7 +1272,7 @@ func upsertSerialModuleConfigPacket(config: Meshtastic.ModuleConfig.SerialConfig } } -func upsertStoreForwardModuleConfigPacket(config: Meshtastic.ModuleConfig.StoreForwardConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertStoreForwardModuleConfigPacket(config: ModuleConfig.StoreForwardConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.storeforward.config %@".localized, String(nodeNum)) MeshLogger.log("📬 \(logString)") @@ -1321,7 +1322,7 @@ func upsertStoreForwardModuleConfigPacket(config: Meshtastic.ModuleConfig.StoreF } } -func upsertTelemetryModuleConfigPacket(config: Meshtastic.ModuleConfig.TelemetryConfig, nodeNum: Int64, context: NSManagedObjectContext) { +func upsertTelemetryModuleConfigPacket(config: ModuleConfig.TelemetryConfig, nodeNum: Int64, context: NSManagedObjectContext) { let logString = String.localizedStringWithFormat("mesh.log.telemetry.config %@".localized, String(nodeNum)) MeshLogger.log("📈 \(logString)") diff --git a/Meshtastic/Views/MapKitMap/WaypointFormMapKit.swift b/Meshtastic/Views/MapKitMap/WaypointFormMapKit.swift index dce0df4a..8217af2d 100644 --- a/Meshtastic/Views/MapKitMap/WaypointFormMapKit.swift +++ b/Meshtastic/Views/MapKitMap/WaypointFormMapKit.swift @@ -5,9 +5,10 @@ // Copyright Garth Vander Houwen 1/10/23. // -import SwiftUI import CoreLocation +import MeshtasticProtobufs import OSLog +import SwiftUI struct WaypointFormMapKit: View { diff --git a/Meshtastic/Views/Messages/ChannelMessageList.swift b/Meshtastic/Views/Messages/ChannelMessageList.swift index 0fbdcf94..882dad07 100644 --- a/Meshtastic/Views/Messages/ChannelMessageList.swift +++ b/Meshtastic/Views/Messages/ChannelMessageList.swift @@ -5,9 +5,10 @@ // Created by Garth Vander Houwen on 12/24/21. // -import SwiftUI import CoreData +import MeshtasticProtobufs import OSLog +import SwiftUI struct ChannelMessageList: View { @StateObject var appState = AppState.shared diff --git a/Meshtastic/Views/Messages/MessageText.swift b/Meshtastic/Views/Messages/MessageText.swift index 31fa2dec..0cdd4be8 100644 --- a/Meshtastic/Views/Messages/MessageText.swift +++ b/Meshtastic/Views/Messages/MessageText.swift @@ -1,5 +1,6 @@ -import SwiftUI +import MeshtasticProtobufs import OSLog +import SwiftUI struct MessageText: View { static let linkBlue = Color(red: 0.4627, green: 0.8392, blue: 1) /* #76d6ff */ diff --git a/Meshtastic/Views/Nodes/DetectionSensorLog.swift b/Meshtastic/Views/Nodes/DetectionSensorLog.swift index 54395c99..da2e4e09 100644 --- a/Meshtastic/Views/Nodes/DetectionSensorLog.swift +++ b/Meshtastic/Views/Nodes/DetectionSensorLog.swift @@ -7,6 +7,7 @@ import SwiftUI import Charts +import MeshtasticProtobufs import OSLog struct DetectionSensorLog: View { diff --git a/Meshtastic/Views/Nodes/Helpers/Map/WaypointForm.swift b/Meshtastic/Views/Nodes/Helpers/Map/WaypointForm.swift index 31138855..8d4f79b4 100644 --- a/Meshtastic/Views/Nodes/Helpers/Map/WaypointForm.swift +++ b/Meshtastic/Views/Nodes/Helpers/Map/WaypointForm.swift @@ -5,10 +5,11 @@ // Copyright Garth Vander Houwen 1/10/23. // -import SwiftUI -import MapKit import CoreLocation +import MapKit +import MeshtasticProtobufs import OSLog +import SwiftUI struct WaypointForm: View { diff --git a/Meshtastic/Views/Settings/Channels.swift b/Meshtastic/Views/Settings/Channels.swift index 689a009e..dee46209 100644 --- a/Meshtastic/Views/Settings/Channels.swift +++ b/Meshtastic/Views/Settings/Channels.swift @@ -5,10 +5,11 @@ // Copyright(c) Garth Vander Houwen 4/8/22. // -import SwiftUI import CoreData import MapKit +import MeshtasticProtobufs import OSLog +import SwiftUI #if canImport(TipKit) import TipKit #endif diff --git a/Meshtastic/Views/Settings/Config/BluetoothConfig.swift b/Meshtastic/Views/Settings/Config/BluetoothConfig.swift index c4ad97df..8b4033db 100644 --- a/Meshtastic/Views/Settings/Config/BluetoothConfig.swift +++ b/Meshtastic/Views/Settings/Config/BluetoothConfig.swift @@ -5,6 +5,7 @@ // Copyright (c) Garth Vander Houwen 8/18/22. // +import MeshtasticProtobufs import OSLog import SwiftUI diff --git a/Meshtastic/Views/Settings/Config/DeviceConfig.swift b/Meshtastic/Views/Settings/Config/DeviceConfig.swift index 020f9710..1a872269 100644 --- a/Meshtastic/Views/Settings/Config/DeviceConfig.swift +++ b/Meshtastic/Views/Settings/Config/DeviceConfig.swift @@ -4,8 +4,10 @@ // // Copyright (c) Garth Vander Houwen 6/13/22. // -import SwiftUI + +import MeshtasticProtobufs import OSLog +import SwiftUI struct DeviceConfig: View { diff --git a/Meshtastic/Views/Settings/Config/DisplayConfig.swift b/Meshtastic/Views/Settings/Config/DisplayConfig.swift index 9a78ade8..867f616d 100644 --- a/Meshtastic/Views/Settings/Config/DisplayConfig.swift +++ b/Meshtastic/Views/Settings/Config/DisplayConfig.swift @@ -5,8 +5,9 @@ // Copyright (c) Garth Vander Houwen 6/7/22. // -import SwiftUI +import MeshtasticProtobufs import OSLog +import SwiftUI struct DisplayConfig: View { diff --git a/Meshtastic/Views/Settings/Config/LoRaConfig.swift b/Meshtastic/Views/Settings/Config/LoRaConfig.swift index f1a1df7b..210675b2 100644 --- a/Meshtastic/Views/Settings/Config/LoRaConfig.swift +++ b/Meshtastic/Views/Settings/Config/LoRaConfig.swift @@ -7,6 +7,7 @@ import SwiftUI import CoreData +import MeshtasticProtobufs import OSLog struct LoRaConfig: View { diff --git a/Meshtastic/Views/Settings/Config/Module/AmbientLightingConfig.swift b/Meshtastic/Views/Settings/Config/Module/AmbientLightingConfig.swift index a6ad64c1..3d3d3586 100644 --- a/Meshtastic/Views/Settings/Config/Module/AmbientLightingConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/AmbientLightingConfig.swift @@ -4,8 +4,9 @@ // // Copyright(c) Garth Vander Houwen 11/26/23 // - +import MeshtasticProtobufs import SwiftUI + @available(iOS 17.0, macOS 14.0, *) struct AmbientLightingConfig: View { @Environment(\.self) var environment diff --git a/Meshtastic/Views/Settings/Config/Module/CannedMessagesConfig.swift b/Meshtastic/Views/Settings/Config/Module/CannedMessagesConfig.swift index 51424da0..37e16f93 100644 --- a/Meshtastic/Views/Settings/Config/Module/CannedMessagesConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/CannedMessagesConfig.swift @@ -4,8 +4,9 @@ // // Copyright (c) Garth Vander Houwen 6/22/22. // -import SwiftUI +import MeshtasticProtobufs import OSLog +import SwiftUI struct CannedMessagesConfig: View { @Environment(\.managedObjectContext) var context diff --git a/Meshtastic/Views/Settings/Config/Module/DetectionSensorConfig.swift b/Meshtastic/Views/Settings/Config/Module/DetectionSensorConfig.swift index fbb2c5bd..2e8f715b 100644 --- a/Meshtastic/Views/Settings/Config/Module/DetectionSensorConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/DetectionSensorConfig.swift @@ -4,8 +4,9 @@ // // Copyright(c) Garth Vander Houwen 8/16/23. // -import SwiftUI +import MeshtasticProtobufs import OSLog +import SwiftUI enum DetectionSensorRole: String, CaseIterable, Equatable, Decodable { case sensor diff --git a/Meshtastic/Views/Settings/Config/Module/ExternalNotificationConfig.swift b/Meshtastic/Views/Settings/Config/Module/ExternalNotificationConfig.swift index b8b94bf0..a2adc9b6 100644 --- a/Meshtastic/Views/Settings/Config/Module/ExternalNotificationConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/ExternalNotificationConfig.swift @@ -4,8 +4,9 @@ // // Copyright (c) Garth Vander Houwen 6/22/22. // -import SwiftUI +import MeshtasticProtobufs import OSLog +import SwiftUI struct ExternalNotificationConfig: View { diff --git a/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift b/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift index 29c31e32..7eb5a945 100644 --- a/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift @@ -4,9 +4,10 @@ // // Copyright (c) Garth Vander Houwen 9/4/22. // -import SwiftUI import CoreLocation +import MeshtasticProtobufs import OSLog +import SwiftUI struct MQTTConfig: View { diff --git a/Meshtastic/Views/Settings/Config/Module/PaxCounterConfig.swift b/Meshtastic/Views/Settings/Config/Module/PaxCounterConfig.swift index d3582e15..90a0e195a 100644 --- a/Meshtastic/Views/Settings/Config/Module/PaxCounterConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/PaxCounterConfig.swift @@ -5,6 +5,7 @@ // Copyright Garth Vander Houwen 2/25/24. // +import MeshtasticProtobufs import SwiftUI struct PaxCounterConfig: View { diff --git a/Meshtastic/Views/Settings/Config/Module/RangeTestConfig.swift b/Meshtastic/Views/Settings/Config/Module/RangeTestConfig.swift index 912a8be7..2af3b5fd 100644 --- a/Meshtastic/Views/Settings/Config/Module/RangeTestConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/RangeTestConfig.swift @@ -4,8 +4,9 @@ // // Copyright (c) Garth Vander Houwen 6/13/22. // -import SwiftUI +import MeshtasticProtobufs import OSLog +import SwiftUI struct RangeTestConfig: View { diff --git a/Meshtastic/Views/Settings/Config/Module/SerialConfig.swift b/Meshtastic/Views/Settings/Config/Module/SerialConfig.swift index e1500ec8..c4f27c6d 100644 --- a/Meshtastic/Views/Settings/Config/Module/SerialConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/SerialConfig.swift @@ -4,8 +4,9 @@ // // Copyright (c) Garth Vander Houwen 6/22/22. // -import SwiftUI +import MeshtasticProtobufs import OSLog +import SwiftUI struct SerialConfig: View { diff --git a/Meshtastic/Views/Settings/Config/Module/StoreForwardConfig.swift b/Meshtastic/Views/Settings/Config/Module/StoreForwardConfig.swift index cf3a89e0..d5aba9cb 100644 --- a/Meshtastic/Views/Settings/Config/Module/StoreForwardConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/StoreForwardConfig.swift @@ -4,9 +4,9 @@ // // Copyright(c) Garth Vander Houwen 8/26/23. // - -import SwiftUI +import MeshtasticProtobufs import OSLog +import SwiftUI struct StoreForwardConfig: View { diff --git a/Meshtastic/Views/Settings/Config/Module/TelemetryConfig.swift b/Meshtastic/Views/Settings/Config/Module/TelemetryConfig.swift index 6271cd24..05b631b1 100644 --- a/Meshtastic/Views/Settings/Config/Module/TelemetryConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/TelemetryConfig.swift @@ -4,8 +4,9 @@ // // Copyright (c) Garth Vander Houwen 6/13/22. // -import SwiftUI +import MeshtasticProtobufs import OSLog +import SwiftUI struct TelemetryConfig: View { diff --git a/Meshtastic/Views/Settings/Config/NetworkConfig.swift b/Meshtastic/Views/Settings/Config/NetworkConfig.swift index 7571107d..0dedaeed 100644 --- a/Meshtastic/Views/Settings/Config/NetworkConfig.swift +++ b/Meshtastic/Views/Settings/Config/NetworkConfig.swift @@ -4,9 +4,9 @@ // // Copyright (c) Garth Vander Houwen 8/1/2022 // - -import SwiftUI +import MeshtasticProtobufs import OSLog +import SwiftUI struct NetworkConfig: View { diff --git a/Meshtastic/Views/Settings/Config/PositionConfig.swift b/Meshtastic/Views/Settings/Config/PositionConfig.swift index b723935b..a0d4ac97 100644 --- a/Meshtastic/Views/Settings/Config/PositionConfig.swift +++ b/Meshtastic/Views/Settings/Config/PositionConfig.swift @@ -6,6 +6,7 @@ // import SwiftUI +import MeshtasticProtobufs import OSLog struct PositionFlags: OptionSet { diff --git a/Meshtastic/Views/Settings/Config/PowerConfig.swift b/Meshtastic/Views/Settings/Config/PowerConfig.swift index 155d9a5f..15b7e44d 100644 --- a/Meshtastic/Views/Settings/Config/PowerConfig.swift +++ b/Meshtastic/Views/Settings/Config/PowerConfig.swift @@ -1,4 +1,5 @@ import SwiftUI +import MeshtasticProtobufs struct PowerConfig: View { @Environment(\.managedObjectContext) private var context diff --git a/Meshtastic/Views/Settings/ShareChannels.swift b/Meshtastic/Views/Settings/ShareChannels.swift index 627bc5e5..1eeebb7c 100644 --- a/Meshtastic/Views/Settings/ShareChannels.swift +++ b/Meshtastic/Views/Settings/ShareChannels.swift @@ -7,6 +7,8 @@ import SwiftUI import CoreData import CoreImage.CIFilterBuiltins +import MeshtasticProtobufs + #if canImport(TipKit) import TipKit #endif diff --git a/Meshtastic/Views/Settings/UserConfig.swift b/Meshtastic/Views/Settings/UserConfig.swift index 3db4665a..c67c70bf 100644 --- a/Meshtastic/Views/Settings/UserConfig.swift +++ b/Meshtastic/Views/Settings/UserConfig.swift @@ -4,8 +4,9 @@ // // Copyright (c) Garth Vander Houwen 6/27/22. // -import SwiftUI import CoreData +import MeshtasticProtobufs +import SwiftUI struct UserConfig: View { diff --git a/MeshtasticProtobufs/.gitignore b/MeshtasticProtobufs/.gitignore new file mode 100644 index 00000000..0023a534 --- /dev/null +++ b/MeshtasticProtobufs/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/MeshtasticProtobufs/Package.swift b/MeshtasticProtobufs/Package.swift new file mode 100644 index 00000000..d329c439 --- /dev/null +++ b/MeshtasticProtobufs/Package.swift @@ -0,0 +1,24 @@ +// swift-tools-version: 5.10 + +import PackageDescription + +let package = Package( + name: "MeshtasticProtobufs", + products: [ + .library( + name: "MeshtasticProtobufs", + targets: ["MeshtasticProtobufs"] + ), + ], + dependencies: [ + .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.19.0"), + ], + targets: [ + .target( + name: "MeshtasticProtobufs", + dependencies: [ + .product(name: "SwiftProtobuf", package: "swift-protobuf") + ] + ) + ] +) diff --git a/Meshtastic/Protobufs/meshtastic/admin.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/admin.pb.swift similarity index 93% rename from Meshtastic/Protobufs/meshtastic/admin.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/admin.pb.swift index c3f1c12f..ba263709 100644 --- a/Meshtastic/Protobufs/meshtastic/admin.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/admin.pb.swift @@ -24,19 +24,19 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// This message is handled by the Admin module and is responsible for all settings/channel read/write operations. /// This message is used to do settings operations to both remote AND local nodes. /// (Prior to 1.2 these operations were done via special ToRadio operations) -struct AdminMessage { +public struct AdminMessage { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// TODO: REPLACE - var payloadVariant: AdminMessage.OneOf_PayloadVariant? = nil + public var payloadVariant: AdminMessage.OneOf_PayloadVariant? = nil /// /// 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) - var getChannelRequest: UInt32 { + public var getChannelRequest: UInt32 { get { if case .getChannelRequest(let v)? = payloadVariant {return v} return 0 @@ -46,7 +46,7 @@ struct AdminMessage { /// /// TODO: REPLACE - var getChannelResponse: Channel { + public var getChannelResponse: Channel { get { if case .getChannelResponse(let v)? = payloadVariant {return v} return Channel() @@ -56,7 +56,7 @@ struct AdminMessage { /// /// Send the current owner data in the response to this message. - var getOwnerRequest: Bool { + public var getOwnerRequest: Bool { get { if case .getOwnerRequest(let v)? = payloadVariant {return v} return false @@ -66,7 +66,7 @@ struct AdminMessage { /// /// TODO: REPLACE - var getOwnerResponse: User { + public var getOwnerResponse: User { get { if case .getOwnerResponse(let v)? = payloadVariant {return v} return User() @@ -76,7 +76,7 @@ struct AdminMessage { /// /// Ask for the following config data to be sent - var getConfigRequest: AdminMessage.ConfigType { + public var getConfigRequest: AdminMessage.ConfigType { get { if case .getConfigRequest(let v)? = payloadVariant {return v} return .deviceConfig @@ -86,7 +86,7 @@ struct AdminMessage { /// /// Send the current Config in the response to this message. - var getConfigResponse: Config { + public var getConfigResponse: Config { get { if case .getConfigResponse(let v)? = payloadVariant {return v} return Config() @@ -96,7 +96,7 @@ struct AdminMessage { /// /// Ask for the following config data to be sent - var getModuleConfigRequest: AdminMessage.ModuleConfigType { + public var getModuleConfigRequest: AdminMessage.ModuleConfigType { get { if case .getModuleConfigRequest(let v)? = payloadVariant {return v} return .mqttConfig @@ -106,7 +106,7 @@ struct AdminMessage { /// /// Send the current Config in the response to this message. - var getModuleConfigResponse: ModuleConfig { + public var getModuleConfigResponse: ModuleConfig { get { if case .getModuleConfigResponse(let v)? = payloadVariant {return v} return ModuleConfig() @@ -116,7 +116,7 @@ struct AdminMessage { /// /// Get the Canned Message Module messages in the response to this message. - var getCannedMessageModuleMessagesRequest: Bool { + public var getCannedMessageModuleMessagesRequest: Bool { get { if case .getCannedMessageModuleMessagesRequest(let v)? = payloadVariant {return v} return false @@ -126,7 +126,7 @@ struct AdminMessage { /// /// Get the Canned Message Module messages in the response to this message. - var getCannedMessageModuleMessagesResponse: String { + public var getCannedMessageModuleMessagesResponse: String { get { if case .getCannedMessageModuleMessagesResponse(let v)? = payloadVariant {return v} return String() @@ -136,7 +136,7 @@ struct AdminMessage { /// /// Request the node to send device metadata (firmware, protobuf version, etc) - var getDeviceMetadataRequest: Bool { + public var getDeviceMetadataRequest: Bool { get { if case .getDeviceMetadataRequest(let v)? = payloadVariant {return v} return false @@ -146,7 +146,7 @@ struct AdminMessage { /// /// Device metadata response - var getDeviceMetadataResponse: DeviceMetadata { + public var getDeviceMetadataResponse: DeviceMetadata { get { if case .getDeviceMetadataResponse(let v)? = payloadVariant {return v} return DeviceMetadata() @@ -156,7 +156,7 @@ struct AdminMessage { /// /// Get the Ringtone in the response to this message. - var getRingtoneRequest: Bool { + public var getRingtoneRequest: Bool { get { if case .getRingtoneRequest(let v)? = payloadVariant {return v} return false @@ -166,7 +166,7 @@ struct AdminMessage { /// /// Get the Ringtone in the response to this message. - var getRingtoneResponse: String { + public var getRingtoneResponse: String { get { if case .getRingtoneResponse(let v)? = payloadVariant {return v} return String() @@ -176,7 +176,7 @@ struct AdminMessage { /// /// Request the node to send it's connection status - var getDeviceConnectionStatusRequest: Bool { + public var getDeviceConnectionStatusRequest: Bool { get { if case .getDeviceConnectionStatusRequest(let v)? = payloadVariant {return v} return false @@ -186,7 +186,7 @@ struct AdminMessage { /// /// Device connection status response - var getDeviceConnectionStatusResponse: DeviceConnectionStatus { + public var getDeviceConnectionStatusResponse: DeviceConnectionStatus { get { if case .getDeviceConnectionStatusResponse(let v)? = payloadVariant {return v} return DeviceConnectionStatus() @@ -196,7 +196,7 @@ struct AdminMessage { /// /// Setup a node for licensed amateur (ham) radio operation - var setHamMode: HamParameters { + public var setHamMode: HamParameters { get { if case .setHamMode(let v)? = payloadVariant {return v} return HamParameters() @@ -206,7 +206,7 @@ struct AdminMessage { /// /// Get the mesh's nodes with their available gpio pins for RemoteHardware module use - var getNodeRemoteHardwarePinsRequest: Bool { + public var getNodeRemoteHardwarePinsRequest: Bool { get { if case .getNodeRemoteHardwarePinsRequest(let v)? = payloadVariant {return v} return false @@ -216,7 +216,7 @@ struct AdminMessage { /// /// Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use - var getNodeRemoteHardwarePinsResponse: NodeRemoteHardwarePinsResponse { + public var getNodeRemoteHardwarePinsResponse: NodeRemoteHardwarePinsResponse { get { if case .getNodeRemoteHardwarePinsResponse(let v)? = payloadVariant {return v} return NodeRemoteHardwarePinsResponse() @@ -227,7 +227,7 @@ struct AdminMessage { /// /// Enter (UF2) DFU mode /// Only implemented on NRF52 currently - var enterDfuModeRequest: Bool { + public var enterDfuModeRequest: Bool { get { if case .enterDfuModeRequest(let v)? = payloadVariant {return v} return false @@ -237,7 +237,7 @@ struct AdminMessage { /// /// Delete the file by the specified path from the device - var deleteFileRequest: String { + public var deleteFileRequest: String { get { if case .deleteFileRequest(let v)? = payloadVariant {return v} return String() @@ -247,7 +247,7 @@ struct AdminMessage { /// /// Set zero and offset for scale chips - var setScale: UInt32 { + public var setScale: UInt32 { get { if case .setScale(let v)? = payloadVariant {return v} return 0 @@ -257,7 +257,7 @@ struct AdminMessage { /// /// Set the owner for this node - var setOwner: User { + public var setOwner: User { get { if case .setOwner(let v)? = payloadVariant {return v} return User() @@ -271,7 +271,7 @@ struct AdminMessage { /// 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. - var setChannel: Channel { + public var setChannel: Channel { get { if case .setChannel(let v)? = payloadVariant {return v} return Channel() @@ -281,7 +281,7 @@ struct AdminMessage { /// /// Set the current Config - var setConfig: Config { + public var setConfig: Config { get { if case .setConfig(let v)? = payloadVariant {return v} return Config() @@ -291,7 +291,7 @@ struct AdminMessage { /// /// Set the current Config - var setModuleConfig: ModuleConfig { + public var setModuleConfig: ModuleConfig { get { if case .setModuleConfig(let v)? = payloadVariant {return v} return ModuleConfig() @@ -301,7 +301,7 @@ struct AdminMessage { /// /// Set the Canned Message Module messages text. - var setCannedMessageModuleMessages: String { + public var setCannedMessageModuleMessages: String { get { if case .setCannedMessageModuleMessages(let v)? = payloadVariant {return v} return String() @@ -311,7 +311,7 @@ struct AdminMessage { /// /// Set the ringtone for ExternalNotification. - var setRingtoneMessage: String { + public var setRingtoneMessage: String { get { if case .setRingtoneMessage(let v)? = payloadVariant {return v} return String() @@ -321,7 +321,7 @@ struct AdminMessage { /// /// Remove the node by the specified node-num from the NodeDB on the device - var removeByNodenum: UInt32 { + public var removeByNodenum: UInt32 { get { if case .removeByNodenum(let v)? = payloadVariant {return v} return 0 @@ -331,7 +331,7 @@ struct AdminMessage { /// /// Set specified node-num to be favorited on the NodeDB on the device - var setFavoriteNode: UInt32 { + public var setFavoriteNode: UInt32 { get { if case .setFavoriteNode(let v)? = payloadVariant {return v} return 0 @@ -341,7 +341,7 @@ struct AdminMessage { /// /// Set specified node-num to be un-favorited on the NodeDB on the device - var removeFavoriteNode: UInt32 { + public var removeFavoriteNode: UInt32 { get { if case .removeFavoriteNode(let v)? = payloadVariant {return v} return 0 @@ -351,7 +351,7 @@ struct AdminMessage { /// /// Set fixed position data on the node and then set the position.fixed_position = true - var setFixedPosition: Position { + public var setFixedPosition: Position { get { if case .setFixedPosition(let v)? = payloadVariant {return v} return Position() @@ -361,7 +361,7 @@ struct AdminMessage { /// /// Clear fixed position coordinates and then set position.fixed_position = false - var removeFixedPosition: Bool { + public var removeFixedPosition: Bool { get { if case .removeFixedPosition(let v)? = payloadVariant {return v} return false @@ -372,7 +372,7 @@ struct AdminMessage { /// /// Begins an edit transaction for config, module config, owner, and channel settings changes /// This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings) - var beginEditSettings: Bool { + public var beginEditSettings: Bool { get { if case .beginEditSettings(let v)? = payloadVariant {return v} return false @@ -382,7 +382,7 @@ struct AdminMessage { /// /// Commits an open transaction for any edits made to config, module config, owner, and channel settings - var commitEditSettings: Bool { + public var commitEditSettings: Bool { get { if case .commitEditSettings(let v)? = payloadVariant {return v} return false @@ -393,7 +393,7 @@ struct AdminMessage { /// /// Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot) /// Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth. - var rebootOtaSeconds: Int32 { + public var rebootOtaSeconds: Int32 { get { if case .rebootOtaSeconds(let v)? = payloadVariant {return v} return 0 @@ -404,7 +404,7 @@ struct AdminMessage { /// /// This message is only supported for the simulator Portduino build. /// If received the simulator will exit successfully. - var exitSimulator: Bool { + public var exitSimulator: Bool { get { if case .exitSimulator(let v)? = payloadVariant {return v} return false @@ -414,7 +414,7 @@ struct AdminMessage { /// /// Tell the node to reboot in this many seconds (or <0 to cancel reboot) - var rebootSeconds: Int32 { + public var rebootSeconds: Int32 { get { if case .rebootSeconds(let v)? = payloadVariant {return v} return 0 @@ -424,7 +424,7 @@ struct AdminMessage { /// /// Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) - var shutdownSeconds: Int32 { + public var shutdownSeconds: Int32 { get { if case .shutdownSeconds(let v)? = payloadVariant {return v} return 0 @@ -434,7 +434,7 @@ struct AdminMessage { /// /// Tell the node to factory reset, all device settings will be returned to factory defaults. - var factoryReset: Int32 { + public var factoryReset: Int32 { get { if case .factoryReset(let v)? = payloadVariant {return v} return 0 @@ -444,7 +444,7 @@ struct AdminMessage { /// /// Tell the node to reset the nodedb. - var nodedbReset: Int32 { + public var nodedbReset: Int32 { get { if case .nodedbReset(let v)? = payloadVariant {return v} return 0 @@ -452,11 +452,11 @@ struct AdminMessage { set {payloadVariant = .nodedbReset(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// TODO: REPLACE - enum OneOf_PayloadVariant: Equatable { + public enum OneOf_PayloadVariant: Equatable { /// /// 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) @@ -591,7 +591,7 @@ struct AdminMessage { case nodedbReset(Int32) #if !swift(>=4.1) - static func ==(lhs: AdminMessage.OneOf_PayloadVariant, rhs: AdminMessage.OneOf_PayloadVariant) -> Bool { + public static func ==(lhs: AdminMessage.OneOf_PayloadVariant, rhs: AdminMessage.OneOf_PayloadVariant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -768,8 +768,8 @@ struct AdminMessage { /// /// TODO: REPLACE - enum ConfigType: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum ConfigType: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// TODO: REPLACE @@ -800,11 +800,11 @@ struct AdminMessage { case bluetoothConfig // = 6 case UNRECOGNIZED(Int) - init() { + public init() { self = .deviceConfig } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .deviceConfig case 1: self = .positionConfig @@ -817,7 +817,7 @@ struct AdminMessage { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .deviceConfig: return 0 case .positionConfig: return 1 @@ -834,8 +834,8 @@ struct AdminMessage { /// /// TODO: REPLACE - enum ModuleConfigType: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum ModuleConfigType: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// TODO: REPLACE @@ -890,11 +890,11 @@ struct AdminMessage { case paxcounterConfig // = 12 case UNRECOGNIZED(Int) - init() { + public init() { self = .mqttConfig } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .mqttConfig case 1: self = .serialConfig @@ -913,7 +913,7 @@ struct AdminMessage { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .mqttConfig: return 0 case .serialConfig: return 1 @@ -934,14 +934,14 @@ struct AdminMessage { } - init() {} + public init() {} } #if swift(>=4.2) extension AdminMessage.ConfigType: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [AdminMessage.ConfigType] = [ + public static let allCases: [AdminMessage.ConfigType] = [ .deviceConfig, .positionConfig, .powerConfig, @@ -954,7 +954,7 @@ extension AdminMessage.ConfigType: CaseIterable { extension AdminMessage.ModuleConfigType: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [AdminMessage.ModuleConfigType] = [ + public static let allCases: [AdminMessage.ModuleConfigType] = [ .mqttConfig, .serialConfig, .extnotifConfig, @@ -975,48 +975,48 @@ extension AdminMessage.ModuleConfigType: CaseIterable { /// /// Parameters for setting up Meshtastic for ameteur radio usage -struct HamParameters { +public struct HamParameters { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Amateur radio call sign, eg. KD2ABC - var callSign: String = String() + public var callSign: String = String() /// /// Transmit power in dBm at the LoRA transceiver, not including any amplification - var txPower: Int32 = 0 + public var txPower: Int32 = 0 /// /// The selected frequency of LoRA operation /// Please respect your local laws, regulations, and band plans. /// Ensure your radio is capable of operating of the selected frequency before setting this. - var frequency: Float = 0 + public var frequency: Float = 0 /// /// Optional short name of user - var shortName: String = String() + public var shortName: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Response envelope for node_remote_hardware_pins -struct NodeRemoteHardwarePinsResponse { +public struct NodeRemoteHardwarePinsResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Nodes and their respective remote hardware GPIO pins - var nodeRemoteHardwarePins: [NodeRemoteHardwarePin] = [] + public var nodeRemoteHardwarePins: [NodeRemoteHardwarePin] = [] - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } #if swift(>=5.5) && canImport(_Concurrency) @@ -1033,8 +1033,8 @@ extension NodeRemoteHardwarePinsResponse: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".AdminMessage" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".AdminMessage" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "get_channel_request"), 2: .standard(proto: "get_channel_response"), 3: .standard(proto: "get_owner_request"), @@ -1078,7 +1078,7 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat 100: .standard(proto: "nodedb_reset"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1482,7 +1482,7 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -1657,7 +1657,7 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: AdminMessage, rhs: AdminMessage) -> Bool { + public static func ==(lhs: AdminMessage, rhs: AdminMessage) -> Bool { if lhs.payloadVariant != rhs.payloadVariant {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1665,7 +1665,7 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } extension AdminMessage.ConfigType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "DEVICE_CONFIG"), 1: .same(proto: "POSITION_CONFIG"), 2: .same(proto: "POWER_CONFIG"), @@ -1677,7 +1677,7 @@ extension AdminMessage.ConfigType: SwiftProtobuf._ProtoNameProviding { } extension AdminMessage.ModuleConfigType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "MQTT_CONFIG"), 1: .same(proto: "SERIAL_CONFIG"), 2: .same(proto: "EXTNOTIF_CONFIG"), @@ -1695,15 +1695,15 @@ extension AdminMessage.ModuleConfigType: SwiftProtobuf._ProtoNameProviding { } extension HamParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".HamParameters" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".HamParameters" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "call_sign"), 2: .standard(proto: "tx_power"), 3: .same(proto: "frequency"), 4: .standard(proto: "short_name"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1718,7 +1718,7 @@ extension HamParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.callSign.isEmpty { try visitor.visitSingularStringField(value: self.callSign, fieldNumber: 1) } @@ -1734,7 +1734,7 @@ extension HamParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: HamParameters, rhs: HamParameters) -> Bool { + public static func ==(lhs: HamParameters, rhs: HamParameters) -> Bool { if lhs.callSign != rhs.callSign {return false} if lhs.txPower != rhs.txPower {return false} if lhs.frequency != rhs.frequency {return false} @@ -1745,12 +1745,12 @@ extension HamParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa } extension NodeRemoteHardwarePinsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".NodeRemoteHardwarePinsResponse" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".NodeRemoteHardwarePinsResponse" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "node_remote_hardware_pins"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1762,14 +1762,14 @@ extension NodeRemoteHardwarePinsResponse: SwiftProtobuf.Message, SwiftProtobuf._ } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.nodeRemoteHardwarePins.isEmpty { try visitor.visitRepeatedMessageField(value: self.nodeRemoteHardwarePins, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: NodeRemoteHardwarePinsResponse, rhs: NodeRemoteHardwarePinsResponse) -> Bool { + public static func ==(lhs: NodeRemoteHardwarePinsResponse, rhs: NodeRemoteHardwarePinsResponse) -> Bool { if lhs.nodeRemoteHardwarePins != rhs.nodeRemoteHardwarePins {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true diff --git a/Meshtastic/Protobufs/meshtastic/apponly.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/apponly.pb.swift similarity index 87% rename from Meshtastic/Protobufs/meshtastic/apponly.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/apponly.pb.swift index 11abf7af..d1533d59 100644 --- a/Meshtastic/Protobufs/meshtastic/apponly.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/apponly.pb.swift @@ -26,32 +26,32 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// any SECONDARY channels. /// No DISABLED channels are included. /// This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL -struct ChannelSet { +public struct ChannelSet { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Channel list with settings - var settings: [ChannelSettings] { + public var settings: [ChannelSettings] { get {return _storage._settings} set {_uniqueStorage()._settings = newValue} } /// /// LoRa config - var loraConfig: Config.LoRaConfig { + public var loraConfig: Config.LoRaConfig { get {return _storage._loraConfig ?? Config.LoRaConfig()} set {_uniqueStorage()._loraConfig = newValue} } /// Returns true if `loraConfig` has been explicitly set. - var hasLoraConfig: Bool {return _storage._loraConfig != nil} + public var hasLoraConfig: Bool {return _storage._loraConfig != nil} /// Clears the value of `loraConfig`. Subsequent reads from it will return its default value. - mutating func clearLoraConfig() {_uniqueStorage()._loraConfig = nil} + public mutating func clearLoraConfig() {_uniqueStorage()._loraConfig = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _storage = _StorageClass.defaultInstance } @@ -65,8 +65,8 @@ extension ChannelSet: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension ChannelSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ChannelSet" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".ChannelSet" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "settings"), 2: .standard(proto: "lora_config"), ] @@ -100,7 +100,7 @@ extension ChannelSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio return _storage } - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { _ = _uniqueStorage() try withExtendedLifetime(_storage) { (_storage: _StorageClass) in while let fieldNumber = try decoder.nextFieldNumber() { @@ -116,7 +116,7 @@ extension ChannelSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations @@ -132,7 +132,7 @@ extension ChannelSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ChannelSet, rhs: ChannelSet) -> Bool { + public static func ==(lhs: ChannelSet, rhs: ChannelSet) -> Bool { if lhs._storage !== rhs._storage { let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 diff --git a/Meshtastic/Protobufs/meshtastic/atak.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/atak.pb.swift similarity index 81% rename from Meshtastic/Protobufs/meshtastic/atak.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/atak.pb.swift index 49229221..4406deb3 100644 --- a/Meshtastic/Protobufs/meshtastic/atak.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/atak.pb.swift @@ -20,8 +20,8 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _2 } -enum Team: SwiftProtobuf.Enum { - typealias RawValue = Int +public enum Team: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Unspecifed @@ -84,11 +84,11 @@ enum Team: SwiftProtobuf.Enum { case brown // = 14 case UNRECOGNIZED(Int) - init() { + public init() { self = .unspecifedColor } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unspecifedColor case 1: self = .white @@ -109,7 +109,7 @@ enum Team: SwiftProtobuf.Enum { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unspecifedColor: return 0 case .white: return 1 @@ -136,7 +136,7 @@ enum Team: SwiftProtobuf.Enum { extension Team: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Team] = [ + public static let allCases: [Team] = [ .unspecifedColor, .white, .yellow, @@ -159,8 +159,8 @@ extension Team: CaseIterable { /// /// Role of the group member -enum MemberRole: SwiftProtobuf.Enum { - typealias RawValue = Int +public enum MemberRole: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Unspecifed @@ -199,11 +199,11 @@ enum MemberRole: SwiftProtobuf.Enum { case k9 // = 8 case UNRECOGNIZED(Int) - init() { + public init() { self = .unspecifed } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unspecifed case 1: self = .teamMember @@ -218,7 +218,7 @@ enum MemberRole: SwiftProtobuf.Enum { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unspecifed: return 0 case .teamMember: return 1 @@ -239,7 +239,7 @@ enum MemberRole: SwiftProtobuf.Enum { extension MemberRole: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [MemberRole] = [ + public static let allCases: [MemberRole] = [ .unspecifed, .teamMember, .teamLead, @@ -256,55 +256,55 @@ extension MemberRole: CaseIterable { /// /// Packets for the official ATAK Plugin -struct TAKPacket { +public struct TAKPacket { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Are the payloads strings compressed for LoRA transport? - var isCompressed: Bool = false + public var isCompressed: Bool = false /// /// The contact / callsign for ATAK user - var contact: Contact { + public var contact: Contact { get {return _contact ?? Contact()} set {_contact = newValue} } /// Returns true if `contact` has been explicitly set. - var hasContact: Bool {return self._contact != nil} + public var hasContact: Bool {return self._contact != nil} /// Clears the value of `contact`. Subsequent reads from it will return its default value. - mutating func clearContact() {self._contact = nil} + public mutating func clearContact() {self._contact = nil} /// /// The group for ATAK user - var group: Group { + public var group: Group { get {return _group ?? Group()} set {_group = newValue} } /// Returns true if `group` has been explicitly set. - var hasGroup: Bool {return self._group != nil} + public var hasGroup: Bool {return self._group != nil} /// Clears the value of `group`. Subsequent reads from it will return its default value. - mutating func clearGroup() {self._group = nil} + public mutating func clearGroup() {self._group = nil} /// /// The status of the ATAK EUD - var status: Status { + public var status: Status { get {return _status ?? Status()} set {_status = newValue} } /// Returns true if `status` has been explicitly set. - var hasStatus: Bool {return self._status != nil} + public var hasStatus: Bool {return self._status != nil} /// Clears the value of `status`. Subsequent reads from it will return its default value. - mutating func clearStatus() {self._status = nil} + public mutating func clearStatus() {self._status = nil} /// /// The payload of the packet - var payloadVariant: TAKPacket.OneOf_PayloadVariant? = nil + public var payloadVariant: TAKPacket.OneOf_PayloadVariant? = nil /// /// TAK position report - var pli: PLI { + public var pli: PLI { get { if case .pli(let v)? = payloadVariant {return v} return PLI() @@ -314,7 +314,7 @@ struct TAKPacket { /// /// ATAK GeoChat message - var chat: GeoChat { + public var chat: GeoChat { get { if case .chat(let v)? = payloadVariant {return v} return GeoChat() @@ -322,11 +322,11 @@ struct TAKPacket { set {payloadVariant = .chat(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// The payload of the packet - enum OneOf_PayloadVariant: Equatable { + public enum OneOf_PayloadVariant: Equatable { /// /// TAK position report case pli(PLI) @@ -335,7 +335,7 @@ struct TAKPacket { case chat(GeoChat) #if !swift(>=4.1) - static func ==(lhs: TAKPacket.OneOf_PayloadVariant, rhs: TAKPacket.OneOf_PayloadVariant) -> Bool { + public static func ==(lhs: TAKPacket.OneOf_PayloadVariant, rhs: TAKPacket.OneOf_PayloadVariant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -354,7 +354,7 @@ struct TAKPacket { #endif } - init() {} + public init() {} fileprivate var _contact: Contact? = nil fileprivate var _group: Group? = nil @@ -363,40 +363,40 @@ struct TAKPacket { /// /// ATAK GeoChat message -struct GeoChat { +public struct GeoChat { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The text message - var message: String = String() + public var message: String = String() /// /// Uid recipient of the message - var to: String { + public var to: String { get {return _to ?? String()} set {_to = newValue} } /// Returns true if `to` has been explicitly set. - var hasTo: Bool {return self._to != nil} + public var hasTo: Bool {return self._to != nil} /// Clears the value of `to`. Subsequent reads from it will return its default value. - mutating func clearTo() {self._to = nil} + public mutating func clearTo() {self._to = nil} /// /// Callsign of the recipient for the message - var toCallsign: String { + public var toCallsign: String { get {return _toCallsign ?? String()} set {_toCallsign = newValue} } /// Returns true if `toCallsign` has been explicitly set. - var hasToCallsign: Bool {return self._toCallsign != nil} + public var hasToCallsign: Bool {return self._toCallsign != nil} /// Clears the value of `toCallsign`. Subsequent reads from it will return its default value. - mutating func clearToCallsign() {self._toCallsign = nil} + public mutating func clearToCallsign() {self._toCallsign = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _to: String? = nil fileprivate var _toCallsign: String? = nil @@ -405,66 +405,66 @@ struct GeoChat { /// /// ATAK Group /// <__group role='Team Member' name='Cyan'/> -struct Group { +public struct Group { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Role of the group member - var role: MemberRole = .unspecifed + public var role: MemberRole = .unspecifed /// /// Team (color) /// Default Cyan - var team: Team = .unspecifedColor + public var team: Team = .unspecifedColor - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// ATAK EUD Status /// -struct Status { +public struct Status { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Battery level - var battery: UInt32 = 0 + public var battery: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// ATAK Contact /// -struct Contact { +public struct Contact { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Callsign - var callsign: String = String() + public var callsign: String = String() /// /// Device callsign - var deviceCallsign: String = String() + public var deviceCallsign: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Position Location Information from ATAK -struct PLI { +public struct PLI { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -472,28 +472,28 @@ struct PLI { /// /// The new preferred location encoding, multiply by 1e-7 to get degrees /// in floating point - var latitudeI: Int32 = 0 + public var latitudeI: Int32 = 0 /// /// The new preferred location encoding, multiply by 1e-7 to get degrees /// in floating point - var longitudeI: Int32 = 0 + public var longitudeI: Int32 = 0 /// /// Altitude (ATAK prefers HAE) - var altitude: Int32 = 0 + public var altitude: Int32 = 0 /// /// Speed - var speed: UInt32 = 0 + public var speed: UInt32 = 0 /// /// Course in degrees - var course: UInt32 = 0 + public var course: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } #if swift(>=5.5) && canImport(_Concurrency) @@ -513,7 +513,7 @@ extension PLI: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension Team: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "Unspecifed_Color"), 1: .same(proto: "White"), 2: .same(proto: "Yellow"), @@ -533,7 +533,7 @@ extension Team: SwiftProtobuf._ProtoNameProviding { } extension MemberRole: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "Unspecifed"), 1: .same(proto: "TeamMember"), 2: .same(proto: "TeamLead"), @@ -547,8 +547,8 @@ extension MemberRole: SwiftProtobuf._ProtoNameProviding { } extension TAKPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".TAKPacket" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".TAKPacket" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "is_compressed"), 2: .same(proto: "contact"), 3: .same(proto: "group"), @@ -557,7 +557,7 @@ extension TAKPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation 6: .same(proto: "chat"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -598,7 +598,7 @@ extension TAKPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -629,7 +629,7 @@ extension TAKPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: TAKPacket, rhs: TAKPacket) -> Bool { + public static func ==(lhs: TAKPacket, rhs: TAKPacket) -> Bool { if lhs.isCompressed != rhs.isCompressed {return false} if lhs._contact != rhs._contact {return false} if lhs._group != rhs._group {return false} @@ -641,14 +641,14 @@ extension TAKPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation } extension GeoChat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GeoChat" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".GeoChat" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "message"), 2: .same(proto: "to"), 3: .standard(proto: "to_callsign"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -662,7 +662,7 @@ extension GeoChat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -679,7 +679,7 @@ extension GeoChat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: GeoChat, rhs: GeoChat) -> Bool { + public static func ==(lhs: GeoChat, rhs: GeoChat) -> Bool { if lhs.message != rhs.message {return false} if lhs._to != rhs._to {return false} if lhs._toCallsign != rhs._toCallsign {return false} @@ -689,13 +689,13 @@ extension GeoChat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa } extension Group: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Group" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Group" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "role"), 2: .same(proto: "team"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -708,7 +708,7 @@ extension Group: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.role != .unspecifed { try visitor.visitSingularEnumField(value: self.role, fieldNumber: 1) } @@ -718,7 +718,7 @@ extension Group: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Group, rhs: Group) -> Bool { + public static func ==(lhs: Group, rhs: Group) -> Bool { if lhs.role != rhs.role {return false} if lhs.team != rhs.team {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -727,12 +727,12 @@ extension Group: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase } extension Status: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Status" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Status" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "battery"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -744,14 +744,14 @@ extension Status: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.battery != 0 { try visitor.visitSingularUInt32Field(value: self.battery, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Status, rhs: Status) -> Bool { + public static func ==(lhs: Status, rhs: Status) -> Bool { if lhs.battery != rhs.battery {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -759,13 +759,13 @@ extension Status: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas } extension Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Contact" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Contact" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "callsign"), 2: .standard(proto: "device_callsign"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -778,7 +778,7 @@ extension Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.callsign.isEmpty { try visitor.visitSingularStringField(value: self.callsign, fieldNumber: 1) } @@ -788,7 +788,7 @@ extension Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Contact, rhs: Contact) -> Bool { + public static func ==(lhs: Contact, rhs: Contact) -> Bool { if lhs.callsign != rhs.callsign {return false} if lhs.deviceCallsign != rhs.deviceCallsign {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -797,8 +797,8 @@ extension Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa } extension PLI: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".PLI" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".PLI" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "latitude_i"), 2: .standard(proto: "longitude_i"), 3: .same(proto: "altitude"), @@ -806,7 +806,7 @@ extension PLI: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, 5: .same(proto: "course"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -822,7 +822,7 @@ extension PLI: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.latitudeI != 0 { try visitor.visitSingularSFixed32Field(value: self.latitudeI, fieldNumber: 1) } @@ -841,7 +841,7 @@ extension PLI: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: PLI, rhs: PLI) -> Bool { + public static func ==(lhs: PLI, rhs: PLI) -> Bool { if lhs.latitudeI != rhs.latitudeI {return false} if lhs.longitudeI != rhs.longitudeI {return false} if lhs.altitude != rhs.altitude {return false} diff --git a/Meshtastic/Protobufs/meshtastic/cannedmessages.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/cannedmessages.pb.swift similarity index 80% rename from Meshtastic/Protobufs/meshtastic/cannedmessages.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/cannedmessages.pb.swift index 7d70da3b..1b8c84de 100644 --- a/Meshtastic/Protobufs/meshtastic/cannedmessages.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/cannedmessages.pb.swift @@ -22,18 +22,18 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// /// Canned message module configuration. -struct CannedMessageModuleConfig { +public struct CannedMessageModuleConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Predefined messages for canned message module separated by '|' characters. - var messages: String = String() + public var messages: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } #if swift(>=5.5) && canImport(_Concurrency) @@ -45,12 +45,12 @@ extension CannedMessageModuleConfig: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension CannedMessageModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".CannedMessageModuleConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".CannedMessageModuleConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "messages"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -62,14 +62,14 @@ extension CannedMessageModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._Messa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.messages.isEmpty { try visitor.visitSingularStringField(value: self.messages, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: CannedMessageModuleConfig, rhs: CannedMessageModuleConfig) -> Bool { + public static func ==(lhs: CannedMessageModuleConfig, rhs: CannedMessageModuleConfig) -> Bool { if lhs.messages != rhs.messages {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true diff --git a/Meshtastic/Protobufs/meshtastic/channel.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/channel.pb.swift similarity index 85% rename from Meshtastic/Protobufs/meshtastic/channel.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/channel.pb.swift index f2f4da72..5b9c7e49 100644 --- a/Meshtastic/Protobufs/meshtastic/channel.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/channel.pb.swift @@ -36,14 +36,14 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// FIXME: Add description of multi-channel support and how primary vs secondary channels are used. /// FIXME: explain how apps use channels for security. /// explain how remote settings and remote gpio are managed as an example -struct ChannelSettings { +public struct ChannelSettings { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Deprecated in favor of LoraConfig.channel_num - var channelNum: UInt32 = 0 + public var channelNum: UInt32 = 0 /// /// A simple pre-shared key for now for crypto. @@ -56,7 +56,7 @@ struct ChannelSettings { /// `1` = The special "default" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0x01} /// `2` through 10 = The default channel key, except with 1 through 9 added to the last byte. /// Shown to user as simple1 through 10 - var psk: Data = Data() + public var psk: Data = Data() /// /// A SHORT name that will be packed into the URL. @@ -67,7 +67,7 @@ struct ChannelSettings { /// In user interfaces it should be rendered as a local language translation of "X". /// For channel_num hashing empty string will be treated as "X". /// Where "X" is selected based on the English words listed above for ModemPreset - var name: String = String() + public var name: String = String() /// /// Used to construct a globally unique channel ID. @@ -81,58 +81,58 @@ struct ChannelSettings { /// Those channels do not have a numeric id included in the settings, but instead it is pulled from /// a table of well known IDs. /// (see Well Known Channels FIXME) - var id: UInt32 = 0 + public var id: UInt32 = 0 /// /// If true, messages on the mesh will be sent to the *public* internet by any gateway ndoe - var uplinkEnabled: Bool = false + public var uplinkEnabled: Bool = false /// /// If true, messages seen on the internet will be forwarded to the local mesh. - var downlinkEnabled: Bool = false + public var downlinkEnabled: Bool = false /// /// Per-channel module settings. - var moduleSettings: ModuleSettings { + public var moduleSettings: ModuleSettings { get {return _moduleSettings ?? ModuleSettings()} set {_moduleSettings = newValue} } /// Returns true if `moduleSettings` has been explicitly set. - var hasModuleSettings: Bool {return self._moduleSettings != nil} + public var hasModuleSettings: Bool {return self._moduleSettings != nil} /// Clears the value of `moduleSettings`. Subsequent reads from it will return its default value. - mutating func clearModuleSettings() {self._moduleSettings = nil} + public mutating func clearModuleSettings() {self._moduleSettings = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _moduleSettings: ModuleSettings? = nil } /// /// This message is specifically for modules to store per-channel configuration data. -struct ModuleSettings { +public struct ModuleSettings { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Bits of precision for the location sent in position packets. - var positionPrecision: UInt32 = 0 + public var positionPrecision: UInt32 = 0 /// /// Controls whether or not the phone / clients should mute the current channel /// Useful for noisy public channels you don't necessarily want to disable - var isClientMuted: Bool = false + public var isClientMuted: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// A pair of a channel number, mode and the (sharable) settings for that channel -struct Channel { +public struct Channel { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -141,24 +141,24 @@ struct Channel { /// The index of this channel in the channel table (from 0 to MAX_NUM_CHANNELS-1) /// (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. - var index: Int32 = 0 + public var index: Int32 = 0 /// /// The new settings, or NULL to disable that channel - var settings: ChannelSettings { + public var settings: ChannelSettings { get {return _settings ?? ChannelSettings()} set {_settings = newValue} } /// Returns true if `settings` has been explicitly set. - var hasSettings: Bool {return self._settings != nil} + public var hasSettings: Bool {return self._settings != nil} /// Clears the value of `settings`. Subsequent reads from it will return its default value. - mutating func clearSettings() {self._settings = nil} + public mutating func clearSettings() {self._settings = nil} /// /// TODO: REPLACE - var role: Channel.Role = .disabled + public var role: Channel.Role = .disabled - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// How this channel is being used (or not). @@ -170,8 +170,8 @@ struct Channel { /// cross band routing as needed. /// If a device has only a single radio (the common case) only one channel can be PRIMARY at a time /// (but any number of SECONDARY channels can't be sent received on that common frequency) - enum Role: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum Role: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// This channel is not in use right now @@ -187,11 +187,11 @@ struct Channel { case secondary // = 2 case UNRECOGNIZED(Int) - init() { + public init() { self = .disabled } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .disabled case 1: self = .primary @@ -200,7 +200,7 @@ struct Channel { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .disabled: return 0 case .primary: return 1 @@ -211,7 +211,7 @@ struct Channel { } - init() {} + public init() {} fileprivate var _settings: ChannelSettings? = nil } @@ -220,7 +220,7 @@ struct Channel { extension Channel.Role: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Channel.Role] = [ + public static let allCases: [Channel.Role] = [ .disabled, .primary, .secondary, @@ -241,8 +241,8 @@ extension Channel.Role: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ChannelSettings" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".ChannelSettings" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "channel_num"), 2: .same(proto: "psk"), 3: .same(proto: "name"), @@ -252,7 +252,7 @@ extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen 7: .standard(proto: "module_settings"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -270,7 +270,7 @@ extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -299,7 +299,7 @@ extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ChannelSettings, rhs: ChannelSettings) -> Bool { + public static func ==(lhs: ChannelSettings, rhs: ChannelSettings) -> Bool { if lhs.channelNum != rhs.channelNum {return false} if lhs.psk != rhs.psk {return false} if lhs.name != rhs.name {return false} @@ -313,13 +313,13 @@ extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ModuleSettings" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".ModuleSettings" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "position_precision"), 2: .standard(proto: "is_client_muted"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -332,7 +332,7 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.positionPrecision != 0 { try visitor.visitSingularUInt32Field(value: self.positionPrecision, fieldNumber: 1) } @@ -342,7 +342,7 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleSettings, rhs: ModuleSettings) -> Bool { + public static func ==(lhs: ModuleSettings, rhs: ModuleSettings) -> Bool { if lhs.positionPrecision != rhs.positionPrecision {return false} if lhs.isClientMuted != rhs.isClientMuted {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -351,14 +351,14 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } extension Channel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Channel" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Channel" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "index"), 2: .same(proto: "settings"), 3: .same(proto: "role"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -372,7 +372,7 @@ extension Channel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -389,7 +389,7 @@ extension Channel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Channel, rhs: Channel) -> Bool { + public static func ==(lhs: Channel, rhs: Channel) -> Bool { if lhs.index != rhs.index {return false} if lhs._settings != rhs._settings {return false} if lhs.role != rhs.role {return false} @@ -399,7 +399,7 @@ extension Channel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa } extension Channel.Role: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "DISABLED"), 1: .same(proto: "PRIMARY"), 2: .same(proto: "SECONDARY"), diff --git a/Meshtastic/Protobufs/meshtastic/clientonly.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/clientonly.pb.swift similarity index 80% rename from Meshtastic/Protobufs/meshtastic/clientonly.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/clientonly.pb.swift index 050c719d..c3d93bf7 100644 --- a/Meshtastic/Protobufs/meshtastic/clientonly.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/clientonly.pb.swift @@ -23,69 +23,69 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// /// This abstraction is used to contain any configuration for provisioning a node on any client. /// It is useful for importing and exporting configurations. -struct DeviceProfile { +public struct DeviceProfile { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Long name for the node - var longName: String { + public var longName: String { get {return _longName ?? String()} set {_longName = newValue} } /// Returns true if `longName` has been explicitly set. - var hasLongName: Bool {return self._longName != nil} + public var hasLongName: Bool {return self._longName != nil} /// Clears the value of `longName`. Subsequent reads from it will return its default value. - mutating func clearLongName() {self._longName = nil} + public mutating func clearLongName() {self._longName = nil} /// /// Short name of the node - var shortName: String { + public var shortName: String { get {return _shortName ?? String()} set {_shortName = newValue} } /// Returns true if `shortName` has been explicitly set. - var hasShortName: Bool {return self._shortName != nil} + public var hasShortName: Bool {return self._shortName != nil} /// Clears the value of `shortName`. Subsequent reads from it will return its default value. - mutating func clearShortName() {self._shortName = nil} + public mutating func clearShortName() {self._shortName = nil} /// /// The url of the channels from our node - var channelURL: String { + public var channelURL: String { get {return _channelURL ?? String()} set {_channelURL = newValue} } /// Returns true if `channelURL` has been explicitly set. - var hasChannelURL: Bool {return self._channelURL != nil} + public var hasChannelURL: Bool {return self._channelURL != nil} /// Clears the value of `channelURL`. Subsequent reads from it will return its default value. - mutating func clearChannelURL() {self._channelURL = nil} + public mutating func clearChannelURL() {self._channelURL = nil} /// /// The Config of the node - var config: LocalConfig { + public var config: LocalConfig { get {return _config ?? LocalConfig()} set {_config = newValue} } /// Returns true if `config` has been explicitly set. - var hasConfig: Bool {return self._config != nil} + public var hasConfig: Bool {return self._config != nil} /// Clears the value of `config`. Subsequent reads from it will return its default value. - mutating func clearConfig() {self._config = nil} + public mutating func clearConfig() {self._config = nil} /// /// The ModuleConfig of the node - var moduleConfig: LocalModuleConfig { + public var moduleConfig: LocalModuleConfig { get {return _moduleConfig ?? LocalModuleConfig()} set {_moduleConfig = newValue} } /// Returns true if `moduleConfig` has been explicitly set. - var hasModuleConfig: Bool {return self._moduleConfig != nil} + public var hasModuleConfig: Bool {return self._moduleConfig != nil} /// Clears the value of `moduleConfig`. Subsequent reads from it will return its default value. - mutating func clearModuleConfig() {self._moduleConfig = nil} + public mutating func clearModuleConfig() {self._moduleConfig = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _longName: String? = nil fileprivate var _shortName: String? = nil @@ -103,8 +103,8 @@ extension DeviceProfile: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension DeviceProfile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".DeviceProfile" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".DeviceProfile" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "long_name"), 2: .standard(proto: "short_name"), 3: .standard(proto: "channel_url"), @@ -112,7 +112,7 @@ extension DeviceProfile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa 5: .standard(proto: "module_config"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -128,7 +128,7 @@ extension DeviceProfile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -151,7 +151,7 @@ extension DeviceProfile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: DeviceProfile, rhs: DeviceProfile) -> Bool { + public static func ==(lhs: DeviceProfile, rhs: DeviceProfile) -> Bool { if lhs._longName != rhs._longName {return false} if lhs._shortName != rhs._shortName {return false} if lhs._channelURL != rhs._channelURL {return false} diff --git a/Meshtastic/Protobufs/meshtastic/config.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/config.pb.swift similarity index 86% rename from Meshtastic/Protobufs/meshtastic/config.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/config.pb.swift index 11453fa7..e7571efd 100644 --- a/Meshtastic/Protobufs/meshtastic/config.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/config.pb.swift @@ -20,16 +20,16 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _2 } -struct Config { +public struct Config { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Payload Variant - var payloadVariant: Config.OneOf_PayloadVariant? = nil + public var payloadVariant: Config.OneOf_PayloadVariant? = nil - var device: Config.DeviceConfig { + public var device: Config.DeviceConfig { get { if case .device(let v)? = payloadVariant {return v} return Config.DeviceConfig() @@ -37,7 +37,7 @@ struct Config { set {payloadVariant = .device(newValue)} } - var position: Config.PositionConfig { + public var position: Config.PositionConfig { get { if case .position(let v)? = payloadVariant {return v} return Config.PositionConfig() @@ -45,7 +45,7 @@ struct Config { set {payloadVariant = .position(newValue)} } - var power: Config.PowerConfig { + public var power: Config.PowerConfig { get { if case .power(let v)? = payloadVariant {return v} return Config.PowerConfig() @@ -53,7 +53,7 @@ struct Config { set {payloadVariant = .power(newValue)} } - var network: Config.NetworkConfig { + public var network: Config.NetworkConfig { get { if case .network(let v)? = payloadVariant {return v} return Config.NetworkConfig() @@ -61,7 +61,7 @@ struct Config { set {payloadVariant = .network(newValue)} } - var display: Config.DisplayConfig { + public var display: Config.DisplayConfig { get { if case .display(let v)? = payloadVariant {return v} return Config.DisplayConfig() @@ -69,7 +69,7 @@ struct Config { set {payloadVariant = .display(newValue)} } - var lora: Config.LoRaConfig { + public var lora: Config.LoRaConfig { get { if case .lora(let v)? = payloadVariant {return v} return Config.LoRaConfig() @@ -77,7 +77,7 @@ struct Config { set {payloadVariant = .lora(newValue)} } - var bluetooth: Config.BluetoothConfig { + public var bluetooth: Config.BluetoothConfig { get { if case .bluetooth(let v)? = payloadVariant {return v} return Config.BluetoothConfig() @@ -85,11 +85,11 @@ struct Config { set {payloadVariant = .bluetooth(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// Payload Variant - enum OneOf_PayloadVariant: Equatable { + public enum OneOf_PayloadVariant: Equatable { case device(Config.DeviceConfig) case position(Config.PositionConfig) case power(Config.PowerConfig) @@ -99,7 +99,7 @@ struct Config { case bluetooth(Config.BluetoothConfig) #if !swift(>=4.1) - static func ==(lhs: Config.OneOf_PayloadVariant, rhs: Config.OneOf_PayloadVariant) -> Bool { + public static func ==(lhs: Config.OneOf_PayloadVariant, rhs: Config.OneOf_PayloadVariant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -140,70 +140,70 @@ struct Config { /// /// Configuration - struct DeviceConfig { + public struct DeviceConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Sets the role of node - var role: Config.DeviceConfig.Role = .client + public var role: Config.DeviceConfig.Role = .client /// /// Disabling this will disable the SerialConsole by not initilizing the StreamAPI - var serialEnabled: Bool = false + public var serialEnabled: Bool = false /// /// By default we turn off logging as soon as an API client connects (to keep shared serial link quiet). /// Set this to true to leave the debug log outputting even when API is active. - var debugLogEnabled: Bool = false + public var debugLogEnabled: Bool = false /// /// For boards without a hard wired button, this is the pin number that will be used /// Boards that have more than one button can swap the function with this one. defaults to BUTTON_PIN if defined. - var buttonGpio: UInt32 = 0 + public var buttonGpio: UInt32 = 0 /// /// For boards without a PWM buzzer, this is the pin number that will be used /// Defaults to PIN_BUZZER if defined. - var buzzerGpio: UInt32 = 0 + public var buzzerGpio: UInt32 = 0 /// /// Sets the role of node - var rebroadcastMode: Config.DeviceConfig.RebroadcastMode = .all + public var rebroadcastMode: Config.DeviceConfig.RebroadcastMode = .all /// /// Send our nodeinfo this often /// Defaults to 900 Seconds (15 minutes) - var nodeInfoBroadcastSecs: UInt32 = 0 + public var nodeInfoBroadcastSecs: UInt32 = 0 /// /// Treat double tap interrupt on supported accelerometers as a button press if set to true - var doubleTapAsButtonPress: Bool = false + public var doubleTapAsButtonPress: Bool = false /// /// If true, device is considered to be "managed" by a mesh administrator /// Clients should then limit available configuration and administrative options inside the user interface - var isManaged: Bool = false + public var isManaged: Bool = false /// /// Disables the triple-press of user button to enable or disable GPS - var disableTripleClick: Bool = false + public var disableTripleClick: Bool = false /// /// POSIX Timezone definition string from https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv. - var tzdef: String = String() + public var tzdef: String = String() /// /// If true, disable the default blinking LED (LED_PIN) behavior on the device - var ledHeartbeatDisabled: Bool = false + public var ledHeartbeatDisabled: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// Defines the device's role on the Mesh network - enum Role: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum Role: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Description: App connected or stand alone messaging device. @@ -275,11 +275,11 @@ struct Config { case takTracker // = 10 case UNRECOGNIZED(Int) - init() { + public init() { self = .client } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .client case 1: self = .clientMute @@ -296,7 +296,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .client: return 0 case .clientMute: return 1 @@ -317,8 +317,8 @@ struct Config { /// /// Defines the device's behavior for how messages are rebroadcast - enum RebroadcastMode: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum RebroadcastMode: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Default behavior. @@ -341,11 +341,11 @@ struct Config { case knownOnly // = 3 case UNRECOGNIZED(Int) - init() { + public init() { self = .all } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .all case 1: self = .allSkipDecoding @@ -355,7 +355,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .all: return 0 case .allSkipDecoding: return 1 @@ -367,12 +367,12 @@ struct Config { } - init() {} + public init() {} } /// /// Position Config - struct PositionConfig { + public struct PositionConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -380,62 +380,62 @@ struct Config { /// /// We should send our position this often (but only if it has changed significantly) /// Defaults to 15 minutes - var positionBroadcastSecs: UInt32 = 0 + public var positionBroadcastSecs: UInt32 = 0 /// /// Adaptive position braoadcast, which is now the default. - var positionBroadcastSmartEnabled: Bool = false + public var positionBroadcastSmartEnabled: Bool = false /// /// If set, this node is at a fixed position. /// We will generate GPS position updates at the regular interval, but use whatever the last lat/lon/alt we have for the node. /// The lat/lon/alt can be set by an internal GPS or with the help of the app. - var fixedPosition: Bool = false + public var fixedPosition: Bool = false /// /// Is GPS enabled for this node? - var gpsEnabled: Bool = false + public var gpsEnabled: Bool = false /// /// How often should we try to get GPS position (in seconds) /// or zero for the default of once every 30 seconds /// or a very large value (maxint) to update only once at boot. - var gpsUpdateInterval: UInt32 = 0 + public var gpsUpdateInterval: UInt32 = 0 /// /// Deprecated in favor of using smart / regular broadcast intervals as implicit attempt time - var gpsAttemptTime: UInt32 = 0 + public var gpsAttemptTime: UInt32 = 0 /// /// Bit field of boolean configuration options for POSITION messages /// (bitwise OR of PositionFlags) - var positionFlags: UInt32 = 0 + public var positionFlags: UInt32 = 0 /// /// (Re)define GPS_RX_PIN for your board. - var rxGpio: UInt32 = 0 + public var rxGpio: UInt32 = 0 /// /// (Re)define GPS_TX_PIN for your board. - var txGpio: UInt32 = 0 + public var txGpio: UInt32 = 0 /// /// The minimum distance in meters traveled (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled - var broadcastSmartMinimumDistance: UInt32 = 0 + public var broadcastSmartMinimumDistance: UInt32 = 0 /// /// The minimum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled - var broadcastSmartMinimumIntervalSecs: UInt32 = 0 + public var broadcastSmartMinimumIntervalSecs: UInt32 = 0 /// /// (Re)define PIN_GPS_EN for your board. - var gpsEnGpio: UInt32 = 0 + public var gpsEnGpio: UInt32 = 0 /// /// Set where GPS is enabled, disabled, or not present - var gpsMode: Config.PositionConfig.GpsMode = .disabled + public var gpsMode: Config.PositionConfig.GpsMode = .disabled - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// Bit field of boolean configuration options, indicating which optional @@ -444,8 +444,8 @@ struct Config { /// are always included (also time if GPS-synced) /// NOTE: the more fields are included, the larger the message will be - /// leading to longer airtime and a higher risk of packet loss - enum PositionFlags: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum PositionFlags: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Required for compilation @@ -496,11 +496,11 @@ struct Config { case speed // = 512 case UNRECOGNIZED(Int) - init() { + public init() { self = .unset } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unset case 1: self = .altitude @@ -517,7 +517,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unset: return 0 case .altitude: return 1 @@ -536,8 +536,8 @@ struct Config { } - enum GpsMode: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum GpsMode: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// GPS is present but disabled @@ -552,11 +552,11 @@ struct Config { case notPresent // = 2 case UNRECOGNIZED(Int) - init() { + public init() { self = .disabled } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .disabled case 1: self = .enabled @@ -565,7 +565,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .disabled: return 0 case .enabled: return 1 @@ -576,13 +576,13 @@ struct Config { } - init() {} + public init() {} } /// /// Power Config\ /// See [Power Config](/docs/settings/config/power) for additional power config details. - struct PowerConfig { + public struct PowerConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -591,106 +591,101 @@ struct Config { /// Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. /// Don't use this setting if you want to use your device with the phone apps or are using a device without a user button. /// Technical Details: Works for ESP32 devices and NRF52 devices in the Sensor or Tracker roles - var isPowerSaving: Bool = false + public var isPowerSaving: Bool = false /// /// Description: If non-zero, the device will fully power off this many seconds after external power is removed. - var onBatteryShutdownAfterSecs: UInt32 = 0 + public var onBatteryShutdownAfterSecs: UInt32 = 0 /// /// Ratio of voltage divider for battery pin eg. 3.20 (R1=100k, R2=220k) /// Overrides the ADC_MULTIPLIER defined in variant for battery voltage calculation. /// https://meshtastic.org/docs/configuration/radio/power/#adc-multiplier-override /// Should be set to floating point value between 2 and 6 - var adcMultiplierOverride: Float = 0 + public var adcMultiplierOverride: Float = 0 /// /// Description: The number of seconds for to wait before turning off BLE in No Bluetooth states /// Technical Details: ESP32 Only 0 for default of 1 minute - var waitBluetoothSecs: UInt32 = 0 + public var waitBluetoothSecs: UInt32 = 0 /// /// Super Deep Sleep Seconds /// While in Light Sleep if mesh_sds_timeout_secs is exceeded we will lower into super deep sleep /// for this value (default 1 year) or a button press /// 0 for default of one year - var sdsSecs: UInt32 = 0 + public var sdsSecs: UInt32 = 0 /// /// Description: In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on /// Technical Details: ESP32 Only 0 for default of 300 - var lsSecs: UInt32 = 0 + public var lsSecs: UInt32 = 0 /// /// Description: While in light sleep when we receive packets on the LoRa radio we will wake and handle them and stay awake in no BLE mode for this value /// Technical Details: ESP32 Only 0 for default of 10 seconds - var minWakeSecs: UInt32 = 0 + public var minWakeSecs: UInt32 = 0 /// /// I2C address of INA_2XX to use for reading device battery voltage - var deviceBatteryInaAddress: UInt32 = 0 + public var deviceBatteryInaAddress: UInt32 = 0 - /// - /// If non-zero, we want powermon log outputs. With the particular (bitfield) sources enabled. - /// Note: we picked an ID of 32 so that lower more efficient IDs can be used for more frequently used options. - var powermonEnables: UInt64 = 0 + public var unknownFields = SwiftProtobuf.UnknownStorage() - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} + public init() {} } /// /// Network Config - struct NetworkConfig { + public struct NetworkConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Enable WiFi (disables Bluetooth) - var wifiEnabled: Bool = false + public var wifiEnabled: Bool = false /// /// If set, this node will try to join the specified wifi network and /// acquire an address via DHCP - var wifiSsid: String = String() + public var wifiSsid: String = String() /// /// If set, will be use to authenticate to the named wifi - var wifiPsk: String = String() + public var wifiPsk: String = String() /// /// NTP server to use if WiFi is conneced, defaults to `0.pool.ntp.org` - var ntpServer: String = String() + public var ntpServer: String = String() /// /// Enable Ethernet - var ethEnabled: Bool = false + public var ethEnabled: Bool = false /// /// acquire an address via DHCP or assign static - var addressMode: Config.NetworkConfig.AddressMode = .dhcp + public var addressMode: Config.NetworkConfig.AddressMode = .dhcp /// /// struct to keep static address - var ipv4Config: Config.NetworkConfig.IpV4Config { + public var ipv4Config: Config.NetworkConfig.IpV4Config { get {return _ipv4Config ?? Config.NetworkConfig.IpV4Config()} set {_ipv4Config = newValue} } /// Returns true if `ipv4Config` has been explicitly set. - var hasIpv4Config: Bool {return self._ipv4Config != nil} + public var hasIpv4Config: Bool {return self._ipv4Config != nil} /// Clears the value of `ipv4Config`. Subsequent reads from it will return its default value. - mutating func clearIpv4Config() {self._ipv4Config = nil} + public mutating func clearIpv4Config() {self._ipv4Config = nil} /// /// rsyslog Server and Port - var rsyslogServer: String = String() + public var rsyslogServer: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum AddressMode: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum AddressMode: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// obtain ip address via DHCP @@ -701,11 +696,11 @@ struct Config { case `static` // = 1 case UNRECOGNIZED(Int) - init() { + public init() { self = .dhcp } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .dhcp case 1: self = .static @@ -713,7 +708,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .dhcp: return 0 case .static: return 1 @@ -723,40 +718,40 @@ struct Config { } - struct IpV4Config { + public struct IpV4Config { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Static IP address - var ip: UInt32 = 0 + public var ip: UInt32 = 0 /// /// Static gateway address - var gateway: UInt32 = 0 + public var gateway: UInt32 = 0 /// /// Static subnet mask - var subnet: UInt32 = 0 + public var subnet: UInt32 = 0 /// /// Static DNS server address - var dns: UInt32 = 0 + public var dns: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } - init() {} + public init() {} fileprivate var _ipv4Config: Config.NetworkConfig.IpV4Config? = nil } /// /// Display Config - struct DisplayConfig { + public struct DisplayConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -764,56 +759,56 @@ struct Config { /// /// Number of seconds the screen stays on after pressing the user button or receiving a message /// 0 for default of one minute MAXUINT for always on - var screenOnSecs: UInt32 = 0 + public var screenOnSecs: UInt32 = 0 /// /// How the GPS coordinates are formatted on the OLED screen. - var gpsFormat: Config.DisplayConfig.GpsCoordinateFormat = .dec + public var gpsFormat: Config.DisplayConfig.GpsCoordinateFormat = .dec /// /// Automatically toggles to the next page on the screen like a carousel, based the specified interval in seconds. /// Potentially useful for devices without user buttons. - var autoScreenCarouselSecs: UInt32 = 0 + public var autoScreenCarouselSecs: UInt32 = 0 /// /// If this is set, the displayed compass will always point north. if unset, the old behaviour /// (top of display is heading direction) is used. - var compassNorthTop: Bool = false + public var compassNorthTop: Bool = false /// /// Flip screen vertically, for cases that mount the screen upside down - var flipScreen: Bool = false + public var flipScreen: Bool = false /// /// Perferred display units - var units: Config.DisplayConfig.DisplayUnits = .metric + public var units: Config.DisplayConfig.DisplayUnits = .metric /// /// Override auto-detect in screen - var oled: Config.DisplayConfig.OledType = .oledAuto + public var oled: Config.DisplayConfig.OledType = .oledAuto /// /// Display Mode - var displaymode: Config.DisplayConfig.DisplayMode = .default + public var displaymode: Config.DisplayConfig.DisplayMode = .default /// /// Print first line in pseudo-bold? FALSE is original style, TRUE is bold - var headingBold: Bool = false + public var headingBold: Bool = false /// /// Should we wake the screen up on accelerometer detected motion or tap - var wakeOnTapOrMotion: Bool = false + public var wakeOnTapOrMotion: Bool = false /// /// Indicates how to rotate or invert the compass output to accurate display on the display. - var compassOrientation: Config.DisplayConfig.CompassOrientation = .degrees0 + public var compassOrientation: Config.DisplayConfig.CompassOrientation = .degrees0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// How the GPS coordinates are displayed on the OLED screen. - enum GpsCoordinateFormat: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum GpsCoordinateFormat: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// GPS coordinates are displayed in the normal decimal degrees format: @@ -847,11 +842,11 @@ struct Config { case osgr // = 5 case UNRECOGNIZED(Int) - init() { + public init() { self = .dec } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .dec case 1: self = .dms @@ -863,7 +858,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .dec: return 0 case .dms: return 1 @@ -879,8 +874,8 @@ struct Config { /// /// Unit display preference - enum DisplayUnits: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum DisplayUnits: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Metric (Default) @@ -891,11 +886,11 @@ struct Config { case imperial // = 1 case UNRECOGNIZED(Int) - init() { + public init() { self = .metric } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .metric case 1: self = .imperial @@ -903,7 +898,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .metric: return 0 case .imperial: return 1 @@ -915,8 +910,8 @@ struct Config { /// /// Override OLED outo detect with this if it fails. - enum OledType: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum OledType: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Default / Auto @@ -935,11 +930,11 @@ struct Config { case oledSh1107 // = 3 case UNRECOGNIZED(Int) - init() { + public init() { self = .oledAuto } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .oledAuto case 1: self = .oledSsd1306 @@ -949,7 +944,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .oledAuto: return 0 case .oledSsd1306: return 1 @@ -961,8 +956,8 @@ struct Config { } - enum DisplayMode: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum DisplayMode: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Default. The old style for the 128x64 OLED screen @@ -981,11 +976,11 @@ struct Config { case color // = 3 case UNRECOGNIZED(Int) - init() { + public init() { self = .default } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .default case 1: self = .twocolor @@ -995,7 +990,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .default: return 0 case .twocolor: return 1 @@ -1007,8 +1002,8 @@ struct Config { } - enum CompassOrientation: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum CompassOrientation: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// The compass and the display are in the same orientation. @@ -1043,11 +1038,11 @@ struct Config { case degrees270Inverted // = 7 case UNRECOGNIZED(Int) - init() { + public init() { self = .degrees0 } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .degrees0 case 1: self = .degrees90 @@ -1061,7 +1056,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .degrees0: return 0 case .degrees90: return 1 @@ -1077,12 +1072,12 @@ struct Config { } - init() {} + public init() {} } /// /// Lora Config - struct LoRaConfig { + public struct LoRaConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1090,7 +1085,7 @@ struct Config { /// /// When enabled, the `modem_preset` fields will be adhered to, else the `bandwidth`/`spread_factor`/`coding_rate` /// will be taked from their respective manually defined fields - var usePreset: Bool = false + public var usePreset: Bool = false /// /// Either modem_config or bandwidth/spreading/coding will be specified - NOT BOTH. @@ -1098,51 +1093,51 @@ struct Config { /// Because protobufs take ZERO space when the value is zero this works out nicely. /// This value is replaced by bandwidth/spread_factor/coding_rate. /// If you'd like to experiment with other options add them to MeshRadio.cpp in the device code. - var modemPreset: Config.LoRaConfig.ModemPreset = .longFast + public var modemPreset: Config.LoRaConfig.ModemPreset = .longFast /// /// Bandwidth in MHz /// Certain bandwidth numbers are 'special' and will be converted to the /// appropriate floating point value: 31 -> 31.25MHz - var bandwidth: UInt32 = 0 + public var bandwidth: UInt32 = 0 /// /// A number from 7 to 12. /// Indicates number of chirps per symbol as 1< 7 results in the default - var hopLimit: UInt32 = 0 + public var hopLimit: UInt32 = 0 /// /// Disable TX from the LoRa radio. Useful for hot-swapping antennas and other tests. /// Defaults to false - var txEnabled: Bool = false + public var txEnabled: Bool = false /// /// If zero, then use default max legal continuous power (ie. something that won't /// burn out the radio hardware) /// In most cases you should use zero here. /// Units are in dBm. - var txPower: Int32 = 0 + public var txPower: Int32 = 0 /// /// This controls the actual hardware frequency the radio transmits on. @@ -1152,17 +1147,17 @@ struct Config { /// algorithm to derive the channel number") /// If using the hash algorithm the channel number will be: hash(channel_name) % /// NUM_CHANNELS (Where num channels depends on the regulatory region). - var channelNum: UInt32 = 0 + public var channelNum: UInt32 = 0 /// /// If true, duty cycle limits will be exceeded and thus you're possibly not following /// the local regulations if you're not a HAM. /// Has no effect if the duty cycle of the used region is 100%. - var overrideDutyCycle: Bool = false + public var overrideDutyCycle: Bool = false /// /// If true, sets RX boosted gain mode on SX126X based radios - var sx126XRxBoostedGain: Bool = false + public var sx126XRxBoostedGain: Bool = false /// /// This parameter is for advanced users and licensed HAM radio operators. @@ -1170,22 +1165,22 @@ struct Config { /// will still be applied. This will allow you to use out-of-band frequencies. /// Please respect your local laws and regulations. If you are a HAM, make sure you /// enable HAM mode and turn off encryption. - var overrideFrequency: Float = 0 + public var overrideFrequency: Float = 0 /// /// For testing it is useful sometimes to force a node to never listen to /// 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) - var ignoreIncoming: [UInt32] = [] + public var ignoreIncoming: [UInt32] = [] /// /// If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it. - var ignoreMqtt: Bool = false + public var ignoreMqtt: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum RegionCode: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum RegionCode: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Region is not set @@ -1264,11 +1259,11 @@ struct Config { case sg923 // = 18 case UNRECOGNIZED(Int) - init() { + public init() { self = .unset } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unset case 1: self = .us @@ -1293,7 +1288,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unset: return 0 case .us: return 1 @@ -1323,8 +1318,8 @@ struct Config { /// /// Standard predefined channel settings /// Note: these mappings must match ModemPreset Choice in the device code. - enum ModemPreset: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum ModemPreset: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Long Range - Fast @@ -1359,11 +1354,11 @@ struct Config { case longModerate // = 7 case UNRECOGNIZED(Int) - init() { + public init() { self = .longFast } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .longFast case 1: self = .longSlow @@ -1377,7 +1372,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .longFast: return 0 case .longSlow: return 1 @@ -1393,34 +1388,34 @@ struct Config { } - init() {} + public init() {} } - struct BluetoothConfig { + public struct BluetoothConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Enable Bluetooth on the device - var enabled: Bool = false + public var enabled: Bool = false /// /// Determines the pairing strategy for the device - var mode: Config.BluetoothConfig.PairingMode = .randomPin + public var mode: Config.BluetoothConfig.PairingMode = .randomPin /// /// Specified PIN for PairingMode.FixedPin - var fixedPin: UInt32 = 0 + public var fixedPin: UInt32 = 0 /// /// Enables device (serial style logs) over Bluetooth - var deviceLoggingEnabled: Bool = false + public var deviceLoggingEnabled: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum PairingMode: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum PairingMode: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Device generates a random PIN that will be shown on the screen of the device for pairing @@ -1435,11 +1430,11 @@ struct Config { case noPin // = 2 case UNRECOGNIZED(Int) - init() { + public init() { self = .randomPin } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .randomPin case 1: self = .fixedPin @@ -1448,7 +1443,7 @@ struct Config { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .randomPin: return 0 case .fixedPin: return 1 @@ -1459,17 +1454,17 @@ struct Config { } - init() {} + public init() {} } - init() {} + public init() {} } #if swift(>=4.2) extension Config.DeviceConfig.Role: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.DeviceConfig.Role] = [ + public static let allCases: [Config.DeviceConfig.Role] = [ .client, .clientMute, .router, @@ -1486,7 +1481,7 @@ extension Config.DeviceConfig.Role: CaseIterable { extension Config.DeviceConfig.RebroadcastMode: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.DeviceConfig.RebroadcastMode] = [ + public static let allCases: [Config.DeviceConfig.RebroadcastMode] = [ .all, .allSkipDecoding, .localOnly, @@ -1496,7 +1491,7 @@ extension Config.DeviceConfig.RebroadcastMode: CaseIterable { extension Config.PositionConfig.PositionFlags: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.PositionConfig.PositionFlags] = [ + public static let allCases: [Config.PositionConfig.PositionFlags] = [ .unset, .altitude, .altitudeMsl, @@ -1513,7 +1508,7 @@ extension Config.PositionConfig.PositionFlags: CaseIterable { extension Config.PositionConfig.GpsMode: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.PositionConfig.GpsMode] = [ + public static let allCases: [Config.PositionConfig.GpsMode] = [ .disabled, .enabled, .notPresent, @@ -1522,7 +1517,7 @@ extension Config.PositionConfig.GpsMode: CaseIterable { extension Config.NetworkConfig.AddressMode: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.NetworkConfig.AddressMode] = [ + public static let allCases: [Config.NetworkConfig.AddressMode] = [ .dhcp, .static, ] @@ -1530,7 +1525,7 @@ extension Config.NetworkConfig.AddressMode: CaseIterable { extension Config.DisplayConfig.GpsCoordinateFormat: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.DisplayConfig.GpsCoordinateFormat] = [ + public static let allCases: [Config.DisplayConfig.GpsCoordinateFormat] = [ .dec, .dms, .utm, @@ -1542,7 +1537,7 @@ extension Config.DisplayConfig.GpsCoordinateFormat: CaseIterable { extension Config.DisplayConfig.DisplayUnits: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.DisplayConfig.DisplayUnits] = [ + public static let allCases: [Config.DisplayConfig.DisplayUnits] = [ .metric, .imperial, ] @@ -1550,7 +1545,7 @@ extension Config.DisplayConfig.DisplayUnits: CaseIterable { extension Config.DisplayConfig.OledType: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.DisplayConfig.OledType] = [ + public static let allCases: [Config.DisplayConfig.OledType] = [ .oledAuto, .oledSsd1306, .oledSh1106, @@ -1560,7 +1555,7 @@ extension Config.DisplayConfig.OledType: CaseIterable { extension Config.DisplayConfig.DisplayMode: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.DisplayConfig.DisplayMode] = [ + public static let allCases: [Config.DisplayConfig.DisplayMode] = [ .default, .twocolor, .inverted, @@ -1570,7 +1565,7 @@ extension Config.DisplayConfig.DisplayMode: CaseIterable { extension Config.DisplayConfig.CompassOrientation: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.DisplayConfig.CompassOrientation] = [ + public static let allCases: [Config.DisplayConfig.CompassOrientation] = [ .degrees0, .degrees90, .degrees180, @@ -1584,7 +1579,7 @@ extension Config.DisplayConfig.CompassOrientation: CaseIterable { extension Config.LoRaConfig.RegionCode: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.LoRaConfig.RegionCode] = [ + public static let allCases: [Config.LoRaConfig.RegionCode] = [ .unset, .us, .eu433, @@ -1609,7 +1604,7 @@ extension Config.LoRaConfig.RegionCode: CaseIterable { extension Config.LoRaConfig.ModemPreset: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.LoRaConfig.ModemPreset] = [ + public static let allCases: [Config.LoRaConfig.ModemPreset] = [ .longFast, .longSlow, .veryLongSlow, @@ -1623,7 +1618,7 @@ extension Config.LoRaConfig.ModemPreset: CaseIterable { extension Config.BluetoothConfig.PairingMode: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Config.BluetoothConfig.PairingMode] = [ + public static let allCases: [Config.BluetoothConfig.PairingMode] = [ .randomPin, .fixedPin, .noPin, @@ -1663,8 +1658,8 @@ extension Config.BluetoothConfig.PairingMode: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Config" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Config" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "device"), 2: .same(proto: "position"), 3: .same(proto: "power"), @@ -1674,7 +1669,7 @@ extension Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas 7: .same(proto: "bluetooth"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1776,7 +1771,7 @@ extension Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -1815,7 +1810,7 @@ extension Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Config, rhs: Config) -> Bool { + public static func ==(lhs: Config, rhs: Config) -> Bool { if lhs.payloadVariant != rhs.payloadVariant {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1823,8 +1818,8 @@ extension Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas } extension Config.DeviceConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Config.protoMessageName + ".DeviceConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Config.protoMessageName + ".DeviceConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "role"), 2: .standard(proto: "serial_enabled"), 3: .standard(proto: "debug_log_enabled"), @@ -1839,7 +1834,7 @@ extension Config.DeviceConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl 12: .standard(proto: "led_heartbeat_disabled"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1862,7 +1857,7 @@ extension Config.DeviceConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.role != .client { try visitor.visitSingularEnumField(value: self.role, fieldNumber: 1) } @@ -1902,7 +1897,7 @@ extension Config.DeviceConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Config.DeviceConfig, rhs: Config.DeviceConfig) -> Bool { + public static func ==(lhs: Config.DeviceConfig, rhs: Config.DeviceConfig) -> Bool { if lhs.role != rhs.role {return false} if lhs.serialEnabled != rhs.serialEnabled {return false} if lhs.debugLogEnabled != rhs.debugLogEnabled {return false} @@ -1921,7 +1916,7 @@ extension Config.DeviceConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl } extension Config.DeviceConfig.Role: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "CLIENT"), 1: .same(proto: "CLIENT_MUTE"), 2: .same(proto: "ROUTER"), @@ -1937,7 +1932,7 @@ extension Config.DeviceConfig.Role: SwiftProtobuf._ProtoNameProviding { } extension Config.DeviceConfig.RebroadcastMode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALL"), 1: .same(proto: "ALL_SKIP_DECODING"), 2: .same(proto: "LOCAL_ONLY"), @@ -1946,8 +1941,8 @@ extension Config.DeviceConfig.RebroadcastMode: SwiftProtobuf._ProtoNameProviding } extension Config.PositionConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Config.protoMessageName + ".PositionConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Config.protoMessageName + ".PositionConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "position_broadcast_secs"), 2: .standard(proto: "position_broadcast_smart_enabled"), 3: .standard(proto: "fixed_position"), @@ -1963,7 +1958,7 @@ extension Config.PositionConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageIm 13: .standard(proto: "gps_mode"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1987,7 +1982,7 @@ extension Config.PositionConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.positionBroadcastSecs != 0 { try visitor.visitSingularUInt32Field(value: self.positionBroadcastSecs, fieldNumber: 1) } @@ -2030,7 +2025,7 @@ extension Config.PositionConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageIm try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Config.PositionConfig, rhs: Config.PositionConfig) -> Bool { + public static func ==(lhs: Config.PositionConfig, rhs: Config.PositionConfig) -> Bool { if lhs.positionBroadcastSecs != rhs.positionBroadcastSecs {return false} if lhs.positionBroadcastSmartEnabled != rhs.positionBroadcastSmartEnabled {return false} if lhs.fixedPosition != rhs.fixedPosition {return false} @@ -2050,7 +2045,7 @@ extension Config.PositionConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } extension Config.PositionConfig.PositionFlags: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "UNSET"), 1: .same(proto: "ALTITUDE"), 2: .same(proto: "ALTITUDE_MSL"), @@ -2066,7 +2061,7 @@ extension Config.PositionConfig.PositionFlags: SwiftProtobuf._ProtoNameProviding } extension Config.PositionConfig.GpsMode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "DISABLED"), 1: .same(proto: "ENABLED"), 2: .same(proto: "NOT_PRESENT"), @@ -2074,8 +2069,8 @@ extension Config.PositionConfig.GpsMode: SwiftProtobuf._ProtoNameProviding { } extension Config.PowerConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Config.protoMessageName + ".PowerConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Config.protoMessageName + ".PowerConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "is_power_saving"), 2: .standard(proto: "on_battery_shutdown_after_secs"), 3: .standard(proto: "adc_multiplier_override"), @@ -2087,7 +2082,7 @@ extension Config.PowerConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImple 32: .standard(proto: "powermon_enables"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2107,7 +2102,7 @@ extension Config.PowerConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.isPowerSaving != false { try visitor.visitSingularBoolField(value: self.isPowerSaving, fieldNumber: 1) } @@ -2138,7 +2133,7 @@ extension Config.PowerConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImple try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Config.PowerConfig, rhs: Config.PowerConfig) -> Bool { + public static func ==(lhs: Config.PowerConfig, rhs: Config.PowerConfig) -> Bool { if lhs.isPowerSaving != rhs.isPowerSaving {return false} if lhs.onBatteryShutdownAfterSecs != rhs.onBatteryShutdownAfterSecs {return false} if lhs.adcMultiplierOverride != rhs.adcMultiplierOverride {return false} @@ -2154,8 +2149,8 @@ extension Config.PowerConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } extension Config.NetworkConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Config.protoMessageName + ".NetworkConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Config.protoMessageName + ".NetworkConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "wifi_enabled"), 3: .standard(proto: "wifi_ssid"), 4: .standard(proto: "wifi_psk"), @@ -2166,7 +2161,7 @@ extension Config.NetworkConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp 9: .standard(proto: "rsyslog_server"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2185,7 +2180,7 @@ extension Config.NetworkConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -2217,7 +2212,7 @@ extension Config.NetworkConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Config.NetworkConfig, rhs: Config.NetworkConfig) -> Bool { + public static func ==(lhs: Config.NetworkConfig, rhs: Config.NetworkConfig) -> Bool { if lhs.wifiEnabled != rhs.wifiEnabled {return false} if lhs.wifiSsid != rhs.wifiSsid {return false} if lhs.wifiPsk != rhs.wifiPsk {return false} @@ -2232,22 +2227,22 @@ extension Config.NetworkConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } extension Config.NetworkConfig.AddressMode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "DHCP"), 1: .same(proto: "STATIC"), ] } extension Config.NetworkConfig.IpV4Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Config.NetworkConfig.protoMessageName + ".IpV4Config" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Config.NetworkConfig.protoMessageName + ".IpV4Config" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "ip"), 2: .same(proto: "gateway"), 3: .same(proto: "subnet"), 4: .same(proto: "dns"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2262,7 +2257,7 @@ extension Config.NetworkConfig.IpV4Config: SwiftProtobuf.Message, SwiftProtobuf. } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.ip != 0 { try visitor.visitSingularFixed32Field(value: self.ip, fieldNumber: 1) } @@ -2278,7 +2273,7 @@ extension Config.NetworkConfig.IpV4Config: SwiftProtobuf.Message, SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Config.NetworkConfig.IpV4Config, rhs: Config.NetworkConfig.IpV4Config) -> Bool { + public static func ==(lhs: Config.NetworkConfig.IpV4Config, rhs: Config.NetworkConfig.IpV4Config) -> Bool { if lhs.ip != rhs.ip {return false} if lhs.gateway != rhs.gateway {return false} if lhs.subnet != rhs.subnet {return false} @@ -2289,8 +2284,8 @@ extension Config.NetworkConfig.IpV4Config: SwiftProtobuf.Message, SwiftProtobuf. } extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Config.protoMessageName + ".DisplayConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Config.protoMessageName + ".DisplayConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "screen_on_secs"), 2: .standard(proto: "gps_format"), 3: .standard(proto: "auto_screen_carousel_secs"), @@ -2304,7 +2299,7 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp 11: .standard(proto: "compass_orientation"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2326,7 +2321,7 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.screenOnSecs != 0 { try visitor.visitSingularUInt32Field(value: self.screenOnSecs, fieldNumber: 1) } @@ -2363,7 +2358,7 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Config.DisplayConfig, rhs: Config.DisplayConfig) -> Bool { + public static func ==(lhs: Config.DisplayConfig, rhs: Config.DisplayConfig) -> Bool { if lhs.screenOnSecs != rhs.screenOnSecs {return false} if lhs.gpsFormat != rhs.gpsFormat {return false} if lhs.autoScreenCarouselSecs != rhs.autoScreenCarouselSecs {return false} @@ -2381,7 +2376,7 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } extension Config.DisplayConfig.GpsCoordinateFormat: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "DEC"), 1: .same(proto: "DMS"), 2: .same(proto: "UTM"), @@ -2392,14 +2387,14 @@ extension Config.DisplayConfig.GpsCoordinateFormat: SwiftProtobuf._ProtoNameProv } extension Config.DisplayConfig.DisplayUnits: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "METRIC"), 1: .same(proto: "IMPERIAL"), ] } extension Config.DisplayConfig.OledType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "OLED_AUTO"), 1: .same(proto: "OLED_SSD1306"), 2: .same(proto: "OLED_SH1106"), @@ -2408,7 +2403,7 @@ extension Config.DisplayConfig.OledType: SwiftProtobuf._ProtoNameProviding { } extension Config.DisplayConfig.DisplayMode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "DEFAULT"), 1: .same(proto: "TWOCOLOR"), 2: .same(proto: "INVERTED"), @@ -2417,7 +2412,7 @@ extension Config.DisplayConfig.DisplayMode: SwiftProtobuf._ProtoNameProviding { } extension Config.DisplayConfig.CompassOrientation: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "DEGREES_0"), 1: .same(proto: "DEGREES_90"), 2: .same(proto: "DEGREES_180"), @@ -2430,8 +2425,8 @@ extension Config.DisplayConfig.CompassOrientation: SwiftProtobuf._ProtoNameProvi } extension Config.LoRaConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Config.protoMessageName + ".LoRaConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Config.protoMessageName + ".LoRaConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "use_preset"), 2: .standard(proto: "modem_preset"), 3: .same(proto: "bandwidth"), @@ -2450,7 +2445,7 @@ extension Config.LoRaConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem 104: .standard(proto: "ignore_mqtt"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2477,7 +2472,7 @@ extension Config.LoRaConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.usePreset != false { try visitor.visitSingularBoolField(value: self.usePreset, fieldNumber: 1) } @@ -2529,7 +2524,7 @@ extension Config.LoRaConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Config.LoRaConfig, rhs: Config.LoRaConfig) -> Bool { + public static func ==(lhs: Config.LoRaConfig, rhs: Config.LoRaConfig) -> Bool { if lhs.usePreset != rhs.usePreset {return false} if lhs.modemPreset != rhs.modemPreset {return false} if lhs.bandwidth != rhs.bandwidth {return false} @@ -2552,7 +2547,7 @@ extension Config.LoRaConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } extension Config.LoRaConfig.RegionCode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "UNSET"), 1: .same(proto: "US"), 2: .same(proto: "EU_433"), @@ -2576,7 +2571,7 @@ extension Config.LoRaConfig.RegionCode: SwiftProtobuf._ProtoNameProviding { } extension Config.LoRaConfig.ModemPreset: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "LONG_FAST"), 1: .same(proto: "LONG_SLOW"), 2: .same(proto: "VERY_LONG_SLOW"), @@ -2589,15 +2584,15 @@ extension Config.LoRaConfig.ModemPreset: SwiftProtobuf._ProtoNameProviding { } extension Config.BluetoothConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Config.protoMessageName + ".BluetoothConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Config.protoMessageName + ".BluetoothConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .same(proto: "mode"), 3: .standard(proto: "fixed_pin"), 4: .standard(proto: "device_logging_enabled"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2612,7 +2607,7 @@ extension Config.BluetoothConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageI } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.enabled != false { try visitor.visitSingularBoolField(value: self.enabled, fieldNumber: 1) } @@ -2628,7 +2623,7 @@ extension Config.BluetoothConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageI try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Config.BluetoothConfig, rhs: Config.BluetoothConfig) -> Bool { + public static func ==(lhs: Config.BluetoothConfig, rhs: Config.BluetoothConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.mode != rhs.mode {return false} if lhs.fixedPin != rhs.fixedPin {return false} @@ -2639,7 +2634,7 @@ extension Config.BluetoothConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageI } extension Config.BluetoothConfig.PairingMode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "RANDOM_PIN"), 1: .same(proto: "FIXED_PIN"), 2: .same(proto: "NO_PIN"), diff --git a/Meshtastic/Protobufs/meshtastic/connection_status.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/connection_status.pb.swift similarity index 76% rename from Meshtastic/Protobufs/meshtastic/connection_status.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/connection_status.pb.swift index 7092c3b3..a2ec180e 100644 --- a/Meshtastic/Protobufs/meshtastic/connection_status.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/connection_status.pb.swift @@ -20,58 +20,58 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _2 } -struct DeviceConnectionStatus { +public struct DeviceConnectionStatus { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// WiFi Status - var wifi: WifiConnectionStatus { + public var wifi: WifiConnectionStatus { get {return _wifi ?? WifiConnectionStatus()} set {_wifi = newValue} } /// Returns true if `wifi` has been explicitly set. - var hasWifi: Bool {return self._wifi != nil} + public var hasWifi: Bool {return self._wifi != nil} /// Clears the value of `wifi`. Subsequent reads from it will return its default value. - mutating func clearWifi() {self._wifi = nil} + public mutating func clearWifi() {self._wifi = nil} /// /// WiFi Status - var ethernet: EthernetConnectionStatus { + public var ethernet: EthernetConnectionStatus { get {return _ethernet ?? EthernetConnectionStatus()} set {_ethernet = newValue} } /// Returns true if `ethernet` has been explicitly set. - var hasEthernet: Bool {return self._ethernet != nil} + public var hasEthernet: Bool {return self._ethernet != nil} /// Clears the value of `ethernet`. Subsequent reads from it will return its default value. - mutating func clearEthernet() {self._ethernet = nil} + public mutating func clearEthernet() {self._ethernet = nil} /// /// Bluetooth Status - var bluetooth: BluetoothConnectionStatus { + public var bluetooth: BluetoothConnectionStatus { get {return _bluetooth ?? BluetoothConnectionStatus()} set {_bluetooth = newValue} } /// Returns true if `bluetooth` has been explicitly set. - var hasBluetooth: Bool {return self._bluetooth != nil} + public var hasBluetooth: Bool {return self._bluetooth != nil} /// Clears the value of `bluetooth`. Subsequent reads from it will return its default value. - mutating func clearBluetooth() {self._bluetooth = nil} + public mutating func clearBluetooth() {self._bluetooth = nil} /// /// Serial Status - var serial: SerialConnectionStatus { + public var serial: SerialConnectionStatus { get {return _serial ?? SerialConnectionStatus()} set {_serial = newValue} } /// Returns true if `serial` has been explicitly set. - var hasSerial: Bool {return self._serial != nil} + public var hasSerial: Bool {return self._serial != nil} /// Clears the value of `serial`. Subsequent reads from it will return its default value. - mutating func clearSerial() {self._serial = nil} + public mutating func clearSerial() {self._serial = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _wifi: WifiConnectionStatus? = nil fileprivate var _ethernet: EthernetConnectionStatus? = nil @@ -81,132 +81,132 @@ struct DeviceConnectionStatus { /// /// WiFi connection status -struct WifiConnectionStatus { +public struct WifiConnectionStatus { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Connection status - var status: NetworkConnectionStatus { + public var status: NetworkConnectionStatus { get {return _status ?? NetworkConnectionStatus()} set {_status = newValue} } /// Returns true if `status` has been explicitly set. - var hasStatus: Bool {return self._status != nil} + public var hasStatus: Bool {return self._status != nil} /// Clears the value of `status`. Subsequent reads from it will return its default value. - mutating func clearStatus() {self._status = nil} + public mutating func clearStatus() {self._status = nil} /// /// WiFi access point SSID - var ssid: String = String() + public var ssid: String = String() /// /// RSSI of wireless connection - var rssi: Int32 = 0 + public var rssi: Int32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _status: NetworkConnectionStatus? = nil } /// /// Ethernet connection status -struct EthernetConnectionStatus { +public struct EthernetConnectionStatus { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Connection status - var status: NetworkConnectionStatus { + public var status: NetworkConnectionStatus { get {return _status ?? NetworkConnectionStatus()} set {_status = newValue} } /// Returns true if `status` has been explicitly set. - var hasStatus: Bool {return self._status != nil} + public var hasStatus: Bool {return self._status != nil} /// Clears the value of `status`. Subsequent reads from it will return its default value. - mutating func clearStatus() {self._status = nil} + public mutating func clearStatus() {self._status = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _status: NetworkConnectionStatus? = nil } /// /// Ethernet or WiFi connection status -struct NetworkConnectionStatus { +public struct NetworkConnectionStatus { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// IP address of device - var ipAddress: UInt32 = 0 + public var ipAddress: UInt32 = 0 /// /// Whether the device has an active connection or not - var isConnected: Bool = false + public var isConnected: Bool = false /// /// Whether the device has an active connection to an MQTT broker or not - var isMqttConnected: Bool = false + public var isMqttConnected: Bool = false /// /// Whether the device is actively remote syslogging or not - var isSyslogConnected: Bool = false + public var isSyslogConnected: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Bluetooth connection status -struct BluetoothConnectionStatus { +public struct BluetoothConnectionStatus { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The pairing PIN for bluetooth - var pin: UInt32 = 0 + public var pin: UInt32 = 0 /// /// RSSI of bluetooth connection - var rssi: Int32 = 0 + public var rssi: Int32 = 0 /// /// Whether the device has an active connection or not - var isConnected: Bool = false + public var isConnected: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Serial connection status -struct SerialConnectionStatus { +public struct SerialConnectionStatus { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Serial baud rate - var baud: UInt32 = 0 + public var baud: UInt32 = 0 /// /// Whether the device has an active connection or not - var isConnected: Bool = false + public var isConnected: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } #if swift(>=5.5) && canImport(_Concurrency) @@ -223,15 +223,15 @@ extension SerialConnectionStatus: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension DeviceConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".DeviceConnectionStatus" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".DeviceConnectionStatus" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "wifi"), 2: .same(proto: "ethernet"), 3: .same(proto: "bluetooth"), 4: .same(proto: "serial"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -246,7 +246,7 @@ extension DeviceConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageI } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -266,7 +266,7 @@ extension DeviceConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageI try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: DeviceConnectionStatus, rhs: DeviceConnectionStatus) -> Bool { + public static func ==(lhs: DeviceConnectionStatus, rhs: DeviceConnectionStatus) -> Bool { if lhs._wifi != rhs._wifi {return false} if lhs._ethernet != rhs._ethernet {return false} if lhs._bluetooth != rhs._bluetooth {return false} @@ -277,14 +277,14 @@ extension DeviceConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageI } extension WifiConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".WifiConnectionStatus" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".WifiConnectionStatus" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "status"), 2: .same(proto: "ssid"), 3: .same(proto: "rssi"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -298,7 +298,7 @@ extension WifiConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -315,7 +315,7 @@ extension WifiConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImp try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: WifiConnectionStatus, rhs: WifiConnectionStatus) -> Bool { + public static func ==(lhs: WifiConnectionStatus, rhs: WifiConnectionStatus) -> Bool { if lhs._status != rhs._status {return false} if lhs.ssid != rhs.ssid {return false} if lhs.rssi != rhs.rssi {return false} @@ -325,12 +325,12 @@ extension WifiConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } extension EthernetConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".EthernetConnectionStatus" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".EthernetConnectionStatus" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "status"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -342,7 +342,7 @@ extension EthernetConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Messag } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -353,7 +353,7 @@ extension EthernetConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Messag try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: EthernetConnectionStatus, rhs: EthernetConnectionStatus) -> Bool { + public static func ==(lhs: EthernetConnectionStatus, rhs: EthernetConnectionStatus) -> Bool { if lhs._status != rhs._status {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -361,15 +361,15 @@ extension EthernetConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Messag } extension NetworkConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".NetworkConnectionStatus" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".NetworkConnectionStatus" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "ip_address"), 2: .standard(proto: "is_connected"), 3: .standard(proto: "is_mqtt_connected"), 4: .standard(proto: "is_syslog_connected"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -384,7 +384,7 @@ extension NetworkConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Message } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.ipAddress != 0 { try visitor.visitSingularFixed32Field(value: self.ipAddress, fieldNumber: 1) } @@ -400,7 +400,7 @@ extension NetworkConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Message try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: NetworkConnectionStatus, rhs: NetworkConnectionStatus) -> Bool { + public static func ==(lhs: NetworkConnectionStatus, rhs: NetworkConnectionStatus) -> Bool { if lhs.ipAddress != rhs.ipAddress {return false} if lhs.isConnected != rhs.isConnected {return false} if lhs.isMqttConnected != rhs.isMqttConnected {return false} @@ -411,14 +411,14 @@ extension NetworkConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Message } extension BluetoothConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".BluetoothConnectionStatus" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".BluetoothConnectionStatus" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "pin"), 2: .same(proto: "rssi"), 3: .standard(proto: "is_connected"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -432,7 +432,7 @@ extension BluetoothConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Messa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.pin != 0 { try visitor.visitSingularUInt32Field(value: self.pin, fieldNumber: 1) } @@ -445,7 +445,7 @@ extension BluetoothConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Messa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: BluetoothConnectionStatus, rhs: BluetoothConnectionStatus) -> Bool { + public static func ==(lhs: BluetoothConnectionStatus, rhs: BluetoothConnectionStatus) -> Bool { if lhs.pin != rhs.pin {return false} if lhs.rssi != rhs.rssi {return false} if lhs.isConnected != rhs.isConnected {return false} @@ -455,13 +455,13 @@ extension BluetoothConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Messa } extension SerialConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".SerialConnectionStatus" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".SerialConnectionStatus" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "baud"), 2: .standard(proto: "is_connected"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -474,7 +474,7 @@ extension SerialConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageI } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.baud != 0 { try visitor.visitSingularUInt32Field(value: self.baud, fieldNumber: 1) } @@ -484,7 +484,7 @@ extension SerialConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageI try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: SerialConnectionStatus, rhs: SerialConnectionStatus) -> Bool { + public static func ==(lhs: SerialConnectionStatus, rhs: SerialConnectionStatus) -> Bool { if lhs.baud != rhs.baud {return false} if lhs.isConnected != rhs.isConnected {return false} if lhs.unknownFields != rhs.unknownFields {return false} diff --git a/Meshtastic/Protobufs/meshtastic/deviceonly.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/deviceonly.pb.swift similarity index 84% rename from Meshtastic/Protobufs/meshtastic/deviceonly.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/deviceonly.pb.swift index ebd5e3f7..10b9af2b 100644 --- a/Meshtastic/Protobufs/meshtastic/deviceonly.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/deviceonly.pb.swift @@ -22,8 +22,8 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// /// Font sizes for the device screen -enum ScreenFonts: SwiftProtobuf.Enum { - typealias RawValue = Int +public enum ScreenFonts: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// TODO: REPLACE @@ -38,11 +38,11 @@ enum ScreenFonts: SwiftProtobuf.Enum { case fontLarge // = 2 case UNRECOGNIZED(Int) - init() { + public init() { self = .fontSmall } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .fontSmall case 1: self = .fontMedium @@ -51,7 +51,7 @@ enum ScreenFonts: SwiftProtobuf.Enum { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .fontSmall: return 0 case .fontMedium: return 1 @@ -66,7 +66,7 @@ enum ScreenFonts: SwiftProtobuf.Enum { extension ScreenFonts: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [ScreenFonts] = [ + public static let allCases: [ScreenFonts] = [ .fontSmall, .fontMedium, .fontLarge, @@ -77,7 +77,7 @@ extension ScreenFonts: CaseIterable { /// /// Position with static location information only for NodeDBLite -struct PositionLite { +public struct PositionLite { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -85,15 +85,15 @@ struct PositionLite { /// /// The new preferred location encoding, multiply by 1e-7 to get degrees /// in floating point - var latitudeI: Int32 = 0 + public var latitudeI: Int32 = 0 /// /// TODO: REPLACE - var longitudeI: Int32 = 0 + public var longitudeI: Int32 = 0 /// /// In meters above MSL (but see issue #359) - var altitude: Int32 = 0 + public var altitude: Int32 = 0 /// /// This is usually not sent over the mesh (to save space), but it is sent @@ -101,95 +101,95 @@ struct PositionLite { /// the mesh (because there are devices on the mesh without GPS), it will only /// be sent by devices which has a hardware GPS clock. /// seconds since 1970 - var time: UInt32 = 0 + public var time: UInt32 = 0 /// /// TODO: REPLACE - var locationSource: Position.LocSource = .locUnset + public var locationSource: Position.LocSource = .locUnset - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } -struct NodeInfoLite { +public struct NodeInfoLite { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The node number - var num: UInt32 { + public var num: UInt32 { get {return _storage._num} set {_uniqueStorage()._num = newValue} } /// /// The user info for this node - var user: User { + public var user: User { get {return _storage._user ?? User()} set {_uniqueStorage()._user = newValue} } /// Returns true if `user` has been explicitly set. - var hasUser: Bool {return _storage._user != nil} + public var hasUser: Bool {return _storage._user != nil} /// Clears the value of `user`. Subsequent reads from it will return its default value. - mutating func clearUser() {_uniqueStorage()._user = nil} + public mutating func clearUser() {_uniqueStorage()._user = nil} /// /// 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. - var position: PositionLite { + public var position: PositionLite { get {return _storage._position ?? PositionLite()} set {_uniqueStorage()._position = newValue} } /// Returns true if `position` has been explicitly set. - var hasPosition: Bool {return _storage._position != nil} + public var hasPosition: Bool {return _storage._position != nil} /// Clears the value of `position`. Subsequent reads from it will return its default value. - mutating func clearPosition() {_uniqueStorage()._position = nil} + public mutating func clearPosition() {_uniqueStorage()._position = nil} /// /// Returns the Signal-to-noise ratio (SNR) of the last received message, /// as measured by the receiver. Return SNR of the last received message in dB - var snr: Float { + public var snr: Float { get {return _storage._snr} set {_uniqueStorage()._snr = newValue} } /// /// Set to indicate the last time we received a packet from this node - var lastHeard: UInt32 { + public var lastHeard: UInt32 { get {return _storage._lastHeard} set {_uniqueStorage()._lastHeard = newValue} } /// /// The latest device metrics for the node. - var deviceMetrics: DeviceMetrics { + public var deviceMetrics: DeviceMetrics { get {return _storage._deviceMetrics ?? DeviceMetrics()} set {_uniqueStorage()._deviceMetrics = newValue} } /// Returns true if `deviceMetrics` has been explicitly set. - var hasDeviceMetrics: Bool {return _storage._deviceMetrics != nil} + public var hasDeviceMetrics: Bool {return _storage._deviceMetrics != nil} /// Clears the value of `deviceMetrics`. Subsequent reads from it will return its default value. - mutating func clearDeviceMetrics() {_uniqueStorage()._deviceMetrics = nil} + public mutating func clearDeviceMetrics() {_uniqueStorage()._deviceMetrics = nil} /// /// local channel index we heard that node on. Only populated if its not the default channel. - var channel: UInt32 { + public var channel: UInt32 { get {return _storage._channel} set {_uniqueStorage()._channel = newValue} } /// /// True if we witnessed the node over MQTT instead of LoRA transport - var viaMqtt: Bool { + public var viaMqtt: Bool { get {return _storage._viaMqtt} set {_uniqueStorage()._viaMqtt = newValue} } /// /// Number of hops away from us this node is (0 if adjacent) - var hopsAway: UInt32 { + public var hopsAway: UInt32 { get {return _storage._hopsAway} set {_uniqueStorage()._hopsAway = newValue} } @@ -197,14 +197,14 @@ struct NodeInfoLite { /// /// True if node is in our favorites list /// Persists between NodeDB internal clean ups - var isFavorite: Bool { + public var isFavorite: Bool { get {return _storage._isFavorite} set {_uniqueStorage()._isFavorite = newValue} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _storage = _StorageClass.defaultInstance } @@ -215,36 +215,36 @@ struct NodeInfoLite { /// FIXME, since we write this each time we enter deep sleep (and have infinite /// flash) it would be better to use some sort of append only data structure for /// the receive queue and use the preferences store for the other stuff -struct DeviceState { +public struct DeviceState { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Read only settings/info about this node - var myNode: MyNodeInfo { + public var myNode: MyNodeInfo { get {return _storage._myNode ?? MyNodeInfo()} set {_uniqueStorage()._myNode = newValue} } /// Returns true if `myNode` has been explicitly set. - var hasMyNode: Bool {return _storage._myNode != nil} + public var hasMyNode: Bool {return _storage._myNode != nil} /// Clears the value of `myNode`. Subsequent reads from it will return its default value. - mutating func clearMyNode() {_uniqueStorage()._myNode = nil} + public mutating func clearMyNode() {_uniqueStorage()._myNode = nil} /// /// My owner info - var owner: User { + public var owner: User { get {return _storage._owner ?? User()} set {_uniqueStorage()._owner = newValue} } /// Returns true if `owner` has been explicitly set. - var hasOwner: Bool {return _storage._owner != nil} + public var hasOwner: Bool {return _storage._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. - mutating func clearOwner() {_uniqueStorage()._owner = nil} + public mutating func clearOwner() {_uniqueStorage()._owner = nil} /// /// Received packets saved for delivery to the phone - var receiveQueue: [MeshPacket] { + public var receiveQueue: [MeshPacket] { get {return _storage._receiveQueue} set {_uniqueStorage()._receiveQueue = newValue} } @@ -253,7 +253,7 @@ struct DeviceState { /// 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. - var version: UInt32 { + public var version: UInt32 { get {return _storage._version} set {_uniqueStorage()._version = newValue} } @@ -262,27 +262,27 @@ struct DeviceState { /// We keep the last received text message (only) stored in the device flash, /// so we can show it on the screen. /// Might be null - var rxTextMessage: MeshPacket { + public var rxTextMessage: MeshPacket { get {return _storage._rxTextMessage ?? MeshPacket()} set {_uniqueStorage()._rxTextMessage = newValue} } /// Returns true if `rxTextMessage` has been explicitly set. - var hasRxTextMessage: Bool {return _storage._rxTextMessage != nil} + public var hasRxTextMessage: Bool {return _storage._rxTextMessage != nil} /// Clears the value of `rxTextMessage`. Subsequent reads from it will return its default value. - mutating func clearRxTextMessage() {_uniqueStorage()._rxTextMessage = nil} + public mutating func clearRxTextMessage() {_uniqueStorage()._rxTextMessage = nil} /// /// Used only during development. /// Indicates developer is testing and changes should never be saved to flash. /// Deprecated in 2.3.1 - var noSave: Bool { + public var noSave: Bool { get {return _storage._noSave} set {_uniqueStorage()._noSave = newValue} } /// /// Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset. - var didGpsReset: Bool { + public var didGpsReset: Bool { get {return _storage._didGpsReset} set {_uniqueStorage()._didGpsReset = newValue} } @@ -291,115 +291,115 @@ struct DeviceState { /// We keep the last received waypoint stored in the device flash, /// so we can show it on the screen. /// Might be null - var rxWaypoint: MeshPacket { + public var rxWaypoint: MeshPacket { get {return _storage._rxWaypoint ?? MeshPacket()} set {_uniqueStorage()._rxWaypoint = newValue} } /// Returns true if `rxWaypoint` has been explicitly set. - var hasRxWaypoint: Bool {return _storage._rxWaypoint != nil} + public var hasRxWaypoint: Bool {return _storage._rxWaypoint != nil} /// Clears the value of `rxWaypoint`. Subsequent reads from it will return its default value. - mutating func clearRxWaypoint() {_uniqueStorage()._rxWaypoint = nil} + public mutating func clearRxWaypoint() {_uniqueStorage()._rxWaypoint = nil} /// /// The mesh's nodes with their available gpio pins for RemoteHardware module - var nodeRemoteHardwarePins: [NodeRemoteHardwarePin] { + public var nodeRemoteHardwarePins: [NodeRemoteHardwarePin] { get {return _storage._nodeRemoteHardwarePins} set {_uniqueStorage()._nodeRemoteHardwarePins = newValue} } /// /// New lite version of NodeDB to decrease memory footprint - var nodeDbLite: [NodeInfoLite] { + public var nodeDbLite: [NodeInfoLite] { get {return _storage._nodeDbLite} set {_uniqueStorage()._nodeDbLite = newValue} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _storage = _StorageClass.defaultInstance } /// /// The on-disk saved channels -struct ChannelFile { +public struct ChannelFile { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The channels our node knows about - var channels: [Channel] = [] + public var channels: [Channel] = [] /// /// 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. - var version: UInt32 = 0 + public var version: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// This can be used for customizing the firmware distribution. If populated, /// show a secondary bootup screen with custom logo and text for 2.5 seconds. -struct OEMStore { +public struct OEMStore { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The Logo width in Px - var oemIconWidth: UInt32 = 0 + public var oemIconWidth: UInt32 = 0 /// /// The Logo height in Px - var oemIconHeight: UInt32 = 0 + public var oemIconHeight: UInt32 = 0 /// /// The Logo in XBM bytechar format - var oemIconBits: Data = Data() + public var oemIconBits: Data = Data() /// /// Use this font for the OEM text. - var oemFont: ScreenFonts = .fontSmall + public var oemFont: ScreenFonts = .fontSmall /// /// Use this font for the OEM text. - var oemText: String = String() + public var oemText: String = String() /// /// The default device encryption key, 16 or 32 byte - var oemAesKey: Data = Data() + public var oemAesKey: Data = Data() /// /// A Preset LocalConfig to apply during factory reset - var oemLocalConfig: LocalConfig { + public var oemLocalConfig: LocalConfig { get {return _oemLocalConfig ?? LocalConfig()} set {_oemLocalConfig = newValue} } /// Returns true if `oemLocalConfig` has been explicitly set. - var hasOemLocalConfig: Bool {return self._oemLocalConfig != nil} + public var hasOemLocalConfig: Bool {return self._oemLocalConfig != nil} /// Clears the value of `oemLocalConfig`. Subsequent reads from it will return its default value. - mutating func clearOemLocalConfig() {self._oemLocalConfig = nil} + public mutating func clearOemLocalConfig() {self._oemLocalConfig = nil} /// /// A Preset LocalModuleConfig to apply during factory reset - var oemLocalModuleConfig: LocalModuleConfig { + public var oemLocalModuleConfig: LocalModuleConfig { get {return _oemLocalModuleConfig ?? LocalModuleConfig()} set {_oemLocalModuleConfig = newValue} } /// Returns true if `oemLocalModuleConfig` has been explicitly set. - var hasOemLocalModuleConfig: Bool {return self._oemLocalModuleConfig != nil} + public var hasOemLocalModuleConfig: Bool {return self._oemLocalModuleConfig != nil} /// Clears the value of `oemLocalModuleConfig`. Subsequent reads from it will return its default value. - mutating func clearOemLocalModuleConfig() {self._oemLocalModuleConfig = nil} + public mutating func clearOemLocalModuleConfig() {self._oemLocalModuleConfig = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _oemLocalConfig: LocalConfig? = nil fileprivate var _oemLocalModuleConfig: LocalModuleConfig? = nil @@ -419,7 +419,7 @@ extension OEMStore: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension ScreenFonts: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "FONT_SMALL"), 1: .same(proto: "FONT_MEDIUM"), 2: .same(proto: "FONT_LARGE"), @@ -427,8 +427,8 @@ extension ScreenFonts: SwiftProtobuf._ProtoNameProviding { } extension PositionLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".PositionLite" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".PositionLite" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "latitude_i"), 2: .standard(proto: "longitude_i"), 3: .same(proto: "altitude"), @@ -436,7 +436,7 @@ extension PositionLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat 5: .standard(proto: "location_source"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -452,7 +452,7 @@ extension PositionLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.latitudeI != 0 { try visitor.visitSingularSFixed32Field(value: self.latitudeI, fieldNumber: 1) } @@ -471,7 +471,7 @@ extension PositionLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: PositionLite, rhs: PositionLite) -> Bool { + public static func ==(lhs: PositionLite, rhs: PositionLite) -> Bool { if lhs.latitudeI != rhs.latitudeI {return false} if lhs.longitudeI != rhs.longitudeI {return false} if lhs.altitude != rhs.altitude {return false} @@ -483,8 +483,8 @@ extension PositionLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".NodeInfoLite" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".NodeInfoLite" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "num"), 2: .same(proto: "user"), 3: .same(proto: "position"), @@ -542,7 +542,7 @@ extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat return _storage } - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { _ = _uniqueStorage() try withExtendedLifetime(_storage) { (_storage: _StorageClass) in while let fieldNumber = try decoder.nextFieldNumber() { @@ -566,7 +566,7 @@ extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations @@ -606,7 +606,7 @@ extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: NodeInfoLite, rhs: NodeInfoLite) -> Bool { + public static func ==(lhs: NodeInfoLite, rhs: NodeInfoLite) -> Bool { if lhs._storage !== rhs._storage { let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 @@ -631,8 +631,8 @@ extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } extension DeviceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".DeviceState" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".DeviceState" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 2: .standard(proto: "my_node"), 3: .same(proto: "owner"), 5: .standard(proto: "receive_queue"), @@ -690,7 +690,7 @@ extension DeviceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati return _storage } - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { _ = _uniqueStorage() try withExtendedLifetime(_storage) { (_storage: _StorageClass) in while let fieldNumber = try decoder.nextFieldNumber() { @@ -714,7 +714,7 @@ extension DeviceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations @@ -754,7 +754,7 @@ extension DeviceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: DeviceState, rhs: DeviceState) -> Bool { + public static func ==(lhs: DeviceState, rhs: DeviceState) -> Bool { if lhs._storage !== rhs._storage { let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 @@ -779,13 +779,13 @@ extension DeviceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } extension ChannelFile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ChannelFile" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".ChannelFile" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "channels"), 2: .same(proto: "version"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -798,7 +798,7 @@ extension ChannelFile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.channels.isEmpty { try visitor.visitRepeatedMessageField(value: self.channels, fieldNumber: 1) } @@ -808,7 +808,7 @@ extension ChannelFile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ChannelFile, rhs: ChannelFile) -> Bool { + public static func ==(lhs: ChannelFile, rhs: ChannelFile) -> Bool { if lhs.channels != rhs.channels {return false} if lhs.version != rhs.version {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -817,8 +817,8 @@ extension ChannelFile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } extension OEMStore: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".OEMStore" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".OEMStore" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "oem_icon_width"), 2: .standard(proto: "oem_icon_height"), 3: .standard(proto: "oem_icon_bits"), @@ -829,7 +829,7 @@ extension OEMStore: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB 8: .standard(proto: "oem_local_module_config"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -848,7 +848,7 @@ extension OEMStore: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -880,7 +880,7 @@ extension OEMStore: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: OEMStore, rhs: OEMStore) -> Bool { + public static func ==(lhs: OEMStore, rhs: OEMStore) -> Bool { if lhs.oemIconWidth != rhs.oemIconWidth {return false} if lhs.oemIconHeight != rhs.oemIconHeight {return false} if lhs.oemIconBits != rhs.oemIconBits {return false} diff --git a/Meshtastic/Protobufs/meshtastic/localonly.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/localonly.pb.swift similarity index 82% rename from Meshtastic/Protobufs/meshtastic/localonly.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/localonly.pb.swift index 0778e962..5e30d1cd 100644 --- a/Meshtastic/Protobufs/meshtastic/localonly.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/localonly.pb.swift @@ -20,264 +20,264 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _2 } -struct LocalConfig { +public struct LocalConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The part of the config that is specific to the Device - var device: Config.DeviceConfig { + public var device: Config.DeviceConfig { get {return _storage._device ?? Config.DeviceConfig()} set {_uniqueStorage()._device = newValue} } /// Returns true if `device` has been explicitly set. - var hasDevice: Bool {return _storage._device != nil} + public var hasDevice: Bool {return _storage._device != nil} /// Clears the value of `device`. Subsequent reads from it will return its default value. - mutating func clearDevice() {_uniqueStorage()._device = nil} + public mutating func clearDevice() {_uniqueStorage()._device = nil} /// /// The part of the config that is specific to the GPS Position - var position: Config.PositionConfig { + public var position: Config.PositionConfig { get {return _storage._position ?? Config.PositionConfig()} set {_uniqueStorage()._position = newValue} } /// Returns true if `position` has been explicitly set. - var hasPosition: Bool {return _storage._position != nil} + public var hasPosition: Bool {return _storage._position != nil} /// Clears the value of `position`. Subsequent reads from it will return its default value. - mutating func clearPosition() {_uniqueStorage()._position = nil} + public mutating func clearPosition() {_uniqueStorage()._position = nil} /// /// The part of the config that is specific to the Power settings - var power: Config.PowerConfig { + public var power: Config.PowerConfig { get {return _storage._power ?? Config.PowerConfig()} set {_uniqueStorage()._power = newValue} } /// Returns true if `power` has been explicitly set. - var hasPower: Bool {return _storage._power != nil} + public var hasPower: Bool {return _storage._power != nil} /// Clears the value of `power`. Subsequent reads from it will return its default value. - mutating func clearPower() {_uniqueStorage()._power = nil} + public mutating func clearPower() {_uniqueStorage()._power = nil} /// /// The part of the config that is specific to the Wifi Settings - var network: Config.NetworkConfig { + public var network: Config.NetworkConfig { get {return _storage._network ?? Config.NetworkConfig()} set {_uniqueStorage()._network = newValue} } /// Returns true if `network` has been explicitly set. - var hasNetwork: Bool {return _storage._network != nil} + public var hasNetwork: Bool {return _storage._network != nil} /// Clears the value of `network`. Subsequent reads from it will return its default value. - mutating func clearNetwork() {_uniqueStorage()._network = nil} + public mutating func clearNetwork() {_uniqueStorage()._network = nil} /// /// The part of the config that is specific to the Display - var display: Config.DisplayConfig { + public var display: Config.DisplayConfig { get {return _storage._display ?? Config.DisplayConfig()} set {_uniqueStorage()._display = newValue} } /// Returns true if `display` has been explicitly set. - var hasDisplay: Bool {return _storage._display != nil} + public var hasDisplay: Bool {return _storage._display != nil} /// Clears the value of `display`. Subsequent reads from it will return its default value. - mutating func clearDisplay() {_uniqueStorage()._display = nil} + public mutating func clearDisplay() {_uniqueStorage()._display = nil} /// /// The part of the config that is specific to the Lora Radio - var lora: Config.LoRaConfig { + public var lora: Config.LoRaConfig { get {return _storage._lora ?? Config.LoRaConfig()} set {_uniqueStorage()._lora = newValue} } /// Returns true if `lora` has been explicitly set. - var hasLora: Bool {return _storage._lora != nil} + public var hasLora: Bool {return _storage._lora != nil} /// Clears the value of `lora`. Subsequent reads from it will return its default value. - mutating func clearLora() {_uniqueStorage()._lora = nil} + public mutating func clearLora() {_uniqueStorage()._lora = nil} /// /// The part of the config that is specific to the Bluetooth settings - var bluetooth: Config.BluetoothConfig { + public var bluetooth: Config.BluetoothConfig { get {return _storage._bluetooth ?? Config.BluetoothConfig()} set {_uniqueStorage()._bluetooth = newValue} } /// Returns true if `bluetooth` has been explicitly set. - var hasBluetooth: Bool {return _storage._bluetooth != nil} + public var hasBluetooth: Bool {return _storage._bluetooth != nil} /// Clears the value of `bluetooth`. Subsequent reads from it will return its default value. - mutating func clearBluetooth() {_uniqueStorage()._bluetooth = nil} + public mutating func clearBluetooth() {_uniqueStorage()._bluetooth = nil} /// /// 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. - var version: UInt32 { + public var version: UInt32 { get {return _storage._version} set {_uniqueStorage()._version = newValue} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _storage = _StorageClass.defaultInstance } -struct LocalModuleConfig { +public struct LocalModuleConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The part of the config that is specific to the MQTT module - var mqtt: ModuleConfig.MQTTConfig { + public var mqtt: ModuleConfig.MQTTConfig { get {return _storage._mqtt ?? ModuleConfig.MQTTConfig()} set {_uniqueStorage()._mqtt = newValue} } /// Returns true if `mqtt` has been explicitly set. - var hasMqtt: Bool {return _storage._mqtt != nil} + public var hasMqtt: Bool {return _storage._mqtt != nil} /// Clears the value of `mqtt`. Subsequent reads from it will return its default value. - mutating func clearMqtt() {_uniqueStorage()._mqtt = nil} + public mutating func clearMqtt() {_uniqueStorage()._mqtt = nil} /// /// The part of the config that is specific to the Serial module - var serial: ModuleConfig.SerialConfig { + public var serial: ModuleConfig.SerialConfig { get {return _storage._serial ?? ModuleConfig.SerialConfig()} set {_uniqueStorage()._serial = newValue} } /// Returns true if `serial` has been explicitly set. - var hasSerial: Bool {return _storage._serial != nil} + public var hasSerial: Bool {return _storage._serial != nil} /// Clears the value of `serial`. Subsequent reads from it will return its default value. - mutating func clearSerial() {_uniqueStorage()._serial = nil} + public mutating func clearSerial() {_uniqueStorage()._serial = nil} /// /// The part of the config that is specific to the ExternalNotification module - var externalNotification: ModuleConfig.ExternalNotificationConfig { + public var externalNotification: ModuleConfig.ExternalNotificationConfig { get {return _storage._externalNotification ?? ModuleConfig.ExternalNotificationConfig()} set {_uniqueStorage()._externalNotification = newValue} } /// Returns true if `externalNotification` has been explicitly set. - var hasExternalNotification: Bool {return _storage._externalNotification != nil} + public var hasExternalNotification: Bool {return _storage._externalNotification != nil} /// Clears the value of `externalNotification`. Subsequent reads from it will return its default value. - mutating func clearExternalNotification() {_uniqueStorage()._externalNotification = nil} + public mutating func clearExternalNotification() {_uniqueStorage()._externalNotification = nil} /// /// The part of the config that is specific to the Store & Forward module - var storeForward: ModuleConfig.StoreForwardConfig { + public var storeForward: ModuleConfig.StoreForwardConfig { get {return _storage._storeForward ?? ModuleConfig.StoreForwardConfig()} set {_uniqueStorage()._storeForward = newValue} } /// Returns true if `storeForward` has been explicitly set. - var hasStoreForward: Bool {return _storage._storeForward != nil} + public var hasStoreForward: Bool {return _storage._storeForward != nil} /// Clears the value of `storeForward`. Subsequent reads from it will return its default value. - mutating func clearStoreForward() {_uniqueStorage()._storeForward = nil} + public mutating func clearStoreForward() {_uniqueStorage()._storeForward = nil} /// /// The part of the config that is specific to the RangeTest module - var rangeTest: ModuleConfig.RangeTestConfig { + public var rangeTest: ModuleConfig.RangeTestConfig { get {return _storage._rangeTest ?? ModuleConfig.RangeTestConfig()} set {_uniqueStorage()._rangeTest = newValue} } /// Returns true if `rangeTest` has been explicitly set. - var hasRangeTest: Bool {return _storage._rangeTest != nil} + public var hasRangeTest: Bool {return _storage._rangeTest != nil} /// Clears the value of `rangeTest`. Subsequent reads from it will return its default value. - mutating func clearRangeTest() {_uniqueStorage()._rangeTest = nil} + public mutating func clearRangeTest() {_uniqueStorage()._rangeTest = nil} /// /// The part of the config that is specific to the Telemetry module - var telemetry: ModuleConfig.TelemetryConfig { + public var telemetry: ModuleConfig.TelemetryConfig { get {return _storage._telemetry ?? ModuleConfig.TelemetryConfig()} set {_uniqueStorage()._telemetry = newValue} } /// Returns true if `telemetry` has been explicitly set. - var hasTelemetry: Bool {return _storage._telemetry != nil} + public var hasTelemetry: Bool {return _storage._telemetry != nil} /// Clears the value of `telemetry`. Subsequent reads from it will return its default value. - mutating func clearTelemetry() {_uniqueStorage()._telemetry = nil} + public mutating func clearTelemetry() {_uniqueStorage()._telemetry = nil} /// /// The part of the config that is specific to the Canned Message module - var cannedMessage: ModuleConfig.CannedMessageConfig { + public var cannedMessage: ModuleConfig.CannedMessageConfig { get {return _storage._cannedMessage ?? ModuleConfig.CannedMessageConfig()} set {_uniqueStorage()._cannedMessage = newValue} } /// Returns true if `cannedMessage` has been explicitly set. - var hasCannedMessage: Bool {return _storage._cannedMessage != nil} + public var hasCannedMessage: Bool {return _storage._cannedMessage != nil} /// Clears the value of `cannedMessage`. Subsequent reads from it will return its default value. - mutating func clearCannedMessage() {_uniqueStorage()._cannedMessage = nil} + public mutating func clearCannedMessage() {_uniqueStorage()._cannedMessage = nil} /// /// The part of the config that is specific to the Audio module - var audio: ModuleConfig.AudioConfig { + public var audio: ModuleConfig.AudioConfig { get {return _storage._audio ?? ModuleConfig.AudioConfig()} set {_uniqueStorage()._audio = newValue} } /// Returns true if `audio` has been explicitly set. - var hasAudio: Bool {return _storage._audio != nil} + public var hasAudio: Bool {return _storage._audio != nil} /// Clears the value of `audio`. Subsequent reads from it will return its default value. - mutating func clearAudio() {_uniqueStorage()._audio = nil} + public mutating func clearAudio() {_uniqueStorage()._audio = nil} /// /// The part of the config that is specific to the Remote Hardware module - var remoteHardware: ModuleConfig.RemoteHardwareConfig { + public var remoteHardware: ModuleConfig.RemoteHardwareConfig { get {return _storage._remoteHardware ?? ModuleConfig.RemoteHardwareConfig()} set {_uniqueStorage()._remoteHardware = newValue} } /// Returns true if `remoteHardware` has been explicitly set. - var hasRemoteHardware: Bool {return _storage._remoteHardware != nil} + public var hasRemoteHardware: Bool {return _storage._remoteHardware != nil} /// Clears the value of `remoteHardware`. Subsequent reads from it will return its default value. - mutating func clearRemoteHardware() {_uniqueStorage()._remoteHardware = nil} + public mutating func clearRemoteHardware() {_uniqueStorage()._remoteHardware = nil} /// /// The part of the config that is specific to the Neighbor Info module - var neighborInfo: ModuleConfig.NeighborInfoConfig { + public var neighborInfo: ModuleConfig.NeighborInfoConfig { get {return _storage._neighborInfo ?? ModuleConfig.NeighborInfoConfig()} set {_uniqueStorage()._neighborInfo = newValue} } /// Returns true if `neighborInfo` has been explicitly set. - var hasNeighborInfo: Bool {return _storage._neighborInfo != nil} + public var hasNeighborInfo: Bool {return _storage._neighborInfo != nil} /// Clears the value of `neighborInfo`. Subsequent reads from it will return its default value. - mutating func clearNeighborInfo() {_uniqueStorage()._neighborInfo = nil} + public mutating func clearNeighborInfo() {_uniqueStorage()._neighborInfo = nil} /// /// The part of the config that is specific to the Ambient Lighting module - var ambientLighting: ModuleConfig.AmbientLightingConfig { + public var ambientLighting: ModuleConfig.AmbientLightingConfig { get {return _storage._ambientLighting ?? ModuleConfig.AmbientLightingConfig()} set {_uniqueStorage()._ambientLighting = newValue} } /// Returns true if `ambientLighting` has been explicitly set. - var hasAmbientLighting: Bool {return _storage._ambientLighting != nil} + public var hasAmbientLighting: Bool {return _storage._ambientLighting != nil} /// Clears the value of `ambientLighting`. Subsequent reads from it will return its default value. - mutating func clearAmbientLighting() {_uniqueStorage()._ambientLighting = nil} + public mutating func clearAmbientLighting() {_uniqueStorage()._ambientLighting = nil} /// /// The part of the config that is specific to the Detection Sensor module - var detectionSensor: ModuleConfig.DetectionSensorConfig { + public var detectionSensor: ModuleConfig.DetectionSensorConfig { get {return _storage._detectionSensor ?? ModuleConfig.DetectionSensorConfig()} set {_uniqueStorage()._detectionSensor = newValue} } /// Returns true if `detectionSensor` has been explicitly set. - var hasDetectionSensor: Bool {return _storage._detectionSensor != nil} + public var hasDetectionSensor: Bool {return _storage._detectionSensor != nil} /// Clears the value of `detectionSensor`. Subsequent reads from it will return its default value. - mutating func clearDetectionSensor() {_uniqueStorage()._detectionSensor = nil} + public mutating func clearDetectionSensor() {_uniqueStorage()._detectionSensor = nil} /// /// Paxcounter Config - var paxcounter: ModuleConfig.PaxcounterConfig { + public var paxcounter: ModuleConfig.PaxcounterConfig { get {return _storage._paxcounter ?? ModuleConfig.PaxcounterConfig()} set {_uniqueStorage()._paxcounter = newValue} } /// Returns true if `paxcounter` has been explicitly set. - var hasPaxcounter: Bool {return _storage._paxcounter != nil} + public var hasPaxcounter: Bool {return _storage._paxcounter != nil} /// Clears the value of `paxcounter`. Subsequent reads from it will return its default value. - mutating func clearPaxcounter() {_uniqueStorage()._paxcounter = nil} + public mutating func clearPaxcounter() {_uniqueStorage()._paxcounter = nil} /// /// 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. - var version: UInt32 { + public var version: UInt32 { get {return _storage._version} set {_uniqueStorage()._version = newValue} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _storage = _StorageClass.defaultInstance } @@ -292,8 +292,8 @@ extension LocalModuleConfig: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".LocalConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".LocalConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "device"), 2: .same(proto: "position"), 3: .same(proto: "power"), @@ -345,7 +345,7 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati return _storage } - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { _ = _uniqueStorage() try withExtendedLifetime(_storage) { (_storage: _StorageClass) in while let fieldNumber = try decoder.nextFieldNumber() { @@ -367,7 +367,7 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations @@ -401,7 +401,7 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: LocalConfig, rhs: LocalConfig) -> Bool { + public static func ==(lhs: LocalConfig, rhs: LocalConfig) -> Bool { if lhs._storage !== rhs._storage { let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 @@ -424,8 +424,8 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } extension LocalModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".LocalModuleConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".LocalModuleConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "mqtt"), 2: .same(proto: "serial"), 3: .standard(proto: "external_notification"), @@ -495,7 +495,7 @@ extension LocalModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem return _storage } - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { _ = _uniqueStorage() try withExtendedLifetime(_storage) { (_storage: _StorageClass) in while let fieldNumber = try decoder.nextFieldNumber() { @@ -523,7 +523,7 @@ extension LocalModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations @@ -575,7 +575,7 @@ extension LocalModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: LocalModuleConfig, rhs: LocalModuleConfig) -> Bool { + public static func ==(lhs: LocalModuleConfig, rhs: LocalModuleConfig) -> Bool { if lhs._storage !== rhs._storage { let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 diff --git a/Meshtastic/Protobufs/meshtastic/mesh.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/mesh.pb.swift similarity index 88% rename from Meshtastic/Protobufs/meshtastic/mesh.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/mesh.pb.swift index a8ee777c..c257be0a 100644 --- a/Meshtastic/Protobufs/meshtastic/mesh.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/mesh.pb.swift @@ -25,8 +25,8 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// bin/build-all.sh script. /// Because they will be used to find firmware filenames in the android app for OTA updates. /// To match the old style filenames, _ is converted to -, p is converted to . -enum HardwareModel: SwiftProtobuf.Enum { - typealias RawValue = Int +public enum HardwareModel: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// TODO: REPLACE @@ -311,11 +311,11 @@ enum HardwareModel: SwiftProtobuf.Enum { case privateHw // = 255 case UNRECOGNIZED(Int) - init() { + public init() { self = .unset } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unset case 1: self = .tloraV2 @@ -387,7 +387,7 @@ enum HardwareModel: SwiftProtobuf.Enum { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unset: return 0 case .tloraV2: return 1 @@ -465,7 +465,7 @@ enum HardwareModel: SwiftProtobuf.Enum { extension HardwareModel: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [HardwareModel] = [ + public static let allCases: [HardwareModel] = [ .unset, .tloraV2, .tloraV1, @@ -539,8 +539,8 @@ extension HardwareModel: CaseIterable { /// /// Shared constants between device and phone -enum Constants: SwiftProtobuf.Enum { - typealias RawValue = Int +public enum Constants: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// First enum must be zero, and we are just using this enum to @@ -554,11 +554,11 @@ enum Constants: SwiftProtobuf.Enum { case dataPayloadLen // = 237 case UNRECOGNIZED(Int) - init() { + public init() { self = .zero } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .zero case 237: self = .dataPayloadLen @@ -566,7 +566,7 @@ enum Constants: SwiftProtobuf.Enum { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .zero: return 0 case .dataPayloadLen: return 237 @@ -580,7 +580,7 @@ enum Constants: SwiftProtobuf.Enum { extension Constants: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Constants] = [ + public static let allCases: [Constants] = [ .zero, .dataPayloadLen, ] @@ -593,8 +593,8 @@ extension Constants: CaseIterable { /// The device might report these fault codes on the screen. /// If you encounter a fault code, please post on the meshtastic.discourse.group /// and we'll try to help. -enum CriticalErrorCode: SwiftProtobuf.Enum { - typealias RawValue = Int +public enum CriticalErrorCode: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// TODO: REPLACE @@ -647,11 +647,11 @@ enum CriticalErrorCode: SwiftProtobuf.Enum { case radioSpiBug // = 11 case UNRECOGNIZED(Int) - init() { + public init() { self = .none } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .none case 1: self = .txWatchdog @@ -669,7 +669,7 @@ enum CriticalErrorCode: SwiftProtobuf.Enum { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .none: return 0 case .txWatchdog: return 1 @@ -693,7 +693,7 @@ enum CriticalErrorCode: SwiftProtobuf.Enum { extension CriticalErrorCode: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [CriticalErrorCode] = [ + public static let allCases: [CriticalErrorCode] = [ .none, .txWatchdog, .sleepEnterWait, @@ -713,7 +713,7 @@ extension CriticalErrorCode: CaseIterable { /// /// a gps position -struct Position { +public struct Position { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -721,21 +721,21 @@ struct Position { /// /// The new preferred location encoding, multiply by 1e-7 to get degrees /// in floating point - var latitudeI: Int32 { + public var latitudeI: Int32 { get {return _storage._latitudeI} set {_uniqueStorage()._latitudeI = newValue} } /// /// TODO: REPLACE - var longitudeI: Int32 { + public var longitudeI: Int32 { get {return _storage._longitudeI} set {_uniqueStorage()._longitudeI = newValue} } /// /// In meters above MSL (but see issue #359) - var altitude: Int32 { + public var altitude: Int32 { get {return _storage._altitude} set {_uniqueStorage()._altitude = newValue} } @@ -745,49 +745,49 @@ struct Position { /// from the phone so that the local device can set its time if it is sent over /// the mesh (because there are devices on the mesh without GPS or RTC). /// seconds since 1970 - var time: UInt32 { + public var time: UInt32 { get {return _storage._time} set {_uniqueStorage()._time = newValue} } /// /// TODO: REPLACE - var locationSource: Position.LocSource { + public var locationSource: Position.LocSource { get {return _storage._locationSource} set {_uniqueStorage()._locationSource = newValue} } /// /// TODO: REPLACE - var altitudeSource: Position.AltSource { + public var altitudeSource: Position.AltSource { get {return _storage._altitudeSource} set {_uniqueStorage()._altitudeSource = newValue} } /// /// Positional timestamp (actual timestamp of GPS solution) in integer epoch seconds - var timestamp: UInt32 { + public var timestamp: UInt32 { get {return _storage._timestamp} set {_uniqueStorage()._timestamp = newValue} } /// /// Pos. timestamp milliseconds adjustment (rarely available or required) - var timestampMillisAdjust: Int32 { + public var timestampMillisAdjust: Int32 { get {return _storage._timestampMillisAdjust} set {_uniqueStorage()._timestampMillisAdjust = newValue} } /// /// HAE altitude in meters - can be used instead of MSL altitude - var altitudeHae: Int32 { + public var altitudeHae: Int32 { get {return _storage._altitudeHae} set {_uniqueStorage()._altitudeHae = newValue} } /// /// Geoidal separation in meters - var altitudeGeoidalSeparation: Int32 { + public var altitudeGeoidalSeparation: Int32 { get {return _storage._altitudeGeoidalSeparation} set {_uniqueStorage()._altitudeGeoidalSeparation = newValue} } @@ -798,21 +798,21 @@ struct Position { /// - for higher precision scenarios, HDOP and VDOP can be used instead, /// in which case PDOP becomes redundant (PDOP=sqrt(HDOP^2 + VDOP^2)) /// TODO: REMOVE/INTEGRATE - var pdop: UInt32 { + public var pdop: UInt32 { get {return _storage._pdop} set {_uniqueStorage()._pdop = newValue} } /// /// TODO: REPLACE - var hdop: UInt32 { + public var hdop: UInt32 { get {return _storage._hdop} set {_uniqueStorage()._hdop = newValue} } /// /// TODO: REPLACE - var vdop: UInt32 { + public var vdop: UInt32 { get {return _storage._vdop} set {_uniqueStorage()._vdop = newValue} } @@ -821,7 +821,7 @@ struct Position { /// GPS accuracy (a hardware specific constant) in mm /// multiplied with DOP to calculate positional accuracy /// Default: "'bout three meters-ish" :) - var gpsAccuracy: UInt32 { + public var gpsAccuracy: UInt32 { get {return _storage._gpsAccuracy} set {_uniqueStorage()._gpsAccuracy = newValue} } @@ -833,42 +833,42 @@ struct Position { /// - "heading" is where the fuselage points (measured in horizontal plane) /// - "yaw" indicates a relative rotation about the vertical axis /// TODO: REMOVE/INTEGRATE - var groundSpeed: UInt32 { + public var groundSpeed: UInt32 { get {return _storage._groundSpeed} set {_uniqueStorage()._groundSpeed = newValue} } /// /// TODO: REPLACE - var groundTrack: UInt32 { + public var groundTrack: UInt32 { get {return _storage._groundTrack} set {_uniqueStorage()._groundTrack = newValue} } /// /// GPS fix quality (from NMEA GxGGA statement or similar) - var fixQuality: UInt32 { + public var fixQuality: UInt32 { get {return _storage._fixQuality} set {_uniqueStorage()._fixQuality = newValue} } /// /// GPS fix type 2D/3D (from NMEA GxGSA statement) - var fixType: UInt32 { + public var fixType: UInt32 { get {return _storage._fixType} set {_uniqueStorage()._fixType = newValue} } /// /// GPS "Satellites in View" number - var satsInView: UInt32 { + public var satsInView: UInt32 { get {return _storage._satsInView} set {_uniqueStorage()._satsInView = newValue} } /// /// Sensor ID - in case multiple positioning sensors are being used - var sensorID: UInt32 { + public var sensorID: UInt32 { get {return _storage._sensorID} set {_uniqueStorage()._sensorID = newValue} } @@ -878,7 +878,7 @@ struct Position { /// - if we update at fixed intervals of X seconds, use X /// - if we update at dynamic intervals (based on relative movement etc), /// but "AT LEAST every Y seconds", use Y - var nextUpdate: UInt32 { + public var nextUpdate: UInt32 { get {return _storage._nextUpdate} set {_uniqueStorage()._nextUpdate = newValue} } @@ -886,24 +886,24 @@ struct Position { /// /// A sequence number, incremented with each Position message to help /// detect lost updates if needed - var seqNumber: UInt32 { + public var seqNumber: UInt32 { get {return _storage._seqNumber} set {_uniqueStorage()._seqNumber = newValue} } /// /// Indicates the bits of precision set by the sending node - var precisionBits: UInt32 { + public var precisionBits: UInt32 { get {return _storage._precisionBits} set {_uniqueStorage()._precisionBits = newValue} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// How the location was acquired: manual, onboard GPS, external (EUD) GPS - enum LocSource: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum LocSource: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// TODO: REPLACE @@ -922,11 +922,11 @@ struct Position { case locExternal // = 3 case UNRECOGNIZED(Int) - init() { + public init() { self = .locUnset } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .locUnset case 1: self = .locManual @@ -936,7 +936,7 @@ struct Position { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .locUnset: return 0 case .locManual: return 1 @@ -951,8 +951,8 @@ struct Position { /// /// How the altitude was acquired: manual, GPS int/ext, etc /// Default: same as location_source if present - enum AltSource: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum AltSource: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// TODO: REPLACE @@ -975,11 +975,11 @@ struct Position { case altBarometric // = 4 case UNRECOGNIZED(Int) - init() { + public init() { self = .altUnset } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .altUnset case 1: self = .altManual @@ -990,7 +990,7 @@ struct Position { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .altUnset: return 0 case .altManual: return 1 @@ -1003,7 +1003,7 @@ struct Position { } - init() {} + public init() {} fileprivate var _storage = _StorageClass.defaultInstance } @@ -1012,7 +1012,7 @@ struct Position { extension Position.LocSource: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Position.LocSource] = [ + public static let allCases: [Position.LocSource] = [ .locUnset, .locManual, .locInternal, @@ -1022,7 +1022,7 @@ extension Position.LocSource: CaseIterable { extension Position.AltSource: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Position.AltSource] = [ + public static let allCases: [Position.AltSource] = [ .altUnset, .altManual, .altInternal, @@ -1054,7 +1054,7 @@ extension Position.AltSource: CaseIterable { /// A few nodenums are reserved and will never be requested: /// 0xff - broadcast /// 0 through 3 - for future use -struct User { +public struct User { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1064,73 +1064,73 @@ struct User { /// In the case of Signal that would mean +16504442323, for the default macaddr derived id it would be !<8 hexidecimal bytes>. /// Note: app developers are encouraged to also use the following standard /// node IDs "^all" (for broadcast), "^local" (for the locally connected node) - var id: String = String() + public var id: String = String() /// /// A full name for this user, i.e. "Kevin Hester" - var longName: String = String() + public var longName: String = String() /// /// A VERY short name, ideally two characters. /// Suitable for a tiny OLED screen - var shortName: String = String() + public var shortName: String = String() /// /// Deprecated in Meshtastic 2.1.x /// This is the addr of the radio. /// Not populated by the phone, but added by the esp32 when broadcasting - var macaddr: Data = Data() + public var macaddr: Data = Data() /// /// TBEAM, HELTEC, etc... /// Starting in 1.2.11 moved to hw_model enum in the NodeInfo object. /// Apps will still need the string here for older builds /// (so OTA update can find the right image), but if the enum is available it will be used instead. - var hwModel: HardwareModel = .unset + public var hwModel: HardwareModel = .unset /// /// In some regions Ham radio operators have different bandwidth limitations than others. /// If this user is a licensed operator, set this flag. /// Also, "long_name" should be their licence number. - var isLicensed: Bool = false + public var isLicensed: Bool = false /// /// Indicates that the user's role in the mesh - var role: Config.DeviceConfig.Role = .client + public var role: Config.DeviceConfig.Role = .client - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// A message used in our Dynamic Source Routing protocol (RFC 4728 based) -struct RouteDiscovery { +public struct RouteDiscovery { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The list of nodenums this packet has visited so far - var route: [UInt32] = [] + public var route: [UInt32] = [] - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// A Routing control Data packet handled by the routing module -struct Routing { +public struct Routing { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var variant: Routing.OneOf_Variant? = nil + public var variant: Routing.OneOf_Variant? = nil /// /// A route request going from the requester - var routeRequest: RouteDiscovery { + public var routeRequest: RouteDiscovery { get { if case .routeRequest(let v)? = variant {return v} return RouteDiscovery() @@ -1140,7 +1140,7 @@ struct Routing { /// /// A route reply - var routeReply: RouteDiscovery { + public var routeReply: RouteDiscovery { get { if case .routeReply(let v)? = variant {return v} return RouteDiscovery() @@ -1151,7 +1151,7 @@ struct Routing { /// /// 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). - var errorReason: Routing.Error { + public var errorReason: Routing.Error { get { if case .errorReason(let v)? = variant {return v} return .none @@ -1159,9 +1159,9 @@ struct Routing { set {variant = .errorReason(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_Variant: Equatable { + public enum OneOf_Variant: Equatable { /// /// A route request going from the requester case routeRequest(RouteDiscovery) @@ -1174,7 +1174,7 @@ struct Routing { case errorReason(Routing.Error) #if !swift(>=4.1) - static func ==(lhs: Routing.OneOf_Variant, rhs: Routing.OneOf_Variant) -> Bool { + public static func ==(lhs: Routing.OneOf_Variant, rhs: Routing.OneOf_Variant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -1200,8 +1200,8 @@ struct Routing { /// /// 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). - enum Error: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum Error: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// This message is not a failure @@ -1254,11 +1254,11 @@ struct Routing { case notAuthorized // = 33 case UNRECOGNIZED(Int) - init() { + public init() { self = .none } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .none case 1: self = .noRoute @@ -1276,7 +1276,7 @@ struct Routing { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .none: return 0 case .noRoute: return 1 @@ -1296,14 +1296,14 @@ struct Routing { } - init() {} + public init() {} } #if swift(>=4.2) extension Routing.Error: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Routing.Error] = [ + public static let allCases: [Routing.Error] = [ .none, .noRoute, .gotNak, @@ -1325,24 +1325,24 @@ extension Routing.Error: CaseIterable { /// (Formerly called SubPacket) /// The payload portion fo a packet, this is the actual bytes that are sent /// inside a radio packet (because from/to are broken out by the comms library) -struct DataMessage { +public struct DataMessage { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Formerly named typ and of type Type - var portnum: PortNum = .unknownApp + public var portnum: PortNum = .unknownApp /// /// TODO: REPLACE - var payload: Data = Data() + public var payload: Data = Data() /// /// Not normally used, but for testing a sender can request that recipient /// responds in kind (i.e. if it received a position, it should unicast back it's position). /// Note: that if you set this on a broadcast you will receive many replies. - var wantResponse: Bool = false + public var wantResponse: Bool = false /// /// The address of the destination node. @@ -1350,96 +1350,96 @@ struct DataMessage { /// layer software should never need it. /// RouteDiscovery messages _must_ populate this. /// Other message types might need to if they are doing multihop routing. - var dest: UInt32 = 0 + public var dest: UInt32 = 0 /// /// The address of the original sender for this message. /// This field should _only_ be populated for reliable multihop packets (to keep /// packets small). - var source: UInt32 = 0 + public var source: UInt32 = 0 /// /// Only used in routing or response messages. /// Indicates the original message ID that this message is reporting failure on. (formerly called original_id) - var requestID: UInt32 = 0 + public var requestID: UInt32 = 0 /// /// If set, this message is intened to be a reply to a previously sent message with the defined id. - var replyID: UInt32 = 0 + public var replyID: UInt32 = 0 /// /// Defaults to false. If true, then what is in the payload should be treated as an emoji like giving /// a message a heart or poop emoji. - var emoji: UInt32 = 0 + public var emoji: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Waypoint message, used to share arbitrary locations across the mesh -struct Waypoint { +public struct Waypoint { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Id of the waypoint - var id: UInt32 = 0 + public var id: UInt32 = 0 /// /// latitude_i - var latitudeI: Int32 = 0 + public var latitudeI: Int32 = 0 /// /// longitude_i - var longitudeI: Int32 = 0 + public var longitudeI: Int32 = 0 /// /// Time the waypoint is to expire (epoch) - var expire: UInt32 = 0 + public var expire: UInt32 = 0 /// /// If greater than zero, treat the value as a nodenum only allowing them to update the waypoint. /// If zero, the waypoint is open to be edited by any member of the mesh. - var lockedTo: UInt32 = 0 + public var lockedTo: UInt32 = 0 /// /// Name of the waypoint - max 30 chars - var name: String = String() + public var name: String = String() /// /// Description of the waypoint - max 100 chars - var description_p: String = String() + public var description_p: String = String() /// /// Designator icon for the waypoint in the form of a unicode emoji - var icon: UInt32 = 0 + public var icon: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server -struct MqttClientProxyMessage { +public struct MqttClientProxyMessage { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The MQTT topic this message will be sent /received on - var topic: String = String() + public var topic: String = String() /// /// The actual service envelope payload or text for mqtt pub / sub - var payloadVariant: MqttClientProxyMessage.OneOf_PayloadVariant? = nil + public var payloadVariant: MqttClientProxyMessage.OneOf_PayloadVariant? = nil /// /// Bytes - var data: Data { + public var data: Data { get { if case .data(let v)? = payloadVariant {return v} return Data() @@ -1449,7 +1449,7 @@ struct MqttClientProxyMessage { /// /// Text - var text: String { + public var text: String { get { if case .text(let v)? = payloadVariant {return v} return String() @@ -1459,13 +1459,13 @@ struct MqttClientProxyMessage { /// /// Whether the message should be retained (or not) - var retained: Bool = false + public var retained: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// The actual service envelope payload or text for mqtt pub / sub - enum OneOf_PayloadVariant: Equatable { + public enum OneOf_PayloadVariant: Equatable { /// /// Bytes case data(Data) @@ -1474,7 +1474,7 @@ struct MqttClientProxyMessage { case text(String) #if !swift(>=4.1) - static func ==(lhs: MqttClientProxyMessage.OneOf_PayloadVariant, rhs: MqttClientProxyMessage.OneOf_PayloadVariant) -> Bool { + public static func ==(lhs: MqttClientProxyMessage.OneOf_PayloadVariant, rhs: MqttClientProxyMessage.OneOf_PayloadVariant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -1493,14 +1493,14 @@ struct MqttClientProxyMessage { #endif } - init() {} + public init() {} } /// /// A packet envelope sent/received over the mesh /// only payload_variant is sent in the payload portion of the LORA packet. /// The other fields are either not sent at all, or sent in the special 16 byte LORA header. -struct MeshPacket { +public struct MeshPacket { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1509,14 +1509,14 @@ struct MeshPacket { /// The sending node number. /// Note: Our crypto implementation uses this field as well. /// See [crypto](/docs/overview/encryption) for details. - var from: UInt32 { + public var from: UInt32 { get {return _storage._from} set {_uniqueStorage()._from = newValue} } /// /// The (immediate) destination for this packet - var to: UInt32 { + public var to: UInt32 { get {return _storage._to} set {_uniqueStorage()._to = newValue} } @@ -1529,19 +1529,19 @@ struct MeshPacket { /// Very briefly, while sending and receiving deep inside the device Router code, this field instead /// contains the 'channel hash' instead of the index. /// This 'trick' is only used while the payload_variant is an 'encrypted'. - var channel: UInt32 { + public var channel: UInt32 { get {return _storage._channel} set {_uniqueStorage()._channel = newValue} } - var payloadVariant: OneOf_PayloadVariant? { + public var payloadVariant: OneOf_PayloadVariant? { get {return _storage._payloadVariant} set {_uniqueStorage()._payloadVariant = newValue} } /// /// TODO: REPLACE - var decoded: DataMessage { + public var decoded: DataMessage { get { if case .decoded(let v)? = _storage._payloadVariant {return v} return DataMessage() @@ -1551,7 +1551,7 @@ struct MeshPacket { /// /// TODO: REPLACE - var encrypted: Data { + public var encrypted: Data { get { if case .encrypted(let v)? = _storage._payloadVariant {return v} return Data() @@ -1568,7 +1568,7 @@ struct MeshPacket { /// any ACK or the completion of a mesh broadcast flood). /// Note: Our crypto implementation uses this id as well. /// See [crypto](/docs/overview/encryption) for details. - var id: UInt32 { + public var id: UInt32 { get {return _storage._id} set {_uniqueStorage()._id = newValue} } @@ -1578,7 +1578,7 @@ struct MeshPacket { /// Note: this field is _never_ sent on the radio link itself (to save space) Times /// are typically not sent over the mesh, but they will be added to any Packet /// (chain of SubPacket) sent to the phone (so the phone can know exact time of reception) - var rxTime: UInt32 { + public var rxTime: UInt32 { get {return _storage._rxTime} set {_uniqueStorage()._rxTime = newValue} } @@ -1587,7 +1587,7 @@ struct MeshPacket { /// *Never* sent over the radio links. /// Set during reception to indicate the SNR of this packet. /// Used to collect statistics on current link quality. - var rxSnr: Float { + public var rxSnr: Float { get {return _storage._rxSnr} set {_uniqueStorage()._rxSnr = newValue} } @@ -1597,7 +1597,7 @@ struct MeshPacket { /// if 1, allow hopping through one node, etc... /// For our usecase real world topologies probably have a max of about 3. /// This field is normally placed into a few of bits in the header. - var hopLimit: UInt32 { + public var hopLimit: UInt32 { get {return _storage._hopLimit} set {_uniqueStorage()._hopLimit = newValue} } @@ -1612,7 +1612,7 @@ struct MeshPacket { /// So FloodingRouter.cpp generates an implicit ack which is delivered to the original sender. /// If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic. /// Note: This flag is normally sent in a flag bit in the header when sent over the wire - var wantAck: Bool { + public var wantAck: Bool { get {return _storage._wantAck} set {_uniqueStorage()._wantAck = newValue} } @@ -1620,28 +1620,28 @@ struct MeshPacket { /// /// The priority of this message for sending. /// See MeshPacket.Priority description for more details. - var priority: MeshPacket.Priority { + public var priority: MeshPacket.Priority { get {return _storage._priority} set {_uniqueStorage()._priority = newValue} } /// /// rssi of received packet. Only sent to phone for dispay purposes. - var rxRssi: Int32 { + public var rxRssi: Int32 { get {return _storage._rxRssi} set {_uniqueStorage()._rxRssi = newValue} } /// /// Describe if this message is delayed - var delayed: MeshPacket.Delayed { + public var delayed: MeshPacket.Delayed { get {return _storage._delayed} set {_uniqueStorage()._delayed = newValue} } /// /// Describes whether this packet passed via MQTT somewhere along the path it currently took. - var viaMqtt: Bool { + public var viaMqtt: Bool { get {return _storage._viaMqtt} set {_uniqueStorage()._viaMqtt = newValue} } @@ -1649,14 +1649,14 @@ struct MeshPacket { /// /// 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. - var hopStart: UInt32 { + public var hopStart: UInt32 { get {return _storage._hopStart} set {_uniqueStorage()._hopStart = newValue} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_PayloadVariant: Equatable { + public enum OneOf_PayloadVariant: Equatable { /// /// TODO: REPLACE case decoded(DataMessage) @@ -1665,7 +1665,7 @@ struct MeshPacket { case encrypted(Data) #if !swift(>=4.1) - static func ==(lhs: MeshPacket.OneOf_PayloadVariant, rhs: MeshPacket.OneOf_PayloadVariant) -> Bool { + public static func ==(lhs: MeshPacket.OneOf_PayloadVariant, rhs: MeshPacket.OneOf_PayloadVariant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -1703,8 +1703,8 @@ struct MeshPacket { /// So I bit the bullet and implemented a new (internal - not sent over the air) /// field in MeshPacket called 'priority'. /// And the transmission queue in the router object is now a priority queue. - enum Priority: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum Priority: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Treated as Priority.DEFAULT @@ -1738,11 +1738,11 @@ struct MeshPacket { case max // = 127 case UNRECOGNIZED(Int) - init() { + public init() { self = .unset } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unset case 1: self = .min @@ -1755,7 +1755,7 @@ struct MeshPacket { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unset: return 0 case .min: return 1 @@ -1772,8 +1772,8 @@ struct MeshPacket { /// /// Identify if this is a delayed packet - enum Delayed: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum Delayed: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// If unset, the message is being sent in real time. @@ -1788,11 +1788,11 @@ struct MeshPacket { case direct // = 2 case UNRECOGNIZED(Int) - init() { + public init() { self = .noDelay } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .noDelay case 1: self = .broadcast @@ -1801,7 +1801,7 @@ struct MeshPacket { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .noDelay: return 0 case .broadcast: return 1 @@ -1812,7 +1812,7 @@ struct MeshPacket { } - init() {} + public init() {} fileprivate var _storage = _StorageClass.defaultInstance } @@ -1821,7 +1821,7 @@ struct MeshPacket { extension MeshPacket.Priority: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [MeshPacket.Priority] = [ + public static let allCases: [MeshPacket.Priority] = [ .unset, .min, .background, @@ -1834,7 +1834,7 @@ extension MeshPacket.Priority: CaseIterable { extension MeshPacket.Delayed: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [MeshPacket.Delayed] = [ + public static let allCases: [MeshPacket.Delayed] = [ .noDelay, .broadcast, .direct, @@ -1860,84 +1860,84 @@ extension MeshPacket.Delayed: CaseIterable { /// level etc) SET_CONFIG (switches device to a new set of radio params and /// preshared key, drops all existing nodes, force our node to rejoin this new group) /// Full information about a node on the mesh -struct NodeInfo { +public struct NodeInfo { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The node number - var num: UInt32 { + public var num: UInt32 { get {return _storage._num} set {_uniqueStorage()._num = newValue} } /// /// The user info for this node - var user: User { + public var user: User { get {return _storage._user ?? User()} set {_uniqueStorage()._user = newValue} } /// Returns true if `user` has been explicitly set. - var hasUser: Bool {return _storage._user != nil} + public var hasUser: Bool {return _storage._user != nil} /// Clears the value of `user`. Subsequent reads from it will return its default value. - mutating func clearUser() {_uniqueStorage()._user = nil} + public mutating func clearUser() {_uniqueStorage()._user = nil} /// /// 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. - var position: Position { + public var position: Position { get {return _storage._position ?? Position()} set {_uniqueStorage()._position = newValue} } /// Returns true if `position` has been explicitly set. - var hasPosition: Bool {return _storage._position != nil} + public var hasPosition: Bool {return _storage._position != nil} /// Clears the value of `position`. Subsequent reads from it will return its default value. - mutating func clearPosition() {_uniqueStorage()._position = nil} + public mutating func clearPosition() {_uniqueStorage()._position = nil} /// /// Returns the Signal-to-noise ratio (SNR) of the last received message, /// as measured by the receiver. Return SNR of the last received message in dB - var snr: Float { + public var snr: Float { get {return _storage._snr} set {_uniqueStorage()._snr = newValue} } /// /// Set to indicate the last time we received a packet from this node - var lastHeard: UInt32 { + public var lastHeard: UInt32 { get {return _storage._lastHeard} set {_uniqueStorage()._lastHeard = newValue} } /// /// The latest device metrics for the node. - var deviceMetrics: DeviceMetrics { + public var deviceMetrics: DeviceMetrics { get {return _storage._deviceMetrics ?? DeviceMetrics()} set {_uniqueStorage()._deviceMetrics = newValue} } /// Returns true if `deviceMetrics` has been explicitly set. - var hasDeviceMetrics: Bool {return _storage._deviceMetrics != nil} + public var hasDeviceMetrics: Bool {return _storage._deviceMetrics != nil} /// Clears the value of `deviceMetrics`. Subsequent reads from it will return its default value. - mutating func clearDeviceMetrics() {_uniqueStorage()._deviceMetrics = nil} + public mutating func clearDeviceMetrics() {_uniqueStorage()._deviceMetrics = nil} /// /// local channel index we heard that node on. Only populated if its not the default channel. - var channel: UInt32 { + public var channel: UInt32 { get {return _storage._channel} set {_uniqueStorage()._channel = newValue} } /// /// True if we witnessed the node over MQTT instead of LoRA transport - var viaMqtt: Bool { + public var viaMqtt: Bool { get {return _storage._viaMqtt} set {_uniqueStorage()._viaMqtt = newValue} } /// /// Number of hops away from us this node is (0 if adjacent) - var hopsAway: UInt32 { + public var hopsAway: UInt32 { get {return _storage._hopsAway} set {_uniqueStorage()._hopsAway = newValue} } @@ -1945,14 +1945,14 @@ struct NodeInfo { /// /// True if node is in our favorites list /// Persists between NodeDB internal clean ups - var isFavorite: Bool { + public var isFavorite: Bool { get {return _storage._isFavorite} set {_uniqueStorage()._isFavorite = newValue} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _storage = _StorageClass.defaultInstance } @@ -1961,7 +1961,7 @@ struct NodeInfo { /// Unique local debugging info for this node /// Note: we don't include position or the user info, because that will come in the /// Sent to the phone in response to WantNodes. -struct MyNodeInfo { +public struct MyNodeInfo { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1969,21 +1969,21 @@ struct MyNodeInfo { /// /// Tells the phone what our node number is, default starting value is /// lowbyte of macaddr, but it will be fixed if that is already in use - var myNodeNum: UInt32 = 0 + public var myNodeNum: UInt32 = 0 /// /// The total number of reboots this node has ever encountered /// (well - since the last time we discarded preferences) - var rebootCount: UInt32 = 0 + public var rebootCount: UInt32 = 0 /// /// The minimum app version that can talk to this device. /// Phone/PC apps should compare this to their build number and if too low tell the user they must update their app - var minAppVersion: UInt32 = 0 + public var minAppVersion: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// @@ -1992,33 +1992,33 @@ struct MyNodeInfo { /// on the message it is assumed to be a continuation of the previously sent message. /// This allows the device code to use fixed maxlen 64 byte strings for messages, /// and then extend as needed by emitting multiple records. -struct LogRecord { +public struct LogRecord { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Log levels, chosen to match python logging conventions. - var message: String = String() + public var message: String = String() /// /// Seconds since 1970 - or 0 for unknown/unset - var time: UInt32 = 0 + public var time: UInt32 = 0 /// /// Usually based on thread name - if known - var source: String = String() + public var source: String = String() /// /// Not yet set - var level: LogRecord.Level = .unset + public var level: LogRecord.Level = .unset - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// Log levels, chosen to match python logging conventions. - enum Level: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum Level: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Log levels, chosen to match python logging conventions. @@ -2049,11 +2049,11 @@ struct LogRecord { case trace // = 5 case UNRECOGNIZED(Int) - init() { + public init() { self = .unset } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unset case 5: self = .trace @@ -2066,7 +2066,7 @@ struct LogRecord { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unset: return 0 case .trace: return 5 @@ -2081,14 +2081,14 @@ struct LogRecord { } - init() {} + public init() {} } #if swift(>=4.2) extension LogRecord.Level: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [LogRecord.Level] = [ + public static let allCases: [LogRecord.Level] = [ .unset, .critical, .error, @@ -2101,26 +2101,26 @@ extension LogRecord.Level: CaseIterable { #endif // swift(>=4.2) -struct QueueStatus { +public struct QueueStatus { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Last attempt to queue status, ErrorCode - var res: Int32 = 0 + public var res: Int32 = 0 /// Free entries in the outgoing queue - var free: UInt32 = 0 + public var free: UInt32 = 0 /// Maximum entries in the outgoing queue - var maxlen: UInt32 = 0 + public var maxlen: UInt32 = 0 /// What was mesh packet id that generated this response? - var meshPacketID: UInt32 = 0 + public var meshPacketID: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// @@ -2128,7 +2128,7 @@ struct QueueStatus { /// It will support READ and NOTIFY. When a new packet arrives the device will BLE notify? /// It will sit in that descriptor until consumed by the phone, /// at which point the next item in the FIFO will be populated. -struct FromRadio { +public struct FromRadio { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -2136,21 +2136,21 @@ struct FromRadio { /// /// The packet id, used to allow the phone to request missing read packets from the FIFO, /// see our bluetooth docs - var id: UInt32 { + public var id: UInt32 { get {return _storage._id} set {_uniqueStorage()._id = newValue} } /// /// Log levels, chosen to match python logging conventions. - var payloadVariant: OneOf_PayloadVariant? { + public var payloadVariant: OneOf_PayloadVariant? { get {return _storage._payloadVariant} set {_uniqueStorage()._payloadVariant = newValue} } /// /// Log levels, chosen to match python logging conventions. - var packet: MeshPacket { + public var packet: MeshPacket { get { if case .packet(let v)? = _storage._payloadVariant {return v} return MeshPacket() @@ -2161,7 +2161,7 @@ struct FromRadio { /// /// 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. - var myInfo: MyNodeInfo { + public var myInfo: MyNodeInfo { get { if case .myInfo(let v)? = _storage._payloadVariant {return v} return MyNodeInfo() @@ -2172,7 +2172,7 @@ struct FromRadio { /// /// One packet is sent for each node in the on radio DB /// starts over with the first node in our DB - var nodeInfo: NodeInfo { + public var nodeInfo: NodeInfo { get { if case .nodeInfo(let v)? = _storage._payloadVariant {return v} return NodeInfo() @@ -2182,7 +2182,7 @@ struct FromRadio { /// /// Include a part of the config (was: RadioConfig radio) - var config: Config { + public var config: Config { get { if case .config(let v)? = _storage._payloadVariant {return v} return Config() @@ -2192,7 +2192,7 @@ struct FromRadio { /// /// Set to send debug console output over our protobuf stream - var logRecord: LogRecord { + public var logRecord: LogRecord { get { if case .logRecord(let v)? = _storage._payloadVariant {return v} return LogRecord() @@ -2205,7 +2205,7 @@ struct FromRadio { /// recipient should check if this ID matches our original request nonce, if /// not, it means your config responses haven't started yet. /// NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. - var configCompleteID: UInt32 { + public var configCompleteID: UInt32 { get { if case .configCompleteID(let v)? = _storage._payloadVariant {return v} return 0 @@ -2218,7 +2218,7 @@ struct FromRadio { /// Set to true if present. /// Not used on all transports, currently just used for the serial console. /// NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. - var rebooted: Bool { + public var rebooted: Bool { get { if case .rebooted(let v)? = _storage._payloadVariant {return v} return false @@ -2228,7 +2228,7 @@ struct FromRadio { /// /// Include module config - var moduleConfig: ModuleConfig { + public var moduleConfig: ModuleConfig { get { if case .moduleConfig(let v)? = _storage._payloadVariant {return v} return ModuleConfig() @@ -2238,7 +2238,7 @@ struct FromRadio { /// /// One packet is sent for each channel - var channel: Channel { + public var channel: Channel { get { if case .channel(let v)? = _storage._payloadVariant {return v} return Channel() @@ -2248,7 +2248,7 @@ struct FromRadio { /// /// Queue status info - var queueStatus: QueueStatus { + public var queueStatus: QueueStatus { get { if case .queueStatus(let v)? = _storage._payloadVariant {return v} return QueueStatus() @@ -2258,7 +2258,7 @@ struct FromRadio { /// /// File Transfer Chunk - var xmodemPacket: XModem { + public var xmodemPacket: XModem { get { if case .xmodemPacket(let v)? = _storage._payloadVariant {return v} return XModem() @@ -2268,7 +2268,7 @@ struct FromRadio { /// /// Device metadata message - var metadata: DeviceMetadata { + public var metadata: DeviceMetadata { get { if case .metadata(let v)? = _storage._payloadVariant {return v} return DeviceMetadata() @@ -2278,7 +2278,7 @@ struct FromRadio { /// /// MQTT Client Proxy Message (device sending to client / phone for publishing to MQTT) - var mqttClientProxyMessage: MqttClientProxyMessage { + public var mqttClientProxyMessage: MqttClientProxyMessage { get { if case .mqttClientProxyMessage(let v)? = _storage._payloadVariant {return v} return MqttClientProxyMessage() @@ -2286,11 +2286,11 @@ struct FromRadio { set {_uniqueStorage()._payloadVariant = .mqttClientProxyMessage(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// Log levels, chosen to match python logging conventions. - enum OneOf_PayloadVariant: Equatable { + public enum OneOf_PayloadVariant: Equatable { /// /// Log levels, chosen to match python logging conventions. case packet(MeshPacket) @@ -2340,7 +2340,7 @@ struct FromRadio { case mqttClientProxyMessage(MqttClientProxyMessage) #if !swift(>=4.1) - static func ==(lhs: FromRadio.OneOf_PayloadVariant, rhs: FromRadio.OneOf_PayloadVariant) -> Bool { + public static func ==(lhs: FromRadio.OneOf_PayloadVariant, rhs: FromRadio.OneOf_PayloadVariant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -2403,7 +2403,7 @@ struct FromRadio { #endif } - init() {} + public init() {} fileprivate var _storage = _StorageClass.defaultInstance } @@ -2411,18 +2411,18 @@ struct FromRadio { /// /// Packets/commands to the radio will be written (reliably) to the toRadio characteristic. /// Once the write completes the phone can assume it is handled. -struct ToRadio { +public struct ToRadio { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Log levels, chosen to match python logging conventions. - var payloadVariant: ToRadio.OneOf_PayloadVariant? = nil + public var payloadVariant: ToRadio.OneOf_PayloadVariant? = nil /// /// Send this packet on the mesh - var packet: MeshPacket { + public var packet: MeshPacket { get { if case .packet(let v)? = payloadVariant {return v} return MeshPacket() @@ -2439,7 +2439,7 @@ struct ToRadio { /// the integer you write into this field will be reported back in the /// config_complete_id response this allows clients to never be confused by /// a stale old partially sent config. - var wantConfigID: UInt32 { + public var wantConfigID: UInt32 { get { if case .wantConfigID(let v)? = payloadVariant {return v} return 0 @@ -2451,7 +2451,7 @@ struct ToRadio { /// Tell API server we are disconnecting now. /// This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link. /// (Sending this message is optional for clients) - var disconnect: Bool { + public var disconnect: Bool { get { if case .disconnect(let v)? = payloadVariant {return v} return false @@ -2459,7 +2459,7 @@ struct ToRadio { set {payloadVariant = .disconnect(newValue)} } - var xmodemPacket: XModem { + public var xmodemPacket: XModem { get { if case .xmodemPacket(let v)? = payloadVariant {return v} return XModem() @@ -2469,7 +2469,7 @@ struct ToRadio { /// /// MQTT Client Proxy Message (for client / phone subscribed to MQTT sending to device) - var mqttClientProxyMessage: MqttClientProxyMessage { + public var mqttClientProxyMessage: MqttClientProxyMessage { get { if case .mqttClientProxyMessage(let v)? = payloadVariant {return v} return MqttClientProxyMessage() @@ -2479,7 +2479,7 @@ struct ToRadio { /// /// Heartbeat message (used to keep the device connection awake on serial) - var heartbeat: Heartbeat { + public var heartbeat: Heartbeat { get { if case .heartbeat(let v)? = payloadVariant {return v} return Heartbeat() @@ -2487,11 +2487,11 @@ struct ToRadio { set {payloadVariant = .heartbeat(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// Log levels, chosen to match python logging conventions. - enum OneOf_PayloadVariant: Equatable { + public enum OneOf_PayloadVariant: Equatable { /// /// Send this packet on the mesh case packet(MeshPacket) @@ -2519,7 +2519,7 @@ struct ToRadio { case heartbeat(Heartbeat) #if !swift(>=4.1) - static func ==(lhs: ToRadio.OneOf_PayloadVariant, rhs: ToRadio.OneOf_PayloadVariant) -> Bool { + public static func ==(lhs: ToRadio.OneOf_PayloadVariant, rhs: ToRadio.OneOf_PayloadVariant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -2554,237 +2554,237 @@ struct ToRadio { #endif } - init() {} + public init() {} } /// /// Compressed message payload -struct Compressed { +public struct Compressed { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// PortNum to determine the how to handle the compressed payload. - var portnum: PortNum = .unknownApp + public var portnum: PortNum = .unknownApp /// /// Compressed data. - var data: Data = Data() + public var data: Data = Data() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Full info on edges for a single node -struct NeighborInfo { +public struct NeighborInfo { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The node ID of the node sending info on its neighbors - var nodeID: UInt32 = 0 + public var nodeID: UInt32 = 0 /// /// Field to pass neighbor info for the next sending cycle - var lastSentByID: UInt32 = 0 + public var lastSentByID: UInt32 = 0 /// /// Broadcast interval of the represented node (in seconds) - var nodeBroadcastIntervalSecs: UInt32 = 0 + public var nodeBroadcastIntervalSecs: UInt32 = 0 /// /// The list of out edges from this node - var neighbors: [Neighbor] = [] + public var neighbors: [Neighbor] = [] - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// A single edge in the mesh -struct Neighbor { +public struct Neighbor { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Node ID of neighbor - var nodeID: UInt32 = 0 + public var nodeID: UInt32 = 0 /// /// SNR of last heard message - var snr: Float = 0 + public var snr: Float = 0 /// /// Reception time (in secs since 1970) of last message that was last sent by this ID. /// Note: this is for local storage only and will not be sent out over the mesh. - var lastRxTime: UInt32 = 0 + public var lastRxTime: UInt32 = 0 /// /// Broadcast interval of this neighbor (in seconds). /// Note: this is for local storage only and will not be sent out over the mesh. - var nodeBroadcastIntervalSecs: UInt32 = 0 + public var nodeBroadcastIntervalSecs: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Device metadata response -struct DeviceMetadata { +public struct DeviceMetadata { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Device firmware version string - var firmwareVersion: String = String() + public var firmwareVersion: String = String() /// /// Device state version - var deviceStateVersion: UInt32 = 0 + public var deviceStateVersion: UInt32 = 0 /// /// Indicates whether the device can shutdown CPU natively or via power management chip - var canShutdown: Bool = false + public var canShutdown: Bool = false /// /// Indicates that the device has native wifi capability - var hasWifi_p: Bool = false + public var hasWifi_p: Bool = false /// /// Indicates that the device has native bluetooth capability - var hasBluetooth_p: Bool = false + public var hasBluetooth_p: Bool = false /// /// Indicates that the device has an ethernet peripheral - var hasEthernet_p: Bool = false + public var hasEthernet_p: Bool = false /// /// Indicates that the device's role in the mesh - var role: Config.DeviceConfig.Role = .client + public var role: Config.DeviceConfig.Role = .client /// /// Indicates the device's current enabled position flags - var positionFlags: UInt32 = 0 + public var positionFlags: UInt32 = 0 /// /// Device hardware model - var hwModel: HardwareModel = .unset + public var hwModel: HardwareModel = .unset /// /// Has Remote Hardware enabled - var hasRemoteHardware_p: Bool = false + public var hasRemoteHardware_p: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// A heartbeat message is sent to the node from the client to keep the connection alive. /// This is currently only needed to keep serial connections alive, but can be used by any PhoneAPI. -struct Heartbeat { +public struct Heartbeat { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// RemoteHardwarePins associated with a node -struct NodeRemoteHardwarePin { +public struct NodeRemoteHardwarePin { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The node_num exposing the available gpio pin - var nodeNum: UInt32 = 0 + public var nodeNum: UInt32 = 0 /// /// The the available gpio pin for usage with RemoteHardware module - var pin: RemoteHardwarePin { + public var pin: RemoteHardwarePin { get {return _pin ?? RemoteHardwarePin()} set {_pin = newValue} } /// Returns true if `pin` has been explicitly set. - var hasPin: Bool {return self._pin != nil} + public var hasPin: Bool {return self._pin != nil} /// Clears the value of `pin`. Subsequent reads from it will return its default value. - mutating func clearPin() {self._pin = nil} + public mutating func clearPin() {self._pin = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _pin: RemoteHardwarePin? = nil } -struct ChunkedPayload { +public struct ChunkedPayload { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The ID of the entire payload - var payloadID: UInt32 = 0 + public var payloadID: UInt32 = 0 /// /// The total number of chunks in the payload - var chunkCount: UInt32 = 0 + public var chunkCount: UInt32 = 0 /// /// The current chunk index in the total - var chunkIndex: UInt32 = 0 + public var chunkIndex: UInt32 = 0 /// /// The binary data of the current chunk - var payloadChunk: Data = Data() + public var payloadChunk: Data = Data() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Wrapper message for broken repeated oneof support -struct resend_chunks { +public struct resend_chunks { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var chunks: [UInt32] = [] + public var chunks: [UInt32] = [] - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Responses to a ChunkedPayload request -struct ChunkedPayloadResponse { +public struct ChunkedPayloadResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The ID of the entire payload - var payloadID: UInt32 = 0 + public var payloadID: UInt32 = 0 - var payloadVariant: ChunkedPayloadResponse.OneOf_PayloadVariant? = nil + public var payloadVariant: ChunkedPayloadResponse.OneOf_PayloadVariant? = nil /// /// Request to transfer chunked payload - var requestTransfer: Bool { + public var requestTransfer: Bool { get { if case .requestTransfer(let v)? = payloadVariant {return v} return false @@ -2794,7 +2794,7 @@ struct ChunkedPayloadResponse { /// /// Accept the transfer chunked payload - var acceptTransfer: Bool { + public var acceptTransfer: Bool { get { if case .acceptTransfer(let v)? = payloadVariant {return v} return false @@ -2804,7 +2804,7 @@ struct ChunkedPayloadResponse { /// /// Request missing indexes in the chunked payload - var resendChunks: resend_chunks { + public var resendChunks: resend_chunks { get { if case .resendChunks(let v)? = payloadVariant {return v} return resend_chunks() @@ -2812,9 +2812,9 @@ struct ChunkedPayloadResponse { set {payloadVariant = .resendChunks(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_PayloadVariant: Equatable { + public enum OneOf_PayloadVariant: Equatable { /// /// Request to transfer chunked payload case requestTransfer(Bool) @@ -2826,7 +2826,7 @@ struct ChunkedPayloadResponse { case resendChunks(resend_chunks) #if !swift(>=4.1) - static func ==(lhs: ChunkedPayloadResponse.OneOf_PayloadVariant, rhs: ChunkedPayloadResponse.OneOf_PayloadVariant) -> Bool { + public static func ==(lhs: ChunkedPayloadResponse.OneOf_PayloadVariant, rhs: ChunkedPayloadResponse.OneOf_PayloadVariant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -2849,7 +2849,7 @@ struct ChunkedPayloadResponse { #endif } - init() {} + public init() {} } #if swift(>=5.5) && canImport(_Concurrency) @@ -2898,7 +2898,7 @@ extension ChunkedPayloadResponse.OneOf_PayloadVariant: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension HardwareModel: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "UNSET"), 1: .same(proto: "TLORA_V2"), 2: .same(proto: "TLORA_V1"), @@ -2969,14 +2969,14 @@ extension HardwareModel: SwiftProtobuf._ProtoNameProviding { } extension Constants: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ZERO"), 237: .same(proto: "DATA_PAYLOAD_LEN"), ] } extension CriticalErrorCode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "NONE"), 1: .same(proto: "TX_WATCHDOG"), 2: .same(proto: "SLEEP_ENTER_WAIT"), @@ -2993,8 +2993,8 @@ extension CriticalErrorCode: SwiftProtobuf._ProtoNameProviding { } extension Position: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Position" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Position" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "latitude_i"), 2: .standard(proto: "longitude_i"), 3: .same(proto: "altitude"), @@ -3091,7 +3091,7 @@ extension Position: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB return _storage } - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { _ = _uniqueStorage() try withExtendedLifetime(_storage) { (_storage: _StorageClass) in while let fieldNumber = try decoder.nextFieldNumber() { @@ -3128,7 +3128,7 @@ extension Position: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in if _storage._latitudeI != 0 { try visitor.visitSingularSFixed32Field(value: _storage._latitudeI, fieldNumber: 1) @@ -3203,7 +3203,7 @@ extension Position: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Position, rhs: Position) -> Bool { + public static func ==(lhs: Position, rhs: Position) -> Bool { if lhs._storage !== rhs._storage { let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 @@ -3241,7 +3241,7 @@ extension Position: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB } extension Position.LocSource: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "LOC_UNSET"), 1: .same(proto: "LOC_MANUAL"), 2: .same(proto: "LOC_INTERNAL"), @@ -3250,7 +3250,7 @@ extension Position.LocSource: SwiftProtobuf._ProtoNameProviding { } extension Position.AltSource: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALT_UNSET"), 1: .same(proto: "ALT_MANUAL"), 2: .same(proto: "ALT_INTERNAL"), @@ -3260,8 +3260,8 @@ extension Position.AltSource: SwiftProtobuf._ProtoNameProviding { } extension User: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".User" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".User" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "id"), 2: .standard(proto: "long_name"), 3: .standard(proto: "short_name"), @@ -3271,7 +3271,7 @@ extension User: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, 7: .same(proto: "role"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -3289,7 +3289,7 @@ extension User: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.id.isEmpty { try visitor.visitSingularStringField(value: self.id, fieldNumber: 1) } @@ -3314,7 +3314,7 @@ extension User: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: User, rhs: User) -> Bool { + public static func ==(lhs: User, rhs: User) -> Bool { if lhs.id != rhs.id {return false} if lhs.longName != rhs.longName {return false} if lhs.shortName != rhs.shortName {return false} @@ -3328,12 +3328,12 @@ extension User: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, } extension RouteDiscovery: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".RouteDiscovery" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".RouteDiscovery" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "route"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -3345,14 +3345,14 @@ extension RouteDiscovery: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.route.isEmpty { try visitor.visitPackedFixed32Field(value: self.route, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: RouteDiscovery, rhs: RouteDiscovery) -> Bool { + public static func ==(lhs: RouteDiscovery, rhs: RouteDiscovery) -> Bool { if lhs.route != rhs.route {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -3360,14 +3360,14 @@ extension RouteDiscovery: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } extension Routing: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Routing" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Routing" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "route_request"), 2: .standard(proto: "route_reply"), 3: .standard(proto: "error_reason"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -3412,7 +3412,7 @@ extension Routing: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -3435,7 +3435,7 @@ extension Routing: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Routing, rhs: Routing) -> Bool { + public static func ==(lhs: Routing, rhs: Routing) -> Bool { if lhs.variant != rhs.variant {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -3443,7 +3443,7 @@ extension Routing: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa } extension Routing.Error: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "NONE"), 1: .same(proto: "NO_ROUTE"), 2: .same(proto: "GOT_NAK"), @@ -3460,8 +3460,8 @@ extension Routing.Error: SwiftProtobuf._ProtoNameProviding { } extension DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Data" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Data" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "portnum"), 2: .same(proto: "payload"), 3: .standard(proto: "want_response"), @@ -3472,7 +3472,7 @@ extension DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati 8: .same(proto: "emoji"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -3491,7 +3491,7 @@ extension DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.portnum != .unknownApp { try visitor.visitSingularEnumField(value: self.portnum, fieldNumber: 1) } @@ -3519,7 +3519,7 @@ extension DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: DataMessage, rhs: DataMessage) -> Bool { + public static func ==(lhs: DataMessage, rhs: DataMessage) -> Bool { if lhs.portnum != rhs.portnum {return false} if lhs.payload != rhs.payload {return false} if lhs.wantResponse != rhs.wantResponse {return false} @@ -3534,8 +3534,8 @@ extension DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } extension Waypoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Waypoint" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Waypoint" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "id"), 2: .standard(proto: "latitude_i"), 3: .standard(proto: "longitude_i"), @@ -3546,7 +3546,7 @@ extension Waypoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB 8: .same(proto: "icon"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -3565,7 +3565,7 @@ extension Waypoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.id != 0 { try visitor.visitSingularUInt32Field(value: self.id, fieldNumber: 1) } @@ -3593,7 +3593,7 @@ extension Waypoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Waypoint, rhs: Waypoint) -> Bool { + public static func ==(lhs: Waypoint, rhs: Waypoint) -> Bool { if lhs.id != rhs.id {return false} if lhs.latitudeI != rhs.latitudeI {return false} if lhs.longitudeI != rhs.longitudeI {return false} @@ -3608,15 +3608,15 @@ extension Waypoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB } extension MqttClientProxyMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".MqttClientProxyMessage" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".MqttClientProxyMessage" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "topic"), 2: .same(proto: "data"), 3: .same(proto: "text"), 4: .same(proto: "retained"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -3645,7 +3645,7 @@ extension MqttClientProxyMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageI } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -3670,7 +3670,7 @@ extension MqttClientProxyMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageI try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: MqttClientProxyMessage, rhs: MqttClientProxyMessage) -> Bool { + public static func ==(lhs: MqttClientProxyMessage, rhs: MqttClientProxyMessage) -> Bool { if lhs.topic != rhs.topic {return false} if lhs.payloadVariant != rhs.payloadVariant {return false} if lhs.retained != rhs.retained {return false} @@ -3680,8 +3680,8 @@ extension MqttClientProxyMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageI } extension MeshPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".MeshPacket" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".MeshPacket" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "from"), 2: .same(proto: "to"), 3: .same(proto: "channel"), @@ -3752,7 +3752,7 @@ extension MeshPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio return _storage } - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { _ = _uniqueStorage() try withExtendedLifetime(_storage) { (_storage: _StorageClass) in while let fieldNumber = try decoder.nextFieldNumber() { @@ -3800,7 +3800,7 @@ extension MeshPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations @@ -3860,7 +3860,7 @@ extension MeshPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: MeshPacket, rhs: MeshPacket) -> Bool { + public static func ==(lhs: MeshPacket, rhs: MeshPacket) -> Bool { if lhs._storage !== rhs._storage { let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 @@ -3889,7 +3889,7 @@ extension MeshPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio } extension MeshPacket.Priority: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "UNSET"), 1: .same(proto: "MIN"), 10: .same(proto: "BACKGROUND"), @@ -3901,7 +3901,7 @@ extension MeshPacket.Priority: SwiftProtobuf._ProtoNameProviding { } extension MeshPacket.Delayed: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "NO_DELAY"), 1: .same(proto: "DELAYED_BROADCAST"), 2: .same(proto: "DELAYED_DIRECT"), @@ -3909,8 +3909,8 @@ extension MeshPacket.Delayed: SwiftProtobuf._ProtoNameProviding { } extension NodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".NodeInfo" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".NodeInfo" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "num"), 2: .same(proto: "user"), 3: .same(proto: "position"), @@ -3968,7 +3968,7 @@ extension NodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB return _storage } - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { _ = _uniqueStorage() try withExtendedLifetime(_storage) { (_storage: _StorageClass) in while let fieldNumber = try decoder.nextFieldNumber() { @@ -3992,7 +3992,7 @@ extension NodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations @@ -4032,7 +4032,7 @@ extension NodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: NodeInfo, rhs: NodeInfo) -> Bool { + public static func ==(lhs: NodeInfo, rhs: NodeInfo) -> Bool { if lhs._storage !== rhs._storage { let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 @@ -4057,14 +4057,14 @@ extension NodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB } extension MyNodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".MyNodeInfo" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".MyNodeInfo" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "my_node_num"), 8: .standard(proto: "reboot_count"), 11: .standard(proto: "min_app_version"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -4078,7 +4078,7 @@ extension MyNodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.myNodeNum != 0 { try visitor.visitSingularUInt32Field(value: self.myNodeNum, fieldNumber: 1) } @@ -4091,7 +4091,7 @@ extension MyNodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: MyNodeInfo, rhs: MyNodeInfo) -> Bool { + public static func ==(lhs: MyNodeInfo, rhs: MyNodeInfo) -> Bool { if lhs.myNodeNum != rhs.myNodeNum {return false} if lhs.rebootCount != rhs.rebootCount {return false} if lhs.minAppVersion != rhs.minAppVersion {return false} @@ -4101,15 +4101,15 @@ extension MyNodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio } extension LogRecord: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".LogRecord" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".LogRecord" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "message"), 2: .same(proto: "time"), 3: .same(proto: "source"), 4: .same(proto: "level"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -4124,7 +4124,7 @@ extension LogRecord: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.message.isEmpty { try visitor.visitSingularStringField(value: self.message, fieldNumber: 1) } @@ -4140,7 +4140,7 @@ extension LogRecord: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: LogRecord, rhs: LogRecord) -> Bool { + public static func ==(lhs: LogRecord, rhs: LogRecord) -> Bool { if lhs.message != rhs.message {return false} if lhs.time != rhs.time {return false} if lhs.source != rhs.source {return false} @@ -4151,7 +4151,7 @@ extension LogRecord: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation } extension LogRecord.Level: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "UNSET"), 5: .same(proto: "TRACE"), 10: .same(proto: "DEBUG"), @@ -4163,15 +4163,15 @@ extension LogRecord.Level: SwiftProtobuf._ProtoNameProviding { } extension QueueStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".QueueStatus" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".QueueStatus" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "res"), 2: .same(proto: "free"), 3: .same(proto: "maxlen"), 4: .standard(proto: "mesh_packet_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -4186,7 +4186,7 @@ extension QueueStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.res != 0 { try visitor.visitSingularInt32Field(value: self.res, fieldNumber: 1) } @@ -4202,7 +4202,7 @@ extension QueueStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: QueueStatus, rhs: QueueStatus) -> Bool { + public static func ==(lhs: QueueStatus, rhs: QueueStatus) -> Bool { if lhs.res != rhs.res {return false} if lhs.free != rhs.free {return false} if lhs.maxlen != rhs.maxlen {return false} @@ -4213,8 +4213,8 @@ extension QueueStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } extension FromRadio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".FromRadio" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".FromRadio" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "id"), 2: .same(proto: "packet"), 3: .standard(proto: "my_info"), @@ -4260,7 +4260,7 @@ extension FromRadio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation return _storage } - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { _ = _uniqueStorage() try withExtendedLifetime(_storage) { (_storage: _StorageClass) in while let fieldNumber = try decoder.nextFieldNumber() { @@ -4434,7 +4434,7 @@ extension FromRadio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations @@ -4502,7 +4502,7 @@ extension FromRadio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: FromRadio, rhs: FromRadio) -> Bool { + public static func ==(lhs: FromRadio, rhs: FromRadio) -> Bool { if lhs._storage !== rhs._storage { let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 @@ -4519,8 +4519,8 @@ extension FromRadio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation } extension ToRadio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ToRadio" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".ToRadio" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "packet"), 3: .standard(proto: "want_config_id"), 4: .same(proto: "disconnect"), @@ -4529,7 +4529,7 @@ extension ToRadio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa 7: .same(proto: "heartbeat"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -4608,7 +4608,7 @@ extension ToRadio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -4643,7 +4643,7 @@ extension ToRadio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ToRadio, rhs: ToRadio) -> Bool { + public static func ==(lhs: ToRadio, rhs: ToRadio) -> Bool { if lhs.payloadVariant != rhs.payloadVariant {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -4651,13 +4651,13 @@ extension ToRadio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa } extension Compressed: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Compressed" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Compressed" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "portnum"), 2: .same(proto: "data"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -4670,7 +4670,7 @@ extension Compressed: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.portnum != .unknownApp { try visitor.visitSingularEnumField(value: self.portnum, fieldNumber: 1) } @@ -4680,7 +4680,7 @@ extension Compressed: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Compressed, rhs: Compressed) -> Bool { + public static func ==(lhs: Compressed, rhs: Compressed) -> Bool { if lhs.portnum != rhs.portnum {return false} if lhs.data != rhs.data {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -4689,15 +4689,15 @@ extension Compressed: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio } extension NeighborInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".NeighborInfo" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".NeighborInfo" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "node_id"), 2: .standard(proto: "last_sent_by_id"), 3: .standard(proto: "node_broadcast_interval_secs"), 4: .same(proto: "neighbors"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -4712,7 +4712,7 @@ extension NeighborInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.nodeID != 0 { try visitor.visitSingularUInt32Field(value: self.nodeID, fieldNumber: 1) } @@ -4728,7 +4728,7 @@ extension NeighborInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: NeighborInfo, rhs: NeighborInfo) -> Bool { + public static func ==(lhs: NeighborInfo, rhs: NeighborInfo) -> Bool { if lhs.nodeID != rhs.nodeID {return false} if lhs.lastSentByID != rhs.lastSentByID {return false} if lhs.nodeBroadcastIntervalSecs != rhs.nodeBroadcastIntervalSecs {return false} @@ -4739,15 +4739,15 @@ extension NeighborInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } extension Neighbor: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Neighbor" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Neighbor" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "node_id"), 2: .same(proto: "snr"), 3: .standard(proto: "last_rx_time"), 4: .standard(proto: "node_broadcast_interval_secs"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -4762,7 +4762,7 @@ extension Neighbor: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.nodeID != 0 { try visitor.visitSingularUInt32Field(value: self.nodeID, fieldNumber: 1) } @@ -4778,7 +4778,7 @@ extension Neighbor: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Neighbor, rhs: Neighbor) -> Bool { + public static func ==(lhs: Neighbor, rhs: Neighbor) -> Bool { if lhs.nodeID != rhs.nodeID {return false} if lhs.snr != rhs.snr {return false} if lhs.lastRxTime != rhs.lastRxTime {return false} @@ -4789,8 +4789,8 @@ extension Neighbor: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB } extension DeviceMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".DeviceMetadata" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".DeviceMetadata" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "firmware_version"), 2: .standard(proto: "device_state_version"), 3: .same(proto: "canShutdown"), @@ -4803,7 +4803,7 @@ extension DeviceMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement 10: .same(proto: "hasRemoteHardware"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -4824,7 +4824,7 @@ extension DeviceMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.firmwareVersion.isEmpty { try visitor.visitSingularStringField(value: self.firmwareVersion, fieldNumber: 1) } @@ -4858,7 +4858,7 @@ extension DeviceMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: DeviceMetadata, rhs: DeviceMetadata) -> Bool { + public static func ==(lhs: DeviceMetadata, rhs: DeviceMetadata) -> Bool { if lhs.firmwareVersion != rhs.firmwareVersion {return false} if lhs.deviceStateVersion != rhs.deviceStateVersion {return false} if lhs.canShutdown != rhs.canShutdown {return false} @@ -4875,32 +4875,32 @@ extension DeviceMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } extension Heartbeat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Heartbeat" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() + public static let protoMessageName: String = _protobuf_package + ".Heartbeat" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let _ = try decoder.nextFieldNumber() { } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Heartbeat, rhs: Heartbeat) -> Bool { + public static func ==(lhs: Heartbeat, rhs: Heartbeat) -> Bool { if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension NodeRemoteHardwarePin: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".NodeRemoteHardwarePin" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".NodeRemoteHardwarePin" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "node_num"), 2: .same(proto: "pin"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -4913,7 +4913,7 @@ extension NodeRemoteHardwarePin: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -4927,7 +4927,7 @@ extension NodeRemoteHardwarePin: SwiftProtobuf.Message, SwiftProtobuf._MessageIm try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: NodeRemoteHardwarePin, rhs: NodeRemoteHardwarePin) -> Bool { + public static func ==(lhs: NodeRemoteHardwarePin, rhs: NodeRemoteHardwarePin) -> Bool { if lhs.nodeNum != rhs.nodeNum {return false} if lhs._pin != rhs._pin {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -4936,15 +4936,15 @@ extension NodeRemoteHardwarePin: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } extension ChunkedPayload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ChunkedPayload" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".ChunkedPayload" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "payload_id"), 2: .standard(proto: "chunk_count"), 3: .standard(proto: "chunk_index"), 4: .standard(proto: "payload_chunk"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -4959,7 +4959,7 @@ extension ChunkedPayload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.payloadID != 0 { try visitor.visitSingularUInt32Field(value: self.payloadID, fieldNumber: 1) } @@ -4975,7 +4975,7 @@ extension ChunkedPayload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ChunkedPayload, rhs: ChunkedPayload) -> Bool { + public static func ==(lhs: ChunkedPayload, rhs: ChunkedPayload) -> Bool { if lhs.payloadID != rhs.payloadID {return false} if lhs.chunkCount != rhs.chunkCount {return false} if lhs.chunkIndex != rhs.chunkIndex {return false} @@ -4986,12 +4986,12 @@ extension ChunkedPayload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } extension resend_chunks: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".resend_chunks" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".resend_chunks" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "chunks"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -5003,14 +5003,14 @@ extension resend_chunks: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.chunks.isEmpty { try visitor.visitPackedUInt32Field(value: self.chunks, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: resend_chunks, rhs: resend_chunks) -> Bool { + public static func ==(lhs: resend_chunks, rhs: resend_chunks) -> Bool { if lhs.chunks != rhs.chunks {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -5018,15 +5018,15 @@ extension resend_chunks: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa } extension ChunkedPayloadResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ChunkedPayloadResponse" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".ChunkedPayloadResponse" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "payload_id"), 2: .standard(proto: "request_transfer"), 3: .standard(proto: "accept_transfer"), 4: .standard(proto: "resend_chunks"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -5067,7 +5067,7 @@ extension ChunkedPayloadResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageI } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -5093,7 +5093,7 @@ extension ChunkedPayloadResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageI try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ChunkedPayloadResponse, rhs: ChunkedPayloadResponse) -> Bool { + public static func ==(lhs: ChunkedPayloadResponse, rhs: ChunkedPayloadResponse) -> Bool { if lhs.payloadID != rhs.payloadID {return false} if lhs.payloadVariant != rhs.payloadVariant {return false} if lhs.unknownFields != rhs.unknownFields {return false} diff --git a/Meshtastic/Protobufs/meshtastic/module_config.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/module_config.pb.swift similarity index 83% rename from Meshtastic/Protobufs/meshtastic/module_config.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/module_config.pb.swift index 465e4e1f..5e2da81a 100644 --- a/Meshtastic/Protobufs/meshtastic/module_config.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/module_config.pb.swift @@ -20,8 +20,8 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _2 } -enum RemoteHardwarePinType: SwiftProtobuf.Enum { - typealias RawValue = Int +public enum RemoteHardwarePinType: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Unset/unused @@ -36,11 +36,11 @@ enum RemoteHardwarePinType: SwiftProtobuf.Enum { case digitalWrite // = 2 case UNRECOGNIZED(Int) - init() { + public init() { self = .unknown } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unknown case 1: self = .digitalRead @@ -49,7 +49,7 @@ enum RemoteHardwarePinType: SwiftProtobuf.Enum { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unknown: return 0 case .digitalRead: return 1 @@ -64,7 +64,7 @@ enum RemoteHardwarePinType: SwiftProtobuf.Enum { extension RemoteHardwarePinType: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [RemoteHardwarePinType] = [ + public static let allCases: [RemoteHardwarePinType] = [ .unknown, .digitalRead, .digitalWrite, @@ -75,18 +75,18 @@ extension RemoteHardwarePinType: CaseIterable { /// /// Module Config -struct ModuleConfig { +public struct ModuleConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// TODO: REPLACE - var payloadVariant: ModuleConfig.OneOf_PayloadVariant? = nil + public var payloadVariant: ModuleConfig.OneOf_PayloadVariant? = nil /// /// TODO: REPLACE - var mqtt: ModuleConfig.MQTTConfig { + public var mqtt: ModuleConfig.MQTTConfig { get { if case .mqtt(let v)? = payloadVariant {return v} return ModuleConfig.MQTTConfig() @@ -96,7 +96,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var serial: ModuleConfig.SerialConfig { + public var serial: ModuleConfig.SerialConfig { get { if case .serial(let v)? = payloadVariant {return v} return ModuleConfig.SerialConfig() @@ -106,7 +106,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var externalNotification: ModuleConfig.ExternalNotificationConfig { + public var externalNotification: ModuleConfig.ExternalNotificationConfig { get { if case .externalNotification(let v)? = payloadVariant {return v} return ModuleConfig.ExternalNotificationConfig() @@ -116,7 +116,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var storeForward: ModuleConfig.StoreForwardConfig { + public var storeForward: ModuleConfig.StoreForwardConfig { get { if case .storeForward(let v)? = payloadVariant {return v} return ModuleConfig.StoreForwardConfig() @@ -126,7 +126,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var rangeTest: ModuleConfig.RangeTestConfig { + public var rangeTest: ModuleConfig.RangeTestConfig { get { if case .rangeTest(let v)? = payloadVariant {return v} return ModuleConfig.RangeTestConfig() @@ -136,7 +136,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var telemetry: ModuleConfig.TelemetryConfig { + public var telemetry: ModuleConfig.TelemetryConfig { get { if case .telemetry(let v)? = payloadVariant {return v} return ModuleConfig.TelemetryConfig() @@ -146,7 +146,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var cannedMessage: ModuleConfig.CannedMessageConfig { + public var cannedMessage: ModuleConfig.CannedMessageConfig { get { if case .cannedMessage(let v)? = payloadVariant {return v} return ModuleConfig.CannedMessageConfig() @@ -156,7 +156,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var audio: ModuleConfig.AudioConfig { + public var audio: ModuleConfig.AudioConfig { get { if case .audio(let v)? = payloadVariant {return v} return ModuleConfig.AudioConfig() @@ -166,7 +166,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var remoteHardware: ModuleConfig.RemoteHardwareConfig { + public var remoteHardware: ModuleConfig.RemoteHardwareConfig { get { if case .remoteHardware(let v)? = payloadVariant {return v} return ModuleConfig.RemoteHardwareConfig() @@ -176,7 +176,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var neighborInfo: ModuleConfig.NeighborInfoConfig { + public var neighborInfo: ModuleConfig.NeighborInfoConfig { get { if case .neighborInfo(let v)? = payloadVariant {return v} return ModuleConfig.NeighborInfoConfig() @@ -186,7 +186,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var ambientLighting: ModuleConfig.AmbientLightingConfig { + public var ambientLighting: ModuleConfig.AmbientLightingConfig { get { if case .ambientLighting(let v)? = payloadVariant {return v} return ModuleConfig.AmbientLightingConfig() @@ -196,7 +196,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var detectionSensor: ModuleConfig.DetectionSensorConfig { + public var detectionSensor: ModuleConfig.DetectionSensorConfig { get { if case .detectionSensor(let v)? = payloadVariant {return v} return ModuleConfig.DetectionSensorConfig() @@ -206,7 +206,7 @@ struct ModuleConfig { /// /// TODO: REPLACE - var paxcounter: ModuleConfig.PaxcounterConfig { + public var paxcounter: ModuleConfig.PaxcounterConfig { get { if case .paxcounter(let v)? = payloadVariant {return v} return ModuleConfig.PaxcounterConfig() @@ -214,11 +214,11 @@ struct ModuleConfig { set {payloadVariant = .paxcounter(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// TODO: REPLACE - enum OneOf_PayloadVariant: Equatable { + public enum OneOf_PayloadVariant: Equatable { /// /// TODO: REPLACE case mqtt(ModuleConfig.MQTTConfig) @@ -260,7 +260,7 @@ struct ModuleConfig { case paxcounter(ModuleConfig.PaxcounterConfig) #if !swift(>=4.1) - static func ==(lhs: ModuleConfig.OneOf_PayloadVariant, rhs: ModuleConfig.OneOf_PayloadVariant) -> Bool { + public static func ==(lhs: ModuleConfig.OneOf_PayloadVariant, rhs: ModuleConfig.OneOf_PayloadVariant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -325,7 +325,7 @@ struct ModuleConfig { /// /// MQTT Client Config - struct MQTTConfig { + public struct MQTTConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -333,228 +333,228 @@ struct ModuleConfig { /// /// If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as /// is_uplink_enabled or is_downlink_enabled. - var enabled: Bool = false + public var enabled: Bool = false /// /// The server to use for our MQTT global message gateway feature. /// If not set, the default server will be used - var address: String = String() + public var address: String = String() /// /// MQTT username to use (most useful for a custom MQTT server). /// If using a custom server, this will be honoured even if empty. /// If using the default server, this will only be honoured if set, otherwise the device will use the default username - var username: String = String() + public var username: String = String() /// /// MQTT password to use (most useful for a custom MQTT server). /// If using a custom server, this will be honoured even if empty. /// If using the default server, this will only be honoured if set, otherwise the device will use the default password - var password: String = String() + public var password: String = String() /// /// Whether to send encrypted or decrypted packets to MQTT. /// This parameter is only honoured if you also set server /// (the default official mqtt.meshtastic.org server can handle encrypted packets) /// Decrypted packets may be useful for external systems that want to consume meshtastic packets - var encryptionEnabled: Bool = false + public var encryptionEnabled: Bool = false /// /// Whether to send / consume json packets on MQTT - var jsonEnabled: Bool = false + public var jsonEnabled: Bool = false /// /// If true, we attempt to establish a secure connection using TLS - var tlsEnabled: Bool = false + public var tlsEnabled: Bool = false /// /// The root topic to use for MQTT messages. Default is "msh". /// This is useful if you want to use a single MQTT server for multiple meshtastic networks and separate them via ACLs - var root: String = String() + public var root: String = String() /// /// If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection - var proxyToClientEnabled: Bool = false + public var proxyToClientEnabled: Bool = false /// /// If true, we will periodically report unencrypted information about our node to a map via MQTT - var mapReportingEnabled: Bool = false + public var mapReportingEnabled: Bool = false /// /// Settings for reporting information about our node to a map via MQTT - var mapReportSettings: ModuleConfig.MapReportSettings { + public var mapReportSettings: ModuleConfig.MapReportSettings { get {return _mapReportSettings ?? ModuleConfig.MapReportSettings()} set {_mapReportSettings = newValue} } /// Returns true if `mapReportSettings` has been explicitly set. - var hasMapReportSettings: Bool {return self._mapReportSettings != nil} + public var hasMapReportSettings: Bool {return self._mapReportSettings != nil} /// Clears the value of `mapReportSettings`. Subsequent reads from it will return its default value. - mutating func clearMapReportSettings() {self._mapReportSettings = nil} + public mutating func clearMapReportSettings() {self._mapReportSettings = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _mapReportSettings: ModuleConfig.MapReportSettings? = nil } /// /// Settings for reporting unencrypted information about our node to a map via MQTT - struct MapReportSettings { + public struct MapReportSettings { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// How often we should report our info to the map (in seconds) - var publishIntervalSecs: UInt32 = 0 + public var publishIntervalSecs: UInt32 = 0 /// /// Bits of precision for the location sent (default of 32 is full precision). - var positionPrecision: UInt32 = 0 + public var positionPrecision: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// RemoteHardwareModule Config - struct RemoteHardwareConfig { + public struct RemoteHardwareConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Whether the Module is enabled - var enabled: Bool = false + public var enabled: Bool = false /// /// Whether the Module allows consumers to read / write to pins not defined in available_pins - var allowUndefinedPinAccess: Bool = false + public var allowUndefinedPinAccess: Bool = false /// /// Exposes the available pins to the mesh for reading and writing - var availablePins: [RemoteHardwarePin] = [] + public var availablePins: [RemoteHardwarePin] = [] - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// NeighborInfoModule Config - struct NeighborInfoConfig { + public struct NeighborInfoConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Whether the Module is enabled - var enabled: Bool = false + public var enabled: Bool = false /// /// Interval in seconds of how often we should try to send our /// Neighbor Info to the mesh - var updateInterval: UInt32 = 0 + public var updateInterval: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Detection Sensor Module Config - struct DetectionSensorConfig { + public struct DetectionSensorConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Whether the Module is enabled - var enabled: Bool = false + public var enabled: Bool = false /// /// Interval in seconds of how often we can send a message to the mesh when a state change is detected - var minimumBroadcastSecs: UInt32 = 0 + public var minimumBroadcastSecs: UInt32 = 0 /// /// Interval in seconds of how often we should send a message to the mesh with the current state regardless of changes /// When set to 0, only state changes will be broadcasted /// Works as a sort of status heartbeat for peace of mind - var stateBroadcastSecs: UInt32 = 0 + public var stateBroadcastSecs: UInt32 = 0 /// /// Send ASCII bell with alert message /// Useful for triggering ext. notification on bell - var sendBell: Bool = false + public var sendBell: Bool = false /// /// Friendly name used to format message sent to mesh /// Example: A name "Motion" would result in a message "Motion detected" /// Maximum length of 20 characters - var name: String = String() + public var name: String = String() /// /// GPIO pin to monitor for state changes - var monitorPin: UInt32 = 0 + public var monitorPin: UInt32 = 0 /// /// Whether or not the GPIO pin state detection is triggered on HIGH (1) /// Otherwise LOW (0) - var detectionTriggeredHigh: Bool = false + public var detectionTriggeredHigh: Bool = false /// /// Whether or not use INPUT_PULLUP mode for GPIO pin /// Only applicable if the board uses pull-up resistors on the pin - var usePullup: Bool = false + public var usePullup: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Audio Config for codec2 voice - struct AudioConfig { + public struct AudioConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Whether Audio is enabled - var codec2Enabled: Bool = false + public var codec2Enabled: Bool = false /// /// PTT Pin - var pttPin: UInt32 = 0 + public var pttPin: UInt32 = 0 /// /// The audio sample rate to use for codec2 - var bitrate: ModuleConfig.AudioConfig.Audio_Baud = .codec2Default + public var bitrate: ModuleConfig.AudioConfig.Audio_Baud = .codec2Default /// /// I2S Word Select - var i2SWs: UInt32 = 0 + public var i2SWs: UInt32 = 0 /// /// I2S Data IN - var i2SSd: UInt32 = 0 + public var i2SSd: UInt32 = 0 /// /// I2S Data OUT - var i2SDin: UInt32 = 0 + public var i2SDin: UInt32 = 0 /// /// I2S Clock - var i2SSck: UInt32 = 0 + public var i2SSck: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// Baudrate for codec2 voice - enum Audio_Baud: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum Audio_Baud: SwiftProtobuf.Enum { + public typealias RawValue = Int case codec2Default // = 0 case codec23200 // = 1 case codec22400 // = 2 @@ -566,11 +566,11 @@ struct ModuleConfig { case codec2700B // = 8 case UNRECOGNIZED(Int) - init() { + public init() { self = .codec2Default } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .codec2Default case 1: self = .codec23200 @@ -585,7 +585,7 @@ struct ModuleConfig { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .codec2Default: return 0 case .codec23200: return 1 @@ -602,82 +602,82 @@ struct ModuleConfig { } - init() {} + public init() {} } /// /// Config for the Paxcounter Module - struct PaxcounterConfig { + public struct PaxcounterConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Enable the Paxcounter Module - var enabled: Bool = false + public var enabled: Bool = false - var paxcounterUpdateInterval: UInt32 = 0 + public var paxcounterUpdateInterval: UInt32 = 0 /// /// WiFi RSSI threshold. Defaults to -80 - var wifiThreshold: Int32 = 0 + public var wifiThreshold: Int32 = 0 /// /// BLE RSSI threshold. Defaults to -80 - var bleThreshold: Int32 = 0 + public var bleThreshold: Int32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Serial Config - struct SerialConfig { + public struct SerialConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Preferences for the SerialModule - var enabled: Bool = false + public var enabled: Bool = false /// /// TODO: REPLACE - var echo: Bool = false + public var echo: Bool = false /// /// RX pin (should match Arduino gpio pin number) - var rxd: UInt32 = 0 + public var rxd: UInt32 = 0 /// /// TX pin (should match Arduino gpio pin number) - var txd: UInt32 = 0 + public var txd: UInt32 = 0 /// /// Serial baud rate - var baud: ModuleConfig.SerialConfig.Serial_Baud = .baudDefault + public var baud: ModuleConfig.SerialConfig.Serial_Baud = .baudDefault /// /// TODO: REPLACE - var timeout: UInt32 = 0 + public var timeout: UInt32 = 0 /// /// Mode for serial module operation - var mode: ModuleConfig.SerialConfig.Serial_Mode = .default + public var mode: ModuleConfig.SerialConfig.Serial_Mode = .default /// /// Overrides the platform's defacto Serial port instance to use with Serial module config settings /// This is currently only usable in output modes like NMEA / CalTopo and may behave strangely or not work at all in other modes /// Existing logging over the Serial Console will still be present - var overrideConsoleSerialPort: Bool = false + public var overrideConsoleSerialPort: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// TODO: REPLACE - enum Serial_Baud: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum Serial_Baud: SwiftProtobuf.Enum { + public typealias RawValue = Int case baudDefault // = 0 case baud110 // = 1 case baud300 // = 2 @@ -696,11 +696,11 @@ struct ModuleConfig { case baud921600 // = 15 case UNRECOGNIZED(Int) - init() { + public init() { self = .baudDefault } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .baudDefault case 1: self = .baud110 @@ -722,7 +722,7 @@ struct ModuleConfig { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .baudDefault: return 0 case .baud110: return 1 @@ -748,8 +748,8 @@ struct ModuleConfig { /// /// TODO: REPLACE - enum Serial_Mode: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum Serial_Mode: SwiftProtobuf.Enum { + public typealias RawValue = Int case `default` // = 0 case simple // = 1 case proto // = 2 @@ -760,11 +760,11 @@ struct ModuleConfig { case caltopo // = 5 case UNRECOGNIZED(Int) - init() { + public init() { self = .default } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .default case 1: self = .simple @@ -776,7 +776,7 @@ struct ModuleConfig { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .default: return 0 case .simple: return 1 @@ -790,152 +790,152 @@ struct ModuleConfig { } - init() {} + public init() {} } /// /// External Notifications Config - struct ExternalNotificationConfig { + public struct ExternalNotificationConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Enable the ExternalNotificationModule - var enabled: Bool = false + public var enabled: Bool = false /// /// When using in On/Off mode, keep the output on for this many /// milliseconds. Default 1000ms (1 second). - var outputMs: UInt32 = 0 + public var outputMs: UInt32 = 0 /// /// Define the output pin GPIO setting Defaults to /// EXT_NOTIFY_OUT if set for the board. /// In standalone devices this pin should drive the LED to match the UI. - var output: UInt32 = 0 + public var output: UInt32 = 0 /// /// Optional: Define a secondary output pin for a vibra motor /// This is used in standalone devices to match the UI. - var outputVibra: UInt32 = 0 + public var outputVibra: UInt32 = 0 /// /// Optional: Define a tertiary output pin for an active buzzer /// This is used in standalone devices to to match the UI. - var outputBuzzer: UInt32 = 0 + public var outputBuzzer: UInt32 = 0 /// /// IF this is true, the 'output' Pin will be pulled active high, false /// means active low. - var active: Bool = false + public var active: Bool = false /// /// True: Alert when a text message arrives (output) - var alertMessage: Bool = false + public var alertMessage: Bool = false /// /// True: Alert when a text message arrives (output_vibra) - var alertMessageVibra: Bool = false + public var alertMessageVibra: Bool = false /// /// True: Alert when a text message arrives (output_buzzer) - var alertMessageBuzzer: Bool = false + public var alertMessageBuzzer: Bool = false /// /// True: Alert when the bell character is received (output) - var alertBell: Bool = false + public var alertBell: Bool = false /// /// True: Alert when the bell character is received (output_vibra) - var alertBellVibra: Bool = false + public var alertBellVibra: Bool = false /// /// True: Alert when the bell character is received (output_buzzer) - var alertBellBuzzer: Bool = false + public var alertBellBuzzer: Bool = false /// /// use a PWM output instead of a simple on/off output. This will ignore /// the 'output', 'output_ms' and 'active' settings and use the /// device.buzzer_gpio instead. - var usePwm: Bool = false + public var usePwm: Bool = false /// /// The notification will toggle with 'output_ms' for this time of seconds. /// Default is 0 which means don't repeat at all. 60 would mean blink /// and/or beep for 60 seconds - var nagTimeout: UInt32 = 0 + public var nagTimeout: UInt32 = 0 /// /// When true, enables devices with native I2S audio output to use the RTTTL over speaker like a buzzer /// T-Watch S3 and T-Deck for example have this capability - var useI2SAsBuzzer: Bool = false + public var useI2SAsBuzzer: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Store and Forward Module Config - struct StoreForwardConfig { + public struct StoreForwardConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Enable the Store and Forward Module - var enabled: Bool = false + public var enabled: Bool = false /// /// TODO: REPLACE - var heartbeat: Bool = false + public var heartbeat: Bool = false /// /// TODO: REPLACE - var records: UInt32 = 0 + public var records: UInt32 = 0 /// /// TODO: REPLACE - var historyReturnMax: UInt32 = 0 + public var historyReturnMax: UInt32 = 0 /// /// TODO: REPLACE - var historyReturnWindow: UInt32 = 0 + public var historyReturnWindow: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Preferences for the RangeTestModule - struct RangeTestConfig { + public struct RangeTestConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Enable the Range Test Module - var enabled: Bool = false + public var enabled: Bool = false /// /// Send out range test messages from this node - var sender: UInt32 = 0 + public var sender: UInt32 = 0 /// /// Bool value indicating that this node should save a RangeTest.csv file. /// ESP32 Only - var save: Bool = false + public var save: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Configuration for both device and environment metrics - struct TelemetryConfig { + public struct TelemetryConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -943,112 +943,112 @@ struct ModuleConfig { /// /// Interval in seconds of how often we should try to send our /// device metrics to the mesh - var deviceUpdateInterval: UInt32 = 0 + public var deviceUpdateInterval: UInt32 = 0 - var environmentUpdateInterval: UInt32 = 0 + public var environmentUpdateInterval: UInt32 = 0 /// /// Preferences for the Telemetry Module (Environment) /// Enable/Disable the telemetry measurement module measurement collection - var environmentMeasurementEnabled: Bool = false + public var environmentMeasurementEnabled: Bool = false /// /// Enable/Disable the telemetry measurement module on-device display - var environmentScreenEnabled: Bool = false + public var environmentScreenEnabled: Bool = false /// /// We'll always read the sensor in Celsius, but sometimes we might want to /// display the results in Fahrenheit as a "user preference". - var environmentDisplayFahrenheit: Bool = false + public var environmentDisplayFahrenheit: Bool = false /// /// Enable/Disable the air quality metrics - var airQualityEnabled: Bool = false + public var airQualityEnabled: Bool = false /// /// Interval in seconds of how often we should try to send our /// air quality metrics to the mesh - var airQualityInterval: UInt32 = 0 + public var airQualityInterval: UInt32 = 0 /// /// Interval in seconds of how often we should try to send our /// air quality metrics to the mesh - var powerMeasurementEnabled: Bool = false + public var powerMeasurementEnabled: Bool = false /// /// Interval in seconds of how often we should try to send our /// air quality metrics to the mesh - var powerUpdateInterval: UInt32 = 0 + public var powerUpdateInterval: UInt32 = 0 /// /// Interval in seconds of how often we should try to send our /// air quality metrics to the mesh - var powerScreenEnabled: Bool = false + public var powerScreenEnabled: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// TODO: REPLACE - struct CannedMessageConfig { + public struct CannedMessageConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Enable the rotary encoder #1. This is a 'dumb' encoder sending pulses on both A and B pins while rotating. - var rotary1Enabled: Bool = false + public var rotary1Enabled: Bool = false /// /// GPIO pin for rotary encoder A port. - var inputbrokerPinA: UInt32 = 0 + public var inputbrokerPinA: UInt32 = 0 /// /// GPIO pin for rotary encoder B port. - var inputbrokerPinB: UInt32 = 0 + public var inputbrokerPinB: UInt32 = 0 /// /// GPIO pin for rotary encoder Press port. - var inputbrokerPinPress: UInt32 = 0 + public var inputbrokerPinPress: UInt32 = 0 /// /// Generate input event on CW of this kind. - var inputbrokerEventCw: ModuleConfig.CannedMessageConfig.InputEventChar = .none + public var inputbrokerEventCw: ModuleConfig.CannedMessageConfig.InputEventChar = .none /// /// Generate input event on CCW of this kind. - var inputbrokerEventCcw: ModuleConfig.CannedMessageConfig.InputEventChar = .none + public var inputbrokerEventCcw: ModuleConfig.CannedMessageConfig.InputEventChar = .none /// /// Generate input event on Press of this kind. - var inputbrokerEventPress: ModuleConfig.CannedMessageConfig.InputEventChar = .none + public var inputbrokerEventPress: ModuleConfig.CannedMessageConfig.InputEventChar = .none /// /// Enable the Up/Down/Select input device. Can be RAK rotary encoder or 3 buttons. Uses the a/b/press definitions from inputbroker. - var updown1Enabled: Bool = false + public var updown1Enabled: Bool = false /// /// Enable/disable CannedMessageModule. - var enabled: Bool = false + public var enabled: Bool = false /// /// Input event origin accepted by the canned message module. /// Can be e.g. "rotEnc1", "upDownEnc1" or keyword "_any" - var allowInputSource: String = String() + public var allowInputSource: String = String() /// /// CannedMessageModule also sends a bell character with the messages. /// ExternalNotificationModule can benefit from this feature. - var sendBell: Bool = false + public var sendBell: Bool = false - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// TODO: REPLACE - enum InputEventChar: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum InputEventChar: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// TODO: REPLACE @@ -1083,11 +1083,11 @@ struct ModuleConfig { case cancel // = 24 case UNRECOGNIZED(Int) - init() { + public init() { self = .none } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .none case 10: self = .select @@ -1101,7 +1101,7 @@ struct ModuleConfig { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .none: return 0 case .select: return 10 @@ -1117,50 +1117,50 @@ struct ModuleConfig { } - init() {} + public init() {} } /// ///Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. ///Initially created for the RAK14001 RGB LED module. - struct AmbientLightingConfig { + public struct AmbientLightingConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Sets LED to on or off. - var ledState: Bool = false + public var ledState: Bool = false /// /// Sets the current for the LED output. Default is 10. - var current: UInt32 = 0 + public var current: UInt32 = 0 /// /// Sets the red LED level. Values are 0-255. - var red: UInt32 = 0 + public var red: UInt32 = 0 /// /// Sets the green LED level. Values are 0-255. - var green: UInt32 = 0 + public var green: UInt32 = 0 /// /// Sets the blue LED level. Values are 0-255. - var blue: UInt32 = 0 + public var blue: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } - init() {} + public init() {} } #if swift(>=4.2) extension ModuleConfig.AudioConfig.Audio_Baud: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [ModuleConfig.AudioConfig.Audio_Baud] = [ + public static let allCases: [ModuleConfig.AudioConfig.Audio_Baud] = [ .codec2Default, .codec23200, .codec22400, @@ -1175,7 +1175,7 @@ extension ModuleConfig.AudioConfig.Audio_Baud: CaseIterable { extension ModuleConfig.SerialConfig.Serial_Baud: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [ModuleConfig.SerialConfig.Serial_Baud] = [ + public static let allCases: [ModuleConfig.SerialConfig.Serial_Baud] = [ .baudDefault, .baud110, .baud300, @@ -1197,7 +1197,7 @@ extension ModuleConfig.SerialConfig.Serial_Baud: CaseIterable { extension ModuleConfig.SerialConfig.Serial_Mode: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [ModuleConfig.SerialConfig.Serial_Mode] = [ + public static let allCases: [ModuleConfig.SerialConfig.Serial_Mode] = [ .default, .simple, .proto, @@ -1209,7 +1209,7 @@ extension ModuleConfig.SerialConfig.Serial_Mode: CaseIterable { extension ModuleConfig.CannedMessageConfig.InputEventChar: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [ModuleConfig.CannedMessageConfig.InputEventChar] = [ + public static let allCases: [ModuleConfig.CannedMessageConfig.InputEventChar] = [ .none, .up, .down, @@ -1225,26 +1225,26 @@ extension ModuleConfig.CannedMessageConfig.InputEventChar: CaseIterable { /// /// A GPIO pin definition for remote hardware module -struct RemoteHardwarePin { +public struct RemoteHardwarePin { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// GPIO Pin number (must match Arduino) - var gpioPin: UInt32 = 0 + public var gpioPin: UInt32 = 0 /// /// Name for the GPIO pin (i.e. Front gate, mailbox, etc) - var name: String = String() + public var name: String = String() /// /// Type of GPIO access available to consumers on the mesh - var type: RemoteHardwarePinType = .unknown + public var type: RemoteHardwarePinType = .unknown - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } #if swift(>=5.5) && canImport(_Concurrency) @@ -1277,7 +1277,7 @@ extension RemoteHardwarePin: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension RemoteHardwarePinType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "UNKNOWN"), 1: .same(proto: "DIGITAL_READ"), 2: .same(proto: "DIGITAL_WRITE"), @@ -1285,8 +1285,8 @@ extension RemoteHardwarePinType: SwiftProtobuf._ProtoNameProviding { } extension ModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ModuleConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".ModuleConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "mqtt"), 2: .same(proto: "serial"), 3: .standard(proto: "external_notification"), @@ -1302,7 +1302,7 @@ extension ModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat 13: .same(proto: "paxcounter"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1482,7 +1482,7 @@ extension ModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -1545,7 +1545,7 @@ extension ModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig, rhs: ModuleConfig) -> Bool { + public static func ==(lhs: ModuleConfig, rhs: ModuleConfig) -> Bool { if lhs.payloadVariant != rhs.payloadVariant {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1553,8 +1553,8 @@ extension ModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } extension ModuleConfig.MQTTConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".MQTTConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".MQTTConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .same(proto: "address"), 3: .same(proto: "username"), @@ -1568,7 +1568,7 @@ extension ModuleConfig.MQTTConfig: SwiftProtobuf.Message, SwiftProtobuf._Message 11: .standard(proto: "map_report_settings"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1590,7 +1590,7 @@ extension ModuleConfig.MQTTConfig: SwiftProtobuf.Message, SwiftProtobuf._Message } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -1631,7 +1631,7 @@ extension ModuleConfig.MQTTConfig: SwiftProtobuf.Message, SwiftProtobuf._Message try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.MQTTConfig, rhs: ModuleConfig.MQTTConfig) -> Bool { + public static func ==(lhs: ModuleConfig.MQTTConfig, rhs: ModuleConfig.MQTTConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.address != rhs.address {return false} if lhs.username != rhs.username {return false} @@ -1649,13 +1649,13 @@ extension ModuleConfig.MQTTConfig: SwiftProtobuf.Message, SwiftProtobuf._Message } extension ModuleConfig.MapReportSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".MapReportSettings" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".MapReportSettings" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "publish_interval_secs"), 2: .standard(proto: "position_precision"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1668,7 +1668,7 @@ extension ModuleConfig.MapReportSettings: SwiftProtobuf.Message, SwiftProtobuf._ } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.publishIntervalSecs != 0 { try visitor.visitSingularUInt32Field(value: self.publishIntervalSecs, fieldNumber: 1) } @@ -1678,7 +1678,7 @@ extension ModuleConfig.MapReportSettings: SwiftProtobuf.Message, SwiftProtobuf._ try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.MapReportSettings, rhs: ModuleConfig.MapReportSettings) -> Bool { + public static func ==(lhs: ModuleConfig.MapReportSettings, rhs: ModuleConfig.MapReportSettings) -> Bool { if lhs.publishIntervalSecs != rhs.publishIntervalSecs {return false} if lhs.positionPrecision != rhs.positionPrecision {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -1687,14 +1687,14 @@ extension ModuleConfig.MapReportSettings: SwiftProtobuf.Message, SwiftProtobuf._ } extension ModuleConfig.RemoteHardwareConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".RemoteHardwareConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".RemoteHardwareConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .standard(proto: "allow_undefined_pin_access"), 3: .standard(proto: "available_pins"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1708,7 +1708,7 @@ extension ModuleConfig.RemoteHardwareConfig: SwiftProtobuf.Message, SwiftProtobu } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.enabled != false { try visitor.visitSingularBoolField(value: self.enabled, fieldNumber: 1) } @@ -1721,7 +1721,7 @@ extension ModuleConfig.RemoteHardwareConfig: SwiftProtobuf.Message, SwiftProtobu try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.RemoteHardwareConfig, rhs: ModuleConfig.RemoteHardwareConfig) -> Bool { + public static func ==(lhs: ModuleConfig.RemoteHardwareConfig, rhs: ModuleConfig.RemoteHardwareConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.allowUndefinedPinAccess != rhs.allowUndefinedPinAccess {return false} if lhs.availablePins != rhs.availablePins {return false} @@ -1731,13 +1731,13 @@ extension ModuleConfig.RemoteHardwareConfig: SwiftProtobuf.Message, SwiftProtobu } extension ModuleConfig.NeighborInfoConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".NeighborInfoConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".NeighborInfoConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .standard(proto: "update_interval"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1750,7 +1750,7 @@ extension ModuleConfig.NeighborInfoConfig: SwiftProtobuf.Message, SwiftProtobuf. } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.enabled != false { try visitor.visitSingularBoolField(value: self.enabled, fieldNumber: 1) } @@ -1760,7 +1760,7 @@ extension ModuleConfig.NeighborInfoConfig: SwiftProtobuf.Message, SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.NeighborInfoConfig, rhs: ModuleConfig.NeighborInfoConfig) -> Bool { + public static func ==(lhs: ModuleConfig.NeighborInfoConfig, rhs: ModuleConfig.NeighborInfoConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.updateInterval != rhs.updateInterval {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -1769,8 +1769,8 @@ extension ModuleConfig.NeighborInfoConfig: SwiftProtobuf.Message, SwiftProtobuf. } extension ModuleConfig.DetectionSensorConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".DetectionSensorConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".DetectionSensorConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .standard(proto: "minimum_broadcast_secs"), 3: .standard(proto: "state_broadcast_secs"), @@ -1781,7 +1781,7 @@ extension ModuleConfig.DetectionSensorConfig: SwiftProtobuf.Message, SwiftProtob 8: .standard(proto: "use_pullup"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1800,7 +1800,7 @@ extension ModuleConfig.DetectionSensorConfig: SwiftProtobuf.Message, SwiftProtob } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.enabled != false { try visitor.visitSingularBoolField(value: self.enabled, fieldNumber: 1) } @@ -1828,7 +1828,7 @@ extension ModuleConfig.DetectionSensorConfig: SwiftProtobuf.Message, SwiftProtob try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.DetectionSensorConfig, rhs: ModuleConfig.DetectionSensorConfig) -> Bool { + public static func ==(lhs: ModuleConfig.DetectionSensorConfig, rhs: ModuleConfig.DetectionSensorConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.minimumBroadcastSecs != rhs.minimumBroadcastSecs {return false} if lhs.stateBroadcastSecs != rhs.stateBroadcastSecs {return false} @@ -1843,8 +1843,8 @@ extension ModuleConfig.DetectionSensorConfig: SwiftProtobuf.Message, SwiftProtob } extension ModuleConfig.AudioConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".AudioConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".AudioConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "codec2_enabled"), 2: .standard(proto: "ptt_pin"), 3: .same(proto: "bitrate"), @@ -1854,7 +1854,7 @@ extension ModuleConfig.AudioConfig: SwiftProtobuf.Message, SwiftProtobuf._Messag 7: .standard(proto: "i2s_sck"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1872,7 +1872,7 @@ extension ModuleConfig.AudioConfig: SwiftProtobuf.Message, SwiftProtobuf._Messag } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.codec2Enabled != false { try visitor.visitSingularBoolField(value: self.codec2Enabled, fieldNumber: 1) } @@ -1897,7 +1897,7 @@ extension ModuleConfig.AudioConfig: SwiftProtobuf.Message, SwiftProtobuf._Messag try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.AudioConfig, rhs: ModuleConfig.AudioConfig) -> Bool { + public static func ==(lhs: ModuleConfig.AudioConfig, rhs: ModuleConfig.AudioConfig) -> Bool { if lhs.codec2Enabled != rhs.codec2Enabled {return false} if lhs.pttPin != rhs.pttPin {return false} if lhs.bitrate != rhs.bitrate {return false} @@ -1911,7 +1911,7 @@ extension ModuleConfig.AudioConfig: SwiftProtobuf.Message, SwiftProtobuf._Messag } extension ModuleConfig.AudioConfig.Audio_Baud: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "CODEC2_DEFAULT"), 1: .same(proto: "CODEC2_3200"), 2: .same(proto: "CODEC2_2400"), @@ -1925,15 +1925,15 @@ extension ModuleConfig.AudioConfig.Audio_Baud: SwiftProtobuf._ProtoNameProviding } extension ModuleConfig.PaxcounterConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".PaxcounterConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".PaxcounterConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .standard(proto: "paxcounter_update_interval"), 3: .standard(proto: "wifi_threshold"), 4: .standard(proto: "ble_threshold"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1948,7 +1948,7 @@ extension ModuleConfig.PaxcounterConfig: SwiftProtobuf.Message, SwiftProtobuf._M } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.enabled != false { try visitor.visitSingularBoolField(value: self.enabled, fieldNumber: 1) } @@ -1964,7 +1964,7 @@ extension ModuleConfig.PaxcounterConfig: SwiftProtobuf.Message, SwiftProtobuf._M try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.PaxcounterConfig, rhs: ModuleConfig.PaxcounterConfig) -> Bool { + public static func ==(lhs: ModuleConfig.PaxcounterConfig, rhs: ModuleConfig.PaxcounterConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.paxcounterUpdateInterval != rhs.paxcounterUpdateInterval {return false} if lhs.wifiThreshold != rhs.wifiThreshold {return false} @@ -1975,8 +1975,8 @@ extension ModuleConfig.PaxcounterConfig: SwiftProtobuf.Message, SwiftProtobuf._M } extension ModuleConfig.SerialConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".SerialConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".SerialConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .same(proto: "echo"), 3: .same(proto: "rxd"), @@ -1987,7 +1987,7 @@ extension ModuleConfig.SerialConfig: SwiftProtobuf.Message, SwiftProtobuf._Messa 8: .standard(proto: "override_console_serial_port"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2006,7 +2006,7 @@ extension ModuleConfig.SerialConfig: SwiftProtobuf.Message, SwiftProtobuf._Messa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.enabled != false { try visitor.visitSingularBoolField(value: self.enabled, fieldNumber: 1) } @@ -2034,7 +2034,7 @@ extension ModuleConfig.SerialConfig: SwiftProtobuf.Message, SwiftProtobuf._Messa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.SerialConfig, rhs: ModuleConfig.SerialConfig) -> Bool { + public static func ==(lhs: ModuleConfig.SerialConfig, rhs: ModuleConfig.SerialConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.echo != rhs.echo {return false} if lhs.rxd != rhs.rxd {return false} @@ -2049,7 +2049,7 @@ extension ModuleConfig.SerialConfig: SwiftProtobuf.Message, SwiftProtobuf._Messa } extension ModuleConfig.SerialConfig.Serial_Baud: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "BAUD_DEFAULT"), 1: .same(proto: "BAUD_110"), 2: .same(proto: "BAUD_300"), @@ -2070,7 +2070,7 @@ extension ModuleConfig.SerialConfig.Serial_Baud: SwiftProtobuf._ProtoNameProvidi } extension ModuleConfig.SerialConfig.Serial_Mode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "DEFAULT"), 1: .same(proto: "SIMPLE"), 2: .same(proto: "PROTO"), @@ -2081,8 +2081,8 @@ extension ModuleConfig.SerialConfig.Serial_Mode: SwiftProtobuf._ProtoNameProvidi } extension ModuleConfig.ExternalNotificationConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".ExternalNotificationConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".ExternalNotificationConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .standard(proto: "output_ms"), 3: .same(proto: "output"), @@ -2100,7 +2100,7 @@ extension ModuleConfig.ExternalNotificationConfig: SwiftProtobuf.Message, SwiftP 15: .standard(proto: "use_i2s_as_buzzer"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2126,7 +2126,7 @@ extension ModuleConfig.ExternalNotificationConfig: SwiftProtobuf.Message, SwiftP } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.enabled != false { try visitor.visitSingularBoolField(value: self.enabled, fieldNumber: 1) } @@ -2175,7 +2175,7 @@ extension ModuleConfig.ExternalNotificationConfig: SwiftProtobuf.Message, SwiftP try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.ExternalNotificationConfig, rhs: ModuleConfig.ExternalNotificationConfig) -> Bool { + public static func ==(lhs: ModuleConfig.ExternalNotificationConfig, rhs: ModuleConfig.ExternalNotificationConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.outputMs != rhs.outputMs {return false} if lhs.output != rhs.output {return false} @@ -2197,8 +2197,8 @@ extension ModuleConfig.ExternalNotificationConfig: SwiftProtobuf.Message, SwiftP } extension ModuleConfig.StoreForwardConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".StoreForwardConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".StoreForwardConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .same(proto: "heartbeat"), 3: .same(proto: "records"), @@ -2206,7 +2206,7 @@ extension ModuleConfig.StoreForwardConfig: SwiftProtobuf.Message, SwiftProtobuf. 5: .standard(proto: "history_return_window"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2222,7 +2222,7 @@ extension ModuleConfig.StoreForwardConfig: SwiftProtobuf.Message, SwiftProtobuf. } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.enabled != false { try visitor.visitSingularBoolField(value: self.enabled, fieldNumber: 1) } @@ -2241,7 +2241,7 @@ extension ModuleConfig.StoreForwardConfig: SwiftProtobuf.Message, SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.StoreForwardConfig, rhs: ModuleConfig.StoreForwardConfig) -> Bool { + public static func ==(lhs: ModuleConfig.StoreForwardConfig, rhs: ModuleConfig.StoreForwardConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.heartbeat != rhs.heartbeat {return false} if lhs.records != rhs.records {return false} @@ -2253,14 +2253,14 @@ extension ModuleConfig.StoreForwardConfig: SwiftProtobuf.Message, SwiftProtobuf. } extension ModuleConfig.RangeTestConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".RangeTestConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".RangeTestConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .same(proto: "sender"), 3: .same(proto: "save"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2274,7 +2274,7 @@ extension ModuleConfig.RangeTestConfig: SwiftProtobuf.Message, SwiftProtobuf._Me } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.enabled != false { try visitor.visitSingularBoolField(value: self.enabled, fieldNumber: 1) } @@ -2287,7 +2287,7 @@ extension ModuleConfig.RangeTestConfig: SwiftProtobuf.Message, SwiftProtobuf._Me try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.RangeTestConfig, rhs: ModuleConfig.RangeTestConfig) -> Bool { + public static func ==(lhs: ModuleConfig.RangeTestConfig, rhs: ModuleConfig.RangeTestConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.sender != rhs.sender {return false} if lhs.save != rhs.save {return false} @@ -2297,8 +2297,8 @@ extension ModuleConfig.RangeTestConfig: SwiftProtobuf.Message, SwiftProtobuf._Me } extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".TelemetryConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".TelemetryConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "device_update_interval"), 2: .standard(proto: "environment_update_interval"), 3: .standard(proto: "environment_measurement_enabled"), @@ -2311,7 +2311,7 @@ extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._Me 10: .standard(proto: "power_screen_enabled"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2332,7 +2332,7 @@ extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._Me } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.deviceUpdateInterval != 0 { try visitor.visitSingularUInt32Field(value: self.deviceUpdateInterval, fieldNumber: 1) } @@ -2366,7 +2366,7 @@ extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._Me try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.TelemetryConfig, rhs: ModuleConfig.TelemetryConfig) -> Bool { + public static func ==(lhs: ModuleConfig.TelemetryConfig, rhs: ModuleConfig.TelemetryConfig) -> Bool { if lhs.deviceUpdateInterval != rhs.deviceUpdateInterval {return false} if lhs.environmentUpdateInterval != rhs.environmentUpdateInterval {return false} if lhs.environmentMeasurementEnabled != rhs.environmentMeasurementEnabled {return false} @@ -2383,8 +2383,8 @@ extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._Me } extension ModuleConfig.CannedMessageConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".CannedMessageConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".CannedMessageConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "rotary1_enabled"), 2: .standard(proto: "inputbroker_pin_a"), 3: .standard(proto: "inputbroker_pin_b"), @@ -2398,7 +2398,7 @@ extension ModuleConfig.CannedMessageConfig: SwiftProtobuf.Message, SwiftProtobuf 11: .standard(proto: "send_bell"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2420,7 +2420,7 @@ extension ModuleConfig.CannedMessageConfig: SwiftProtobuf.Message, SwiftProtobuf } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.rotary1Enabled != false { try visitor.visitSingularBoolField(value: self.rotary1Enabled, fieldNumber: 1) } @@ -2457,7 +2457,7 @@ extension ModuleConfig.CannedMessageConfig: SwiftProtobuf.Message, SwiftProtobuf try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.CannedMessageConfig, rhs: ModuleConfig.CannedMessageConfig) -> Bool { + public static func ==(lhs: ModuleConfig.CannedMessageConfig, rhs: ModuleConfig.CannedMessageConfig) -> Bool { if lhs.rotary1Enabled != rhs.rotary1Enabled {return false} if lhs.inputbrokerPinA != rhs.inputbrokerPinA {return false} if lhs.inputbrokerPinB != rhs.inputbrokerPinB {return false} @@ -2475,7 +2475,7 @@ extension ModuleConfig.CannedMessageConfig: SwiftProtobuf.Message, SwiftProtobuf } extension ModuleConfig.CannedMessageConfig.InputEventChar: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "NONE"), 10: .same(proto: "SELECT"), 17: .same(proto: "UP"), @@ -2488,8 +2488,8 @@ extension ModuleConfig.CannedMessageConfig.InputEventChar: SwiftProtobuf._ProtoN } extension ModuleConfig.AmbientLightingConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = ModuleConfig.protoMessageName + ".AmbientLightingConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = ModuleConfig.protoMessageName + ".AmbientLightingConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "led_state"), 2: .same(proto: "current"), 3: .same(proto: "red"), @@ -2497,7 +2497,7 @@ extension ModuleConfig.AmbientLightingConfig: SwiftProtobuf.Message, SwiftProtob 5: .same(proto: "blue"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2513,7 +2513,7 @@ extension ModuleConfig.AmbientLightingConfig: SwiftProtobuf.Message, SwiftProtob } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.ledState != false { try visitor.visitSingularBoolField(value: self.ledState, fieldNumber: 1) } @@ -2532,7 +2532,7 @@ extension ModuleConfig.AmbientLightingConfig: SwiftProtobuf.Message, SwiftProtob try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ModuleConfig.AmbientLightingConfig, rhs: ModuleConfig.AmbientLightingConfig) -> Bool { + public static func ==(lhs: ModuleConfig.AmbientLightingConfig, rhs: ModuleConfig.AmbientLightingConfig) -> Bool { if lhs.ledState != rhs.ledState {return false} if lhs.current != rhs.current {return false} if lhs.red != rhs.red {return false} @@ -2544,14 +2544,14 @@ extension ModuleConfig.AmbientLightingConfig: SwiftProtobuf.Message, SwiftProtob } extension RemoteHardwarePin: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".RemoteHardwarePin" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".RemoteHardwarePin" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "gpio_pin"), 2: .same(proto: "name"), 3: .same(proto: "type"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2565,7 +2565,7 @@ extension RemoteHardwarePin: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.gpioPin != 0 { try visitor.visitSingularUInt32Field(value: self.gpioPin, fieldNumber: 1) } @@ -2578,7 +2578,7 @@ extension RemoteHardwarePin: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: RemoteHardwarePin, rhs: RemoteHardwarePin) -> Bool { + public static func ==(lhs: RemoteHardwarePin, rhs: RemoteHardwarePin) -> Bool { if lhs.gpioPin != rhs.gpioPin {return false} if lhs.name != rhs.name {return false} if lhs.type != rhs.type {return false} diff --git a/Meshtastic/Protobufs/meshtastic/mqtt.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/mqtt.pb.swift similarity index 84% rename from Meshtastic/Protobufs/meshtastic/mqtt.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/mqtt.pb.swift index 43000bd1..efe6cdd5 100644 --- a/Meshtastic/Protobufs/meshtastic/mqtt.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/mqtt.pb.swift @@ -22,103 +22,103 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// /// This message wraps a MeshPacket with extra metadata about the sender and how it arrived. -struct ServiceEnvelope { +public struct ServiceEnvelope { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// The (probably encrypted) packet - var packet: MeshPacket { + public var packet: MeshPacket { get {return _packet ?? MeshPacket()} set {_packet = newValue} } /// Returns true if `packet` has been explicitly set. - var hasPacket: Bool {return self._packet != nil} + public var hasPacket: Bool {return self._packet != nil} /// Clears the value of `packet`. Subsequent reads from it will return its default value. - mutating func clearPacket() {self._packet = nil} + public mutating func clearPacket() {self._packet = nil} /// /// The global channel ID it was sent on - var channelID: String = String() + public var channelID: String = String() /// /// The sending gateway node ID. Can we use this to authenticate/prevent fake /// nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as /// the globally trusted nodenum - var gatewayID: String = String() + public var gatewayID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} fileprivate var _packet: MeshPacket? = nil } /// /// Information about a node intended to be reported unencrypted to a map using MQTT. -struct MapReport { +public struct MapReport { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// A full name for this user, i.e. "Kevin Hester" - var longName: String = String() + public var longName: String = String() /// /// A VERY short name, ideally two characters. /// Suitable for a tiny OLED screen - var shortName: String = String() + public var shortName: String = String() /// /// Role of the node that applies specific settings for a particular use-case - var role: Config.DeviceConfig.Role = .client + public var role: Config.DeviceConfig.Role = .client /// /// Hardware model of the node, i.e. T-Beam, Heltec V3, etc... - var hwModel: HardwareModel = .unset + public var hwModel: HardwareModel = .unset /// /// Device firmware version string - var firmwareVersion: String = String() + public var firmwareVersion: String = String() /// /// The region code for the radio (US, CN, EU433, etc...) - var region: Config.LoRaConfig.RegionCode = .unset + public var region: Config.LoRaConfig.RegionCode = .unset /// /// Modem preset used by the radio (LongFast, MediumSlow, etc...) - var modemPreset: Config.LoRaConfig.ModemPreset = .longFast + public var modemPreset: Config.LoRaConfig.ModemPreset = .longFast /// /// Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...) /// and it uses the default frequency slot given the region and modem preset. - var hasDefaultChannel_p: Bool = false + public var hasDefaultChannel_p: Bool = false /// /// Latitude: multiply by 1e-7 to get degrees in floating point - var latitudeI: Int32 = 0 + public var latitudeI: Int32 = 0 /// /// Longitude: multiply by 1e-7 to get degrees in floating point - var longitudeI: Int32 = 0 + public var longitudeI: Int32 = 0 /// /// Altitude in meters above MSL - var altitude: Int32 = 0 + public var altitude: Int32 = 0 /// /// Indicates the bits of precision for latitude and longitude set by the sending node - var positionPrecision: UInt32 = 0 + public var positionPrecision: UInt32 = 0 /// /// Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT) - var numOnlineLocalNodes: UInt32 = 0 + public var numOnlineLocalNodes: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } #if swift(>=5.5) && canImport(_Concurrency) @@ -131,14 +131,14 @@ extension MapReport: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension ServiceEnvelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ServiceEnvelope" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".ServiceEnvelope" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "packet"), 2: .standard(proto: "channel_id"), 3: .standard(proto: "gateway_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -152,7 +152,7 @@ extension ServiceEnvelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -169,7 +169,7 @@ extension ServiceEnvelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: ServiceEnvelope, rhs: ServiceEnvelope) -> Bool { + public static func ==(lhs: ServiceEnvelope, rhs: ServiceEnvelope) -> Bool { if lhs._packet != rhs._packet {return false} if lhs.channelID != rhs.channelID {return false} if lhs.gatewayID != rhs.gatewayID {return false} @@ -179,8 +179,8 @@ extension ServiceEnvelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } extension MapReport: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".MapReport" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".MapReport" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "long_name"), 2: .standard(proto: "short_name"), 3: .same(proto: "role"), @@ -196,7 +196,7 @@ extension MapReport: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation 13: .standard(proto: "num_online_local_nodes"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -220,7 +220,7 @@ extension MapReport: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.longName.isEmpty { try visitor.visitSingularStringField(value: self.longName, fieldNumber: 1) } @@ -263,7 +263,7 @@ extension MapReport: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: MapReport, rhs: MapReport) -> Bool { + public static func ==(lhs: MapReport, rhs: MapReport) -> Bool { if lhs.longName != rhs.longName {return false} if lhs.shortName != rhs.shortName {return false} if lhs.role != rhs.role {return false} diff --git a/Meshtastic/Protobufs/meshtastic/paxcount.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/paxcount.pb.swift similarity index 83% rename from Meshtastic/Protobufs/meshtastic/paxcount.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/paxcount.pb.swift index dea7d016..cf8aa463 100644 --- a/Meshtastic/Protobufs/meshtastic/paxcount.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/paxcount.pb.swift @@ -22,26 +22,26 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// /// TODO: REPLACE -struct Paxcount { +public struct Paxcount { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// seen Wifi devices - var wifi: UInt32 = 0 + public var wifi: UInt32 = 0 /// /// Seen BLE devices - var ble: UInt32 = 0 + public var ble: UInt32 = 0 /// /// Uptime in seconds - var uptime: UInt32 = 0 + public var uptime: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } #if swift(>=5.5) && canImport(_Concurrency) @@ -53,14 +53,14 @@ extension Paxcount: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension Paxcount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Paxcount" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Paxcount" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "wifi"), 2: .same(proto: "ble"), 3: .same(proto: "uptime"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -74,7 +74,7 @@ extension Paxcount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.wifi != 0 { try visitor.visitSingularUInt32Field(value: self.wifi, fieldNumber: 1) } @@ -87,7 +87,7 @@ extension Paxcount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Paxcount, rhs: Paxcount) -> Bool { + public static func ==(lhs: Paxcount, rhs: Paxcount) -> Bool { if lhs.wifi != rhs.wifi {return false} if lhs.ble != rhs.ble {return false} if lhs.uptime != rhs.uptime {return false} diff --git a/Meshtastic/Protobufs/meshtastic/portnums.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/portnums.pb.swift similarity index 97% rename from Meshtastic/Protobufs/meshtastic/portnums.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/portnums.pb.swift index a67e5ae6..71777a1b 100644 --- a/Meshtastic/Protobufs/meshtastic/portnums.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/portnums.pb.swift @@ -33,8 +33,8 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// Note: This was formerly a Type enum named 'typ' with the same id # /// We have change to this 'portnum' based scheme for specifying app handlers for particular payloads. /// This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically. -enum PortNum: SwiftProtobuf.Enum { - typealias RawValue = Int +public enum PortNum: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Deprecated: do not use in new code (formerly called OPAQUE) @@ -201,11 +201,11 @@ enum PortNum: SwiftProtobuf.Enum { case max // = 511 case UNRECOGNIZED(Int) - init() { + public init() { self = .unknownApp } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unknownApp case 1: self = .textMessageApp @@ -238,7 +238,7 @@ enum PortNum: SwiftProtobuf.Enum { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unknownApp: return 0 case .textMessageApp: return 1 @@ -277,7 +277,7 @@ enum PortNum: SwiftProtobuf.Enum { extension PortNum: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [PortNum] = [ + public static let allCases: [PortNum] = [ .unknownApp, .textMessageApp, .remoteHardwareApp, @@ -317,7 +317,7 @@ extension PortNum: @unchecked Sendable {} // MARK: - Code below here is support for the SwiftProtobuf runtime. extension PortNum: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "UNKNOWN_APP"), 1: .same(proto: "TEXT_MESSAGE_APP"), 2: .same(proto: "REMOTE_HARDWARE_APP"), diff --git a/Meshtastic/Protobufs/meshtastic/powermon.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/powermon.pb.swift similarity index 100% rename from Meshtastic/Protobufs/meshtastic/powermon.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/powermon.pb.swift diff --git a/Meshtastic/Protobufs/meshtastic/remote_hardware.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/remote_hardware.pb.swift similarity index 86% rename from Meshtastic/Protobufs/meshtastic/remote_hardware.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/remote_hardware.pb.swift index b26a80a2..ac6eeb26 100644 --- a/Meshtastic/Protobufs/meshtastic/remote_hardware.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/remote_hardware.pb.swift @@ -30,30 +30,30 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// because no security yet (beyond the channel mechanism). /// It should be off by default and then protected based on some TBD mechanism /// (a special channel once multichannel support is included?) -struct HardwareMessage { +public struct HardwareMessage { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// What type of HardwareMessage is this? - var type: HardwareMessage.TypeEnum = .unset + public var type: HardwareMessage.TypeEnum = .unset /// /// What gpios are we changing. Not used for all MessageTypes, see MessageType for details - var gpioMask: UInt64 = 0 + public var gpioMask: UInt64 = 0 /// /// For gpios that were listed in gpio_mask as valid, what are the signal levels for those gpios. /// Not used for all MessageTypes, see MessageType for details - var gpioValue: UInt64 = 0 + public var gpioValue: UInt64 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// TODO: REPLACE - enum TypeEnum: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum TypeEnum: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Unset/unused @@ -82,11 +82,11 @@ struct HardwareMessage { case readGpiosReply // = 5 case UNRECOGNIZED(Int) - init() { + public init() { self = .unset } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unset case 1: self = .writeGpios @@ -98,7 +98,7 @@ struct HardwareMessage { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unset: return 0 case .writeGpios: return 1 @@ -112,14 +112,14 @@ struct HardwareMessage { } - init() {} + public init() {} } #if swift(>=4.2) extension HardwareMessage.TypeEnum: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [HardwareMessage.TypeEnum] = [ + public static let allCases: [HardwareMessage.TypeEnum] = [ .unset, .writeGpios, .watchGpios, @@ -141,14 +141,14 @@ extension HardwareMessage.TypeEnum: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension HardwareMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".HardwareMessage" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".HardwareMessage" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "type"), 2: .standard(proto: "gpio_mask"), 3: .standard(proto: "gpio_value"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -162,7 +162,7 @@ extension HardwareMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.type != .unset { try visitor.visitSingularEnumField(value: self.type, fieldNumber: 1) } @@ -175,7 +175,7 @@ extension HardwareMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: HardwareMessage, rhs: HardwareMessage) -> Bool { + public static func ==(lhs: HardwareMessage, rhs: HardwareMessage) -> Bool { if lhs.type != rhs.type {return false} if lhs.gpioMask != rhs.gpioMask {return false} if lhs.gpioValue != rhs.gpioValue {return false} @@ -185,7 +185,7 @@ extension HardwareMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } extension HardwareMessage.TypeEnum: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "UNSET"), 1: .same(proto: "WRITE_GPIOS"), 2: .same(proto: "WATCH_GPIOS"), diff --git a/Meshtastic/Protobufs/meshtastic/rtttl.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/rtttl.pb.swift similarity index 81% rename from Meshtastic/Protobufs/meshtastic/rtttl.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/rtttl.pb.swift index 3adac8a2..6fdf3208 100644 --- a/Meshtastic/Protobufs/meshtastic/rtttl.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/rtttl.pb.swift @@ -22,18 +22,18 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// /// Canned message module configuration. -struct RTTTLConfig { +public struct RTTTLConfig { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Ringtone for PWM Buzzer in RTTTL Format. - var ringtone: String = String() + public var ringtone: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } #if swift(>=5.5) && canImport(_Concurrency) @@ -45,12 +45,12 @@ extension RTTTLConfig: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension RTTTLConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".RTTTLConfig" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".RTTTLConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "ringtone"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -62,14 +62,14 @@ extension RTTTLConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.ringtone.isEmpty { try visitor.visitSingularStringField(value: self.ringtone, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: RTTTLConfig, rhs: RTTTLConfig) -> Bool { + public static func ==(lhs: RTTTLConfig, rhs: RTTTLConfig) -> Bool { if lhs.ringtone != rhs.ringtone {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true diff --git a/Meshtastic/Protobufs/meshtastic/storeforward.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/storeforward.pb.swift similarity index 85% rename from Meshtastic/Protobufs/meshtastic/storeforward.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/storeforward.pb.swift index 697b4e87..54efa77b 100644 --- a/Meshtastic/Protobufs/meshtastic/storeforward.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/storeforward.pb.swift @@ -22,22 +22,22 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// /// TODO: REPLACE -struct StoreAndForward { +public struct StoreAndForward { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// TODO: REPLACE - var rr: StoreAndForward.RequestResponse = .unset + public var rr: StoreAndForward.RequestResponse = .unset /// /// TODO: REPLACE - var variant: StoreAndForward.OneOf_Variant? = nil + public var variant: StoreAndForward.OneOf_Variant? = nil /// /// TODO: REPLACE - var stats: StoreAndForward.Statistics { + public var stats: StoreAndForward.Statistics { get { if case .stats(let v)? = variant {return v} return StoreAndForward.Statistics() @@ -47,7 +47,7 @@ struct StoreAndForward { /// /// TODO: REPLACE - var history: StoreAndForward.History { + public var history: StoreAndForward.History { get { if case .history(let v)? = variant {return v} return StoreAndForward.History() @@ -57,7 +57,7 @@ struct StoreAndForward { /// /// TODO: REPLACE - var heartbeat: StoreAndForward.Heartbeat { + public var heartbeat: StoreAndForward.Heartbeat { get { if case .heartbeat(let v)? = variant {return v} return StoreAndForward.Heartbeat() @@ -67,7 +67,7 @@ struct StoreAndForward { /// /// Text from history message. - var text: Data { + public var text: Data { get { if case .text(let v)? = variant {return v} return Data() @@ -75,11 +75,11 @@ struct StoreAndForward { set {variant = .text(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() /// /// TODO: REPLACE - enum OneOf_Variant: Equatable { + public enum OneOf_Variant: Equatable { /// /// TODO: REPLACE case stats(StoreAndForward.Statistics) @@ -94,7 +94,7 @@ struct StoreAndForward { case text(Data) #if !swift(>=4.1) - static func ==(lhs: StoreAndForward.OneOf_Variant, rhs: StoreAndForward.OneOf_Variant) -> Bool { + public static func ==(lhs: StoreAndForward.OneOf_Variant, rhs: StoreAndForward.OneOf_Variant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -124,8 +124,8 @@ struct StoreAndForward { /// /// 001 - 063 = From Router /// 064 - 127 = From Client - enum RequestResponse: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum RequestResponse: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// Unset/unused @@ -194,11 +194,11 @@ struct StoreAndForward { case clientAbort // = 106 case UNRECOGNIZED(Int) - init() { + public init() { self = .unset } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unset case 1: self = .routerError @@ -220,7 +220,7 @@ struct StoreAndForward { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unset: return 0 case .routerError: return 1 @@ -246,105 +246,105 @@ struct StoreAndForward { /// /// TODO: REPLACE - struct Statistics { + public struct Statistics { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Number of messages we have ever seen - var messagesTotal: UInt32 = 0 + public var messagesTotal: UInt32 = 0 /// /// Number of messages we have currently saved our history. - var messagesSaved: UInt32 = 0 + public var messagesSaved: UInt32 = 0 /// /// Maximum number of messages we will save - var messagesMax: UInt32 = 0 + public var messagesMax: UInt32 = 0 /// /// Router uptime in seconds - var upTime: UInt32 = 0 + public var upTime: UInt32 = 0 /// /// Number of times any client sent a request to the S&F. - var requests: UInt32 = 0 + public var requests: UInt32 = 0 /// /// Number of times the history was requested. - var requestsHistory: UInt32 = 0 + public var requestsHistory: UInt32 = 0 /// /// Is the heartbeat enabled on the server? - var heartbeat: Bool = false + public var heartbeat: Bool = false /// /// Maximum number of messages the server will return. - var returnMax: UInt32 = 0 + public var returnMax: UInt32 = 0 /// /// Maximum history window in minutes the server will return messages from. - var returnWindow: UInt32 = 0 + public var returnWindow: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// TODO: REPLACE - struct History { + public struct History { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Number of that will be sent to the client - var historyMessages: UInt32 = 0 + public var historyMessages: UInt32 = 0 /// /// The window of messages that was used to filter the history client requested - var window: UInt32 = 0 + public var window: UInt32 = 0 /// /// Index in the packet history of the last message sent in a previous request to the server. /// Will be sent to the client before sending the history and can be set in a subsequent request to avoid getting packets the server already sent to the client. - var lastRequest: UInt32 = 0 + public var lastRequest: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// TODO: REPLACE - struct Heartbeat { + public struct Heartbeat { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Period in seconds that the heartbeat is sent out that will be sent to the client - var period: UInt32 = 0 + public var period: UInt32 = 0 /// /// If set, this is not the primary Store & Forward router on the mesh - var secondary: UInt32 = 0 + public var secondary: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } - init() {} + public init() {} } #if swift(>=4.2) extension StoreAndForward.RequestResponse: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [StoreAndForward.RequestResponse] = [ + public static let allCases: [StoreAndForward.RequestResponse] = [ .unset, .routerError, .routerHeartbeat, @@ -380,8 +380,8 @@ extension StoreAndForward.Heartbeat: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension StoreAndForward: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".StoreAndForward" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".StoreAndForward" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "rr"), 2: .same(proto: "stats"), 3: .same(proto: "history"), @@ -389,7 +389,7 @@ extension StoreAndForward: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen 5: .same(proto: "text"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -448,7 +448,7 @@ extension StoreAndForward: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -478,7 +478,7 @@ extension StoreAndForward: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: StoreAndForward, rhs: StoreAndForward) -> Bool { + public static func ==(lhs: StoreAndForward, rhs: StoreAndForward) -> Bool { if lhs.rr != rhs.rr {return false} if lhs.variant != rhs.variant {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -487,7 +487,7 @@ extension StoreAndForward: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } extension StoreAndForward.RequestResponse: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "UNSET"), 1: .same(proto: "ROUTER_ERROR"), 2: .same(proto: "ROUTER_HEARTBEAT"), @@ -508,8 +508,8 @@ extension StoreAndForward.RequestResponse: SwiftProtobuf._ProtoNameProviding { } extension StoreAndForward.Statistics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = StoreAndForward.protoMessageName + ".Statistics" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = StoreAndForward.protoMessageName + ".Statistics" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "messages_total"), 2: .standard(proto: "messages_saved"), 3: .standard(proto: "messages_max"), @@ -521,7 +521,7 @@ extension StoreAndForward.Statistics: SwiftProtobuf.Message, SwiftProtobuf._Mess 9: .standard(proto: "return_window"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -541,7 +541,7 @@ extension StoreAndForward.Statistics: SwiftProtobuf.Message, SwiftProtobuf._Mess } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.messagesTotal != 0 { try visitor.visitSingularUInt32Field(value: self.messagesTotal, fieldNumber: 1) } @@ -572,7 +572,7 @@ extension StoreAndForward.Statistics: SwiftProtobuf.Message, SwiftProtobuf._Mess try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: StoreAndForward.Statistics, rhs: StoreAndForward.Statistics) -> Bool { + public static func ==(lhs: StoreAndForward.Statistics, rhs: StoreAndForward.Statistics) -> Bool { if lhs.messagesTotal != rhs.messagesTotal {return false} if lhs.messagesSaved != rhs.messagesSaved {return false} if lhs.messagesMax != rhs.messagesMax {return false} @@ -588,14 +588,14 @@ extension StoreAndForward.Statistics: SwiftProtobuf.Message, SwiftProtobuf._Mess } extension StoreAndForward.History: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = StoreAndForward.protoMessageName + ".History" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = StoreAndForward.protoMessageName + ".History" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "history_messages"), 2: .same(proto: "window"), 3: .standard(proto: "last_request"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -609,7 +609,7 @@ extension StoreAndForward.History: SwiftProtobuf.Message, SwiftProtobuf._Message } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.historyMessages != 0 { try visitor.visitSingularUInt32Field(value: self.historyMessages, fieldNumber: 1) } @@ -622,7 +622,7 @@ extension StoreAndForward.History: SwiftProtobuf.Message, SwiftProtobuf._Message try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: StoreAndForward.History, rhs: StoreAndForward.History) -> Bool { + public static func ==(lhs: StoreAndForward.History, rhs: StoreAndForward.History) -> Bool { if lhs.historyMessages != rhs.historyMessages {return false} if lhs.window != rhs.window {return false} if lhs.lastRequest != rhs.lastRequest {return false} @@ -632,13 +632,13 @@ extension StoreAndForward.History: SwiftProtobuf.Message, SwiftProtobuf._Message } extension StoreAndForward.Heartbeat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = StoreAndForward.protoMessageName + ".Heartbeat" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = StoreAndForward.protoMessageName + ".Heartbeat" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "period"), 2: .same(proto: "secondary"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -651,7 +651,7 @@ extension StoreAndForward.Heartbeat: SwiftProtobuf.Message, SwiftProtobuf._Messa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.period != 0 { try visitor.visitSingularUInt32Field(value: self.period, fieldNumber: 1) } @@ -661,7 +661,7 @@ extension StoreAndForward.Heartbeat: SwiftProtobuf.Message, SwiftProtobuf._Messa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: StoreAndForward.Heartbeat, rhs: StoreAndForward.Heartbeat) -> Bool { + public static func ==(lhs: StoreAndForward.Heartbeat, rhs: StoreAndForward.Heartbeat) -> Bool { if lhs.period != rhs.period {return false} if lhs.secondary != rhs.secondary {return false} if lhs.unknownFields != rhs.unknownFields {return false} diff --git a/Meshtastic/Protobufs/meshtastic/telemetry.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/telemetry.pb.swift similarity index 85% rename from Meshtastic/Protobufs/meshtastic/telemetry.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/telemetry.pb.swift index f6116cf9..395309b6 100644 --- a/Meshtastic/Protobufs/meshtastic/telemetry.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/telemetry.pb.swift @@ -22,8 +22,8 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// /// Supported I2C Sensors for telemetry in Meshtastic -enum TelemetrySensorType: SwiftProtobuf.Enum { - typealias RawValue = Int +public enum TelemetrySensorType: SwiftProtobuf.Enum { + public typealias RawValue = Int /// /// No external telemetry sensor explicitly set @@ -130,11 +130,11 @@ enum TelemetrySensorType: SwiftProtobuf.Enum { case nau7802 // = 25 case UNRECOGNIZED(Int) - init() { + public init() { self = .sensorUnset } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .sensorUnset case 1: self = .bme280 @@ -166,7 +166,7 @@ enum TelemetrySensorType: SwiftProtobuf.Enum { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .sensorUnset: return 0 case .bme280: return 1 @@ -204,7 +204,7 @@ enum TelemetrySensorType: SwiftProtobuf.Enum { extension TelemetrySensorType: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [TelemetrySensorType] = [ + public static let allCases: [TelemetrySensorType] = [ .sensorUnset, .bme280, .bme680, @@ -238,222 +238,222 @@ extension TelemetrySensorType: CaseIterable { /// /// Key native device metrics such as battery level -struct DeviceMetrics { +public struct DeviceMetrics { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// 0-100 (>100 means powered) - var batteryLevel: UInt32 = 0 + public var batteryLevel: UInt32 = 0 /// /// Voltage measured - var voltage: Float = 0 + public var voltage: Float = 0 /// /// Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). - var channelUtilization: Float = 0 + public var channelUtilization: Float = 0 /// /// Percent of airtime for transmission used within the last hour. - var airUtilTx: Float = 0 + public var airUtilTx: Float = 0 /// /// How long the device has been running since the last reboot (in seconds) - var uptimeSeconds: UInt32 = 0 + public var uptimeSeconds: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Weather station or other environmental metrics -struct EnvironmentMetrics { +public struct EnvironmentMetrics { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Temperature measured - var temperature: Float = 0 + public var temperature: Float = 0 /// /// Relative humidity percent measured - var relativeHumidity: Float = 0 + public var relativeHumidity: Float = 0 /// /// Barometric pressure in hPA measured - var barometricPressure: Float = 0 + public var barometricPressure: Float = 0 /// /// Gas resistance in MOhm measured - var gasResistance: Float = 0 + public var gasResistance: Float = 0 /// /// Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) - var voltage: Float = 0 + public var voltage: Float = 0 /// /// Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) - var current: Float = 0 + public var current: Float = 0 /// /// relative scale IAQ value as measured by Bosch BME680 . value 0-500. /// Belongs to Air Quality but is not particle but VOC measurement. Other VOC values can also be put in here. - var iaq: UInt32 = 0 + public var iaq: UInt32 = 0 /// /// RCWL9620 Doppler Radar Distance Sensor, used for water level detection. Float value in mm. - var distance: Float = 0 + public var distance: Float = 0 /// /// VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. - var lux: Float = 0 + public var lux: Float = 0 /// /// VEML7700 high accuracy white light(irradiance) not calibrated digital 16-bit resolution sensor. - var whiteLux: Float = 0 + public var whiteLux: Float = 0 /// /// Infrared lux - var irLux: Float = 0 + public var irLux: Float = 0 /// /// Ultraviolet lux - var uvLux: Float = 0 + public var uvLux: Float = 0 /// /// Wind direction in degrees /// 0 degrees = North, 90 = East, etc... - var windDirection: UInt32 = 0 + public var windDirection: UInt32 = 0 /// /// Wind speed in m/s - var windSpeed: Float = 0 + public var windSpeed: Float = 0 /// /// Weight in KG - var weight: Float = 0 + public var weight: Float = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Power Metrics (voltage / current / etc) -struct PowerMetrics { +public struct PowerMetrics { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Voltage (Ch1) - var ch1Voltage: Float = 0 + public var ch1Voltage: Float = 0 /// /// Current (Ch1) - var ch1Current: Float = 0 + public var ch1Current: Float = 0 /// /// Voltage (Ch2) - var ch2Voltage: Float = 0 + public var ch2Voltage: Float = 0 /// /// Current (Ch2) - var ch2Current: Float = 0 + public var ch2Current: Float = 0 /// /// Voltage (Ch3) - var ch3Voltage: Float = 0 + public var ch3Voltage: Float = 0 /// /// Current (Ch3) - var ch3Current: Float = 0 + public var ch3Current: Float = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Air quality metrics -struct AirQualityMetrics { +public struct AirQualityMetrics { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Concentration Units Standard PM1.0 - var pm10Standard: UInt32 = 0 + public var pm10Standard: UInt32 = 0 /// /// Concentration Units Standard PM2.5 - var pm25Standard: UInt32 = 0 + public var pm25Standard: UInt32 = 0 /// /// Concentration Units Standard PM10.0 - var pm100Standard: UInt32 = 0 + public var pm100Standard: UInt32 = 0 /// /// Concentration Units Environmental PM1.0 - var pm10Environmental: UInt32 = 0 + public var pm10Environmental: UInt32 = 0 /// /// Concentration Units Environmental PM2.5 - var pm25Environmental: UInt32 = 0 + public var pm25Environmental: UInt32 = 0 /// /// Concentration Units Environmental PM10.0 - var pm100Environmental: UInt32 = 0 + public var pm100Environmental: UInt32 = 0 /// /// 0.3um Particle Count - var particles03Um: UInt32 = 0 + public var particles03Um: UInt32 = 0 /// /// 0.5um Particle Count - var particles05Um: UInt32 = 0 + public var particles05Um: UInt32 = 0 /// /// 1.0um Particle Count - var particles10Um: UInt32 = 0 + public var particles10Um: UInt32 = 0 /// /// 2.5um Particle Count - var particles25Um: UInt32 = 0 + public var particles25Um: UInt32 = 0 /// /// 5.0um Particle Count - var particles50Um: UInt32 = 0 + public var particles50Um: UInt32 = 0 /// /// 10.0um Particle Count - var particles100Um: UInt32 = 0 + public var particles100Um: UInt32 = 0 - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// /// Types of Measurements the telemetry module is equipped to handle -struct Telemetry { +public struct Telemetry { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// /// Seconds since 1970 - or 0 for unknown/unset - var time: UInt32 = 0 + public var time: UInt32 = 0 - var variant: Telemetry.OneOf_Variant? = nil + public var variant: Telemetry.OneOf_Variant? = nil /// /// Key native device metrics such as battery level - var deviceMetrics: DeviceMetrics { + public var deviceMetrics: DeviceMetrics { get { if case .deviceMetrics(let v)? = variant {return v} return DeviceMetrics() @@ -463,7 +463,7 @@ struct Telemetry { /// /// Weather station or other environmental metrics - var environmentMetrics: EnvironmentMetrics { + public var environmentMetrics: EnvironmentMetrics { get { if case .environmentMetrics(let v)? = variant {return v} return EnvironmentMetrics() @@ -473,7 +473,7 @@ struct Telemetry { /// /// Air quality metrics - var airQualityMetrics: AirQualityMetrics { + public var airQualityMetrics: AirQualityMetrics { get { if case .airQualityMetrics(let v)? = variant {return v} return AirQualityMetrics() @@ -483,7 +483,7 @@ struct Telemetry { /// /// Power Metrics - var powerMetrics: PowerMetrics { + public var powerMetrics: PowerMetrics { get { if case .powerMetrics(let v)? = variant {return v} return PowerMetrics() @@ -491,9 +491,9 @@ struct Telemetry { set {variant = .powerMetrics(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_Variant: Equatable { + public enum OneOf_Variant: Equatable { /// /// Key native device metrics such as battery level case deviceMetrics(DeviceMetrics) @@ -508,7 +508,7 @@ struct Telemetry { case powerMetrics(PowerMetrics) #if !swift(>=4.1) - static func ==(lhs: Telemetry.OneOf_Variant, rhs: Telemetry.OneOf_Variant) -> Bool { + public static func ==(lhs: Telemetry.OneOf_Variant, rhs: Telemetry.OneOf_Variant) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -535,7 +535,27 @@ struct Telemetry { #endif } - init() {} + public init() {} +} + +/// +/// NAU7802 Telemetry configuration, for saving to flash +public struct Nau7802Config { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + /// The offset setting for the NAU7802 + public var zeroOffset: Int32 = 0 + + /// + /// The calibration factor for the NAU7802 + public var calibrationFactor: Float = 0 + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} } /// @@ -574,7 +594,7 @@ extension Nau7802Config: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension TelemetrySensorType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "SENSOR_UNSET"), 1: .same(proto: "BME280"), 2: .same(proto: "BME680"), @@ -605,8 +625,8 @@ extension TelemetrySensorType: SwiftProtobuf._ProtoNameProviding { } extension DeviceMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".DeviceMetrics" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".DeviceMetrics" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "battery_level"), 2: .same(proto: "voltage"), 3: .standard(proto: "channel_utilization"), @@ -614,7 +634,7 @@ extension DeviceMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa 5: .standard(proto: "uptime_seconds"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -630,7 +650,7 @@ extension DeviceMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.batteryLevel != 0 { try visitor.visitSingularUInt32Field(value: self.batteryLevel, fieldNumber: 1) } @@ -649,7 +669,7 @@ extension DeviceMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: DeviceMetrics, rhs: DeviceMetrics) -> Bool { + public static func ==(lhs: DeviceMetrics, rhs: DeviceMetrics) -> Bool { if lhs.batteryLevel != rhs.batteryLevel {return false} if lhs.voltage != rhs.voltage {return false} if lhs.channelUtilization != rhs.channelUtilization {return false} @@ -661,8 +681,8 @@ extension DeviceMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa } extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".EnvironmentMetrics" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".EnvironmentMetrics" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "temperature"), 2: .standard(proto: "relative_humidity"), 3: .standard(proto: "barometric_pressure"), @@ -680,7 +700,7 @@ extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImple 15: .same(proto: "weight"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -706,7 +726,7 @@ extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.temperature != 0 { try visitor.visitSingularFloatField(value: self.temperature, fieldNumber: 1) } @@ -755,7 +775,7 @@ extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImple try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: EnvironmentMetrics, rhs: EnvironmentMetrics) -> Bool { + public static func ==(lhs: EnvironmentMetrics, rhs: EnvironmentMetrics) -> Bool { if lhs.temperature != rhs.temperature {return false} if lhs.relativeHumidity != rhs.relativeHumidity {return false} if lhs.barometricPressure != rhs.barometricPressure {return false} @@ -777,8 +797,8 @@ extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } extension PowerMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".PowerMetrics" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".PowerMetrics" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "ch1_voltage"), 2: .standard(proto: "ch1_current"), 3: .standard(proto: "ch2_voltage"), @@ -787,7 +807,7 @@ extension PowerMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat 6: .standard(proto: "ch3_current"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -804,7 +824,7 @@ extension PowerMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.ch1Voltage != 0 { try visitor.visitSingularFloatField(value: self.ch1Voltage, fieldNumber: 1) } @@ -826,7 +846,7 @@ extension PowerMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: PowerMetrics, rhs: PowerMetrics) -> Bool { + public static func ==(lhs: PowerMetrics, rhs: PowerMetrics) -> Bool { if lhs.ch1Voltage != rhs.ch1Voltage {return false} if lhs.ch1Current != rhs.ch1Current {return false} if lhs.ch2Voltage != rhs.ch2Voltage {return false} @@ -839,8 +859,8 @@ extension PowerMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".AirQualityMetrics" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".AirQualityMetrics" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "pm10_standard"), 2: .standard(proto: "pm25_standard"), 3: .standard(proto: "pm100_standard"), @@ -855,7 +875,7 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem 12: .standard(proto: "particles_100um"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -878,7 +898,7 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.pm10Standard != 0 { try visitor.visitSingularUInt32Field(value: self.pm10Standard, fieldNumber: 1) } @@ -918,7 +938,7 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: AirQualityMetrics, rhs: AirQualityMetrics) -> Bool { + public static func ==(lhs: AirQualityMetrics, rhs: AirQualityMetrics) -> Bool { if lhs.pm10Standard != rhs.pm10Standard {return false} if lhs.pm25Standard != rhs.pm25Standard {return false} if lhs.pm100Standard != rhs.pm100Standard {return false} @@ -937,8 +957,8 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } extension Telemetry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Telemetry" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Telemetry" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "time"), 2: .standard(proto: "device_metrics"), 3: .standard(proto: "environment_metrics"), @@ -946,7 +966,7 @@ extension Telemetry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation 5: .standard(proto: "power_metrics"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1010,7 +1030,7 @@ extension Telemetry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -1040,7 +1060,7 @@ extension Telemetry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Telemetry, rhs: Telemetry) -> Bool { + public static func ==(lhs: Telemetry, rhs: Telemetry) -> Bool { if lhs.time != rhs.time {return false} if lhs.variant != rhs.variant {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -1049,13 +1069,13 @@ extension Telemetry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation } extension Nau7802Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Nau7802Config" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".Nau7802Config" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "zeroOffset"), 2: .same(proto: "calibrationFactor"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1068,7 +1088,7 @@ extension Nau7802Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.zeroOffset != 0 { try visitor.visitSingularInt32Field(value: self.zeroOffset, fieldNumber: 1) } @@ -1078,7 +1098,7 @@ extension Nau7802Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Nau7802Config, rhs: Nau7802Config) -> Bool { + public static func ==(lhs: Nau7802Config, rhs: Nau7802Config) -> Bool { if lhs.zeroOffset != rhs.zeroOffset {return false} if lhs.calibrationFactor != rhs.calibrationFactor {return false} if lhs.unknownFields != rhs.unknownFields {return false} diff --git a/Meshtastic/Protobufs/meshtastic/xmodem.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/xmodem.pb.swift similarity index 83% rename from Meshtastic/Protobufs/meshtastic/xmodem.pb.swift rename to MeshtasticProtobufs/Sources/meshtastic/xmodem.pb.swift index 4df972b8..1f41fe0b 100644 --- a/Meshtastic/Protobufs/meshtastic/xmodem.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/xmodem.pb.swift @@ -20,23 +20,23 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _2 } -struct XModem { +public struct XModem { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var control: XModem.Control = .nul + public var control: XModem.Control = .nul - var seq: UInt32 = 0 + public var seq: UInt32 = 0 - var crc16: UInt32 = 0 + public var crc16: UInt32 = 0 - var buffer: Data = Data() + public var buffer: Data = Data() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum Control: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum Control: SwiftProtobuf.Enum { + public typealias RawValue = Int case nul // = 0 case soh // = 1 case stx // = 2 @@ -47,11 +47,11 @@ struct XModem { case ctrlz // = 26 case UNRECOGNIZED(Int) - init() { + public init() { self = .nul } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .nul case 1: self = .soh @@ -65,7 +65,7 @@ struct XModem { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .nul: return 0 case .soh: return 1 @@ -81,14 +81,14 @@ struct XModem { } - init() {} + public init() {} } #if swift(>=4.2) extension XModem.Control: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [XModem.Control] = [ + public static let allCases: [XModem.Control] = [ .nul, .soh, .stx, @@ -112,15 +112,15 @@ extension XModem.Control: @unchecked Sendable {} fileprivate let _protobuf_package = "meshtastic" extension XModem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".XModem" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".XModem" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "control"), 2: .same(proto: "seq"), 3: .same(proto: "crc16"), 4: .same(proto: "buffer"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -135,7 +135,7 @@ extension XModem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.control != .nul { try visitor.visitSingularEnumField(value: self.control, fieldNumber: 1) } @@ -151,7 +151,7 @@ extension XModem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: XModem, rhs: XModem) -> Bool { + public static func ==(lhs: XModem, rhs: XModem) -> Bool { if lhs.control != rhs.control {return false} if lhs.seq != rhs.seq {return false} if lhs.crc16 != rhs.crc16 {return false} @@ -162,7 +162,7 @@ extension XModem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas } extension XModem.Control: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "NUL"), 1: .same(proto: "SOH"), 2: .same(proto: "STX"), diff --git a/MeshtasticTests/Info.plist b/MeshtasticTests/Info.plist deleted file mode 100644 index 64d65ca4..00000000 --- a/MeshtasticTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/MeshtasticTests/MeshtasticTests.swift b/MeshtasticTests/MeshtasticTests.swift deleted file mode 100644 index bc75d0da..00000000 --- a/MeshtasticTests/MeshtasticTests.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// MeshtasticAppleTests.swift -// MeshtasticAppleTests -// -// Created by Garth Vander Houwen on 8/18/21. -// - -import XCTest - -@testable import Meshtastic - -class MeshtasticTests: XCTestCase { - - override func setUpWithError() throws { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDownWithError() throws { - - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() throws { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/MeshtasticUITests/Info.plist b/MeshtasticUITests/Info.plist deleted file mode 100644 index 64d65ca4..00000000 --- a/MeshtasticUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/MeshtasticUITests/MeshtasticUITests.swift b/MeshtasticUITests/MeshtasticUITests.swift deleted file mode 100644 index ae140de9..00000000 --- a/MeshtasticUITests/MeshtasticUITests.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// MeshtasticUITests.swift -// MeshtasticUITests -// -// Copyright(c) Garth Vander Houwen 8/18/21. -// - -import XCTest - -class MeshtasticUITests: XCTestCase { - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() throws { - // UI tests must launch the application that they test. - let app = XCUIApplication() - app.launch() - - // Use recording to get started writing UI tests. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testLaunchPerformance() throws { - if #available(macOS 13, iOS 16.0, watchOS 8.0, *) { - // This measures how long it takes to launch your application. - measure(metrics: [XCTApplicationLaunchMetric()]) { - XCUIApplication().launch() - } - } - } -} diff --git a/README.md b/README.md index 9b888e90..0db0708e 100644 --- a/README.md +++ b/README.md @@ -8,35 +8,41 @@ SwiftUI client applications for iOS, iPadOS and macOS. -## OS Requirements +## Getting Started -* iOS App Requires iOS 16 + -* iPadOS App Requires iPadOS 16 + -* Mac App Reguires macOS 13 + +This project is currently using **Xcode 15.4**. -## Code Standards +1. Clone the repo. +2. Open `Meshtastic.xcworkspace` +2. Build and run the `Meshtastic` target. -- Use SwiftUI (Maps are the exception) -- Use Hierarchical icons +```sh +git clone git@github.com:meshtastic/Meshtastic-Apple.git +cd Meshtastic-Apple +open Meshtastic.xcworkspace +``` + +## Technical Standards + +### Supported Operating Systems + +* iOS 16+ +* iPadOS 16+ +* macOS 13+ + +### Code Standards + +- Use SwiftUI +- Use SFSymbols for icons - Use Core Data for persistence -- Requires SwiftLint - see https://github.com/realm/SwiftLint -## To update protobufs: - -- install swift-protobuf: - ```bash - brew install swift-protobuf - ``` -- check out the latest protobuf commit from the master branch - ```bash - git submodule update --init - ``` +## Updating Protobufs: - run: ```bash - ./gen_protos.sh + scripts/gen_protos.sh ``` - build, test, commit changes -- You may need to run: - ```bash - swiftlint --fix - ``` + +## License + +This project is licensed under the GPL v3. See the [LICENSE](LICENSE) file for details. diff --git a/gen_protos.sh b/scripts/gen_protos.sh similarity index 76% rename from gen_protos.sh rename to scripts/gen_protos.sh index b829095f..4c7cb290 100755 --- a/gen_protos.sh +++ b/scripts/gen_protos.sh @@ -12,7 +12,7 @@ if [ ! -x "$(which protoc)" ]; then exit fi -protoc --proto_path=./protobufs --swift_out=./Meshtastic/Protobufs ./protobufs/meshtastic/*.proto +protoc --proto_path=./protobufs --swift_opt=Visibility=Public --swift_out=./MeshtasticProtobufs/Sources ./protobufs/meshtastic/*.proto echo "Done generating the swift files from the proto files." echo "Build, test, and commit changes." diff --git a/thebenternify.sh b/scripts/thebenternify.sh similarity index 100% rename from thebenternify.sh rename to scripts/thebenternify.sh diff --git a/unthebenternify.sh b/scripts/unthebenternify.sh similarity index 100% rename from unthebenternify.sh rename to scripts/unthebenternify.sh