mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Proto Submodule
This commit is contained in:
parent
357817af30
commit
b12067e7ef
20 changed files with 87 additions and 12706 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "protobufs"]
|
||||
path = protobufs
|
||||
url = http://github.com/meshtastic/protobufs
|
||||
|
|
@ -11,9 +11,7 @@
|
|||
C9697FA527933B8C00250207 /* SQLite in Frameworks */ = {isa = PBXBuildFile; productRef = C9697FA427933B8C00250207 /* SQLite */; };
|
||||
C9A7BC1027759A9600760B50 /* PositionAnnotationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9A7BC0F27759A9600760B50 /* PositionAnnotationView.swift */; };
|
||||
C9A88B55278B503C00BD810A /* MapViewModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9A88B54278B503C00BD810A /* MapViewModule.swift */; };
|
||||
C9A88B57278B559900BD810A /* apponly.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9A88B56278B559900BD810A /* apponly.pb.swift */; };
|
||||
DD0F791B28713C8A00A6FDAD /* AdminMessageList.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0F791A28713C8A00A6FDAD /* AdminMessageList.swift */; };
|
||||
DD17E5DE277D49D400010EC2 /* storeforward.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD17E5DC277D49D400010EC2 /* storeforward.pb.swift */; };
|
||||
DD1925B728CDA5A400720036 /* CannedMessagesConfigEnums.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD1925B628CDA5A400720036 /* CannedMessagesConfigEnums.swift */; };
|
||||
DD1925B928CDA93900720036 /* SerialConfigEnums.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD1925B828CDA93900720036 /* SerialConfigEnums.swift */; };
|
||||
DD1BF2F92776FE2E008C8D2F /* UserMessageList.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD1BF2F82776FE2E008C8D2F /* UserMessageList.swift */; };
|
||||
|
|
@ -23,8 +21,6 @@
|
|||
DD2553592855B52700E55709 /* PositionConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD2553582855B52700E55709 /* PositionConfig.swift */; };
|
||||
DD2AD8A8296D2DF9001FF0E7 /* MapViewSwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD2AD8A7296D2DF9001FF0E7 /* MapViewSwiftUI.swift */; };
|
||||
DD2E65262767A01F00E45FC5 /* NodeDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD2E65252767A01F00E45FC5 /* NodeDetail.swift */; };
|
||||
DD2F145129787595009E4638 /* xmodem.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD2F144F29787595009E4638 /* xmodem.pb.swift */; };
|
||||
DD2F145229787595009E4638 /* rtttl.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD2F145029787595009E4638 /* rtttl.pb.swift */; };
|
||||
DD3501892852FC3B000FC853 /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3501882852FC3B000FC853 /* Settings.swift */; };
|
||||
DD35018B2852FC79000FC853 /* UserSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD35018A2852FC79000FC853 /* UserSettings.swift */; };
|
||||
DD3CC6B528E33FD100FA9159 /* ShareChannels.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3CC6B428E33FD100FA9159 /* ShareChannels.swift */; };
|
||||
|
|
@ -39,15 +35,30 @@
|
|||
DD47E3CE26F103C600029299 /* NodeList.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD47E3CD26F103C600029299 /* NodeList.swift */; };
|
||||
DD47E3D626F17ED900029299 /* CircleText.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD47E3D526F17ED900029299 /* CircleText.swift */; };
|
||||
DD4A911E2708C65400501B7E /* AppSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4A911D2708C65400501B7E /* AppSettings.swift */; };
|
||||
DD4C158C2824A91E0032668E /* module_config.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4C158B2824A91E0032668E /* module_config.pb.swift */; };
|
||||
DD4C158E2824AA7E0032668E /* config.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4C158D2824AA7E0032668E /* config.pb.swift */; };
|
||||
DD4DED9027AD2975004BA27E /* cannedmessages.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4DED8F27AD2975004BA27E /* cannedmessages.pb.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 */; };
|
||||
DD539502276DAA6A00AD86B1 /* MapLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD539501276DAA6A00AD86B1 /* MapLocation.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 */; };
|
||||
DD5E520B298EE33B00D21B61 /* device_metadata.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5E51F9298EE33B00D21B61 /* device_metadata.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 */; };
|
||||
DD6193752862F6E600E59241 /* ExternalNotificationConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6193742862F6E600E59241 /* ExternalNotificationConfig.swift */; };
|
||||
DD6193772862F90F00E59241 /* CannedMessagesConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6193762862F90F00E59241 /* CannedMessagesConfig.swift */; };
|
||||
DD6193792863875F00E59241 /* SerialConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6193782863875F00E59241 /* SerialConfig.swift */; };
|
||||
|
|
@ -81,16 +92,7 @@
|
|||
DDA6B2E928419CF2003E8C16 /* MeshPackets.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA6B2E828419CF2003E8C16 /* MeshPackets.swift */; };
|
||||
DDA6B2EB28420A7B003E8C16 /* NodeAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA6B2EA28420A7B003E8C16 /* NodeAnnotation.swift */; };
|
||||
DDAF8C5326EB1DF10058C060 /* BLEManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF8C5226EB1DF10058C060 /* BLEManager.swift */; };
|
||||
DDAF8C5826ED07FD0058C060 /* mesh.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF8C5726ED07FD0058C060 /* mesh.pb.swift */; };
|
||||
DDAF8C5D26ED09490058C060 /* portnums.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF8C5C26ED09490058C060 /* portnums.pb.swift */; };
|
||||
DDAF8C6226ED0A230058C060 /* mqtt.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF8C6026ED0A230058C060 /* mqtt.pb.swift */; };
|
||||
DDAF8C6326ED0A230058C060 /* admin.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF8C6126ED0A230058C060 /* admin.pb.swift */; };
|
||||
DDAF8C6526ED0A490058C060 /* channel.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF8C6426ED0A490058C060 /* channel.pb.swift */; };
|
||||
DDAF8C6726ED0C8C0058C060 /* remote_hardware.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF8C6626ED0C8C0058C060 /* remote_hardware.pb.swift */; };
|
||||
DDAF8C6926ED0D070058C060 /* deviceonly.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF8C6826ED0D070058C060 /* deviceonly.pb.swift */; };
|
||||
DDAF8C6E26ED19040058C060 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF8C6D26ED19040058C060 /* Extensions.swift */; };
|
||||
DDB2CC6E27F3EB47009C5FCC /* telemetry.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB2CC6D27F3EB47009C5FCC /* telemetry.pb.swift */; };
|
||||
DDB3107228A6224100F1DE3D /* device_metadata.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB3107128A6224100F1DE3D /* device_metadata.pb.swift */; };
|
||||
DDB6ABD628AE742000384BA1 /* BluetoothConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB6ABD528AE742000384BA1 /* BluetoothConfig.swift */; };
|
||||
DDB6ABD928B0A4BA00384BA1 /* BluetoothModes.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB6ABD828B0A4BA00384BA1 /* BluetoothModes.swift */; };
|
||||
DDB6ABDB28B0AC6000384BA1 /* DistanceText.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB6ABDA28B0AC6000384BA1 /* DistanceText.swift */; };
|
||||
|
|
@ -108,7 +110,6 @@
|
|||
DDC4D568275499A500A4208E /* Persistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC4D567275499A500A4208E /* Persistence.swift */; };
|
||||
DDCDC6CB29481FCC004C1DDA /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DDCDC6CD29481FCC004C1DDA /* Localizable.strings */; };
|
||||
DDCE4E2C2869F92900BE9F8F /* UserConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDCE4E2B2869F92900BE9F8F /* UserConfig.swift */; };
|
||||
DDCFF601285453A7005FA625 /* localonly.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDCFF600285453A7005FA625 /* localonly.pb.swift */; };
|
||||
DDD3BBD5292D763200D609B3 /* MeshtasticTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDD3BBD4292D763200D609B3 /* MeshtasticTests.swift */; };
|
||||
DDD94A502845C8F5004A87A0 /* DateTimeText.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDD94A4F2845C8F5004A87A0 /* DateTimeText.swift */; };
|
||||
DDD9E4E4284B208E003777C5 /* UserEntityExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDD9E4E3284B208E003777C5 /* UserEntityExtension.swift */; };
|
||||
|
|
@ -138,9 +139,7 @@
|
|||
C9697F9C279336B700250207 /* LocalMBTileOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalMBTileOverlay.swift; sourceTree = "<group>"; };
|
||||
C9A7BC0F27759A9600760B50 /* PositionAnnotationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PositionAnnotationView.swift; sourceTree = "<group>"; };
|
||||
C9A88B54278B503C00BD810A /* MapViewModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapViewModule.swift; sourceTree = "<group>"; };
|
||||
C9A88B56278B559900BD810A /* apponly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = apponly.pb.swift; sourceTree = "<group>"; };
|
||||
DD0F791A28713C8A00A6FDAD /* AdminMessageList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminMessageList.swift; sourceTree = "<group>"; };
|
||||
DD17E5DC277D49D400010EC2 /* storeforward.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = storeforward.pb.swift; sourceTree = "<group>"; };
|
||||
DD1925B628CDA5A400720036 /* CannedMessagesConfigEnums.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CannedMessagesConfigEnums.swift; sourceTree = "<group>"; };
|
||||
DD1925B828CDA93900720036 /* SerialConfigEnums.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SerialConfigEnums.swift; sourceTree = "<group>"; };
|
||||
DD1BF2F82776FE2E008C8D2F /* UserMessageList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserMessageList.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -150,8 +149,6 @@
|
|||
DD2553582855B52700E55709 /* PositionConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PositionConfig.swift; sourceTree = "<group>"; };
|
||||
DD2AD8A7296D2DF9001FF0E7 /* MapViewSwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewSwiftUI.swift; sourceTree = "<group>"; };
|
||||
DD2E65252767A01F00E45FC5 /* NodeDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeDetail.swift; sourceTree = "<group>"; };
|
||||
DD2F144F29787595009E4638 /* xmodem.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = xmodem.pb.swift; sourceTree = "<group>"; };
|
||||
DD2F145029787595009E4638 /* rtttl.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = rtttl.pb.swift; sourceTree = "<group>"; };
|
||||
DD3501882852FC3B000FC853 /* Settings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Settings.swift; sourceTree = "<group>"; };
|
||||
DD35018A2852FC79000FC853 /* UserSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSettings.swift; sourceTree = "<group>"; };
|
||||
DD3CC6B428E33FD100FA9159 /* ShareChannels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareChannels.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -167,9 +164,6 @@
|
|||
DD47E3CD26F103C600029299 /* NodeList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeList.swift; sourceTree = "<group>"; };
|
||||
DD47E3D526F17ED900029299 /* CircleText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleText.swift; sourceTree = "<group>"; };
|
||||
DD4A911D2708C65400501B7E /* AppSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppSettings.swift; sourceTree = "<group>"; };
|
||||
DD4C158B2824A91E0032668E /* module_config.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = module_config.pb.swift; sourceTree = "<group>"; };
|
||||
DD4C158D2824AA7E0032668E /* config.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = config.pb.swift; sourceTree = "<group>"; };
|
||||
DD4DED8F27AD2975004BA27E /* cannedmessages.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = cannedmessages.pb.swift; sourceTree = "<group>"; };
|
||||
DD4F23CC28779A3C001D37CB /* EnvironmentMetricsLog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnvironmentMetricsLog.swift; sourceTree = "<group>"; };
|
||||
DD5394FD276BA0EF00AD86B1 /* PositionEntityExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PositionEntityExtension.swift; sourceTree = "<group>"; };
|
||||
DD539501276DAA6A00AD86B1 /* MapLocation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapLocation.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -177,6 +171,24 @@
|
|||
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>"; };
|
||||
DD5E51F9298EE33B00D21B61 /* device_metadata.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = device_metadata.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>"; };
|
||||
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>"; };
|
||||
DD6193782863875F00E59241 /* SerialConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SerialConfig.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -212,16 +224,7 @@
|
|||
DDA6B2E828419CF2003E8C16 /* MeshPackets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeshPackets.swift; sourceTree = "<group>"; };
|
||||
DDA6B2EA28420A7B003E8C16 /* NodeAnnotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeAnnotation.swift; sourceTree = "<group>"; };
|
||||
DDAF8C5226EB1DF10058C060 /* BLEManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BLEManager.swift; sourceTree = "<group>"; };
|
||||
DDAF8C5726ED07FD0058C060 /* mesh.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = mesh.pb.swift; sourceTree = "<group>"; };
|
||||
DDAF8C5C26ED09490058C060 /* portnums.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = portnums.pb.swift; sourceTree = "<group>"; };
|
||||
DDAF8C6026ED0A230058C060 /* mqtt.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = mqtt.pb.swift; sourceTree = "<group>"; };
|
||||
DDAF8C6126ED0A230058C060 /* admin.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = admin.pb.swift; sourceTree = "<group>"; };
|
||||
DDAF8C6426ED0A490058C060 /* channel.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = channel.pb.swift; sourceTree = "<group>"; };
|
||||
DDAF8C6626ED0C8C0058C060 /* remote_hardware.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = remote_hardware.pb.swift; sourceTree = "<group>"; };
|
||||
DDAF8C6826ED0D070058C060 /* deviceonly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = deviceonly.pb.swift; sourceTree = "<group>"; };
|
||||
DDAF8C6D26ED19040058C060 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
|
||||
DDB2CC6D27F3EB47009C5FCC /* telemetry.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = telemetry.pb.swift; sourceTree = "<group>"; };
|
||||
DDB3107128A6224100F1DE3D /* device_metadata.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = device_metadata.pb.swift; sourceTree = "<group>"; };
|
||||
DDB6ABD528AE742000384BA1 /* BluetoothConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BluetoothConfig.swift; sourceTree = "<group>"; };
|
||||
DDB6ABD828B0A4BA00384BA1 /* BluetoothModes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BluetoothModes.swift; sourceTree = "<group>"; };
|
||||
DDB6ABDA28B0AC6000384BA1 /* DistanceText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DistanceText.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -247,7 +250,6 @@
|
|||
DDCDC6CC29481FCC004C1DDA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
DDCDC6CE294821AD004C1DDA /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
DDCE4E2B2869F92900BE9F8F /* UserConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserConfig.swift; sourceTree = "<group>"; };
|
||||
DDCFF600285453A7005FA625 /* localonly.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = localonly.pb.swift; sourceTree = "<group>"; };
|
||||
DDD3BBD4292D763200D609B3 /* MeshtasticTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeshtasticTests.swift; sourceTree = "<group>"; };
|
||||
DDD94A4F2845C8F5004A87A0 /* DateTimeText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateTimeText.swift; sourceTree = "<group>"; };
|
||||
DDD9E4E3284B208E003777C5 /* UserEntityExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserEntityExtension.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -343,6 +345,31 @@
|
|||
path = Settings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DD5E51EF298EE33B00D21B61 /* meshtastic */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
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 */,
|
||||
DD5E51F9298EE33B00D21B61 /* device_metadata.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>";
|
||||
};
|
||||
DD61937A2863876A00E59241 /* Config */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -410,23 +437,7 @@
|
|||
DDAF8C5626ED07740058C060 /* Protobufs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DDAF8C6126ED0A230058C060 /* admin.pb.swift */,
|
||||
C9A88B56278B559900BD810A /* apponly.pb.swift */,
|
||||
DD4DED8F27AD2975004BA27E /* cannedmessages.pb.swift */,
|
||||
DDAF8C6426ED0A490058C060 /* channel.pb.swift */,
|
||||
DD4C158D2824AA7E0032668E /* config.pb.swift */,
|
||||
DDAF8C6826ED0D070058C060 /* deviceonly.pb.swift */,
|
||||
DDB3107128A6224100F1DE3D /* device_metadata.pb.swift */,
|
||||
DDCFF600285453A7005FA625 /* localonly.pb.swift */,
|
||||
DDAF8C5726ED07FD0058C060 /* mesh.pb.swift */,
|
||||
DD4C158B2824A91E0032668E /* module_config.pb.swift */,
|
||||
DDAF8C6026ED0A230058C060 /* mqtt.pb.swift */,
|
||||
DDAF8C5C26ED09490058C060 /* portnums.pb.swift */,
|
||||
DDAF8C6626ED0C8C0058C060 /* remote_hardware.pb.swift */,
|
||||
DD2F145029787595009E4638 /* rtttl.pb.swift */,
|
||||
DD17E5DC277D49D400010EC2 /* storeforward.pb.swift */,
|
||||
DDB2CC6D27F3EB47009C5FCC /* telemetry.pb.swift */,
|
||||
DD2F144F29787595009E4638 /* xmodem.pb.swift */,
|
||||
DD5E51EF298EE33B00D21B61 /* meshtastic */,
|
||||
);
|
||||
path = Protobufs;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -749,21 +760,19 @@
|
|||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DD4DED9027AD2975004BA27E /* cannedmessages.pb.swift in Sources */,
|
||||
DD5E520C298EE33B00D21B61 /* portnums.pb.swift in Sources */,
|
||||
DD457188293C7E63000C49FB /* SignalStrengthIndicator.swift in Sources */,
|
||||
DDCFF601285453A7005FA625 /* localonly.pb.swift in Sources */,
|
||||
DD836AE726F6B38600ABCC23 /* Connect.swift in Sources */,
|
||||
DDAF8C6E26ED19040058C060 /* Extensions.swift in Sources */,
|
||||
DD964FBF296E76EF007C176F /* WaypointFormView.swift in Sources */,
|
||||
DD3501892852FC3B000FC853 /* Settings.swift in Sources */,
|
||||
DD5D0A9C2931B9F200F7EA61 /* EthernetModes.swift in Sources */,
|
||||
DD5E5203298EE33B00D21B61 /* config.pb.swift in Sources */,
|
||||
DD798B072915928D005217CD /* ChannelMessageList.swift in Sources */,
|
||||
DDA6B2EB28420A7B003E8C16 /* NodeAnnotation.swift in Sources */,
|
||||
DDC2E1A726CEB3400042C5E4 /* LocationHelper.swift in Sources */,
|
||||
DD5394FE276BA0EF00AD86B1 /* PositionEntityExtension.swift in Sources */,
|
||||
DD913639270DFF4C00D7ACF3 /* LocalNotificationManager.swift in Sources */,
|
||||
DD2F145129787595009E4638 /* xmodem.pb.swift in Sources */,
|
||||
DD4C158C2824A91E0032668E /* module_config.pb.swift in Sources */,
|
||||
DD4F23CD28779A3C001D37CB /* EnvironmentMetricsLog.swift in Sources */,
|
||||
DDB6ABD628AE742000384BA1 /* BluetoothConfig.swift in Sources */,
|
||||
DD769E0328D18BF1001A3F05 /* DeviceMetricsLog.swift in Sources */,
|
||||
|
|
@ -773,52 +782,53 @@
|
|||
DD964FBD296E6B01007C176F /* EmojiOnlyTextField.swift in Sources */,
|
||||
DD8169FF272476C700F4AB02 /* LogDocument.swift in Sources */,
|
||||
DD2AD8A8296D2DF9001FF0E7 /* MapViewSwiftUI.swift in Sources */,
|
||||
DD5E5213298EE33B00D21B61 /* deviceonly.pb.swift in Sources */,
|
||||
DD5E5208298EE33B00D21B61 /* rtttl.pb.swift in Sources */,
|
||||
DD6193792863875F00E59241 /* SerialConfig.swift in Sources */,
|
||||
DDA0B6B2294CDC55001356EC /* Channels.swift in Sources */,
|
||||
DDAF8C6926ED0D070058C060 /* deviceonly.pb.swift in Sources */,
|
||||
DD4A911E2708C65400501B7E /* AppSettings.swift in Sources */,
|
||||
DD5E5209298EE33B00D21B61 /* module_config.pb.swift in Sources */,
|
||||
DD35018B2852FC79000FC853 /* UserSettings.swift in Sources */,
|
||||
DD2160AF28C5552500C17253 /* MQTTConfig.swift in Sources */,
|
||||
DDAF8C6226ED0A230058C060 /* mqtt.pb.swift in Sources */,
|
||||
DD5E520F298EE33B00D21B61 /* cannedmessages.pb.swift in Sources */,
|
||||
DDF924CA26FBB953009FE055 /* ConnectedDevice.swift in Sources */,
|
||||
DDAF8C5D26ED09490058C060 /* portnums.pb.swift in Sources */,
|
||||
DD3CC6BE28E4CD9800FA9159 /* BatteryGauge.swift in Sources */,
|
||||
DD6193772862F90F00E59241 /* CannedMessagesConfig.swift in Sources */,
|
||||
DD41582628582E9B009B0E59 /* DeviceConfig.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 */,
|
||||
DDB2CC6E27F3EB47009C5FCC /* telemetry.pb.swift in Sources */,
|
||||
DD23A50F26FD1B4400D9B90C /* PeripheralModel.swift in Sources */,
|
||||
DDB6ABDB28B0AC6000384BA1 /* DistanceText.swift in Sources */,
|
||||
DD5E520D298EE33B00D21B61 /* storeforward.pb.swift in Sources */,
|
||||
C9A7BC1027759A9600760B50 /* PositionAnnotationView.swift in Sources */,
|
||||
DD882F5D2772E4640005BF05 /* Contacts.swift in Sources */,
|
||||
DD964FC2297272AE007C176F /* WaypointEntityExtension.swift in Sources */,
|
||||
DD47E3CE26F103C600029299 /* NodeList.swift in Sources */,
|
||||
DD5E520A298EE33B00D21B61 /* channel.pb.swift in Sources */,
|
||||
DD8EBF43285058FA00426DCA /* DisplayConfig.swift in Sources */,
|
||||
DD964FC42974767D007C176F /* MapViewFitExtension.swift in Sources */,
|
||||
DD47E3D626F17ED900029299 /* CircleText.swift in Sources */,
|
||||
DDC2E18F26CE25FE0042C5E4 /* ContentView.swift in Sources */,
|
||||
DD17E5DE277D49D400010EC2 /* storeforward.pb.swift in Sources */,
|
||||
DD2553572855B02500E55709 /* LoRaConfig.swift in Sources */,
|
||||
DDB6ABD928B0A4BA00384BA1 /* BluetoothModes.swift in Sources */,
|
||||
DDD9E4E4284B208E003777C5 /* UserEntityExtension.swift in Sources */,
|
||||
C9A88B55278B503C00BD810A /* MapViewModule.swift in Sources */,
|
||||
DD2553592855B52700E55709 /* PositionConfig.swift in Sources */,
|
||||
DDB3107228A6224100F1DE3D /* device_metadata.pb.swift in Sources */,
|
||||
DDAF8C6326ED0A230058C060 /* admin.pb.swift in Sources */,
|
||||
DD97E96828EFE9A00056DDA4 /* About.swift in Sources */,
|
||||
DDB6ABE028B13AC700384BA1 /* DeviceRoles.swift in Sources */,
|
||||
DD86D40C287F401000BAEB7A /* SaveChannelQRCode.swift in Sources */,
|
||||
DDA1C48E28DB49D3009933EC /* ChannelRoles.swift in Sources */,
|
||||
DD8ED9C8289CE4B900B3B0AB /* RoutingError.swift in Sources */,
|
||||
DDAF8C5826ED07FD0058C060 /* mesh.pb.swift in Sources */,
|
||||
DD5E5202298EE33B00D21B61 /* admin.pb.swift in Sources */,
|
||||
DD964FC62975DBFD007C176F /* QueryCoreData.swift in Sources */,
|
||||
DD8169FB271F1F3A00F4AB02 /* MeshLog.swift in Sources */,
|
||||
DD8ED9C52898D51F00B3B0AB /* NetworkConfig.swift in Sources */,
|
||||
DDC3B274283F411B00AC321C /* LastHeardText.swift in Sources */,
|
||||
DD5E520B298EE33B00D21B61 /* device_metadata.pb.swift in Sources */,
|
||||
DD2E65262767A01F00E45FC5 /* NodeDetail.swift in Sources */,
|
||||
DD1925B928CDA93900720036 /* SerialConfigEnums.swift in Sources */,
|
||||
DD86D4112881D16900BAEB7A /* WriteCsvFile.swift in Sources */,
|
||||
|
|
@ -829,25 +839,27 @@
|
|||
DDB6ABE428B13FFF00384BA1 /* DisplayEnums.swift in Sources */,
|
||||
DD86D40A287F04F100BAEB7A /* InvalidVersion.swift in Sources */,
|
||||
DDD94A502845C8F5004A87A0 /* DateTimeText.swift in Sources */,
|
||||
C9A88B57278B559900BD810A /* apponly.pb.swift in Sources */,
|
||||
DD4C158E2824AA7E0032668E /* config.pb.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 */,
|
||||
DD415828285859C4009B0E59 /* TelemetryConfig.swift in Sources */,
|
||||
DD73FD1128750779000852D6 /* PositionLog.swift in Sources */,
|
||||
DD5E5206298EE33B00D21B61 /* localonly.pb.swift in Sources */,
|
||||
DD3CC6C028E7A60700FA9159 /* MessagingEnums.swift in Sources */,
|
||||
DD97E96628EFD9820056DDA4 /* MeshtasticLogo.swift in Sources */,
|
||||
C9697F9D279336B700250207 /* LocalMBTileOverlay.swift in Sources */,
|
||||
DD58C5F22919AD3C00D5BEFB /* ChannelEntityExtension.swift in Sources */,
|
||||
DD0F791B28713C8A00A6FDAD /* AdminMessageList.swift in Sources */,
|
||||
DD2F145229787595009E4638 /* rtttl.pb.swift in Sources */,
|
||||
DD3CC6BC28E366DF00FA9159 /* Meshtastic.xcdatamodeld in Sources */,
|
||||
DD5E5210298EE33B00D21B61 /* telemetry.pb.swift in Sources */,
|
||||
DD5E5205298EE33B00D21B61 /* mesh.pb.swift in Sources */,
|
||||
DD8169F9271F1A6100F4AB02 /* MeshLogger.swift in Sources */,
|
||||
DD539502276DAA6A00AD86B1 /* MapLocation.swift in Sources */,
|
||||
DD41582A28585C32009B0E59 /* RangeTestConfig.swift in Sources */,
|
||||
DDAF8C6726ED0C8C0058C060 /* remote_hardware.pb.swift in Sources */,
|
||||
DD1925B728CDA5A400720036 /* CannedMessagesConfigEnums.swift in Sources */,
|
||||
DDAF8C6526ED0A490058C060 /* channel.pb.swift in Sources */,
|
||||
DD5E5211298EE33B00D21B61 /* remote_hardware.pb.swift in Sources */,
|
||||
DD5E5204298EE33B00D21B61 /* xmodem.pb.swift in Sources */,
|
||||
DDC2E15826CE248E0042C5E4 /* MeshtasticApp.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,102 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: apponly.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// This is the most compact possible representation for a set of channels.
|
||||
/// It includes only one PRIMARY channel (which must be first) and
|
||||
/// 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 {
|
||||
// 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] = []
|
||||
|
||||
///
|
||||
/// LoRa config
|
||||
var loraConfig: Config.LoRaConfig {
|
||||
get {return _loraConfig ?? Config.LoRaConfig()}
|
||||
set {_loraConfig = newValue}
|
||||
}
|
||||
/// Returns true if `loraConfig` has been explicitly set.
|
||||
var hasLoraConfig: Bool {return self._loraConfig != nil}
|
||||
/// Clears the value of `loraConfig`. Subsequent reads from it will return its default value.
|
||||
mutating func clearLoraConfig() {self._loraConfig = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _loraConfig: Config.LoRaConfig? = nil
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension ChannelSet: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension ChannelSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "ChannelSet"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "settings"),
|
||||
2: .standard(proto: "lora_config"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeRepeatedMessageField(value: &self.settings) }()
|
||||
case 2: try { try decoder.decodeSingularMessageField(value: &self._loraConfig) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// https://github.com/apple/swift-protobuf/issues/1182
|
||||
if !self.settings.isEmpty {
|
||||
try visitor.visitRepeatedMessageField(value: self.settings, fieldNumber: 1)
|
||||
}
|
||||
try { if let v = self._loraConfig {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
} }()
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: ChannelSet, rhs: ChannelSet) -> Bool {
|
||||
if lhs.settings != rhs.settings {return false}
|
||||
if lhs._loraConfig != rhs._loraConfig {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: cannedmessages.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// Canned message module configuration.
|
||||
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()
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension CannedMessageModuleConfig: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension CannedMessageModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "CannedMessageModuleConfig"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "messages"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularStringField(value: &self.messages) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
if lhs.messages != rhs.messages {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,326 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: channel.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// Full settings (center freq, spread factor, pre-shared secret key etc...)
|
||||
/// needed to configure a radio for speaking on a particular channel This
|
||||
/// information can be encoded as a QRcode/url so that other users can configure
|
||||
/// their radio to join the same channel.
|
||||
/// A note about how channel names are shown to users: channelname-Xy
|
||||
/// poundsymbol is a prefix used to indicate this is a channel name (idea from @professr).
|
||||
/// Where X is a letter from A-Z (base 26) representing a hash of the PSK for this
|
||||
/// channel - so that if the user changes anything about the channel (which does
|
||||
/// force a new PSK) this letter will also change. Thus preventing user confusion if
|
||||
/// two friends try to type in a channel name of "BobsChan" and then can't talk
|
||||
/// because their PSKs will be different.
|
||||
/// The PSK is hashed into this letter by "0x41 + [xor all bytes of the psk ] modulo 26"
|
||||
/// This also allows the option of someday if people have the PSK off (zero), the
|
||||
/// users COULD type in a channel name and be able to talk.
|
||||
/// Y is a lower case letter from a-z that represents the channel 'speed' settings
|
||||
/// (for some future definition of speed)
|
||||
/// 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 {
|
||||
// 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
|
||||
|
||||
///
|
||||
/// A simple pre-shared key for now for crypto.
|
||||
/// Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256).
|
||||
/// A special shorthand is used for 1 byte long psks.
|
||||
/// These psks should be treated as only minimally secure,
|
||||
/// because they are listed in this source code.
|
||||
/// Those bytes are mapped using the following scheme:
|
||||
/// `0` = No crypto
|
||||
/// `1` = The special "default" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0xbf}
|
||||
/// `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()
|
||||
|
||||
///
|
||||
/// A SHORT name that will be packed into the URL.
|
||||
/// Less than 12 bytes.
|
||||
/// Something for end users to call the channel
|
||||
/// If this is the empty string it is assumed that this channel
|
||||
/// is the special (minimally secure) "Default"channel.
|
||||
/// 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()
|
||||
|
||||
///
|
||||
/// Used to construct a globally unique channel ID.
|
||||
/// The full globally unique ID will be: "name.id" where ID is shown as base36.
|
||||
/// Assuming that the number of meshtastic users is below 20K (true for a long time)
|
||||
/// the chance of this 64 bit random number colliding with anyone else is super low.
|
||||
/// And the penalty for collision is low as well, it just means that anyone trying to decrypt channel messages might need to
|
||||
/// try multiple candidate channels.
|
||||
/// Any time a non wire compatible change is made to a channel, this field should be regenerated.
|
||||
/// There are a small number of 'special' globally known (and fairly) insecure standard channels.
|
||||
/// 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
|
||||
|
||||
///
|
||||
/// If true, messages on the mesh will be sent to the *public* internet by any gateway ndoe
|
||||
var uplinkEnabled: Bool = false
|
||||
|
||||
///
|
||||
/// If true, messages seen on the internet will be forwarded to the local mesh.
|
||||
var downlinkEnabled: Bool = false
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
///
|
||||
/// A pair of a channel number, mode and the (sharable) settings for that channel
|
||||
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.
|
||||
|
||||
///
|
||||
/// 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
|
||||
|
||||
///
|
||||
/// The new settings, or NULL to disable that channel
|
||||
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}
|
||||
/// Clears the value of `settings`. Subsequent reads from it will return its default value.
|
||||
mutating func clearSettings() {self._settings = nil}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
var role: Channel.Role = .disabled
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
///
|
||||
/// How this channel is being used (or not).
|
||||
/// Note: this field is an enum to give us options for the future.
|
||||
/// In particular, someday we might make a 'SCANNING' option.
|
||||
/// SCANNING channels could have different frequencies and the radio would
|
||||
/// occasionally check that freq to see if anything is being transmitted.
|
||||
/// For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow
|
||||
/// 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
|
||||
|
||||
///
|
||||
/// This channel is not in use right now
|
||||
case disabled // = 0
|
||||
|
||||
///
|
||||
/// This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY
|
||||
case primary // = 1
|
||||
|
||||
///
|
||||
/// Secondary channels are only used for encryption/decryption/authentication purposes.
|
||||
/// Their radio settings (freq etc) are ignored, only psk is used.
|
||||
case secondary // = 2
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
init() {
|
||||
self = .disabled
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .disabled
|
||||
case 1: self = .primary
|
||||
case 2: self = .secondary
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .disabled: return 0
|
||||
case .primary: return 1
|
||||
case .secondary: return 2
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _settings: ChannelSettings? = nil
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Channel.Role: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
static var allCases: [Channel.Role] = [
|
||||
.disabled,
|
||||
.primary,
|
||||
.secondary,
|
||||
]
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension ChannelSettings: @unchecked Sendable {}
|
||||
extension Channel: @unchecked Sendable {}
|
||||
extension Channel.Role: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "ChannelSettings"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "channel_num"),
|
||||
2: .same(proto: "psk"),
|
||||
3: .same(proto: "name"),
|
||||
4: .same(proto: "id"),
|
||||
5: .standard(proto: "uplink_enabled"),
|
||||
6: .standard(proto: "downlink_enabled"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.channelNum) }()
|
||||
case 2: try { try decoder.decodeSingularBytesField(value: &self.psk) }()
|
||||
case 3: try { try decoder.decodeSingularStringField(value: &self.name) }()
|
||||
case 4: try { try decoder.decodeSingularFixed32Field(value: &self.id) }()
|
||||
case 5: try { try decoder.decodeSingularBoolField(value: &self.uplinkEnabled) }()
|
||||
case 6: try { try decoder.decodeSingularBoolField(value: &self.downlinkEnabled) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.channelNum != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.channelNum, fieldNumber: 1)
|
||||
}
|
||||
if !self.psk.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.psk, fieldNumber: 2)
|
||||
}
|
||||
if !self.name.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.name, fieldNumber: 3)
|
||||
}
|
||||
if self.id != 0 {
|
||||
try visitor.visitSingularFixed32Field(value: self.id, fieldNumber: 4)
|
||||
}
|
||||
if self.uplinkEnabled != false {
|
||||
try visitor.visitSingularBoolField(value: self.uplinkEnabled, fieldNumber: 5)
|
||||
}
|
||||
if self.downlinkEnabled != false {
|
||||
try visitor.visitSingularBoolField(value: self.downlinkEnabled, fieldNumber: 6)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
if lhs.id != rhs.id {return false}
|
||||
if lhs.uplinkEnabled != rhs.uplinkEnabled {return false}
|
||||
if lhs.downlinkEnabled != rhs.downlinkEnabled {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Channel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "Channel"
|
||||
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 {
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularInt32Field(value: &self.index) }()
|
||||
case 2: try { try decoder.decodeSingularMessageField(value: &self._settings) }()
|
||||
case 3: try { try decoder.decodeSingularEnumField(value: &self.role) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// https://github.com/apple/swift-protobuf/issues/1182
|
||||
if self.index != 0 {
|
||||
try visitor.visitSingularInt32Field(value: self.index, fieldNumber: 1)
|
||||
}
|
||||
try { if let v = self._settings {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
} }()
|
||||
if self.role != .disabled {
|
||||
try visitor.visitSingularEnumField(value: self.role, fieldNumber: 3)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Channel.Role: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "DISABLED"),
|
||||
1: .same(proto: "PRIMARY"),
|
||||
2: .same(proto: "SECONDARY"),
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,145 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: device_metadata.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// Device metadata response
|
||||
struct DeviceMetadata {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
||||
///
|
||||
/// Device firmware version string
|
||||
var firmwareVersion: String = String()
|
||||
|
||||
///
|
||||
/// Device state version
|
||||
var deviceStateVersion: UInt32 = 0
|
||||
|
||||
///
|
||||
/// Indicates whether the device can shutdown CPU natively or via power management chip
|
||||
var canShutdown: Bool = false
|
||||
|
||||
///
|
||||
/// Indicates that the device has native wifi capability
|
||||
var hasWifi_p: Bool = false
|
||||
|
||||
///
|
||||
/// Indicates that the device has native bluetooth capability
|
||||
var hasBluetooth_p: Bool = false
|
||||
|
||||
///
|
||||
/// Indicates that the device has an ethernet peripheral
|
||||
var hasEthernet_p: Bool = false
|
||||
|
||||
///
|
||||
/// Indicates that the device's role in the mesh
|
||||
var role: Config.DeviceConfig.Role = .client
|
||||
|
||||
///
|
||||
/// Indicates the device's current enabled position flags
|
||||
var positionFlags: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension DeviceMetadata: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension DeviceMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "DeviceMetadata"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "firmware_version"),
|
||||
2: .standard(proto: "device_state_version"),
|
||||
3: .same(proto: "canShutdown"),
|
||||
4: .same(proto: "hasWifi"),
|
||||
5: .same(proto: "hasBluetooth"),
|
||||
6: .same(proto: "hasEthernet"),
|
||||
7: .same(proto: "role"),
|
||||
8: .standard(proto: "position_flags"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularStringField(value: &self.firmwareVersion) }()
|
||||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.deviceStateVersion) }()
|
||||
case 3: try { try decoder.decodeSingularBoolField(value: &self.canShutdown) }()
|
||||
case 4: try { try decoder.decodeSingularBoolField(value: &self.hasWifi_p) }()
|
||||
case 5: try { try decoder.decodeSingularBoolField(value: &self.hasBluetooth_p) }()
|
||||
case 6: try { try decoder.decodeSingularBoolField(value: &self.hasEthernet_p) }()
|
||||
case 7: try { try decoder.decodeSingularEnumField(value: &self.role) }()
|
||||
case 8: try { try decoder.decodeSingularUInt32Field(value: &self.positionFlags) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.firmwareVersion.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.firmwareVersion, fieldNumber: 1)
|
||||
}
|
||||
if self.deviceStateVersion != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.deviceStateVersion, fieldNumber: 2)
|
||||
}
|
||||
if self.canShutdown != false {
|
||||
try visitor.visitSingularBoolField(value: self.canShutdown, fieldNumber: 3)
|
||||
}
|
||||
if self.hasWifi_p != false {
|
||||
try visitor.visitSingularBoolField(value: self.hasWifi_p, fieldNumber: 4)
|
||||
}
|
||||
if self.hasBluetooth_p != false {
|
||||
try visitor.visitSingularBoolField(value: self.hasBluetooth_p, fieldNumber: 5)
|
||||
}
|
||||
if self.hasEthernet_p != false {
|
||||
try visitor.visitSingularBoolField(value: self.hasEthernet_p, fieldNumber: 6)
|
||||
}
|
||||
if self.role != .client {
|
||||
try visitor.visitSingularEnumField(value: self.role, fieldNumber: 7)
|
||||
}
|
||||
if self.positionFlags != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.positionFlags, fieldNumber: 8)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: DeviceMetadata, rhs: DeviceMetadata) -> Bool {
|
||||
if lhs.firmwareVersion != rhs.firmwareVersion {return false}
|
||||
if lhs.deviceStateVersion != rhs.deviceStateVersion {return false}
|
||||
if lhs.canShutdown != rhs.canShutdown {return false}
|
||||
if lhs.hasWifi_p != rhs.hasWifi_p {return false}
|
||||
if lhs.hasBluetooth_p != rhs.hasBluetooth_p {return false}
|
||||
if lhs.hasEthernet_p != rhs.hasEthernet_p {return false}
|
||||
if lhs.role != rhs.role {return false}
|
||||
if lhs.positionFlags != rhs.positionFlags {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,508 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: deviceonly.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
enum ScreenFonts: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
case fontSmall // = 0
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
case fontMedium // = 1
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
case fontLarge // = 2
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
init() {
|
||||
self = .fontSmall
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .fontSmall
|
||||
case 1: self = .fontMedium
|
||||
case 2: self = .fontLarge
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .fontSmall: return 0
|
||||
case .fontMedium: return 1
|
||||
case .fontLarge: return 2
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension ScreenFonts: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
static var allCases: [ScreenFonts] = [
|
||||
.fontSmall,
|
||||
.fontMedium,
|
||||
.fontLarge,
|
||||
]
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
///
|
||||
/// This message is never sent over the wire, but it is used for serializing DB
|
||||
/// state to flash in the device code
|
||||
/// 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 {
|
||||
// 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 {
|
||||
get {return _storage._myNode ?? MyNodeInfo()}
|
||||
set {_uniqueStorage()._myNode = newValue}
|
||||
}
|
||||
/// Returns true if `myNode` has been explicitly set.
|
||||
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}
|
||||
|
||||
///
|
||||
/// My owner info
|
||||
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}
|
||||
/// Clears the value of `owner`. Subsequent reads from it will return its default value.
|
||||
mutating func clearOwner() {_uniqueStorage()._owner = nil}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
var nodeDb: [NodeInfo] {
|
||||
get {return _storage._nodeDb}
|
||||
set {_uniqueStorage()._nodeDb = newValue}
|
||||
}
|
||||
|
||||
///
|
||||
/// Received packets saved for delivery to the phone
|
||||
var receiveQueue: [MeshPacket] {
|
||||
get {return _storage._receiveQueue}
|
||||
set {_uniqueStorage()._receiveQueue = newValue}
|
||||
}
|
||||
|
||||
///
|
||||
/// 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 {
|
||||
get {return _storage._version}
|
||||
set {_uniqueStorage()._version = newValue}
|
||||
}
|
||||
|
||||
///
|
||||
/// 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 {
|
||||
get {return _storage._rxTextMessage ?? MeshPacket()}
|
||||
set {_uniqueStorage()._rxTextMessage = newValue}
|
||||
}
|
||||
/// Returns true if `rxTextMessage` has been explicitly set.
|
||||
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}
|
||||
|
||||
///
|
||||
/// Used only during development.
|
||||
/// Indicates developer is testing and changes should never be saved to flash.
|
||||
var noSave: Bool {
|
||||
get {return _storage._noSave}
|
||||
set {_uniqueStorage()._noSave = newValue}
|
||||
}
|
||||
|
||||
///
|
||||
/// Some GPSes seem to have bogus settings from the factory, so we always do one factory reset.
|
||||
var didGpsReset: Bool {
|
||||
get {return _storage._didGpsReset}
|
||||
set {_uniqueStorage()._didGpsReset = newValue}
|
||||
}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _storage = _StorageClass.defaultInstance
|
||||
}
|
||||
|
||||
///
|
||||
/// The on-disk saved channels
|
||||
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] = []
|
||||
|
||||
///
|
||||
/// 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
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
///
|
||||
/// This can be used for customizing the firmware distribution. If populated,
|
||||
/// show a secondary bootup screen with cuatom logo and text for 2.5 seconds.
|
||||
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
|
||||
|
||||
///
|
||||
/// The Logo height in Px
|
||||
var oemIconHeight: UInt32 = 0
|
||||
|
||||
///
|
||||
/// The Logo in xbm bytechar format
|
||||
var oemIconBits: Data = Data()
|
||||
|
||||
///
|
||||
/// Use this font for the OEM text.
|
||||
var oemFont: ScreenFonts = .fontSmall
|
||||
|
||||
///
|
||||
/// Use this font for the OEM text.
|
||||
var oemText: String = String()
|
||||
|
||||
///
|
||||
/// The default device encryption key, 16 or 32 byte
|
||||
var oemAesKey: Data = Data()
|
||||
|
||||
///
|
||||
/// A Preset LocalConfig to apply during factory reset
|
||||
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}
|
||||
/// Clears the value of `oemLocalConfig`. Subsequent reads from it will return its default value.
|
||||
mutating func clearOemLocalConfig() {self._oemLocalConfig = nil}
|
||||
|
||||
///
|
||||
/// A Preset LocalModuleConfig to apply during factory reset
|
||||
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}
|
||||
/// Clears the value of `oemLocalModuleConfig`. Subsequent reads from it will return its default value.
|
||||
mutating func clearOemLocalModuleConfig() {self._oemLocalModuleConfig = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _oemLocalConfig: LocalConfig? = nil
|
||||
fileprivate var _oemLocalModuleConfig: LocalModuleConfig? = nil
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension ScreenFonts: @unchecked Sendable {}
|
||||
extension DeviceState: @unchecked Sendable {}
|
||||
extension ChannelFile: @unchecked Sendable {}
|
||||
extension OEMStore: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension ScreenFonts: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "FONT_SMALL"),
|
||||
1: .same(proto: "FONT_MEDIUM"),
|
||||
2: .same(proto: "FONT_LARGE"),
|
||||
]
|
||||
}
|
||||
|
||||
extension DeviceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "DeviceState"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
2: .standard(proto: "my_node"),
|
||||
3: .same(proto: "owner"),
|
||||
4: .standard(proto: "node_db"),
|
||||
5: .standard(proto: "receive_queue"),
|
||||
8: .same(proto: "version"),
|
||||
7: .standard(proto: "rx_text_message"),
|
||||
9: .standard(proto: "no_save"),
|
||||
11: .standard(proto: "did_gps_reset"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _myNode: MyNodeInfo? = nil
|
||||
var _owner: User? = nil
|
||||
var _nodeDb: [NodeInfo] = []
|
||||
var _receiveQueue: [MeshPacket] = []
|
||||
var _version: UInt32 = 0
|
||||
var _rxTextMessage: MeshPacket? = nil
|
||||
var _noSave: Bool = false
|
||||
var _didGpsReset: Bool = false
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
private init() {}
|
||||
|
||||
init(copying source: _StorageClass) {
|
||||
_myNode = source._myNode
|
||||
_owner = source._owner
|
||||
_nodeDb = source._nodeDb
|
||||
_receiveQueue = source._receiveQueue
|
||||
_version = source._version
|
||||
_rxTextMessage = source._rxTextMessage
|
||||
_noSave = source._noSave
|
||||
_didGpsReset = source._didGpsReset
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate mutating func _uniqueStorage() -> _StorageClass {
|
||||
if !isKnownUniquelyReferenced(&_storage) {
|
||||
_storage = _StorageClass(copying: _storage)
|
||||
}
|
||||
return _storage
|
||||
}
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
_ = _uniqueStorage()
|
||||
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 2: try { try decoder.decodeSingularMessageField(value: &_storage._myNode) }()
|
||||
case 3: try { try decoder.decodeSingularMessageField(value: &_storage._owner) }()
|
||||
case 4: try { try decoder.decodeRepeatedMessageField(value: &_storage._nodeDb) }()
|
||||
case 5: try { try decoder.decodeRepeatedMessageField(value: &_storage._receiveQueue) }()
|
||||
case 7: try { try decoder.decodeSingularMessageField(value: &_storage._rxTextMessage) }()
|
||||
case 8: try { try decoder.decodeSingularUInt32Field(value: &_storage._version) }()
|
||||
case 9: try { try decoder.decodeSingularBoolField(value: &_storage._noSave) }()
|
||||
case 11: try { try decoder.decodeSingularBoolField(value: &_storage._didGpsReset) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
||||
// https://github.com/apple/swift-protobuf/issues/1182
|
||||
try { if let v = _storage._myNode {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
} }()
|
||||
try { if let v = _storage._owner {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
||||
} }()
|
||||
if !_storage._nodeDb.isEmpty {
|
||||
try visitor.visitRepeatedMessageField(value: _storage._nodeDb, fieldNumber: 4)
|
||||
}
|
||||
if !_storage._receiveQueue.isEmpty {
|
||||
try visitor.visitRepeatedMessageField(value: _storage._receiveQueue, fieldNumber: 5)
|
||||
}
|
||||
try { if let v = _storage._rxTextMessage {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
|
||||
} }()
|
||||
if _storage._version != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: _storage._version, fieldNumber: 8)
|
||||
}
|
||||
if _storage._noSave != false {
|
||||
try visitor.visitSingularBoolField(value: _storage._noSave, fieldNumber: 9)
|
||||
}
|
||||
if _storage._didGpsReset != false {
|
||||
try visitor.visitSingularBoolField(value: _storage._didGpsReset, fieldNumber: 11)
|
||||
}
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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
|
||||
let rhs_storage = _args.1
|
||||
if _storage._myNode != rhs_storage._myNode {return false}
|
||||
if _storage._owner != rhs_storage._owner {return false}
|
||||
if _storage._nodeDb != rhs_storage._nodeDb {return false}
|
||||
if _storage._receiveQueue != rhs_storage._receiveQueue {return false}
|
||||
if _storage._version != rhs_storage._version {return false}
|
||||
if _storage._rxTextMessage != rhs_storage._rxTextMessage {return false}
|
||||
if _storage._noSave != rhs_storage._noSave {return false}
|
||||
if _storage._didGpsReset != rhs_storage._didGpsReset {return false}
|
||||
return true
|
||||
}
|
||||
if !storagesAreEqual {return false}
|
||||
}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension ChannelFile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "ChannelFile"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "channels"),
|
||||
2: .same(proto: "version"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeRepeatedMessageField(value: &self.channels) }()
|
||||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.version) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.channels.isEmpty {
|
||||
try visitor.visitRepeatedMessageField(value: self.channels, fieldNumber: 1)
|
||||
}
|
||||
if self.version != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension OEMStore: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "OEMStore"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "oem_icon_width"),
|
||||
2: .standard(proto: "oem_icon_height"),
|
||||
3: .standard(proto: "oem_icon_bits"),
|
||||
4: .standard(proto: "oem_font"),
|
||||
5: .standard(proto: "oem_text"),
|
||||
6: .standard(proto: "oem_aes_key"),
|
||||
7: .standard(proto: "oem_local_config"),
|
||||
8: .standard(proto: "oem_local_module_config"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.oemIconWidth) }()
|
||||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.oemIconHeight) }()
|
||||
case 3: try { try decoder.decodeSingularBytesField(value: &self.oemIconBits) }()
|
||||
case 4: try { try decoder.decodeSingularEnumField(value: &self.oemFont) }()
|
||||
case 5: try { try decoder.decodeSingularStringField(value: &self.oemText) }()
|
||||
case 6: try { try decoder.decodeSingularBytesField(value: &self.oemAesKey) }()
|
||||
case 7: try { try decoder.decodeSingularMessageField(value: &self._oemLocalConfig) }()
|
||||
case 8: try { try decoder.decodeSingularMessageField(value: &self._oemLocalModuleConfig) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// https://github.com/apple/swift-protobuf/issues/1182
|
||||
if self.oemIconWidth != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.oemIconWidth, fieldNumber: 1)
|
||||
}
|
||||
if self.oemIconHeight != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.oemIconHeight, fieldNumber: 2)
|
||||
}
|
||||
if !self.oemIconBits.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.oemIconBits, fieldNumber: 3)
|
||||
}
|
||||
if self.oemFont != .fontSmall {
|
||||
try visitor.visitSingularEnumField(value: self.oemFont, fieldNumber: 4)
|
||||
}
|
||||
if !self.oemText.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.oemText, fieldNumber: 5)
|
||||
}
|
||||
if !self.oemAesKey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.oemAesKey, fieldNumber: 6)
|
||||
}
|
||||
try { if let v = self._oemLocalConfig {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
|
||||
} }()
|
||||
try { if let v = self._oemLocalModuleConfig {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
|
||||
} }()
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
if lhs.oemFont != rhs.oemFont {return false}
|
||||
if lhs.oemText != rhs.oemText {return false}
|
||||
if lhs.oemAesKey != rhs.oemAesKey {return false}
|
||||
if lhs._oemLocalConfig != rhs._oemLocalConfig {return false}
|
||||
if lhs._oemLocalModuleConfig != rhs._oemLocalModuleConfig {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,510 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: localonly.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
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 {
|
||||
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}
|
||||
/// Clears the value of `device`. Subsequent reads from it will return its default value.
|
||||
mutating func clearDevice() {_uniqueStorage()._device = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the GPS Position
|
||||
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}
|
||||
/// Clears the value of `position`. Subsequent reads from it will return its default value.
|
||||
mutating func clearPosition() {_uniqueStorage()._position = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Power settings
|
||||
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}
|
||||
/// Clears the value of `power`. Subsequent reads from it will return its default value.
|
||||
mutating func clearPower() {_uniqueStorage()._power = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Wifi Settings
|
||||
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}
|
||||
/// Clears the value of `network`. Subsequent reads from it will return its default value.
|
||||
mutating func clearNetwork() {_uniqueStorage()._network = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Display
|
||||
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}
|
||||
/// Clears the value of `display`. Subsequent reads from it will return its default value.
|
||||
mutating func clearDisplay() {_uniqueStorage()._display = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Lora Radio
|
||||
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}
|
||||
/// Clears the value of `lora`. Subsequent reads from it will return its default value.
|
||||
mutating func clearLora() {_uniqueStorage()._lora = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Bluetooth settings
|
||||
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}
|
||||
/// Clears the value of `bluetooth`. Subsequent reads from it will return its default value.
|
||||
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 {
|
||||
get {return _storage._version}
|
||||
set {_uniqueStorage()._version = newValue}
|
||||
}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _storage = _StorageClass.defaultInstance
|
||||
}
|
||||
|
||||
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 {
|
||||
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}
|
||||
/// Clears the value of `mqtt`. Subsequent reads from it will return its default value.
|
||||
mutating func clearMqtt() {_uniqueStorage()._mqtt = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Serial module
|
||||
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}
|
||||
/// Clears the value of `serial`. Subsequent reads from it will return its default value.
|
||||
mutating func clearSerial() {_uniqueStorage()._serial = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the ExternalNotification module
|
||||
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}
|
||||
/// Clears the value of `externalNotification`. Subsequent reads from it will return its default value.
|
||||
mutating func clearExternalNotification() {_uniqueStorage()._externalNotification = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Store & Forward module
|
||||
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}
|
||||
/// Clears the value of `storeForward`. Subsequent reads from it will return its default value.
|
||||
mutating func clearStoreForward() {_uniqueStorage()._storeForward = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the RangeTest module
|
||||
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}
|
||||
/// Clears the value of `rangeTest`. Subsequent reads from it will return its default value.
|
||||
mutating func clearRangeTest() {_uniqueStorage()._rangeTest = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Telemetry module
|
||||
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}
|
||||
/// Clears the value of `telemetry`. Subsequent reads from it will return its default value.
|
||||
mutating func clearTelemetry() {_uniqueStorage()._telemetry = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Canned Message module
|
||||
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}
|
||||
/// Clears the value of `cannedMessage`. Subsequent reads from it will return its default value.
|
||||
mutating func clearCannedMessage() {_uniqueStorage()._cannedMessage = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Audio module
|
||||
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}
|
||||
/// Clears the value of `audio`. Subsequent reads from it will return its default value.
|
||||
mutating func clearAudio() {_uniqueStorage()._audio = nil}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to the Remote Hardware module
|
||||
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}
|
||||
/// Clears the value of `remoteHardware`. Subsequent reads from it will return its default value.
|
||||
mutating func clearRemoteHardware() {_uniqueStorage()._remoteHardware = 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 {
|
||||
get {return _storage._version}
|
||||
set {_uniqueStorage()._version = newValue}
|
||||
}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _storage = _StorageClass.defaultInstance
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension LocalConfig: @unchecked Sendable {}
|
||||
extension LocalModuleConfig: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "LocalConfig"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "device"),
|
||||
2: .same(proto: "position"),
|
||||
3: .same(proto: "power"),
|
||||
4: .same(proto: "network"),
|
||||
5: .same(proto: "display"),
|
||||
6: .same(proto: "lora"),
|
||||
7: .same(proto: "bluetooth"),
|
||||
8: .same(proto: "version"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _device: Config.DeviceConfig? = nil
|
||||
var _position: Config.PositionConfig? = nil
|
||||
var _power: Config.PowerConfig? = nil
|
||||
var _network: Config.NetworkConfig? = nil
|
||||
var _display: Config.DisplayConfig? = nil
|
||||
var _lora: Config.LoRaConfig? = nil
|
||||
var _bluetooth: Config.BluetoothConfig? = nil
|
||||
var _version: UInt32 = 0
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
private init() {}
|
||||
|
||||
init(copying source: _StorageClass) {
|
||||
_device = source._device
|
||||
_position = source._position
|
||||
_power = source._power
|
||||
_network = source._network
|
||||
_display = source._display
|
||||
_lora = source._lora
|
||||
_bluetooth = source._bluetooth
|
||||
_version = source._version
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate mutating func _uniqueStorage() -> _StorageClass {
|
||||
if !isKnownUniquelyReferenced(&_storage) {
|
||||
_storage = _StorageClass(copying: _storage)
|
||||
}
|
||||
return _storage
|
||||
}
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
_ = _uniqueStorage()
|
||||
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularMessageField(value: &_storage._device) }()
|
||||
case 2: try { try decoder.decodeSingularMessageField(value: &_storage._position) }()
|
||||
case 3: try { try decoder.decodeSingularMessageField(value: &_storage._power) }()
|
||||
case 4: try { try decoder.decodeSingularMessageField(value: &_storage._network) }()
|
||||
case 5: try { try decoder.decodeSingularMessageField(value: &_storage._display) }()
|
||||
case 6: try { try decoder.decodeSingularMessageField(value: &_storage._lora) }()
|
||||
case 7: try { try decoder.decodeSingularMessageField(value: &_storage._bluetooth) }()
|
||||
case 8: try { try decoder.decodeSingularUInt32Field(value: &_storage._version) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
||||
// https://github.com/apple/swift-protobuf/issues/1182
|
||||
try { if let v = _storage._device {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||||
} }()
|
||||
try { if let v = _storage._position {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
} }()
|
||||
try { if let v = _storage._power {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
||||
} }()
|
||||
try { if let v = _storage._network {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
|
||||
} }()
|
||||
try { if let v = _storage._display {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
|
||||
} }()
|
||||
try { if let v = _storage._lora {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
|
||||
} }()
|
||||
try { if let v = _storage._bluetooth {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
|
||||
} }()
|
||||
if _storage._version != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: _storage._version, fieldNumber: 8)
|
||||
}
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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
|
||||
let rhs_storage = _args.1
|
||||
if _storage._device != rhs_storage._device {return false}
|
||||
if _storage._position != rhs_storage._position {return false}
|
||||
if _storage._power != rhs_storage._power {return false}
|
||||
if _storage._network != rhs_storage._network {return false}
|
||||
if _storage._display != rhs_storage._display {return false}
|
||||
if _storage._lora != rhs_storage._lora {return false}
|
||||
if _storage._bluetooth != rhs_storage._bluetooth {return false}
|
||||
if _storage._version != rhs_storage._version {return false}
|
||||
return true
|
||||
}
|
||||
if !storagesAreEqual {return false}
|
||||
}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension LocalModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "LocalModuleConfig"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "mqtt"),
|
||||
2: .same(proto: "serial"),
|
||||
3: .standard(proto: "external_notification"),
|
||||
4: .standard(proto: "store_forward"),
|
||||
5: .standard(proto: "range_test"),
|
||||
6: .same(proto: "telemetry"),
|
||||
7: .standard(proto: "canned_message"),
|
||||
9: .same(proto: "audio"),
|
||||
10: .standard(proto: "remote_hardware"),
|
||||
8: .same(proto: "version"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _mqtt: ModuleConfig.MQTTConfig? = nil
|
||||
var _serial: ModuleConfig.SerialConfig? = nil
|
||||
var _externalNotification: ModuleConfig.ExternalNotificationConfig? = nil
|
||||
var _storeForward: ModuleConfig.StoreForwardConfig? = nil
|
||||
var _rangeTest: ModuleConfig.RangeTestConfig? = nil
|
||||
var _telemetry: ModuleConfig.TelemetryConfig? = nil
|
||||
var _cannedMessage: ModuleConfig.CannedMessageConfig? = nil
|
||||
var _audio: ModuleConfig.AudioConfig? = nil
|
||||
var _remoteHardware: ModuleConfig.RemoteHardwareConfig? = nil
|
||||
var _version: UInt32 = 0
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
private init() {}
|
||||
|
||||
init(copying source: _StorageClass) {
|
||||
_mqtt = source._mqtt
|
||||
_serial = source._serial
|
||||
_externalNotification = source._externalNotification
|
||||
_storeForward = source._storeForward
|
||||
_rangeTest = source._rangeTest
|
||||
_telemetry = source._telemetry
|
||||
_cannedMessage = source._cannedMessage
|
||||
_audio = source._audio
|
||||
_remoteHardware = source._remoteHardware
|
||||
_version = source._version
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate mutating func _uniqueStorage() -> _StorageClass {
|
||||
if !isKnownUniquelyReferenced(&_storage) {
|
||||
_storage = _StorageClass(copying: _storage)
|
||||
}
|
||||
return _storage
|
||||
}
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
_ = _uniqueStorage()
|
||||
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularMessageField(value: &_storage._mqtt) }()
|
||||
case 2: try { try decoder.decodeSingularMessageField(value: &_storage._serial) }()
|
||||
case 3: try { try decoder.decodeSingularMessageField(value: &_storage._externalNotification) }()
|
||||
case 4: try { try decoder.decodeSingularMessageField(value: &_storage._storeForward) }()
|
||||
case 5: try { try decoder.decodeSingularMessageField(value: &_storage._rangeTest) }()
|
||||
case 6: try { try decoder.decodeSingularMessageField(value: &_storage._telemetry) }()
|
||||
case 7: try { try decoder.decodeSingularMessageField(value: &_storage._cannedMessage) }()
|
||||
case 8: try { try decoder.decodeSingularUInt32Field(value: &_storage._version) }()
|
||||
case 9: try { try decoder.decodeSingularMessageField(value: &_storage._audio) }()
|
||||
case 10: try { try decoder.decodeSingularMessageField(value: &_storage._remoteHardware) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
||||
// https://github.com/apple/swift-protobuf/issues/1182
|
||||
try { if let v = _storage._mqtt {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||||
} }()
|
||||
try { if let v = _storage._serial {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
} }()
|
||||
try { if let v = _storage._externalNotification {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
||||
} }()
|
||||
try { if let v = _storage._storeForward {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
|
||||
} }()
|
||||
try { if let v = _storage._rangeTest {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
|
||||
} }()
|
||||
try { if let v = _storage._telemetry {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
|
||||
} }()
|
||||
try { if let v = _storage._cannedMessage {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
|
||||
} }()
|
||||
if _storage._version != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: _storage._version, fieldNumber: 8)
|
||||
}
|
||||
try { if let v = _storage._audio {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
|
||||
} }()
|
||||
try { if let v = _storage._remoteHardware {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 10)
|
||||
} }()
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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
|
||||
let rhs_storage = _args.1
|
||||
if _storage._mqtt != rhs_storage._mqtt {return false}
|
||||
if _storage._serial != rhs_storage._serial {return false}
|
||||
if _storage._externalNotification != rhs_storage._externalNotification {return false}
|
||||
if _storage._storeForward != rhs_storage._storeForward {return false}
|
||||
if _storage._rangeTest != rhs_storage._rangeTest {return false}
|
||||
if _storage._telemetry != rhs_storage._telemetry {return false}
|
||||
if _storage._cannedMessage != rhs_storage._cannedMessage {return false}
|
||||
if _storage._audio != rhs_storage._audio {return false}
|
||||
if _storage._remoteHardware != rhs_storage._remoteHardware {return false}
|
||||
if _storage._version != rhs_storage._version {return false}
|
||||
return true
|
||||
}
|
||||
if !storagesAreEqual {return false}
|
||||
}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,110 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: mqtt.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
|
||||
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 {
|
||||
get {return _packet ?? MeshPacket()}
|
||||
set {_packet = newValue}
|
||||
}
|
||||
/// Returns true if `packet` has been explicitly set.
|
||||
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}
|
||||
|
||||
///
|
||||
/// The global channel ID it was sent on
|
||||
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()
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _packet: MeshPacket? = nil
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension ServiceEnvelope: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension ServiceEnvelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "ServiceEnvelope"
|
||||
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 {
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularMessageField(value: &self._packet) }()
|
||||
case 2: try { try decoder.decodeSingularStringField(value: &self.channelID) }()
|
||||
case 3: try { try decoder.decodeSingularStringField(value: &self.gatewayID) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// https://github.com/apple/swift-protobuf/issues/1182
|
||||
try { if let v = self._packet {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||||
} }()
|
||||
if !self.channelID.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.channelID, fieldNumber: 2)
|
||||
}
|
||||
if !self.gatewayID.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.gatewayID, fieldNumber: 3)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,278 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: portnums.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a
|
||||
/// unique 'portnum' for their application.
|
||||
/// If you are making a new app using meshtastic, please send in a pull request to add your 'portnum' to this
|
||||
/// master table.
|
||||
/// PortNums should be assigned in the following range:
|
||||
/// 0-63 Core Meshtastic use, do not use for third party apps
|
||||
/// 64-127 Registered 3rd party apps, send in a pull request that adds a new entry to portnums.proto to register your application
|
||||
/// 256-511 Use one of these portnums for your private applications that you don't want to register publically
|
||||
/// All other values are reserved.
|
||||
/// 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
|
||||
|
||||
///
|
||||
/// Deprecated: do not use in new code (formerly called OPAQUE)
|
||||
/// A message sent from a device outside of the mesh, in a form the mesh does not understand
|
||||
/// NOTE: This must be 0, because it is documented in IMeshService.aidl to be so
|
||||
case unknownApp // = 0
|
||||
|
||||
///
|
||||
/// A simple UTF-8 text message, which even the little micros in the mesh
|
||||
/// can understand and show on their screen eventually in some circumstances
|
||||
/// even signal might send messages in this form (see below)
|
||||
case textMessageApp // = 1
|
||||
|
||||
///
|
||||
/// Reserved for built-in GPIO/example app.
|
||||
/// See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number
|
||||
case remoteHardwareApp // = 2
|
||||
|
||||
///
|
||||
/// The built-in position messaging app.
|
||||
/// Payload is a [Position](/docs/developers/protobufs/api#position) message
|
||||
case positionApp // = 3
|
||||
|
||||
///
|
||||
/// The built-in user info app.
|
||||
/// Payload is a [User](/docs/developers/protobufs/api#user) message
|
||||
case nodeinfoApp // = 4
|
||||
|
||||
///
|
||||
/// Protocol control packets for mesh protocol use.
|
||||
/// Payload is a [Routing](/docs/developers/protobufs/api#routing) message
|
||||
case routingApp // = 5
|
||||
|
||||
///
|
||||
/// Admin control packets.
|
||||
/// Payload is a [AdminMessage](/docs/developers/protobufs/api#adminmessage) message
|
||||
case adminApp // = 6
|
||||
|
||||
///
|
||||
/// Compressed TEXT_MESSAGE payloads.
|
||||
case textMessageCompressedApp // = 7
|
||||
|
||||
///
|
||||
/// Waypoint payloads.
|
||||
/// Payload is a [Waypoint](/docs/developers/protobufs/api#waypoint) message
|
||||
case waypointApp // = 8
|
||||
|
||||
/// Audio Payloads.
|
||||
/// Encapsulated codec2 packets. On 2.4 GHZ Bandwidths only for now
|
||||
case audioApp // = 9
|
||||
|
||||
///
|
||||
/// Provides a 'ping' service that replies to any packet it receives.
|
||||
/// Also serves as a small example module.
|
||||
case replyApp // = 32
|
||||
|
||||
///
|
||||
/// Used for the python IP tunnel feature
|
||||
case ipTunnelApp // = 33
|
||||
|
||||
///
|
||||
/// Provides a hardware serial interface to send and receive from the Meshtastic network.
|
||||
/// Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic
|
||||
/// network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network.
|
||||
/// Maximum packet size of 240 bytes.
|
||||
/// Module is disabled by default can be turned on by setting SERIAL_MODULE_ENABLED = 1 in SerialPlugh.cpp.
|
||||
case serialApp // = 64
|
||||
|
||||
///
|
||||
/// STORE_FORWARD_APP (Work in Progress)
|
||||
/// Maintained by Jm Casler (MC Hamster) : jm@casler.org
|
||||
case storeForwardApp // = 65
|
||||
|
||||
///
|
||||
/// Optional port for messages for the range test module.
|
||||
case rangeTestApp // = 66
|
||||
|
||||
///
|
||||
/// Provides a format to send and receive telemetry data from the Meshtastic network.
|
||||
/// Maintained by Charles Crossan (crossan007) : crossan007@gmail.com
|
||||
case telemetryApp // = 67
|
||||
|
||||
///
|
||||
/// Experimental tools for estimating node position without a GPS
|
||||
/// Maintained by Github user a-f-G-U-C (a Meshtastic contributor)
|
||||
/// Project files at https://github.com/a-f-G-U-C/Meshtastic-ZPS
|
||||
case zpsApp // = 68
|
||||
|
||||
///
|
||||
/// Used to let multiple instances of Linux native applications communicate
|
||||
/// as if they did using their LoRa chip.
|
||||
/// Maintained by GitHub user GUVWAF.
|
||||
/// Project files at https://github.com/GUVWAF/Meshtasticator
|
||||
case simulatorApp // = 69
|
||||
|
||||
///
|
||||
/// Provides a traceroute functionality to show the route a packet towards
|
||||
/// a certain destination would take on the mesh.
|
||||
case tracerouteApp // = 70
|
||||
|
||||
///
|
||||
/// Private applications should use portnums >= 256.
|
||||
/// To simplify initial development and testing you can use "PRIVATE_APP"
|
||||
/// in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh))
|
||||
case privateApp // = 256
|
||||
|
||||
///
|
||||
/// ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder
|
||||
case atakForwarder // = 257
|
||||
|
||||
///
|
||||
/// Currently we limit port nums to no higher than this value
|
||||
case max // = 511
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
init() {
|
||||
self = .unknownApp
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .unknownApp
|
||||
case 1: self = .textMessageApp
|
||||
case 2: self = .remoteHardwareApp
|
||||
case 3: self = .positionApp
|
||||
case 4: self = .nodeinfoApp
|
||||
case 5: self = .routingApp
|
||||
case 6: self = .adminApp
|
||||
case 7: self = .textMessageCompressedApp
|
||||
case 8: self = .waypointApp
|
||||
case 9: self = .audioApp
|
||||
case 32: self = .replyApp
|
||||
case 33: self = .ipTunnelApp
|
||||
case 64: self = .serialApp
|
||||
case 65: self = .storeForwardApp
|
||||
case 66: self = .rangeTestApp
|
||||
case 67: self = .telemetryApp
|
||||
case 68: self = .zpsApp
|
||||
case 69: self = .simulatorApp
|
||||
case 70: self = .tracerouteApp
|
||||
case 256: self = .privateApp
|
||||
case 257: self = .atakForwarder
|
||||
case 511: self = .max
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .unknownApp: return 0
|
||||
case .textMessageApp: return 1
|
||||
case .remoteHardwareApp: return 2
|
||||
case .positionApp: return 3
|
||||
case .nodeinfoApp: return 4
|
||||
case .routingApp: return 5
|
||||
case .adminApp: return 6
|
||||
case .textMessageCompressedApp: return 7
|
||||
case .waypointApp: return 8
|
||||
case .audioApp: return 9
|
||||
case .replyApp: return 32
|
||||
case .ipTunnelApp: return 33
|
||||
case .serialApp: return 64
|
||||
case .storeForwardApp: return 65
|
||||
case .rangeTestApp: return 66
|
||||
case .telemetryApp: return 67
|
||||
case .zpsApp: return 68
|
||||
case .simulatorApp: return 69
|
||||
case .tracerouteApp: return 70
|
||||
case .privateApp: return 256
|
||||
case .atakForwarder: return 257
|
||||
case .max: return 511
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension PortNum: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
static var allCases: [PortNum] = [
|
||||
.unknownApp,
|
||||
.textMessageApp,
|
||||
.remoteHardwareApp,
|
||||
.positionApp,
|
||||
.nodeinfoApp,
|
||||
.routingApp,
|
||||
.adminApp,
|
||||
.textMessageCompressedApp,
|
||||
.waypointApp,
|
||||
.audioApp,
|
||||
.replyApp,
|
||||
.ipTunnelApp,
|
||||
.serialApp,
|
||||
.storeForwardApp,
|
||||
.rangeTestApp,
|
||||
.telemetryApp,
|
||||
.zpsApp,
|
||||
.simulatorApp,
|
||||
.tracerouteApp,
|
||||
.privateApp,
|
||||
.atakForwarder,
|
||||
.max,
|
||||
]
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension PortNum: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension PortNum: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "UNKNOWN_APP"),
|
||||
1: .same(proto: "TEXT_MESSAGE_APP"),
|
||||
2: .same(proto: "REMOTE_HARDWARE_APP"),
|
||||
3: .same(proto: "POSITION_APP"),
|
||||
4: .same(proto: "NODEINFO_APP"),
|
||||
5: .same(proto: "ROUTING_APP"),
|
||||
6: .same(proto: "ADMIN_APP"),
|
||||
7: .same(proto: "TEXT_MESSAGE_COMPRESSED_APP"),
|
||||
8: .same(proto: "WAYPOINT_APP"),
|
||||
9: .same(proto: "AUDIO_APP"),
|
||||
32: .same(proto: "REPLY_APP"),
|
||||
33: .same(proto: "IP_TUNNEL_APP"),
|
||||
64: .same(proto: "SERIAL_APP"),
|
||||
65: .same(proto: "STORE_FORWARD_APP"),
|
||||
66: .same(proto: "RANGE_TEST_APP"),
|
||||
67: .same(proto: "TELEMETRY_APP"),
|
||||
68: .same(proto: "ZPS_APP"),
|
||||
69: .same(proto: "SIMULATOR_APP"),
|
||||
70: .same(proto: "TRACEROUTE_APP"),
|
||||
256: .same(proto: "PRIVATE_APP"),
|
||||
257: .same(proto: "ATAK_FORWARDER"),
|
||||
511: .same(proto: "MAX"),
|
||||
]
|
||||
}
|
||||
|
|
@ -1,194 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: remote_hardware.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// An example app to show off the module system. This message is used for
|
||||
/// REMOTE_HARDWARE_APP PortNums.
|
||||
/// Also provides easy remote access to any GPIO.
|
||||
/// In the future other remote hardware operations can be added based on user interest
|
||||
/// (i.e. serial output, spi/i2c input/output).
|
||||
/// FIXME - currently this feature is turned on by default which is dangerous
|
||||
/// 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 {
|
||||
// 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
|
||||
|
||||
///
|
||||
/// What gpios are we changing. Not used for all MessageTypes, see MessageType for details
|
||||
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
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
enum TypeEnum: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
|
||||
///
|
||||
/// Unset/unused
|
||||
case unset // = 0
|
||||
|
||||
///
|
||||
/// Set gpio gpios based on gpio_mask/gpio_value
|
||||
case writeGpios // = 1
|
||||
|
||||
///
|
||||
/// We are now interested in watching the gpio_mask gpios.
|
||||
/// If the selected gpios change, please broadcast GPIOS_CHANGED.
|
||||
/// Will implicitly change the gpios requested to be INPUT gpios.
|
||||
case watchGpios // = 2
|
||||
|
||||
///
|
||||
/// The gpios listed in gpio_mask have changed, the new values are listed in gpio_value
|
||||
case gpiosChanged // = 3
|
||||
|
||||
///
|
||||
/// Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated
|
||||
case readGpios // = 4
|
||||
|
||||
///
|
||||
/// A reply to READ_GPIOS. gpio_mask and gpio_value will be populated
|
||||
case readGpiosReply // = 5
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
init() {
|
||||
self = .unset
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .unset
|
||||
case 1: self = .writeGpios
|
||||
case 2: self = .watchGpios
|
||||
case 3: self = .gpiosChanged
|
||||
case 4: self = .readGpios
|
||||
case 5: self = .readGpiosReply
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .unset: return 0
|
||||
case .writeGpios: return 1
|
||||
case .watchGpios: return 2
|
||||
case .gpiosChanged: return 3
|
||||
case .readGpios: return 4
|
||||
case .readGpiosReply: return 5
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension HardwareMessage.TypeEnum: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
static var allCases: [HardwareMessage.TypeEnum] = [
|
||||
.unset,
|
||||
.writeGpios,
|
||||
.watchGpios,
|
||||
.gpiosChanged,
|
||||
.readGpios,
|
||||
.readGpiosReply,
|
||||
]
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension HardwareMessage: @unchecked Sendable {}
|
||||
extension HardwareMessage.TypeEnum: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension HardwareMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "HardwareMessage"
|
||||
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 {
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularEnumField(value: &self.type) }()
|
||||
case 2: try { try decoder.decodeSingularUInt64Field(value: &self.gpioMask) }()
|
||||
case 3: try { try decoder.decodeSingularUInt64Field(value: &self.gpioValue) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.type != .unset {
|
||||
try visitor.visitSingularEnumField(value: self.type, fieldNumber: 1)
|
||||
}
|
||||
if self.gpioMask != 0 {
|
||||
try visitor.visitSingularUInt64Field(value: self.gpioMask, fieldNumber: 2)
|
||||
}
|
||||
if self.gpioValue != 0 {
|
||||
try visitor.visitSingularUInt64Field(value: self.gpioValue, fieldNumber: 3)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension HardwareMessage.TypeEnum: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "UNSET"),
|
||||
1: .same(proto: "WRITE_GPIOS"),
|
||||
2: .same(proto: "WATCH_GPIOS"),
|
||||
3: .same(proto: "GPIOS_CHANGED"),
|
||||
4: .same(proto: "READ_GPIOS"),
|
||||
5: .same(proto: "READ_GPIOS_REPLY"),
|
||||
]
|
||||
}
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: rtttl.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// Canned message module configuration.
|
||||
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()
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension RTTTLConfig: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension RTTTLConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "RTTTLConfig"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "ringtone"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularStringField(value: &self.ringtone) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
if lhs.ringtone != rhs.ringtone {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,651 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: storeforward.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
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
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
var variant: StoreAndForward.OneOf_Variant? = nil
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
var stats: StoreAndForward.Statistics {
|
||||
get {
|
||||
if case .stats(let v)? = variant {return v}
|
||||
return StoreAndForward.Statistics()
|
||||
}
|
||||
set {variant = .stats(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
var history: StoreAndForward.History {
|
||||
get {
|
||||
if case .history(let v)? = variant {return v}
|
||||
return StoreAndForward.History()
|
||||
}
|
||||
set {variant = .history(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
var heartbeat: StoreAndForward.Heartbeat {
|
||||
get {
|
||||
if case .heartbeat(let v)? = variant {return v}
|
||||
return StoreAndForward.Heartbeat()
|
||||
}
|
||||
set {variant = .heartbeat(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
/// Empty Payload
|
||||
var empty: Bool {
|
||||
get {
|
||||
if case .empty(let v)? = variant {return v}
|
||||
return false
|
||||
}
|
||||
set {variant = .empty(newValue)}
|
||||
}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
enum OneOf_Variant: Equatable {
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
case stats(StoreAndForward.Statistics)
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
case history(StoreAndForward.History)
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
case heartbeat(StoreAndForward.Heartbeat)
|
||||
///
|
||||
/// Empty Payload
|
||||
case empty(Bool)
|
||||
|
||||
#if !swift(>=4.1)
|
||||
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
|
||||
switch (lhs, rhs) {
|
||||
case (.stats, .stats): return {
|
||||
guard case .stats(let l) = lhs, case .stats(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.history, .history): return {
|
||||
guard case .history(let l) = lhs, case .history(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.heartbeat, .heartbeat): return {
|
||||
guard case .heartbeat(let l) = lhs, case .heartbeat(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.empty, .empty): return {
|
||||
guard case .empty(let l) = lhs, case .empty(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
default: return false
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
///
|
||||
/// 001 - 063 = From Router
|
||||
/// 064 - 127 = From Client
|
||||
enum RequestResponse: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
|
||||
///
|
||||
/// Unset/unused
|
||||
case unset // = 0
|
||||
|
||||
///
|
||||
/// Router is an in error state.
|
||||
case routerError // = 1
|
||||
|
||||
///
|
||||
/// Router heartbeat
|
||||
case routerHeartbeat // = 2
|
||||
|
||||
///
|
||||
/// Router has requested the client respond. This can work as a
|
||||
/// "are you there" message.
|
||||
case routerPing // = 3
|
||||
|
||||
///
|
||||
/// The response to a "Ping"
|
||||
case routerPong // = 4
|
||||
|
||||
///
|
||||
/// Router is currently busy. Please try again later.
|
||||
case routerBusy // = 5
|
||||
|
||||
///
|
||||
/// Router is responding to a request for history.
|
||||
case routerHistory // = 6
|
||||
|
||||
///
|
||||
/// Router is responding to a request for stats.
|
||||
case routerStats // = 7
|
||||
|
||||
///
|
||||
/// Client is an in error state.
|
||||
case clientError // = 64
|
||||
|
||||
///
|
||||
/// Client has requested a replay from the router.
|
||||
case clientHistory // = 65
|
||||
|
||||
///
|
||||
/// Client has requested stats from the router.
|
||||
case clientStats // = 66
|
||||
|
||||
///
|
||||
/// Client has requested the router respond. This can work as a
|
||||
/// "are you there" message.
|
||||
case clientPing // = 67
|
||||
|
||||
///
|
||||
/// The response to a "Ping"
|
||||
case clientPong // = 68
|
||||
|
||||
///
|
||||
/// Client has requested that the router abort processing the client's request
|
||||
case clientAbort // = 106
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
init() {
|
||||
self = .unset
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .unset
|
||||
case 1: self = .routerError
|
||||
case 2: self = .routerHeartbeat
|
||||
case 3: self = .routerPing
|
||||
case 4: self = .routerPong
|
||||
case 5: self = .routerBusy
|
||||
case 6: self = .routerHistory
|
||||
case 7: self = .routerStats
|
||||
case 64: self = .clientError
|
||||
case 65: self = .clientHistory
|
||||
case 66: self = .clientStats
|
||||
case 67: self = .clientPing
|
||||
case 68: self = .clientPong
|
||||
case 106: self = .clientAbort
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .unset: return 0
|
||||
case .routerError: return 1
|
||||
case .routerHeartbeat: return 2
|
||||
case .routerPing: return 3
|
||||
case .routerPong: return 4
|
||||
case .routerBusy: return 5
|
||||
case .routerHistory: return 6
|
||||
case .routerStats: return 7
|
||||
case .clientError: return 64
|
||||
case .clientHistory: return 65
|
||||
case .clientStats: return 66
|
||||
case .clientPing: return 67
|
||||
case .clientPong: return 68
|
||||
case .clientAbort: return 106
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
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
|
||||
|
||||
///
|
||||
/// Number of messages we have currently saved our history.
|
||||
var messagesSaved: UInt32 = 0
|
||||
|
||||
///
|
||||
/// Maximum number of messages we will save
|
||||
var messagesMax: UInt32 = 0
|
||||
|
||||
///
|
||||
/// Router uptime in seconds
|
||||
var upTime: UInt32 = 0
|
||||
|
||||
///
|
||||
/// Number of times any client sent a request to the S&F.
|
||||
var requests: UInt32 = 0
|
||||
|
||||
///
|
||||
/// Number of times the history was requested.
|
||||
var requestsHistory: UInt32 = 0
|
||||
|
||||
///
|
||||
/// Is the heartbeat enabled on the server?
|
||||
var heartbeat: Bool = false
|
||||
|
||||
///
|
||||
/// Is the heartbeat enabled on the server?
|
||||
var returnMax: UInt32 = 0
|
||||
|
||||
///
|
||||
/// Is the heartbeat enabled on the server?
|
||||
var returnWindow: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
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
|
||||
|
||||
///
|
||||
/// The window of messages that was used to filter the history client requested
|
||||
var window: UInt32 = 0
|
||||
|
||||
///
|
||||
/// The window of messages that was used to filter the history client requested
|
||||
var lastRequest: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
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.
|
||||
|
||||
///
|
||||
/// Number of that will be sent to the client
|
||||
var period: UInt32 = 0
|
||||
|
||||
///
|
||||
/// If set, this is not the primary Store & Forward router on the mesh
|
||||
var secondary: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension StoreAndForward.RequestResponse: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
static var allCases: [StoreAndForward.RequestResponse] = [
|
||||
.unset,
|
||||
.routerError,
|
||||
.routerHeartbeat,
|
||||
.routerPing,
|
||||
.routerPong,
|
||||
.routerBusy,
|
||||
.routerHistory,
|
||||
.routerStats,
|
||||
.clientError,
|
||||
.clientHistory,
|
||||
.clientStats,
|
||||
.clientPing,
|
||||
.clientPong,
|
||||
.clientAbort,
|
||||
]
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension StoreAndForward: @unchecked Sendable {}
|
||||
extension StoreAndForward.OneOf_Variant: @unchecked Sendable {}
|
||||
extension StoreAndForward.RequestResponse: @unchecked Sendable {}
|
||||
extension StoreAndForward.Statistics: @unchecked Sendable {}
|
||||
extension StoreAndForward.History: @unchecked Sendable {}
|
||||
extension StoreAndForward.Heartbeat: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension StoreAndForward: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "StoreAndForward"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "rr"),
|
||||
2: .same(proto: "stats"),
|
||||
3: .same(proto: "history"),
|
||||
4: .same(proto: "heartbeat"),
|
||||
5: .same(proto: "empty"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularEnumField(value: &self.rr) }()
|
||||
case 2: try {
|
||||
var v: StoreAndForward.Statistics?
|
||||
var hadOneofValue = false
|
||||
if let current = self.variant {
|
||||
hadOneofValue = true
|
||||
if case .stats(let m) = current {v = m}
|
||||
}
|
||||
try decoder.decodeSingularMessageField(value: &v)
|
||||
if let v = v {
|
||||
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
||||
self.variant = .stats(v)
|
||||
}
|
||||
}()
|
||||
case 3: try {
|
||||
var v: StoreAndForward.History?
|
||||
var hadOneofValue = false
|
||||
if let current = self.variant {
|
||||
hadOneofValue = true
|
||||
if case .history(let m) = current {v = m}
|
||||
}
|
||||
try decoder.decodeSingularMessageField(value: &v)
|
||||
if let v = v {
|
||||
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
||||
self.variant = .history(v)
|
||||
}
|
||||
}()
|
||||
case 4: try {
|
||||
var v: StoreAndForward.Heartbeat?
|
||||
var hadOneofValue = false
|
||||
if let current = self.variant {
|
||||
hadOneofValue = true
|
||||
if case .heartbeat(let m) = current {v = m}
|
||||
}
|
||||
try decoder.decodeSingularMessageField(value: &v)
|
||||
if let v = v {
|
||||
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
||||
self.variant = .heartbeat(v)
|
||||
}
|
||||
}()
|
||||
case 5: try {
|
||||
var v: Bool?
|
||||
try decoder.decodeSingularBoolField(value: &v)
|
||||
if let v = v {
|
||||
if self.variant != nil {try decoder.handleConflictingOneOf()}
|
||||
self.variant = .empty(v)
|
||||
}
|
||||
}()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// https://github.com/apple/swift-protobuf/issues/1182
|
||||
if self.rr != .unset {
|
||||
try visitor.visitSingularEnumField(value: self.rr, fieldNumber: 1)
|
||||
}
|
||||
switch self.variant {
|
||||
case .stats?: try {
|
||||
guard case .stats(let v)? = self.variant else { preconditionFailure() }
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
}()
|
||||
case .history?: try {
|
||||
guard case .history(let v)? = self.variant else { preconditionFailure() }
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
||||
}()
|
||||
case .heartbeat?: try {
|
||||
guard case .heartbeat(let v)? = self.variant else { preconditionFailure() }
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
|
||||
}()
|
||||
case .empty?: try {
|
||||
guard case .empty(let v)? = self.variant else { preconditionFailure() }
|
||||
try visitor.visitSingularBoolField(value: v, fieldNumber: 5)
|
||||
}()
|
||||
case nil: break
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension StoreAndForward.RequestResponse: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "UNSET"),
|
||||
1: .same(proto: "ROUTER_ERROR"),
|
||||
2: .same(proto: "ROUTER_HEARTBEAT"),
|
||||
3: .same(proto: "ROUTER_PING"),
|
||||
4: .same(proto: "ROUTER_PONG"),
|
||||
5: .same(proto: "ROUTER_BUSY"),
|
||||
6: .same(proto: "ROUTER_HISTORY"),
|
||||
7: .same(proto: "ROUTER_STATS"),
|
||||
64: .same(proto: "CLIENT_ERROR"),
|
||||
65: .same(proto: "CLIENT_HISTORY"),
|
||||
66: .same(proto: "CLIENT_STATS"),
|
||||
67: .same(proto: "CLIENT_PING"),
|
||||
68: .same(proto: "CLIENT_PONG"),
|
||||
106: .same(proto: "CLIENT_ABORT"),
|
||||
]
|
||||
}
|
||||
|
||||
extension StoreAndForward.Statistics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = StoreAndForward.protoMessageName + ".Statistics"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "messages_total"),
|
||||
2: .standard(proto: "messages_saved"),
|
||||
3: .standard(proto: "messages_max"),
|
||||
4: .standard(proto: "up_time"),
|
||||
5: .same(proto: "requests"),
|
||||
6: .standard(proto: "requests_history"),
|
||||
7: .same(proto: "heartbeat"),
|
||||
8: .standard(proto: "return_max"),
|
||||
9: .standard(proto: "return_window"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.messagesTotal) }()
|
||||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.messagesSaved) }()
|
||||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.messagesMax) }()
|
||||
case 4: try { try decoder.decodeSingularUInt32Field(value: &self.upTime) }()
|
||||
case 5: try { try decoder.decodeSingularUInt32Field(value: &self.requests) }()
|
||||
case 6: try { try decoder.decodeSingularUInt32Field(value: &self.requestsHistory) }()
|
||||
case 7: try { try decoder.decodeSingularBoolField(value: &self.heartbeat) }()
|
||||
case 8: try { try decoder.decodeSingularUInt32Field(value: &self.returnMax) }()
|
||||
case 9: try { try decoder.decodeSingularUInt32Field(value: &self.returnWindow) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.messagesTotal != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.messagesTotal, fieldNumber: 1)
|
||||
}
|
||||
if self.messagesSaved != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.messagesSaved, fieldNumber: 2)
|
||||
}
|
||||
if self.messagesMax != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.messagesMax, fieldNumber: 3)
|
||||
}
|
||||
if self.upTime != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.upTime, fieldNumber: 4)
|
||||
}
|
||||
if self.requests != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.requests, fieldNumber: 5)
|
||||
}
|
||||
if self.requestsHistory != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.requestsHistory, fieldNumber: 6)
|
||||
}
|
||||
if self.heartbeat != false {
|
||||
try visitor.visitSingularBoolField(value: self.heartbeat, fieldNumber: 7)
|
||||
}
|
||||
if self.returnMax != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.returnMax, fieldNumber: 8)
|
||||
}
|
||||
if self.returnWindow != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.returnWindow, fieldNumber: 9)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
if lhs.upTime != rhs.upTime {return false}
|
||||
if lhs.requests != rhs.requests {return false}
|
||||
if lhs.requestsHistory != rhs.requestsHistory {return false}
|
||||
if lhs.heartbeat != rhs.heartbeat {return false}
|
||||
if lhs.returnMax != rhs.returnMax {return false}
|
||||
if lhs.returnWindow != rhs.returnWindow {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension StoreAndForward.History: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = StoreAndForward.protoMessageName + ".History"
|
||||
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 {
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.historyMessages) }()
|
||||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.window) }()
|
||||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.lastRequest) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.historyMessages != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.historyMessages, fieldNumber: 1)
|
||||
}
|
||||
if self.window != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.window, fieldNumber: 2)
|
||||
}
|
||||
if self.lastRequest != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.lastRequest, fieldNumber: 3)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension StoreAndForward.Heartbeat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = StoreAndForward.protoMessageName + ".Heartbeat"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "period"),
|
||||
2: .same(proto: "secondary"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.period) }()
|
||||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.secondary) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.period != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.period, fieldNumber: 1)
|
||||
}
|
||||
if self.secondary != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.secondary, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,496 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: telemetry.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
enum TelemetrySensorType: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
|
||||
///
|
||||
/// No external telemetry sensor explicitly set
|
||||
case sensorUnset // = 0
|
||||
|
||||
///
|
||||
/// High accuracy temperature, pressure, humidity
|
||||
case bme280 // = 1
|
||||
|
||||
///
|
||||
/// High accuracy temperature, pressure, humidity, and air resistance
|
||||
case bme680 // = 2
|
||||
|
||||
///
|
||||
/// Very high accuracy temperature
|
||||
case mcp9808 // = 3
|
||||
|
||||
///
|
||||
/// Moderate accuracy current and voltage
|
||||
case ina260 // = 4
|
||||
|
||||
///
|
||||
/// Moderate accuracy current and voltage
|
||||
case ina219 // = 5
|
||||
|
||||
///
|
||||
/// High accuracy temperature and pressure
|
||||
case bmp280 // = 6
|
||||
|
||||
///
|
||||
/// High accuracy temperature and humidity
|
||||
case shtc3 // = 7
|
||||
|
||||
///
|
||||
/// High accuracy pressure
|
||||
case lps22 // = 8
|
||||
|
||||
///
|
||||
/// 3-Axis magnetic sensor
|
||||
case qmc6310 // = 9
|
||||
|
||||
///
|
||||
/// 6-Axis inertial measurement sensor
|
||||
case qmi8658 // = 10
|
||||
|
||||
///
|
||||
/// 3-Axis magnetic sensor
|
||||
case qmc5883L // = 11
|
||||
|
||||
///
|
||||
/// High accuracy temperature and humidity
|
||||
case sht31 // = 12
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
init() {
|
||||
self = .sensorUnset
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .sensorUnset
|
||||
case 1: self = .bme280
|
||||
case 2: self = .bme680
|
||||
case 3: self = .mcp9808
|
||||
case 4: self = .ina260
|
||||
case 5: self = .ina219
|
||||
case 6: self = .bmp280
|
||||
case 7: self = .shtc3
|
||||
case 8: self = .lps22
|
||||
case 9: self = .qmc6310
|
||||
case 10: self = .qmi8658
|
||||
case 11: self = .qmc5883L
|
||||
case 12: self = .sht31
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .sensorUnset: return 0
|
||||
case .bme280: return 1
|
||||
case .bme680: return 2
|
||||
case .mcp9808: return 3
|
||||
case .ina260: return 4
|
||||
case .ina219: return 5
|
||||
case .bmp280: return 6
|
||||
case .shtc3: return 7
|
||||
case .lps22: return 8
|
||||
case .qmc6310: return 9
|
||||
case .qmi8658: return 10
|
||||
case .qmc5883L: return 11
|
||||
case .sht31: return 12
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension TelemetrySensorType: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
static var allCases: [TelemetrySensorType] = [
|
||||
.sensorUnset,
|
||||
.bme280,
|
||||
.bme680,
|
||||
.mcp9808,
|
||||
.ina260,
|
||||
.ina219,
|
||||
.bmp280,
|
||||
.shtc3,
|
||||
.lps22,
|
||||
.qmc6310,
|
||||
.qmi8658,
|
||||
.qmc5883L,
|
||||
.sht31,
|
||||
]
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
///
|
||||
/// Key native device metrics such as battery level
|
||||
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.
|
||||
|
||||
///
|
||||
/// 1-100 (0 means powered)
|
||||
var batteryLevel: UInt32 = 0
|
||||
|
||||
///
|
||||
/// Voltage measured
|
||||
var voltage: Float = 0
|
||||
|
||||
///
|
||||
/// Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise).
|
||||
var channelUtilization: Float = 0
|
||||
|
||||
///
|
||||
/// Percent of airtime for transmission used within the last hour.
|
||||
var airUtilTx: Float = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
///
|
||||
/// Weather station or other environmental metrics
|
||||
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
|
||||
|
||||
///
|
||||
/// Relative humidity percent measured
|
||||
var relativeHumidity: Float = 0
|
||||
|
||||
///
|
||||
/// Barometric pressure in hPA measured
|
||||
var barometricPressure: Float = 0
|
||||
|
||||
///
|
||||
/// Gas resistance in mOhm measured
|
||||
var gasResistance: Float = 0
|
||||
|
||||
///
|
||||
/// Voltage measured
|
||||
var voltage: Float = 0
|
||||
|
||||
///
|
||||
/// Current measured
|
||||
var current: Float = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
///
|
||||
/// Types of Measurements the telemetry module is equipped to handle
|
||||
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.
|
||||
|
||||
///
|
||||
/// This is usually not sent over the mesh (to save space), but it is sent
|
||||
/// from the phone so that the local device can set its RTC If it is sent over
|
||||
/// the mesh (because there are devices on the mesh without GPS), it will only
|
||||
/// be sent by devices which has a hardware GPS clock (IE Mobile Phone).
|
||||
/// seconds since 1970
|
||||
var time: UInt32 = 0
|
||||
|
||||
var variant: Telemetry.OneOf_Variant? = nil
|
||||
|
||||
///
|
||||
/// Key native device metrics such as battery level
|
||||
var deviceMetrics: DeviceMetrics {
|
||||
get {
|
||||
if case .deviceMetrics(let v)? = variant {return v}
|
||||
return DeviceMetrics()
|
||||
}
|
||||
set {variant = .deviceMetrics(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
/// Weather station or other environmental metrics
|
||||
var environmentMetrics: EnvironmentMetrics {
|
||||
get {
|
||||
if case .environmentMetrics(let v)? = variant {return v}
|
||||
return EnvironmentMetrics()
|
||||
}
|
||||
set {variant = .environmentMetrics(newValue)}
|
||||
}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
enum OneOf_Variant: Equatable {
|
||||
///
|
||||
/// Key native device metrics such as battery level
|
||||
case deviceMetrics(DeviceMetrics)
|
||||
///
|
||||
/// Weather station or other environmental metrics
|
||||
case environmentMetrics(EnvironmentMetrics)
|
||||
|
||||
#if !swift(>=4.1)
|
||||
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
|
||||
switch (lhs, rhs) {
|
||||
case (.deviceMetrics, .deviceMetrics): return {
|
||||
guard case .deviceMetrics(let l) = lhs, case .deviceMetrics(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.environmentMetrics, .environmentMetrics): return {
|
||||
guard case .environmentMetrics(let l) = lhs, case .environmentMetrics(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
default: return false
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension TelemetrySensorType: @unchecked Sendable {}
|
||||
extension DeviceMetrics: @unchecked Sendable {}
|
||||
extension EnvironmentMetrics: @unchecked Sendable {}
|
||||
extension Telemetry: @unchecked Sendable {}
|
||||
extension Telemetry.OneOf_Variant: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension TelemetrySensorType: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "SENSOR_UNSET"),
|
||||
1: .same(proto: "BME280"),
|
||||
2: .same(proto: "BME680"),
|
||||
3: .same(proto: "MCP9808"),
|
||||
4: .same(proto: "INA260"),
|
||||
5: .same(proto: "INA219"),
|
||||
6: .same(proto: "BMP280"),
|
||||
7: .same(proto: "SHTC3"),
|
||||
8: .same(proto: "LPS22"),
|
||||
9: .same(proto: "QMC6310"),
|
||||
10: .same(proto: "QMI8658"),
|
||||
11: .same(proto: "QMC5883L"),
|
||||
12: .same(proto: "SHT31"),
|
||||
]
|
||||
}
|
||||
|
||||
extension DeviceMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "DeviceMetrics"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "battery_level"),
|
||||
2: .same(proto: "voltage"),
|
||||
3: .standard(proto: "channel_utilization"),
|
||||
4: .standard(proto: "air_util_tx"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.batteryLevel) }()
|
||||
case 2: try { try decoder.decodeSingularFloatField(value: &self.voltage) }()
|
||||
case 3: try { try decoder.decodeSingularFloatField(value: &self.channelUtilization) }()
|
||||
case 4: try { try decoder.decodeSingularFloatField(value: &self.airUtilTx) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.batteryLevel != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.batteryLevel, fieldNumber: 1)
|
||||
}
|
||||
if self.voltage != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.voltage, fieldNumber: 2)
|
||||
}
|
||||
if self.channelUtilization != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.channelUtilization, fieldNumber: 3)
|
||||
}
|
||||
if self.airUtilTx != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.airUtilTx, fieldNumber: 4)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
if lhs.airUtilTx != rhs.airUtilTx {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "EnvironmentMetrics"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "temperature"),
|
||||
2: .standard(proto: "relative_humidity"),
|
||||
3: .standard(proto: "barometric_pressure"),
|
||||
4: .standard(proto: "gas_resistance"),
|
||||
5: .same(proto: "voltage"),
|
||||
6: .same(proto: "current"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularFloatField(value: &self.temperature) }()
|
||||
case 2: try { try decoder.decodeSingularFloatField(value: &self.relativeHumidity) }()
|
||||
case 3: try { try decoder.decodeSingularFloatField(value: &self.barometricPressure) }()
|
||||
case 4: try { try decoder.decodeSingularFloatField(value: &self.gasResistance) }()
|
||||
case 5: try { try decoder.decodeSingularFloatField(value: &self.voltage) }()
|
||||
case 6: try { try decoder.decodeSingularFloatField(value: &self.current) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.temperature != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.temperature, fieldNumber: 1)
|
||||
}
|
||||
if self.relativeHumidity != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.relativeHumidity, fieldNumber: 2)
|
||||
}
|
||||
if self.barometricPressure != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.barometricPressure, fieldNumber: 3)
|
||||
}
|
||||
if self.gasResistance != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.gasResistance, fieldNumber: 4)
|
||||
}
|
||||
if self.voltage != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.voltage, fieldNumber: 5)
|
||||
}
|
||||
if self.current != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.current, fieldNumber: 6)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
if lhs.gasResistance != rhs.gasResistance {return false}
|
||||
if lhs.voltage != rhs.voltage {return false}
|
||||
if lhs.current != rhs.current {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Telemetry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "Telemetry"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "time"),
|
||||
2: .standard(proto: "device_metrics"),
|
||||
3: .standard(proto: "environment_metrics"),
|
||||
]
|
||||
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularFixed32Field(value: &self.time) }()
|
||||
case 2: try {
|
||||
var v: DeviceMetrics?
|
||||
var hadOneofValue = false
|
||||
if let current = self.variant {
|
||||
hadOneofValue = true
|
||||
if case .deviceMetrics(let m) = current {v = m}
|
||||
}
|
||||
try decoder.decodeSingularMessageField(value: &v)
|
||||
if let v = v {
|
||||
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
||||
self.variant = .deviceMetrics(v)
|
||||
}
|
||||
}()
|
||||
case 3: try {
|
||||
var v: EnvironmentMetrics?
|
||||
var hadOneofValue = false
|
||||
if let current = self.variant {
|
||||
hadOneofValue = true
|
||||
if case .environmentMetrics(let m) = current {v = m}
|
||||
}
|
||||
try decoder.decodeSingularMessageField(value: &v)
|
||||
if let v = v {
|
||||
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
||||
self.variant = .environmentMetrics(v)
|
||||
}
|
||||
}()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// https://github.com/apple/swift-protobuf/issues/1182
|
||||
if self.time != 0 {
|
||||
try visitor.visitSingularFixed32Field(value: self.time, fieldNumber: 1)
|
||||
}
|
||||
switch self.variant {
|
||||
case .deviceMetrics?: try {
|
||||
guard case .deviceMetrics(let v)? = self.variant else { preconditionFailure() }
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
}()
|
||||
case .environmentMetrics?: try {
|
||||
guard case .environmentMetrics(let v)? = self.variant else { preconditionFailure() }
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
||||
}()
|
||||
case nil: break
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: xmodem.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
// was generated by a version of the `protoc` Swift plug-in that is
|
||||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
var seq: UInt32 = 0
|
||||
|
||||
var crc16: UInt32 = 0
|
||||
|
||||
var buffer: Data = Data()
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
enum Control: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case nul // = 0
|
||||
case soh // = 1
|
||||
case stx // = 2
|
||||
case eot // = 4
|
||||
case ack // = 6
|
||||
case nak // = 21
|
||||
case can // = 24
|
||||
case ctrlz // = 26
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
init() {
|
||||
self = .nul
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .nul
|
||||
case 1: self = .soh
|
||||
case 2: self = .stx
|
||||
case 4: self = .eot
|
||||
case 6: self = .ack
|
||||
case 21: self = .nak
|
||||
case 24: self = .can
|
||||
case 26: self = .ctrlz
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .nul: return 0
|
||||
case .soh: return 1
|
||||
case .stx: return 2
|
||||
case .eot: return 4
|
||||
case .ack: return 6
|
||||
case .nak: return 21
|
||||
case .can: return 24
|
||||
case .ctrlz: return 26
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension XModem.Control: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
static var allCases: [XModem.Control] = [
|
||||
.nul,
|
||||
.soh,
|
||||
.stx,
|
||||
.eot,
|
||||
.ack,
|
||||
.nak,
|
||||
.can,
|
||||
.ctrlz,
|
||||
]
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension XModem: @unchecked Sendable {}
|
||||
extension XModem.Control: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
extension XModem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = "XModem"
|
||||
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 {
|
||||
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
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularEnumField(value: &self.control) }()
|
||||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.seq) }()
|
||||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.crc16) }()
|
||||
case 4: try { try decoder.decodeSingularBytesField(value: &self.buffer) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.control != .nul {
|
||||
try visitor.visitSingularEnumField(value: self.control, fieldNumber: 1)
|
||||
}
|
||||
if self.seq != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.seq, fieldNumber: 2)
|
||||
}
|
||||
if self.crc16 != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.crc16, fieldNumber: 3)
|
||||
}
|
||||
if !self.buffer.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.buffer, fieldNumber: 4)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
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}
|
||||
if lhs.buffer != rhs.buffer {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension XModem.Control: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "NUL"),
|
||||
1: .same(proto: "SOH"),
|
||||
2: .same(proto: "STX"),
|
||||
4: .same(proto: "EOT"),
|
||||
6: .same(proto: "ACK"),
|
||||
21: .same(proto: "NAK"),
|
||||
24: .same(proto: "CAN"),
|
||||
26: .same(proto: "CTRLZ"),
|
||||
]
|
||||
}
|
||||
|
|
@ -1,36 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
# simple sanity checking for repo
|
||||
if [ ! -d "../protobufs/meshtastic" ]; then
|
||||
echo "Please check out the https://github.com/meshtastic/protobufs parent directory."
|
||||
if [ ! -d "../protobufs" ]; then
|
||||
echo "Please check out the protobuf submodule by running: `git submodule update --init`"
|
||||
exit
|
||||
fi
|
||||
|
||||
# simple sanity checking for executable
|
||||
if [ ! -x "`which protoc`" ]; then
|
||||
if [ ! -x "$(which protoc)" ]; then
|
||||
echo "Please install swift-protobuf by running: brew install swift-protobuf"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -x "`which gsed`" ]; then
|
||||
echo "Please install gnu-sed by running: brew install gnu-sed"
|
||||
exit
|
||||
fi
|
||||
protoc --proto_path=./protobufs --swift_out=./Meshtastic/Protobufs ./protobufs/meshtastic/*.proto
|
||||
|
||||
pdir=$(realpath "../protobufs/meshtastic")
|
||||
sdir=$(realpath "./Meshtastic/Protobufs")
|
||||
|
||||
gsed -i 's/import "meshtastic\//import "/g' ../protobufs/meshtastic/*
|
||||
gsed -i 's/package meshtastic;//g' ../protobufs/meshtastic/*
|
||||
|
||||
echo "pdir:$pdir sdir:$sdir"
|
||||
pfiles="admin.proto apponly.proto cannedmessages.proto channel.proto config.proto device_metadata.proto deviceonly.proto localonly.proto mesh.proto module_config.proto mqtt.proto portnums.proto remote_hardware.proto rtttl.proto storeforward.proto telemetry.proto xmodem.proto"
|
||||
for pf in $pfiles
|
||||
do
|
||||
echo "Generating $pf..."
|
||||
protoc --swift_out=${sdir} --proto_path=${pdir} $pf
|
||||
done
|
||||
echo "Done generating the swift files from the proto files."
|
||||
echo "Build, test, and commit changes."
|
||||
|
||||
cd ../protobufs/meshtastic && git reset --hard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue