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.
This commit is contained in:
Blake McAnally 2024-06-07 22:09:20 -05:00
parent 2bc48b1c60
commit 58da532d32
88 changed files with 2218 additions and 2212 deletions

View file

@ -1,6 +1,6 @@
# Exclude automatically generated Swift files
excluded:
- Meshtastic/Protobufs
- MeshtasticProtobufs
line_length: 400

View file

@ -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 = "<group>"; };
DD007BAF2AA5981000F5FA12 /* NodeInfoEntityExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeInfoEntityExtension.swift; sourceTree = "<group>"; };
DD05296F2B77F454008E44CD /* MeshtasticDataModelV 26.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MeshtasticDataModelV 26.xcdatamodel"; sourceTree = "<group>"; };
DD0E20F92B87090400F2D100 /* atak.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = atak.pb.swift; sourceTree = "<group>"; };
DD0E20FA2B87090400F2D100 /* clientonly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = clientonly.pb.swift; sourceTree = "<group>"; };
DD0E20FB2B87090400F2D100 /* paxcount.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = paxcount.pb.swift; sourceTree = "<group>"; };
DD0E20FF2B892E1300F2D100 /* MeshtasticDataModelV 28.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MeshtasticDataModelV 28.xcdatamodel"; sourceTree = "<group>"; };
DD0E21002B8A6BC500F2D100 /* DeviceHardware.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = DeviceHardware.json; sourceTree = "<group>"; };
DD0E9C222A30CE3A00580CBB /* MeshtasticDataModelV14.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MeshtasticDataModelV14.xcdatamodel; sourceTree = "<group>"; };
@ -328,23 +298,6 @@
DD5D0A9A2931AD6B00F7EA61 /* MeshtasticDataModelV2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MeshtasticDataModelV2.xcdatamodel; sourceTree = "<group>"; };
DD5D0A9B2931B9F200F7EA61 /* EthernetModes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EthernetModes.swift; sourceTree = "<group>"; };
DD5E51CC2986643400D21B61 /* MeshtasticDataModelV7.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MeshtasticDataModelV7.xcdatamodel; sourceTree = "<group>"; };
DD5E51F0298EE33B00D21B61 /* admin.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = admin.pb.swift; sourceTree = "<group>"; };
DD5E51F1298EE33B00D21B61 /* config.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = config.pb.swift; sourceTree = "<group>"; };
DD5E51F2298EE33B00D21B61 /* xmodem.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = xmodem.pb.swift; sourceTree = "<group>"; };
DD5E51F3298EE33B00D21B61 /* mesh.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = mesh.pb.swift; sourceTree = "<group>"; };
DD5E51F4298EE33B00D21B61 /* localonly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = localonly.pb.swift; sourceTree = "<group>"; };
DD5E51F5298EE33B00D21B61 /* connection_status.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = connection_status.pb.swift; sourceTree = "<group>"; };
DD5E51F6298EE33B00D21B61 /* rtttl.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = rtttl.pb.swift; sourceTree = "<group>"; };
DD5E51F7298EE33B00D21B61 /* module_config.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = module_config.pb.swift; sourceTree = "<group>"; };
DD5E51F8298EE33B00D21B61 /* channel.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = channel.pb.swift; sourceTree = "<group>"; };
DD5E51FA298EE33B00D21B61 /* portnums.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = portnums.pb.swift; sourceTree = "<group>"; };
DD5E51FB298EE33B00D21B61 /* storeforward.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = storeforward.pb.swift; sourceTree = "<group>"; };
DD5E51FC298EE33B00D21B61 /* mqtt.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = mqtt.pb.swift; sourceTree = "<group>"; };
DD5E51FD298EE33B00D21B61 /* cannedmessages.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = cannedmessages.pb.swift; sourceTree = "<group>"; };
DD5E51FE298EE33B00D21B61 /* telemetry.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = telemetry.pb.swift; sourceTree = "<group>"; };
DD5E51FF298EE33B00D21B61 /* remote_hardware.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = remote_hardware.pb.swift; sourceTree = "<group>"; };
DD5E5200298EE33B00D21B61 /* apponly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = apponly.pb.swift; sourceTree = "<group>"; };
DD5E5201298EE33B00D21B61 /* deviceonly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = deviceonly.pb.swift; sourceTree = "<group>"; };
DD5E523E298F5A9E00D21B61 /* AirQualityIndex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AirQualityIndex.swift; sourceTree = "<group>"; };
DD6193742862F6E600E59241 /* ExternalNotificationConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalNotificationConfig.swift; sourceTree = "<group>"; };
DD6193762862F90F00E59241 /* CannedMessagesConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CannedMessagesConfig.swift; sourceTree = "<group>"; };
@ -423,10 +376,6 @@
DDC2E15B26CE248F0042C5E4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = ../Assets.xcassets; sourceTree = "<group>"; };
DDC2E15E26CE248F0042C5E4 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
DDC2E16526CE248F0042C5E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DDC2E17026CE248F0042C5E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
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 = "<group>"; };
DDC2E17B26CE248F0042C5E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DDC2E18E26CE25FE0042C5E4 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
DDC2E1A626CEB3400042C5E4 /* LocationHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationHelper.swift; sourceTree = "<group>"; };
DDC3B273283F411B00AC321C /* LastHeardText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LastHeardText.swift; sourceTree = "<group>"; };
@ -442,7 +391,6 @@
DDCE4E2B2869F92900BE9F8F /* UserConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserConfig.swift; sourceTree = "<group>"; };
DDD28D362C0CCCD10063CFA3 /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/Localizable.strings"; sourceTree = "<group>"; };
DDD28D372C0CD2670063CFA3 /* MeshtasticDataModelV 37.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MeshtasticDataModelV 37.xcdatamodel"; sourceTree = "<group>"; };
DDD3BBD4292D763200D609B3 /* MeshtasticTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeshtasticTests.swift; sourceTree = "<group>"; };
DDD43FE22A78C8900083A3E9 /* MqttClientProxyManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MqttClientProxyManager.swift; sourceTree = "<group>"; };
DDD5BB082C285DDC007E03CA /* AppLog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLog.swift; sourceTree = "<group>"; };
DDD5BB0A2C285E45007E03CA /* LogDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogDetail.swift; sourceTree = "<group>"; };
@ -460,7 +408,6 @@
DDDB26472AACD6D1003AFCB7 /* NodeMapMapkit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeMapMapkit.swift; sourceTree = "<group>"; };
DDDB26492AAD743E003AFCB7 /* MeshtasticDataModelV18.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MeshtasticDataModelV18.xcdatamodel; sourceTree = "<group>"; };
DDDB443529F6287000EE2349 /* MapButtons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapButtons.swift; sourceTree = "<group>"; };
DDDB443C29F6592F00EE2349 /* NetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = "<group>"; };
DDDB443F29F79AB000EE2349 /* UserDefaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaults.swift; sourceTree = "<group>"; };
DDDB444129F8A88700EE2349 /* Double.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Double.swift; sourceTree = "<group>"; };
DDDB444329F8A8DD00EE2349 /* Float.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Float.swift; sourceTree = "<group>"; };
@ -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 = "<group>";
};
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 = "<group>";
};
DD5E523D298F5A7D00D21B61 /* Weather */ = {
isa = PBXGroup;
children = (
@ -783,14 +697,6 @@
path = Map;
sourceTree = "<group>";
};
DDAF8C5626ED07740058C060 /* Protobufs */ = {
isa = PBXGroup;
children = (
DD5E51EF298EE33B00D21B61 /* meshtastic */,
);
path = Protobufs;
sourceTree = "<group>";
};
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 = "<group>";
};
DDC2E16D26CE248F0042C5E4 /* MeshtasticTests */ = {
isa = PBXGroup;
children = (
DDD3BBD4292D763200D609B3 /* MeshtasticTests.swift */,
DDC2E17026CE248F0042C5E4 /* Info.plist */,
);
path = MeshtasticTests;
sourceTree = "<group>";
};
DDC2E17826CE248F0042C5E4 /* MeshtasticUITests */ = {
isa = PBXGroup;
children = (
DDC2E17926CE248F0042C5E4 /* MeshtasticUITests.swift */,
DDC2E17B26CE248F0042C5E4 /* Info.plist */,
);
path = MeshtasticUITests;
sourceTree = "<group>";
};
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 */

View file

@ -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"
}
}
],

View file

@ -89,7 +89,6 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:README.md">
</FileRef>
<FileRef
location = "group:Meshtastic.xcodeproj">
</FileRef>
<FileRef
location = "group:MeshtasticProtobufs">
</FileRef>
</Workspace>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View file

@ -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
}

View file

@ -5,6 +5,7 @@
// Copyright(c) Garth Vander Houwen 8/19/22.
//
import Foundation
import MeshtasticProtobufs
enum BluetoothModes: Int, CaseIterable, Identifiable {

View file

@ -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 {

View file

@ -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 {

View file

@ -6,6 +6,7 @@
//
import Foundation
import MeshtasticProtobufs
// Default of 0 is Client
enum DeviceRoles: Int, CaseIterable, Identifiable {

View file

@ -6,6 +6,7 @@
//
import Foundation
import MeshtasticProtobufs
enum ScreenUnits: Int, CaseIterable, Identifiable {

View file

@ -6,6 +6,7 @@
//
import Foundation
import MeshtasticProtobufs
enum EthernetMode: Int, CaseIterable, Identifiable {

View file

@ -6,6 +6,7 @@
//
import Foundation
import MeshtasticProtobufs
enum RegionCodes: Int, CaseIterable, Identifiable {

View file

@ -6,6 +6,7 @@
//
import Foundation
import MeshtasticProtobufs
enum GpsFormats: Int, CaseIterable, Identifiable {

View file

@ -5,6 +5,7 @@
// Copyright(c) Garth Vander Houwen 8/4/22.
//
import Foundation
import MeshtasticProtobufs
enum RoutingError: Int, CaseIterable, Identifiable {

View file

@ -5,6 +5,7 @@
// Copyright(c) Garth Vander Houwen 9/10/22.
//
import Foundation
import MeshtasticProtobufs
enum SerialBaudRates: Int, CaseIterable, Identifiable {

View file

@ -5,6 +5,8 @@
// Copyright(c) Garth Vander Houwen 11/7/22.
//
import Foundation
import CoreData
import MeshtasticProtobufs
extension ChannelEntity {

View file

@ -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)
}
}

View file

@ -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
}
}

View file

@ -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)
}
}

View file

@ -8,6 +8,7 @@
import CoreData
import CoreLocation
import MapKit
import MeshtasticProtobufs
import SwiftUI
extension PositionEntity {

View file

@ -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
}
}

View file

@ -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)
}
}

View file

@ -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)
}
}

View file

@ -7,6 +7,7 @@
import Foundation
import CoreData
import MeshtasticProtobufs
extension UserEntity {

View file

@ -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
}
}

View file

@ -3,6 +3,7 @@ import CoreData
import CoreBluetooth
import SwiftUI
import MapKit
import MeshtasticProtobufs
import CocoaMQTT
import OSLog
import RegexBuilder

View file

@ -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")
}

View file

@ -7,6 +7,7 @@
import Foundation
import CoreData
import MeshtasticProtobufs
import SwiftUI
import RegexBuilder
import OSLog

View file

@ -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))
}
}

View file

@ -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)")

View file

@ -5,9 +5,10 @@
// Copyright Garth Vander Houwen 1/10/23.
//
import SwiftUI
import CoreLocation
import MeshtasticProtobufs
import OSLog
import SwiftUI
struct WaypointFormMapKit: View {

View file

@ -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

View file

@ -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 */

View file

@ -7,6 +7,7 @@
import SwiftUI
import Charts
import MeshtasticProtobufs
import OSLog
struct DetectionSensorLog: View {

View file

@ -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 {

View file

@ -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

View file

@ -5,6 +5,7 @@
// Copyright (c) Garth Vander Houwen 8/18/22.
//
import MeshtasticProtobufs
import OSLog
import SwiftUI

View file

@ -4,8 +4,10 @@
//
// Copyright (c) Garth Vander Houwen 6/13/22.
//
import SwiftUI
import MeshtasticProtobufs
import OSLog
import SwiftUI
struct DeviceConfig: View {

View file

@ -5,8 +5,9 @@
// Copyright (c) Garth Vander Houwen 6/7/22.
//
import SwiftUI
import MeshtasticProtobufs
import OSLog
import SwiftUI
struct DisplayConfig: View {

View file

@ -7,6 +7,7 @@
import SwiftUI
import CoreData
import MeshtasticProtobufs
import OSLog
struct LoRaConfig: View {

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -4,8 +4,9 @@
//
// Copyright (c) Garth Vander Houwen 6/22/22.
//
import SwiftUI
import MeshtasticProtobufs
import OSLog
import SwiftUI
struct ExternalNotificationConfig: View {

View file

@ -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 {

View file

@ -5,6 +5,7 @@
// Copyright Garth Vander Houwen 2/25/24.
//
import MeshtasticProtobufs
import SwiftUI
struct PaxCounterConfig: View {

View file

@ -4,8 +4,9 @@
//
// Copyright (c) Garth Vander Houwen 6/13/22.
//
import SwiftUI
import MeshtasticProtobufs
import OSLog
import SwiftUI
struct RangeTestConfig: View {

View file

@ -4,8 +4,9 @@
//
// Copyright (c) Garth Vander Houwen 6/22/22.
//
import SwiftUI
import MeshtasticProtobufs
import OSLog
import SwiftUI
struct SerialConfig: View {

View file

@ -4,9 +4,9 @@
//
// Copyright(c) Garth Vander Houwen 8/26/23.
//
import SwiftUI
import MeshtasticProtobufs
import OSLog
import SwiftUI
struct StoreForwardConfig: View {

View file

@ -4,8 +4,9 @@
//
// Copyright (c) Garth Vander Houwen 6/13/22.
//
import SwiftUI
import MeshtasticProtobufs
import OSLog
import SwiftUI
struct TelemetryConfig: View {

View file

@ -4,9 +4,9 @@
//
// Copyright (c) Garth Vander Houwen 8/1/2022
//
import SwiftUI
import MeshtasticProtobufs
import OSLog
import SwiftUI
struct NetworkConfig: View {

View file

@ -6,6 +6,7 @@
//
import SwiftUI
import MeshtasticProtobufs
import OSLog
struct PositionFlags: OptionSet {

View file

@ -1,4 +1,5 @@
import SwiftUI
import MeshtasticProtobufs
struct PowerConfig: View {
@Environment(\.managedObjectContext) private var context

View file

@ -7,6 +7,8 @@
import SwiftUI
import CoreData
import CoreImage.CIFilterBuiltins
import MeshtasticProtobufs
#if canImport(TipKit)
import TipKit
#endif

View file

@ -4,8 +4,9 @@
//
// Copyright (c) Garth Vander Houwen 6/27/22.
//
import SwiftUI
import CoreData
import MeshtasticProtobufs
import SwiftUI
struct UserConfig: View {

8
MeshtasticProtobufs/.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
.DS_Store
/.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc

View file

@ -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")
]
)
]
)

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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

View file

@ -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
/// <status battery='100' />
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
/// <contact endpoint='0.0.0.0:4242:tcp' phone='+12345678' callsign='FALKE'/>
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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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}

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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"),

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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}

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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}

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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}

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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}

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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}

View file

@ -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"),

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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"),

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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}

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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}

View file

@ -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<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
public func traverse<V: SwiftProtobuf.Visitor>(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"),

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View file

@ -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.
}
}
}

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View file

@ -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 its 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()
}
}
}
}

View file

@ -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.

View file

@ -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."