Update protobufs to 2.7.1

This commit is contained in:
Ben Meadors 2025-12-17 20:26:44 -06:00
parent fcb20cd1ac
commit 9b6e645bd9
30 changed files with 1205 additions and 3664 deletions

View file

@ -1,5 +1,5 @@
{
"originHash" : "0fb5b226f8ca0b357ce7816ebac09d017cbe0ad253452876e5e2ff8e555c7124",
"originHash" : "25240dd07109fa832be10093f5d97529f872f18e8d9df6468e5e4212bc0b487e",
"pins" : [
{
"identity" : "cocoamqtt",
@ -60,8 +60,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "d72aed98f8253ec1aa9ea1141e28150f408cf17f",
"version" : "1.29.0"
"revision" : "c169a5744230951031770e27e475ff6eefe51f9d",
"version" : "1.33.3"
}
}
],

View file

@ -1814,7 +1814,7 @@ extension AccessoryManager {
public func sendNodeDBReset(fromUser: UserEntity, toUser: UserEntity) async throws {
var adminPacket = AdminMessage()
adminPacket.nodedbReset = 5
adminPacket.nodedbReset = true
if fromUser != toUser {
adminPacket.sessionPasskey = toUser.userNode?.sessionPasskey ?? Data()
}

View file

@ -578,6 +578,8 @@ class AccessoryManager: ObservableObject, MqttClientProxyManagerDelegate {
Logger.mesh.info("🕸️ MESH PACKET received for ATAK Forwarder App UNHANDLED UNHANDLED")
case .simulatorApp:
Logger.mesh.info("🕸️ MESH PACKET received for Simulator App UNHANDLED UNHANDLED")
case .storeForwardPlusplusApp:
Logger.mesh.info("🕸️ MESH PACKET received for SFPP App UNHANDLED UNHANDLED")
case .audioApp:
Logger.mesh.info("🕸️ MESH PACKET received for Audio App UNHANDLED UNHANDLED")
case .tracerouteApp:

View file

@ -55,7 +55,7 @@ extension ChannelEntity {
channel.settings.psk = self.psk ?? Data()
channel.role = Channel.Role(rawValue: Int(self.role)) ?? Channel.Role.secondary
channel.settings.moduleSettings.positionPrecision = UInt32(self.positionPrecision)
channel.settings.moduleSettings.isClientMuted = self.mute
channel.settings.moduleSettings.isMuted = self.mute
return channel
}
}

View file

@ -181,7 +181,7 @@ func channelPacket (channel: Channel, fromNum: Int64, context: NSManagedObjectCo
newChannel.psk = channel.settings.psk
if channel.settings.hasModuleSettings {
newChannel.positionPrecision = Int32(truncatingIfNeeded: channel.settings.moduleSettings.positionPrecision)
newChannel.mute = channel.settings.moduleSettings.isClientMuted
newChannel.mute = channel.settings.moduleSettings.isMuted
}
guard let mutableChannels = fetchedMyInfo[0].channels!.mutableCopy() as? NSMutableOrderedSet else {
return

View file

@ -11,7 +11,7 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.19.0"),
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.33.3"),
],
targets: [
.target(

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/admin.proto
@ -24,7 +25,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
/// This message is handled by the Admin module and is responsible for all settings/channel read/write operations.
/// This message is used to do settings operations to both remote AND local nodes.
/// (Prior to 1.2 these operations were done via special ToRadio operations)
public struct AdminMessage {
public struct AdminMessage: Sendable {
// 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.
@ -582,10 +583,11 @@ public struct AdminMessage {
///
/// Tell the node to reset the nodedb.
public var nodedbReset: Int32 {
/// When true, favorites are preserved through reset.
public var nodedbReset: Bool {
get {
if case .nodedbReset(let v)? = payloadVariant {return v}
return 0
return false
}
set {payloadVariant = .nodedbReset(newValue)}
}
@ -594,7 +596,7 @@ public struct AdminMessage {
///
/// TODO: REPLACE
public enum OneOf_PayloadVariant: Equatable {
public enum OneOf_PayloadVariant: Equatable, Sendable {
///
/// Send the specified channel in the response to this message
/// NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present)
@ -767,239 +769,14 @@ public struct AdminMessage {
case factoryResetConfig(Int32)
///
/// Tell the node to reset the nodedb.
case nodedbReset(Int32)
/// When true, favorites are preserved through reset.
case nodedbReset(Bool)
#if !swift(>=4.1)
public static func ==(lhs: AdminMessage.OneOf_PayloadVariant, rhs: AdminMessage.OneOf_PayloadVariant) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.getChannelRequest, .getChannelRequest): return {
guard case .getChannelRequest(let l) = lhs, case .getChannelRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getChannelResponse, .getChannelResponse): return {
guard case .getChannelResponse(let l) = lhs, case .getChannelResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getOwnerRequest, .getOwnerRequest): return {
guard case .getOwnerRequest(let l) = lhs, case .getOwnerRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getOwnerResponse, .getOwnerResponse): return {
guard case .getOwnerResponse(let l) = lhs, case .getOwnerResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getConfigRequest, .getConfigRequest): return {
guard case .getConfigRequest(let l) = lhs, case .getConfigRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getConfigResponse, .getConfigResponse): return {
guard case .getConfigResponse(let l) = lhs, case .getConfigResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getModuleConfigRequest, .getModuleConfigRequest): return {
guard case .getModuleConfigRequest(let l) = lhs, case .getModuleConfigRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getModuleConfigResponse, .getModuleConfigResponse): return {
guard case .getModuleConfigResponse(let l) = lhs, case .getModuleConfigResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getCannedMessageModuleMessagesRequest, .getCannedMessageModuleMessagesRequest): return {
guard case .getCannedMessageModuleMessagesRequest(let l) = lhs, case .getCannedMessageModuleMessagesRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getCannedMessageModuleMessagesResponse, .getCannedMessageModuleMessagesResponse): return {
guard case .getCannedMessageModuleMessagesResponse(let l) = lhs, case .getCannedMessageModuleMessagesResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getDeviceMetadataRequest, .getDeviceMetadataRequest): return {
guard case .getDeviceMetadataRequest(let l) = lhs, case .getDeviceMetadataRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getDeviceMetadataResponse, .getDeviceMetadataResponse): return {
guard case .getDeviceMetadataResponse(let l) = lhs, case .getDeviceMetadataResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getRingtoneRequest, .getRingtoneRequest): return {
guard case .getRingtoneRequest(let l) = lhs, case .getRingtoneRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getRingtoneResponse, .getRingtoneResponse): return {
guard case .getRingtoneResponse(let l) = lhs, case .getRingtoneResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getDeviceConnectionStatusRequest, .getDeviceConnectionStatusRequest): return {
guard case .getDeviceConnectionStatusRequest(let l) = lhs, case .getDeviceConnectionStatusRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getDeviceConnectionStatusResponse, .getDeviceConnectionStatusResponse): return {
guard case .getDeviceConnectionStatusResponse(let l) = lhs, case .getDeviceConnectionStatusResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setHamMode, .setHamMode): return {
guard case .setHamMode(let l) = lhs, case .setHamMode(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getNodeRemoteHardwarePinsRequest, .getNodeRemoteHardwarePinsRequest): return {
guard case .getNodeRemoteHardwarePinsRequest(let l) = lhs, case .getNodeRemoteHardwarePinsRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getNodeRemoteHardwarePinsResponse, .getNodeRemoteHardwarePinsResponse): return {
guard case .getNodeRemoteHardwarePinsResponse(let l) = lhs, case .getNodeRemoteHardwarePinsResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.enterDfuModeRequest, .enterDfuModeRequest): return {
guard case .enterDfuModeRequest(let l) = lhs, case .enterDfuModeRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.deleteFileRequest, .deleteFileRequest): return {
guard case .deleteFileRequest(let l) = lhs, case .deleteFileRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setScale, .setScale): return {
guard case .setScale(let l) = lhs, case .setScale(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.backupPreferences, .backupPreferences): return {
guard case .backupPreferences(let l) = lhs, case .backupPreferences(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.restorePreferences, .restorePreferences): return {
guard case .restorePreferences(let l) = lhs, case .restorePreferences(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.removeBackupPreferences, .removeBackupPreferences): return {
guard case .removeBackupPreferences(let l) = lhs, case .removeBackupPreferences(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.sendInputEvent, .sendInputEvent): return {
guard case .sendInputEvent(let l) = lhs, case .sendInputEvent(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setOwner, .setOwner): return {
guard case .setOwner(let l) = lhs, case .setOwner(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setChannel, .setChannel): return {
guard case .setChannel(let l) = lhs, case .setChannel(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setConfig, .setConfig): return {
guard case .setConfig(let l) = lhs, case .setConfig(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setModuleConfig, .setModuleConfig): return {
guard case .setModuleConfig(let l) = lhs, case .setModuleConfig(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setCannedMessageModuleMessages, .setCannedMessageModuleMessages): return {
guard case .setCannedMessageModuleMessages(let l) = lhs, case .setCannedMessageModuleMessages(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setRingtoneMessage, .setRingtoneMessage): return {
guard case .setRingtoneMessage(let l) = lhs, case .setRingtoneMessage(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.removeByNodenum, .removeByNodenum): return {
guard case .removeByNodenum(let l) = lhs, case .removeByNodenum(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setFavoriteNode, .setFavoriteNode): return {
guard case .setFavoriteNode(let l) = lhs, case .setFavoriteNode(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.removeFavoriteNode, .removeFavoriteNode): return {
guard case .removeFavoriteNode(let l) = lhs, case .removeFavoriteNode(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setFixedPosition, .setFixedPosition): return {
guard case .setFixedPosition(let l) = lhs, case .setFixedPosition(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.removeFixedPosition, .removeFixedPosition): return {
guard case .removeFixedPosition(let l) = lhs, case .removeFixedPosition(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setTimeOnly, .setTimeOnly): return {
guard case .setTimeOnly(let l) = lhs, case .setTimeOnly(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getUiConfigRequest, .getUiConfigRequest): return {
guard case .getUiConfigRequest(let l) = lhs, case .getUiConfigRequest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.getUiConfigResponse, .getUiConfigResponse): return {
guard case .getUiConfigResponse(let l) = lhs, case .getUiConfigResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.storeUiConfig, .storeUiConfig): return {
guard case .storeUiConfig(let l) = lhs, case .storeUiConfig(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setIgnoredNode, .setIgnoredNode): return {
guard case .setIgnoredNode(let l) = lhs, case .setIgnoredNode(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.removeIgnoredNode, .removeIgnoredNode): return {
guard case .removeIgnoredNode(let l) = lhs, case .removeIgnoredNode(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.beginEditSettings, .beginEditSettings): return {
guard case .beginEditSettings(let l) = lhs, case .beginEditSettings(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.commitEditSettings, .commitEditSettings): return {
guard case .commitEditSettings(let l) = lhs, case .commitEditSettings(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.addContact, .addContact): return {
guard case .addContact(let l) = lhs, case .addContact(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.keyVerification, .keyVerification): return {
guard case .keyVerification(let l) = lhs, case .keyVerification(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.factoryResetDevice, .factoryResetDevice): return {
guard case .factoryResetDevice(let l) = lhs, case .factoryResetDevice(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.rebootOtaSeconds, .rebootOtaSeconds): return {
guard case .rebootOtaSeconds(let l) = lhs, case .rebootOtaSeconds(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.exitSimulator, .exitSimulator): return {
guard case .exitSimulator(let l) = lhs, case .exitSimulator(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.rebootSeconds, .rebootSeconds): return {
guard case .rebootSeconds(let l) = lhs, case .rebootSeconds(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.shutdownSeconds, .shutdownSeconds): return {
guard case .shutdownSeconds(let l) = lhs, case .shutdownSeconds(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.factoryResetConfig, .factoryResetConfig): return {
guard case .factoryResetConfig(let l) = lhs, case .factoryResetConfig(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.nodedbReset, .nodedbReset): return {
guard case .nodedbReset(let l) = lhs, case .nodedbReset(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
///
/// TODO: REPLACE
public enum ConfigType: SwiftProtobuf.Enum {
public enum ConfigType: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -1079,11 +856,25 @@ public struct AdminMessage {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [AdminMessage.ConfigType] = [
.deviceConfig,
.positionConfig,
.powerConfig,
.networkConfig,
.displayConfig,
.loraConfig,
.bluetoothConfig,
.securityConfig,
.sessionkeyConfig,
.deviceuiConfig,
]
}
///
/// TODO: REPLACE
public enum ModuleConfigType: SwiftProtobuf.Enum {
public enum ModuleConfigType: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -1181,9 +972,26 @@ public struct AdminMessage {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [AdminMessage.ModuleConfigType] = [
.mqttConfig,
.serialConfig,
.extnotifConfig,
.storeforwardConfig,
.rangetestConfig,
.telemetryConfig,
.cannedmsgConfig,
.audioConfig,
.remotehardwareConfig,
.neighborinfoConfig,
.ambientlightingConfig,
.detectionsensorConfig,
.paxcounterConfig,
]
}
public enum BackupLocation: SwiftProtobuf.Enum {
public enum BackupLocation: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -1215,11 +1023,17 @@ public struct AdminMessage {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [AdminMessage.BackupLocation] = [
.flash,
.sd,
]
}
///
/// Input event message to be sent to the node.
public struct InputEvent {
public struct InputEvent: Sendable {
// 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.
@ -1248,56 +1062,9 @@ public struct AdminMessage {
public init() {}
}
#if swift(>=4.2)
extension AdminMessage.ConfigType: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [AdminMessage.ConfigType] = [
.deviceConfig,
.positionConfig,
.powerConfig,
.networkConfig,
.displayConfig,
.loraConfig,
.bluetoothConfig,
.securityConfig,
.sessionkeyConfig,
.deviceuiConfig,
]
}
extension AdminMessage.ModuleConfigType: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [AdminMessage.ModuleConfigType] = [
.mqttConfig,
.serialConfig,
.extnotifConfig,
.storeforwardConfig,
.rangetestConfig,
.telemetryConfig,
.cannedmsgConfig,
.audioConfig,
.remotehardwareConfig,
.neighborinfoConfig,
.ambientlightingConfig,
.detectionsensorConfig,
.paxcounterConfig,
]
}
extension AdminMessage.BackupLocation: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [AdminMessage.BackupLocation] = [
.flash,
.sd,
]
}
#endif // swift(>=4.2)
///
/// Parameters for setting up Meshtastic for ameteur radio usage
public struct HamParameters {
public struct HamParameters: Sendable {
// 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.
@ -1327,7 +1094,7 @@ public struct HamParameters {
///
/// Response envelope for node_remote_hardware_pins
public struct NodeRemoteHardwarePinsResponse {
public struct NodeRemoteHardwarePinsResponse: Sendable {
// 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.
@ -1341,7 +1108,7 @@ public struct NodeRemoteHardwarePinsResponse {
public init() {}
}
public struct SharedContact {
public struct SharedContact: Sendable {
// 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.
@ -1378,7 +1145,7 @@ public struct SharedContact {
///
/// This message is used by a client to initiate or complete a key verification
public struct KeyVerificationAdmin {
public struct KeyVerificationAdmin: Sendable {
// 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.
@ -1408,7 +1175,7 @@ public struct KeyVerificationAdmin {
///
/// Three stages of this request.
public enum MessageType: SwiftProtobuf.Enum {
public enum MessageType: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -1453,6 +1220,14 @@ public struct KeyVerificationAdmin {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [KeyVerificationAdmin.MessageType] = [
.initiateVerification,
.provideSecurityNumber,
.doVerify,
.doNotVerify,
]
}
public init() {}
@ -1460,97 +1235,13 @@ public struct KeyVerificationAdmin {
fileprivate var _securityNumber: UInt32? = nil
}
#if swift(>=4.2)
extension KeyVerificationAdmin.MessageType: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [KeyVerificationAdmin.MessageType] = [
.initiateVerification,
.provideSecurityNumber,
.doVerify,
.doNotVerify,
]
}
#endif // swift(>=4.2)
#if swift(>=5.5) && canImport(_Concurrency)
extension AdminMessage: @unchecked Sendable {}
extension AdminMessage.OneOf_PayloadVariant: @unchecked Sendable {}
extension AdminMessage.ConfigType: @unchecked Sendable {}
extension AdminMessage.ModuleConfigType: @unchecked Sendable {}
extension AdminMessage.BackupLocation: @unchecked Sendable {}
extension AdminMessage.InputEvent: @unchecked Sendable {}
extension HamParameters: @unchecked Sendable {}
extension NodeRemoteHardwarePinsResponse: @unchecked Sendable {}
extension SharedContact: @unchecked Sendable {}
extension KeyVerificationAdmin: @unchecked Sendable {}
extension KeyVerificationAdmin.MessageType: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".AdminMessage"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
101: .standard(proto: "session_passkey"),
1: .standard(proto: "get_channel_request"),
2: .standard(proto: "get_channel_response"),
3: .standard(proto: "get_owner_request"),
4: .standard(proto: "get_owner_response"),
5: .standard(proto: "get_config_request"),
6: .standard(proto: "get_config_response"),
7: .standard(proto: "get_module_config_request"),
8: .standard(proto: "get_module_config_response"),
10: .standard(proto: "get_canned_message_module_messages_request"),
11: .standard(proto: "get_canned_message_module_messages_response"),
12: .standard(proto: "get_device_metadata_request"),
13: .standard(proto: "get_device_metadata_response"),
14: .standard(proto: "get_ringtone_request"),
15: .standard(proto: "get_ringtone_response"),
16: .standard(proto: "get_device_connection_status_request"),
17: .standard(proto: "get_device_connection_status_response"),
18: .standard(proto: "set_ham_mode"),
19: .standard(proto: "get_node_remote_hardware_pins_request"),
20: .standard(proto: "get_node_remote_hardware_pins_response"),
21: .standard(proto: "enter_dfu_mode_request"),
22: .standard(proto: "delete_file_request"),
23: .standard(proto: "set_scale"),
24: .standard(proto: "backup_preferences"),
25: .standard(proto: "restore_preferences"),
26: .standard(proto: "remove_backup_preferences"),
27: .standard(proto: "send_input_event"),
32: .standard(proto: "set_owner"),
33: .standard(proto: "set_channel"),
34: .standard(proto: "set_config"),
35: .standard(proto: "set_module_config"),
36: .standard(proto: "set_canned_message_module_messages"),
37: .standard(proto: "set_ringtone_message"),
38: .standard(proto: "remove_by_nodenum"),
39: .standard(proto: "set_favorite_node"),
40: .standard(proto: "remove_favorite_node"),
41: .standard(proto: "set_fixed_position"),
42: .standard(proto: "remove_fixed_position"),
43: .standard(proto: "set_time_only"),
44: .standard(proto: "get_ui_config_request"),
45: .standard(proto: "get_ui_config_response"),
46: .standard(proto: "store_ui_config"),
47: .standard(proto: "set_ignored_node"),
48: .standard(proto: "remove_ignored_node"),
64: .standard(proto: "begin_edit_settings"),
65: .standard(proto: "commit_edit_settings"),
66: .standard(proto: "add_contact"),
67: .standard(proto: "key_verification"),
94: .standard(proto: "factory_reset_device"),
95: .standard(proto: "reboot_ota_seconds"),
96: .standard(proto: "exit_simulator"),
97: .standard(proto: "reboot_seconds"),
98: .standard(proto: "shutdown_seconds"),
99: .standard(proto: "factory_reset_config"),
100: .standard(proto: "nodedb_reset"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}get_channel_request\0\u{3}get_channel_response\0\u{3}get_owner_request\0\u{3}get_owner_response\0\u{3}get_config_request\0\u{3}get_config_response\0\u{3}get_module_config_request\0\u{3}get_module_config_response\0\u{4}\u{2}get_canned_message_module_messages_request\0\u{3}get_canned_message_module_messages_response\0\u{3}get_device_metadata_request\0\u{3}get_device_metadata_response\0\u{3}get_ringtone_request\0\u{3}get_ringtone_response\0\u{3}get_device_connection_status_request\0\u{3}get_device_connection_status_response\0\u{3}set_ham_mode\0\u{3}get_node_remote_hardware_pins_request\0\u{3}get_node_remote_hardware_pins_response\0\u{3}enter_dfu_mode_request\0\u{3}delete_file_request\0\u{3}set_scale\0\u{3}backup_preferences\0\u{3}restore_preferences\0\u{3}remove_backup_preferences\0\u{3}send_input_event\0\u{4}\u{5}set_owner\0\u{3}set_channel\0\u{3}set_config\0\u{3}set_module_config\0\u{3}set_canned_message_module_messages\0\u{3}set_ringtone_message\0\u{3}remove_by_nodenum\0\u{3}set_favorite_node\0\u{3}remove_favorite_node\0\u{3}set_fixed_position\0\u{3}remove_fixed_position\0\u{3}set_time_only\0\u{3}get_ui_config_request\0\u{3}get_ui_config_response\0\u{3}store_ui_config\0\u{3}set_ignored_node\0\u{3}remove_ignored_node\0\u{4}\u{10}begin_edit_settings\0\u{3}commit_edit_settings\0\u{3}add_contact\0\u{3}key_verification\0\u{4}\u{1b}factory_reset_device\0\u{3}reboot_ota_seconds\0\u{3}exit_simulator\0\u{3}reboot_seconds\0\u{3}shutdown_seconds\0\u{3}factory_reset_config\0\u{3}nodedb_reset\0\u{3}session_passkey\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2073,8 +1764,8 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
}
}()
case 100: try {
var v: Int32?
try decoder.decodeSingularInt32Field(value: &v)
var v: Bool?
try decoder.decodeSingularBoolField(value: &v)
if let v = v {
if self.payloadVariant != nil {try decoder.handleConflictingOneOf()}
self.payloadVariant = .nodedbReset(v)
@ -2306,7 +1997,7 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
}()
case .nodedbReset?: try {
guard case .nodedbReset(let v)? = self.payloadVariant else { preconditionFailure() }
try visitor.visitSingularInt32Field(value: v, fieldNumber: 100)
try visitor.visitSingularBoolField(value: v, fieldNumber: 100)
}()
case nil: break
}
@ -2325,53 +2016,20 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
}
extension AdminMessage.ConfigType: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "DEVICE_CONFIG"),
1: .same(proto: "POSITION_CONFIG"),
2: .same(proto: "POWER_CONFIG"),
3: .same(proto: "NETWORK_CONFIG"),
4: .same(proto: "DISPLAY_CONFIG"),
5: .same(proto: "LORA_CONFIG"),
6: .same(proto: "BLUETOOTH_CONFIG"),
7: .same(proto: "SECURITY_CONFIG"),
8: .same(proto: "SESSIONKEY_CONFIG"),
9: .same(proto: "DEVICEUI_CONFIG"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DEVICE_CONFIG\0\u{1}POSITION_CONFIG\0\u{1}POWER_CONFIG\0\u{1}NETWORK_CONFIG\0\u{1}DISPLAY_CONFIG\0\u{1}LORA_CONFIG\0\u{1}BLUETOOTH_CONFIG\0\u{1}SECURITY_CONFIG\0\u{1}SESSIONKEY_CONFIG\0\u{1}DEVICEUI_CONFIG\0")
}
extension AdminMessage.ModuleConfigType: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "MQTT_CONFIG"),
1: .same(proto: "SERIAL_CONFIG"),
2: .same(proto: "EXTNOTIF_CONFIG"),
3: .same(proto: "STOREFORWARD_CONFIG"),
4: .same(proto: "RANGETEST_CONFIG"),
5: .same(proto: "TELEMETRY_CONFIG"),
6: .same(proto: "CANNEDMSG_CONFIG"),
7: .same(proto: "AUDIO_CONFIG"),
8: .same(proto: "REMOTEHARDWARE_CONFIG"),
9: .same(proto: "NEIGHBORINFO_CONFIG"),
10: .same(proto: "AMBIENTLIGHTING_CONFIG"),
11: .same(proto: "DETECTIONSENSOR_CONFIG"),
12: .same(proto: "PAXCOUNTER_CONFIG"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0MQTT_CONFIG\0\u{1}SERIAL_CONFIG\0\u{1}EXTNOTIF_CONFIG\0\u{1}STOREFORWARD_CONFIG\0\u{1}RANGETEST_CONFIG\0\u{1}TELEMETRY_CONFIG\0\u{1}CANNEDMSG_CONFIG\0\u{1}AUDIO_CONFIG\0\u{1}REMOTEHARDWARE_CONFIG\0\u{1}NEIGHBORINFO_CONFIG\0\u{1}AMBIENTLIGHTING_CONFIG\0\u{1}DETECTIONSENSOR_CONFIG\0\u{1}PAXCOUNTER_CONFIG\0")
}
extension AdminMessage.BackupLocation: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "FLASH"),
1: .same(proto: "SD"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0FLASH\0\u{1}SD\0")
}
extension AdminMessage.InputEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = AdminMessage.protoMessageName + ".InputEvent"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "event_code"),
2: .standard(proto: "kb_char"),
3: .standard(proto: "touch_x"),
4: .standard(proto: "touch_y"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}event_code\0\u{3}kb_char\0\u{3}touch_x\0\u{3}touch_y\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2416,12 +2074,7 @@ extension AdminMessage.InputEvent: SwiftProtobuf.Message, SwiftProtobuf._Message
extension HamParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".HamParameters"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "call_sign"),
2: .standard(proto: "tx_power"),
3: .same(proto: "frequency"),
4: .standard(proto: "short_name"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}call_sign\0\u{3}tx_power\0\u{1}frequency\0\u{3}short_name\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2445,7 +2098,7 @@ extension HamParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
if self.txPower != 0 {
try visitor.visitSingularInt32Field(value: self.txPower, fieldNumber: 2)
}
if self.frequency != 0 {
if self.frequency.bitPattern != 0 {
try visitor.visitSingularFloatField(value: self.frequency, fieldNumber: 3)
}
if !self.shortName.isEmpty {
@ -2466,9 +2119,7 @@ extension HamParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
extension NodeRemoteHardwarePinsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".NodeRemoteHardwarePinsResponse"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "node_remote_hardware_pins"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}node_remote_hardware_pins\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2498,12 +2149,7 @@ extension NodeRemoteHardwarePinsResponse: SwiftProtobuf.Message, SwiftProtobuf._
extension SharedContact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".SharedContact"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "node_num"),
2: .same(proto: "user"),
3: .standard(proto: "should_ignore"),
4: .standard(proto: "manually_verified"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}node_num\0\u{1}user\0\u{3}should_ignore\0\u{3}manually_verified\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2552,12 +2198,7 @@ extension SharedContact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
extension KeyVerificationAdmin: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".KeyVerificationAdmin"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "message_type"),
2: .standard(proto: "remote_nodenum"),
3: .same(proto: "nonce"),
4: .standard(proto: "security_number"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}message_type\0\u{3}remote_nodenum\0\u{1}nonce\0\u{3}security_number\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2605,10 +2246,5 @@ extension KeyVerificationAdmin: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
}
extension KeyVerificationAdmin.MessageType: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "INITIATE_VERIFICATION"),
1: .same(proto: "PROVIDE_SECURITY_NUMBER"),
2: .same(proto: "DO_VERIFY"),
3: .same(proto: "DO_NOT_VERIFY"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0INITIATE_VERIFICATION\0\u{1}PROVIDE_SECURITY_NUMBER\0\u{1}DO_VERIFY\0\u{1}DO_NOT_VERIFY\0")
}

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/apponly.proto
@ -7,7 +8,6 @@
// 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
@ -26,7 +26,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
/// any SECONDARY channels.
/// No DISABLED channels are included.
/// This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL
public struct ChannelSet {
public struct ChannelSet: Sendable {
// 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.
@ -53,20 +53,13 @@ public struct ChannelSet {
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.
fileprivate let _protobuf_package = "meshtastic"
extension ChannelSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".ChannelSet"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "settings"),
2: .standard(proto: "lora_config"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}settings\0\u{3}lora_config\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/atak.proto
@ -20,7 +21,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
typealias Version = _2
}
public enum Team: SwiftProtobuf.Enum {
public enum Team: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -130,11 +131,6 @@ public enum Team: SwiftProtobuf.Enum {
}
}
}
#if swift(>=4.2)
extension Team: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [Team] = [
.unspecifedColor,
@ -153,13 +149,12 @@ extension Team: CaseIterable {
.darkGreen,
.brown,
]
}
#endif // swift(>=4.2)
}
///
/// Role of the group member
public enum MemberRole: SwiftProtobuf.Enum {
public enum MemberRole: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -233,11 +228,6 @@ public enum MemberRole: SwiftProtobuf.Enum {
}
}
}
#if swift(>=4.2)
extension MemberRole: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [MemberRole] = [
.unspecifed,
@ -250,13 +240,12 @@ extension MemberRole: CaseIterable {
.rto,
.k9,
]
}
#endif // swift(>=4.2)
}
///
/// Packets for the official ATAK Plugin
public struct TAKPacket {
public struct TAKPacket: Sendable {
// 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.
@ -337,7 +326,7 @@ public struct TAKPacket {
///
/// The payload of the packet
public enum OneOf_PayloadVariant: Equatable {
public enum OneOf_PayloadVariant: Equatable, Sendable {
///
/// TAK position report
case pli(PLI)
@ -349,28 +338,6 @@ public struct TAKPacket {
/// May be compressed / truncated by the sender (EUD)
case detail(Data)
#if !swift(>=4.1)
public static func ==(lhs: TAKPacket.OneOf_PayloadVariant, rhs: TAKPacket.OneOf_PayloadVariant) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.pli, .pli): return {
guard case .pli(let l) = lhs, case .pli(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.chat, .chat): return {
guard case .chat(let l) = lhs, case .chat(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.detail, .detail): return {
guard case .detail(let l) = lhs, case .detail(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
@ -382,7 +349,7 @@ public struct TAKPacket {
///
/// ATAK GeoChat message
public struct GeoChat {
public struct GeoChat: Sendable {
// 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.
@ -424,7 +391,7 @@ public struct GeoChat {
///
/// ATAK Group
/// <__group role='Team Member' name='Cyan'/>
public struct Group {
public struct Group: Sendable {
// 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.
@ -446,7 +413,7 @@ public struct Group {
///
/// ATAK EUD Status
/// <status battery='100' />
public struct Status {
public struct Status: Sendable {
// 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.
@ -463,7 +430,7 @@ public struct Status {
///
/// ATAK Contact
/// <contact endpoint='0.0.0.0:4242:tcp' phone='+12345678' callsign='FALKE'/>
public struct Contact {
public struct Contact: Sendable {
// 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.
@ -483,7 +450,7 @@ public struct Contact {
///
/// Position Location Information from ATAK
public struct PLI {
public struct PLI: Sendable {
// 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.
@ -515,67 +482,21 @@ public struct PLI {
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension Team: @unchecked Sendable {}
extension MemberRole: @unchecked Sendable {}
extension TAKPacket: @unchecked Sendable {}
extension TAKPacket.OneOf_PayloadVariant: @unchecked Sendable {}
extension GeoChat: @unchecked Sendable {}
extension Group: @unchecked Sendable {}
extension Status: @unchecked Sendable {}
extension Contact: @unchecked Sendable {}
extension PLI: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension Team: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "Unspecifed_Color"),
1: .same(proto: "White"),
2: .same(proto: "Yellow"),
3: .same(proto: "Orange"),
4: .same(proto: "Magenta"),
5: .same(proto: "Red"),
6: .same(proto: "Maroon"),
7: .same(proto: "Purple"),
8: .same(proto: "Dark_Blue"),
9: .same(proto: "Blue"),
10: .same(proto: "Cyan"),
11: .same(proto: "Teal"),
12: .same(proto: "Green"),
13: .same(proto: "Dark_Green"),
14: .same(proto: "Brown"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0Unspecifed_Color\0\u{1}White\0\u{1}Yellow\0\u{1}Orange\0\u{1}Magenta\0\u{1}Red\0\u{1}Maroon\0\u{1}Purple\0\u{1}Dark_Blue\0\u{1}Blue\0\u{1}Cyan\0\u{1}Teal\0\u{1}Green\0\u{1}Dark_Green\0\u{1}Brown\0")
}
extension MemberRole: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "Unspecifed"),
1: .same(proto: "TeamMember"),
2: .same(proto: "TeamLead"),
3: .same(proto: "HQ"),
4: .same(proto: "Sniper"),
5: .same(proto: "Medic"),
6: .same(proto: "ForwardObserver"),
7: .same(proto: "RTO"),
8: .same(proto: "K9"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0Unspecifed\0\u{1}TeamMember\0\u{1}TeamLead\0\u{1}HQ\0\u{1}Sniper\0\u{1}Medic\0\u{1}ForwardObserver\0\u{1}RTO\0\u{1}K9\0")
}
extension TAKPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".TAKPacket"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "is_compressed"),
2: .same(proto: "contact"),
3: .same(proto: "group"),
4: .same(proto: "status"),
5: .same(proto: "pli"),
6: .same(proto: "chat"),
7: .same(proto: "detail"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}is_compressed\0\u{1}contact\0\u{1}group\0\u{1}status\0\u{1}pli\0\u{1}chat\0\u{1}detail\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -674,11 +595,7 @@ extension TAKPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation
extension GeoChat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".GeoChat"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "message"),
2: .same(proto: "to"),
3: .standard(proto: "to_callsign"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}message\0\u{1}to\0\u{3}to_callsign\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -722,10 +639,7 @@ extension GeoChat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa
extension Group: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".Group"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "role"),
2: .same(proto: "team"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}role\0\u{1}team\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -760,9 +674,7 @@ extension Group: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase
extension Status: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".Status"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "battery"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}battery\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -792,10 +704,7 @@ extension Status: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas
extension Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".Contact"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "callsign"),
2: .standard(proto: "device_callsign"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}callsign\0\u{3}device_callsign\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -830,13 +739,7 @@ extension Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa
extension PLI: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".PLI"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "latitude_i"),
2: .standard(proto: "longitude_i"),
3: .same(proto: "altitude"),
4: .same(proto: "speed"),
5: .same(proto: "course"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}latitude_i\0\u{3}longitude_i\0\u{1}altitude\0\u{1}speed\0\u{1}course\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/cannedmessages.proto
@ -7,7 +8,6 @@
// 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
@ -22,7 +22,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
///
/// Canned message module configuration.
public struct CannedMessageModuleConfig {
public struct CannedMessageModuleConfig: Sendable {
// 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.
@ -36,19 +36,13 @@ public struct CannedMessageModuleConfig {
public 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.
fileprivate let _protobuf_package = "meshtastic"
extension CannedMessageModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".CannedMessageModuleConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "messages"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}messages\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/channel.proto
@ -36,13 +37,15 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
/// FIXME: Add description of multi-channel support and how primary vs secondary channels are used.
/// FIXME: explain how apps use channels for security.
/// explain how remote settings and remote gpio are managed as an example
public struct ChannelSettings {
public struct ChannelSettings: Sendable {
// 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
///
/// NOTE: This field was marked as deprecated in the .proto file.
public var channelNum: UInt32 = 0
///
@ -102,10 +105,6 @@ public struct ChannelSettings {
/// Clears the value of `moduleSettings`. Subsequent reads from it will return its default value.
public mutating func clearModuleSettings() {self._moduleSettings = nil}
///
/// Whether or not we should receive notifactions / alerts through this channel
public var mute: Bool = false
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
@ -115,7 +114,7 @@ public struct ChannelSettings {
///
/// This message is specifically for modules to store per-channel configuration data.
public struct ModuleSettings {
public struct ModuleSettings: Sendable {
// 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.
@ -125,9 +124,9 @@ public struct ModuleSettings {
public var positionPrecision: UInt32 = 0
///
/// Controls whether or not the phone / clients should mute the current channel
/// Controls whether or not the client / device should mute the current channel
/// Useful for noisy public channels you don't necessarily want to disable
public var isClientMuted: Bool = false
public var isMuted: Bool = false
public var unknownFields = SwiftProtobuf.UnknownStorage()
@ -136,7 +135,7 @@ public struct ModuleSettings {
///
/// A pair of a channel number, mode and the (sharable) settings for that channel
public struct Channel {
public struct Channel: Sendable {
// 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.
@ -174,7 +173,7 @@ public struct Channel {
/// cross band routing as needed.
/// If a device has only a single radio (the common case) only one channel can be PRIMARY at a time
/// (but any number of SECONDARY channels can't be sent received on that common frequency)
public enum Role: SwiftProtobuf.Enum {
public enum Role: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -213,6 +212,13 @@ public struct Channel {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [Channel.Role] = [
.disabled,
.primary,
.secondary,
]
}
public init() {}
@ -220,42 +226,13 @@ public struct Channel {
fileprivate var _settings: ChannelSettings? = nil
}
#if swift(>=4.2)
extension Channel.Role: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [Channel.Role] = [
.disabled,
.primary,
.secondary,
]
}
#endif // swift(>=4.2)
#if swift(>=5.5) && canImport(_Concurrency)
extension ChannelSettings: @unchecked Sendable {}
extension ModuleSettings: @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.
fileprivate let _protobuf_package = "meshtastic"
extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".ChannelSettings"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "channel_num"),
2: .same(proto: "psk"),
3: .same(proto: "name"),
4: .same(proto: "id"),
5: .standard(proto: "uplink_enabled"),
6: .standard(proto: "downlink_enabled"),
7: .standard(proto: "module_settings"),
8: .same(proto: "mute"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}channel_num\0\u{1}psk\0\u{1}name\0\u{1}id\0\u{3}uplink_enabled\0\u{3}downlink_enabled\0\u{3}module_settings\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -270,7 +247,6 @@ extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen
case 5: try { try decoder.decodeSingularBoolField(value: &self.uplinkEnabled) }()
case 6: try { try decoder.decodeSingularBoolField(value: &self.downlinkEnabled) }()
case 7: try { try decoder.decodeSingularMessageField(value: &self._moduleSettings) }()
case 8: try { try decoder.decodeSingularBoolField(value: &self.mute) }()
default: break
}
}
@ -302,9 +278,6 @@ extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen
try { if let v = self._moduleSettings {
try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
} }()
if self.mute != false {
try visitor.visitSingularBoolField(value: self.mute, fieldNumber: 8)
}
try unknownFields.traverse(visitor: &visitor)
}
@ -316,7 +289,6 @@ extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen
if lhs.uplinkEnabled != rhs.uplinkEnabled {return false}
if lhs.downlinkEnabled != rhs.downlinkEnabled {return false}
if lhs._moduleSettings != rhs._moduleSettings {return false}
if lhs.mute != rhs.mute {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
@ -324,10 +296,7 @@ extension ChannelSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen
extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".ModuleSettings"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "position_precision"),
2: .standard(proto: "is_client_muted"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}position_precision\0\u{3}is_muted\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -336,7 +305,7 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.positionPrecision) }()
case 2: try { try decoder.decodeSingularBoolField(value: &self.isClientMuted) }()
case 2: try { try decoder.decodeSingularBoolField(value: &self.isMuted) }()
default: break
}
}
@ -346,15 +315,15 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
if self.positionPrecision != 0 {
try visitor.visitSingularUInt32Field(value: self.positionPrecision, fieldNumber: 1)
}
if self.isClientMuted != false {
try visitor.visitSingularBoolField(value: self.isClientMuted, fieldNumber: 2)
if self.isMuted != false {
try visitor.visitSingularBoolField(value: self.isMuted, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: ModuleSettings, rhs: ModuleSettings) -> Bool {
if lhs.positionPrecision != rhs.positionPrecision {return false}
if lhs.isClientMuted != rhs.isClientMuted {return false}
if lhs.isMuted != rhs.isMuted {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
@ -362,11 +331,7 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
extension Channel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".Channel"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "index"),
2: .same(proto: "settings"),
3: .same(proto: "role"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}index\0\u{1}settings\0\u{1}role\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -409,9 +374,5 @@ extension Channel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa
}
extension Channel.Role: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "DISABLED"),
1: .same(proto: "PRIMARY"),
2: .same(proto: "SECONDARY"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DISABLED\0\u{1}PRIMARY\0\u{1}SECONDARY\0")
}

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/clientonly.proto
@ -7,7 +8,6 @@
// 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
@ -23,7 +23,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
///
/// This abstraction is used to contain any configuration for provisioning a node on any client.
/// It is useful for importing and exporting configurations.
public struct DeviceProfile {
public struct DeviceProfile: Sendable {
// 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.
@ -130,26 +130,13 @@ public struct DeviceProfile {
fileprivate var _cannedMessages: String? = nil
}
#if swift(>=5.5) && canImport(_Concurrency)
extension DeviceProfile: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension DeviceProfile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".DeviceProfile"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "long_name"),
2: .standard(proto: "short_name"),
3: .standard(proto: "channel_url"),
4: .same(proto: "config"),
5: .standard(proto: "module_config"),
6: .standard(proto: "fixed_position"),
7: .same(proto: "ringtone"),
8: .standard(proto: "canned_messages"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}long_name\0\u{3}short_name\0\u{3}channel_url\0\u{1}config\0\u{3}module_config\0\u{3}fixed_position\0\u{1}ringtone\0\u{3}canned_messages\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/connection_status.proto
@ -7,7 +8,6 @@
// 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
@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
typealias Version = _2
}
public struct DeviceConnectionStatus {
public struct DeviceConnectionStatus: Sendable {
// 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.
@ -81,7 +81,7 @@ public struct DeviceConnectionStatus {
///
/// WiFi connection status
public struct WifiConnectionStatus {
public struct WifiConnectionStatus: Sendable {
// 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.
@ -114,7 +114,7 @@ public struct WifiConnectionStatus {
///
/// Ethernet connection status
public struct EthernetConnectionStatus {
public struct EthernetConnectionStatus: Sendable {
// 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.
@ -139,7 +139,7 @@ public struct EthernetConnectionStatus {
///
/// Ethernet or WiFi connection status
public struct NetworkConnectionStatus {
public struct NetworkConnectionStatus: Sendable {
// 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.
@ -167,7 +167,7 @@ public struct NetworkConnectionStatus {
///
/// Bluetooth connection status
public struct BluetoothConnectionStatus {
public struct BluetoothConnectionStatus: Sendable {
// 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.
@ -191,7 +191,7 @@ public struct BluetoothConnectionStatus {
///
/// Serial connection status
public struct SerialConnectionStatus {
public struct SerialConnectionStatus: Sendable {
// 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.
@ -209,27 +209,13 @@ public struct SerialConnectionStatus {
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension DeviceConnectionStatus: @unchecked Sendable {}
extension WifiConnectionStatus: @unchecked Sendable {}
extension EthernetConnectionStatus: @unchecked Sendable {}
extension NetworkConnectionStatus: @unchecked Sendable {}
extension BluetoothConnectionStatus: @unchecked Sendable {}
extension SerialConnectionStatus: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension DeviceConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".DeviceConnectionStatus"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "wifi"),
2: .same(proto: "ethernet"),
3: .same(proto: "bluetooth"),
4: .same(proto: "serial"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}wifi\0\u{1}ethernet\0\u{1}bluetooth\0\u{1}serial\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -278,11 +264,7 @@ extension DeviceConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageI
extension WifiConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".WifiConnectionStatus"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "status"),
2: .same(proto: "ssid"),
3: .same(proto: "rssi"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}status\0\u{1}ssid\0\u{1}rssi\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -326,9 +308,7 @@ extension WifiConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
extension EthernetConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".EthernetConnectionStatus"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "status"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}status\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -362,12 +342,7 @@ extension EthernetConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Messag
extension NetworkConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".NetworkConnectionStatus"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "ip_address"),
2: .standard(proto: "is_connected"),
3: .standard(proto: "is_mqtt_connected"),
4: .standard(proto: "is_syslog_connected"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}ip_address\0\u{3}is_connected\0\u{3}is_mqtt_connected\0\u{3}is_syslog_connected\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -412,11 +387,7 @@ extension NetworkConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Message
extension BluetoothConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".BluetoothConnectionStatus"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "pin"),
2: .same(proto: "rssi"),
3: .standard(proto: "is_connected"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}pin\0\u{1}rssi\0\u{3}is_connected\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -456,10 +427,7 @@ extension BluetoothConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._Messa
extension SerialConnectionStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".SerialConnectionStatus"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "baud"),
2: .standard(proto: "is_connected"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}baud\0\u{3}is_connected\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/device_ui.proto
@ -20,7 +21,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
typealias Version = _2
}
public enum CompassMode: SwiftProtobuf.Enum {
public enum CompassMode: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -58,22 +59,16 @@ public enum CompassMode: SwiftProtobuf.Enum {
}
}
}
#if swift(>=4.2)
extension CompassMode: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [CompassMode] = [
.dynamic,
.fixedRing,
.freezeHeading,
]
}
#endif // swift(>=4.2)
public enum Theme: SwiftProtobuf.Enum {
public enum Theme: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -111,24 +106,18 @@ public enum Theme: SwiftProtobuf.Enum {
}
}
}
#if swift(>=4.2)
extension Theme: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [Theme] = [
.dark,
.light,
.red,
]
}
#endif // swift(>=4.2)
}
///
/// Localization
public enum Language: SwiftProtobuf.Enum {
public enum Language: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -280,11 +269,6 @@ public enum Language: SwiftProtobuf.Enum {
}
}
}
#if swift(>=4.2)
extension Language: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [Language] = [
.english,
@ -310,11 +294,10 @@ extension Language: CaseIterable {
.simplifiedChinese,
.traditionalChinese,
]
}
#endif // swift(>=4.2)
public struct DeviceUIConfig {
public struct DeviceUIConfig: @unchecked Sendable {
// 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.
@ -462,7 +445,7 @@ public struct DeviceUIConfig {
///
/// How the GPS coordinates are displayed on the OLED screen.
public enum GpsCoordinateFormat: SwiftProtobuf.Enum {
public enum GpsCoordinateFormat: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -532,6 +515,17 @@ public struct DeviceUIConfig {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [DeviceUIConfig.GpsCoordinateFormat] = [
.dec,
.dms,
.utm,
.mgrs,
.olc,
.osgr,
.mls,
]
}
public init() {}
@ -539,24 +533,7 @@ public struct DeviceUIConfig {
fileprivate var _storage = _StorageClass.defaultInstance
}
#if swift(>=4.2)
extension DeviceUIConfig.GpsCoordinateFormat: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [DeviceUIConfig.GpsCoordinateFormat] = [
.dec,
.dms,
.utm,
.mgrs,
.olc,
.osgr,
.mls,
]
}
#endif // swift(>=4.2)
public struct NodeFilter {
public struct NodeFilter: Sendable {
// 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.
@ -594,7 +571,7 @@ public struct NodeFilter {
public init() {}
}
public struct NodeHighlight {
public struct NodeHighlight: Sendable {
// 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.
@ -624,7 +601,7 @@ public struct NodeHighlight {
public init() {}
}
public struct GeoPoint {
public struct GeoPoint: Sendable {
// 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.
@ -646,7 +623,7 @@ public struct GeoPoint {
public init() {}
}
public struct Map {
public struct Map: Sendable {
// 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.
@ -677,88 +654,25 @@ public struct Map {
fileprivate var _home: GeoPoint? = nil
}
#if swift(>=5.5) && canImport(_Concurrency)
extension CompassMode: @unchecked Sendable {}
extension Theme: @unchecked Sendable {}
extension Language: @unchecked Sendable {}
extension DeviceUIConfig: @unchecked Sendable {}
extension DeviceUIConfig.GpsCoordinateFormat: @unchecked Sendable {}
extension NodeFilter: @unchecked Sendable {}
extension NodeHighlight: @unchecked Sendable {}
extension GeoPoint: @unchecked Sendable {}
extension Map: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension CompassMode: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "DYNAMIC"),
1: .same(proto: "FIXED_RING"),
2: .same(proto: "FREEZE_HEADING"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DYNAMIC\0\u{1}FIXED_RING\0\u{1}FREEZE_HEADING\0")
}
extension Theme: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "DARK"),
1: .same(proto: "LIGHT"),
2: .same(proto: "RED"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DARK\0\u{1}LIGHT\0\u{1}RED\0")
}
extension Language: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "ENGLISH"),
1: .same(proto: "FRENCH"),
2: .same(proto: "GERMAN"),
3: .same(proto: "ITALIAN"),
4: .same(proto: "PORTUGUESE"),
5: .same(proto: "SPANISH"),
6: .same(proto: "SWEDISH"),
7: .same(proto: "FINNISH"),
8: .same(proto: "POLISH"),
9: .same(proto: "TURKISH"),
10: .same(proto: "SERBIAN"),
11: .same(proto: "RUSSIAN"),
12: .same(proto: "DUTCH"),
13: .same(proto: "GREEK"),
14: .same(proto: "NORWEGIAN"),
15: .same(proto: "SLOVENIAN"),
16: .same(proto: "UKRAINIAN"),
17: .same(proto: "BULGARIAN"),
18: .same(proto: "CZECH"),
19: .same(proto: "DANISH"),
30: .same(proto: "SIMPLIFIED_CHINESE"),
31: .same(proto: "TRADITIONAL_CHINESE"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0ENGLISH\0\u{1}FRENCH\0\u{1}GERMAN\0\u{1}ITALIAN\0\u{1}PORTUGUESE\0\u{1}SPANISH\0\u{1}SWEDISH\0\u{1}FINNISH\0\u{1}POLISH\0\u{1}TURKISH\0\u{1}SERBIAN\0\u{1}RUSSIAN\0\u{1}DUTCH\0\u{1}GREEK\0\u{1}NORWEGIAN\0\u{1}SLOVENIAN\0\u{1}UKRAINIAN\0\u{1}BULGARIAN\0\u{1}CZECH\0\u{1}DANISH\0\u{2}\u{b}SIMPLIFIED_CHINESE\0\u{1}TRADITIONAL_CHINESE\0")
}
extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".DeviceUIConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "version"),
2: .standard(proto: "screen_brightness"),
3: .standard(proto: "screen_timeout"),
4: .standard(proto: "screen_lock"),
5: .standard(proto: "settings_lock"),
6: .standard(proto: "pin_code"),
7: .same(proto: "theme"),
8: .standard(proto: "alert_enabled"),
9: .standard(proto: "banner_enabled"),
10: .standard(proto: "ring_tone_id"),
11: .same(proto: "language"),
12: .standard(proto: "node_filter"),
13: .standard(proto: "node_highlight"),
14: .standard(proto: "calibration_data"),
15: .standard(proto: "map_data"),
16: .standard(proto: "compass_mode"),
17: .standard(proto: "screen_rgb_color"),
18: .standard(proto: "is_clockface_analog"),
19: .standard(proto: "gps_format"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{3}screen_brightness\0\u{3}screen_timeout\0\u{3}screen_lock\0\u{3}settings_lock\0\u{3}pin_code\0\u{1}theme\0\u{3}alert_enabled\0\u{3}banner_enabled\0\u{3}ring_tone_id\0\u{1}language\0\u{3}node_filter\0\u{3}node_highlight\0\u{3}calibration_data\0\u{3}map_data\0\u{3}compass_mode\0\u{3}screen_rgb_color\0\u{3}is_clockface_analog\0\u{3}gps_format\0")
fileprivate class _StorageClass {
var _version: UInt32 = 0
@ -781,15 +695,11 @@ extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
var _isClockfaceAnalog: Bool = false
var _gpsFormat: DeviceUIConfig.GpsCoordinateFormat = .dec
#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif
private init() {}
@ -957,28 +867,12 @@ extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
}
extension DeviceUIConfig.GpsCoordinateFormat: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "DEC"),
1: .same(proto: "DMS"),
2: .same(proto: "UTM"),
3: .same(proto: "MGRS"),
4: .same(proto: "OLC"),
5: .same(proto: "OSGR"),
6: .same(proto: "MLS"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DEC\0\u{1}DMS\0\u{1}UTM\0\u{1}MGRS\0\u{1}OLC\0\u{1}OSGR\0\u{1}MLS\0")
}
extension NodeFilter: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".NodeFilter"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "unknown_switch"),
2: .standard(proto: "offline_switch"),
3: .standard(proto: "public_key_switch"),
4: .standard(proto: "hops_away"),
5: .standard(proto: "position_switch"),
6: .standard(proto: "node_name"),
7: .same(proto: "channel"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}unknown_switch\0\u{3}offline_switch\0\u{3}public_key_switch\0\u{3}hops_away\0\u{3}position_switch\0\u{3}node_name\0\u{1}channel\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -1038,13 +932,7 @@ extension NodeFilter: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio
extension NodeHighlight: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".NodeHighlight"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "chat_switch"),
2: .standard(proto: "position_switch"),
3: .standard(proto: "telemetry_switch"),
4: .standard(proto: "iaq_switch"),
5: .standard(proto: "node_name"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}chat_switch\0\u{3}position_switch\0\u{3}telemetry_switch\0\u{3}iaq_switch\0\u{3}node_name\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -1094,11 +982,7 @@ extension NodeHighlight: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
extension GeoPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".GeoPoint"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "zoom"),
2: .same(proto: "latitude"),
3: .same(proto: "longitude"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}zoom\0\u{1}latitude\0\u{1}longitude\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -1138,11 +1022,7 @@ extension GeoPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB
extension Map: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".Map"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "home"),
2: .same(proto: "style"),
3: .standard(proto: "follow_gps"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}home\0\u{1}style\0\u{3}follow_gps\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/deviceonly.proto
@ -22,7 +23,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
///
/// Position with static location information only for NodeDBLite
public struct PositionLite {
public struct PositionLite: Sendable {
// 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.
@ -57,13 +58,15 @@ public struct PositionLite {
public init() {}
}
public struct UserLite {
public struct UserLite: Sendable {
// 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 the addr of the radio.
///
/// NOTE: This field was marked as deprecated in the .proto file.
public var macaddr: Data = Data()
///
@ -115,7 +118,7 @@ public struct UserLite {
fileprivate var _isUnmessagable: Bool? = nil
}
public struct NodeInfoLite {
public struct NodeInfoLite: @unchecked Sendable {
// 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.
@ -245,7 +248,7 @@ public struct NodeInfoLite {
/// FIXME, since we write this each time we enter deep sleep (and have infinite
/// flash) it would be better to use some sort of append only data structure for
/// the receive queue and use the preferences store for the other stuff
public struct DeviceState {
public struct DeviceState: @unchecked Sendable {
// 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.
@ -305,6 +308,8 @@ public struct DeviceState {
/// Used only during development.
/// Indicates developer is testing and changes should never be saved to flash.
/// Deprecated in 2.3.1
///
/// NOTE: This field was marked as deprecated in the .proto file.
public var noSave: Bool {
get {return _storage._noSave}
set {_uniqueStorage()._noSave = newValue}
@ -313,6 +318,8 @@ public struct DeviceState {
///
/// Previously used to manage GPS factory resets.
/// Deprecated in 2.5.23
///
/// NOTE: This field was marked as deprecated in the .proto file.
public var didGpsReset: Bool {
get {return _storage._didGpsReset}
set {_uniqueStorage()._didGpsReset = newValue}
@ -345,7 +352,7 @@ public struct DeviceState {
fileprivate var _storage = _StorageClass.defaultInstance
}
public struct NodeDatabase {
public struct NodeDatabase: Sendable {
// 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.
@ -367,7 +374,7 @@ public struct NodeDatabase {
///
/// The on-disk saved channels
public struct ChannelFile {
public struct ChannelFile: Sendable {
// 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.
@ -389,7 +396,7 @@ public struct ChannelFile {
///
/// The on-disk backup of the node's preferences
public struct BackupPreferences {
public struct BackupPreferences: Sendable {
// 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.
@ -456,29 +463,13 @@ public struct BackupPreferences {
fileprivate var _owner: User? = nil
}
#if swift(>=5.5) && canImport(_Concurrency)
extension PositionLite: @unchecked Sendable {}
extension UserLite: @unchecked Sendable {}
extension NodeInfoLite: @unchecked Sendable {}
extension DeviceState: @unchecked Sendable {}
extension NodeDatabase: @unchecked Sendable {}
extension ChannelFile: @unchecked Sendable {}
extension BackupPreferences: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension PositionLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".PositionLite"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "latitude_i"),
2: .standard(proto: "longitude_i"),
3: .same(proto: "altitude"),
4: .same(proto: "time"),
5: .standard(proto: "location_source"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}latitude_i\0\u{3}longitude_i\0\u{1}altitude\0\u{1}time\0\u{3}location_source\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -528,16 +519,7 @@ extension PositionLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
extension UserLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".UserLite"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "macaddr"),
2: .standard(proto: "long_name"),
3: .standard(proto: "short_name"),
4: .standard(proto: "hw_model"),
5: .standard(proto: "is_licensed"),
6: .same(proto: "role"),
7: .standard(proto: "public_key"),
9: .standard(proto: "is_unmessagable"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}macaddr\0\u{3}long_name\0\u{3}short_name\0\u{3}hw_model\0\u{3}is_licensed\0\u{1}role\0\u{3}public_key\0\u{4}\u{2}is_unmessagable\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -606,21 +588,7 @@ extension UserLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB
extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".NodeInfoLite"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "num"),
2: .same(proto: "user"),
3: .same(proto: "position"),
4: .same(proto: "snr"),
5: .standard(proto: "last_heard"),
6: .standard(proto: "device_metrics"),
7: .same(proto: "channel"),
8: .standard(proto: "via_mqtt"),
9: .standard(proto: "hops_away"),
10: .standard(proto: "is_favorite"),
11: .standard(proto: "is_ignored"),
12: .standard(proto: "next_hop"),
13: .same(proto: "bitfield"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}num\0\u{1}user\0\u{1}position\0\u{1}snr\0\u{3}last_heard\0\u{3}device_metrics\0\u{1}channel\0\u{3}via_mqtt\0\u{3}hops_away\0\u{3}is_favorite\0\u{3}is_ignored\0\u{3}next_hop\0\u{1}bitfield\0")
fileprivate class _StorageClass {
var _num: UInt32 = 0
@ -637,15 +605,11 @@ extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
var _nextHop: UInt32 = 0
var _bitfield: UInt32 = 0
#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif
private init() {}
@ -715,7 +679,7 @@ extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
try { if let v = _storage._position {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
if _storage._snr != 0 {
if _storage._snr.bitPattern != 0 {
try visitor.visitSingularFloatField(value: _storage._snr, fieldNumber: 4)
}
if _storage._lastHeard != 0 {
@ -778,17 +742,7 @@ extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
extension DeviceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".DeviceState"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
2: .standard(proto: "my_node"),
3: .same(proto: "owner"),
5: .standard(proto: "receive_queue"),
8: .same(proto: "version"),
7: .standard(proto: "rx_text_message"),
9: .standard(proto: "no_save"),
11: .standard(proto: "did_gps_reset"),
12: .standard(proto: "rx_waypoint"),
13: .standard(proto: "node_remote_hardware_pins"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{4}\u{2}my_node\0\u{1}owner\0\u{4}\u{2}receive_queue\0\u{4}\u{2}rx_text_message\0\u{1}version\0\u{3}no_save\0\u{4}\u{2}did_gps_reset\0\u{3}rx_waypoint\0\u{3}node_remote_hardware_pins\0")
fileprivate class _StorageClass {
var _myNode: MyNodeInfo? = nil
@ -801,15 +755,11 @@ extension DeviceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
var _rxWaypoint: MeshPacket? = nil
var _nodeRemoteHardwarePins: [NodeRemoteHardwarePin] = []
#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif
private init() {}
@ -918,10 +868,7 @@ extension DeviceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
extension NodeDatabase: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".NodeDatabase"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "version"),
2: .same(proto: "nodes"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}nodes\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -956,10 +903,7 @@ extension NodeDatabase: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
extension ChannelFile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".ChannelFile"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "channels"),
2: .same(proto: "version"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}channels\0\u{1}version\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -994,14 +938,7 @@ extension ChannelFile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
extension BackupPreferences: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".BackupPreferences"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "version"),
2: .same(proto: "timestamp"),
3: .same(proto: "config"),
4: .standard(proto: "module_config"),
5: .same(proto: "channels"),
6: .same(proto: "owner"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}timestamp\0\u{1}config\0\u{3}module_config\0\u{1}channels\0\u{1}owner\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/interdevice.proto
@ -7,7 +8,6 @@
// 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
@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
typealias Version = _2
}
public enum MessageType: SwiftProtobuf.Enum {
public enum MessageType: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
case ack // = 0
@ -82,11 +82,6 @@ public enum MessageType: SwiftProtobuf.Enum {
}
}
}
#if swift(>=4.2)
extension MessageType: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [MessageType] = [
.ack,
@ -102,11 +97,10 @@ extension MessageType: CaseIterable {
.aht20Humidity,
.tvocIndex,
]
}
#endif // swift(>=4.2)
public struct SensorData {
public struct SensorData: Sendable {
// 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.
@ -136,34 +130,16 @@ public struct SensorData {
public var unknownFields = SwiftProtobuf.UnknownStorage()
/// The sensor data, either as a float or an uint32
public enum OneOf_Data: Equatable {
public enum OneOf_Data: Equatable, Sendable {
case floatValue(Float)
case uint32Value(UInt32)
#if !swift(>=4.1)
public static func ==(lhs: SensorData.OneOf_Data, rhs: SensorData.OneOf_Data) -> 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 (.floatValue, .floatValue): return {
guard case .floatValue(let l) = lhs, case .floatValue(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.uint32Value, .uint32Value): return {
guard case .uint32Value(let l) = lhs, case .uint32Value(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
}
public struct InterdeviceMessage {
public struct InterdeviceMessage: Sendable {
// 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.
@ -190,69 +166,26 @@ public struct InterdeviceMessage {
public var unknownFields = SwiftProtobuf.UnknownStorage()
/// The message data
public enum OneOf_Data: Equatable {
public enum OneOf_Data: Equatable, Sendable {
case nmea(String)
case sensor(SensorData)
#if !swift(>=4.1)
public static func ==(lhs: InterdeviceMessage.OneOf_Data, rhs: InterdeviceMessage.OneOf_Data) -> 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 (.nmea, .nmea): return {
guard case .nmea(let l) = lhs, case .nmea(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.sensor, .sensor): return {
guard case .sensor(let l) = lhs, case .sensor(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension MessageType: @unchecked Sendable {}
extension SensorData: @unchecked Sendable {}
extension SensorData.OneOf_Data: @unchecked Sendable {}
extension InterdeviceMessage: @unchecked Sendable {}
extension InterdeviceMessage.OneOf_Data: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension MessageType: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "ACK"),
160: .same(proto: "COLLECT_INTERVAL"),
161: .same(proto: "BEEP_ON"),
162: .same(proto: "BEEP_OFF"),
163: .same(proto: "SHUTDOWN"),
164: .same(proto: "POWER_ON"),
176: .same(proto: "SCD41_TEMP"),
177: .same(proto: "SCD41_HUMIDITY"),
178: .same(proto: "SCD41_CO2"),
179: .same(proto: "AHT20_TEMP"),
180: .same(proto: "AHT20_HUMIDITY"),
181: .same(proto: "TVOC_INDEX"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0ACK\0\u{2}`\u{2}COLLECT_INTERVAL\0\u{1}BEEP_ON\0\u{1}BEEP_OFF\0\u{1}SHUTDOWN\0\u{1}POWER_ON\0\u{2}\u{c}SCD41_TEMP\0\u{1}SCD41_HUMIDITY\0\u{1}SCD41_CO2\0\u{1}AHT20_TEMP\0\u{1}AHT20_HUMIDITY\0\u{1}TVOC_INDEX\0")
}
extension SensorData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".SensorData"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "type"),
2: .standard(proto: "float_value"),
3: .standard(proto: "uint32_value"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}float_value\0\u{3}uint32_value\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -314,10 +247,7 @@ extension SensorData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio
extension InterdeviceMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".InterdeviceMessage"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "nmea"),
2: .same(proto: "sensor"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}nmea\0\u{1}sensor\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/localonly.proto
@ -7,7 +8,6 @@
// 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
@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
typealias Version = _2
}
public struct LocalConfig {
public struct LocalConfig: @unchecked Sendable {
// 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.
@ -129,7 +129,7 @@ public struct LocalConfig {
fileprivate var _storage = _StorageClass.defaultInstance
}
public struct LocalModuleConfig {
public struct LocalModuleConfig: @unchecked Sendable {
// 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.
@ -293,28 +293,13 @@ public struct LocalModuleConfig {
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.
fileprivate let _protobuf_package = "meshtastic"
extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".LocalConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "device"),
2: .same(proto: "position"),
3: .same(proto: "power"),
4: .same(proto: "network"),
5: .same(proto: "display"),
6: .same(proto: "lora"),
7: .same(proto: "bluetooth"),
8: .same(proto: "version"),
9: .same(proto: "security"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}device\0\u{1}position\0\u{1}power\0\u{1}network\0\u{1}display\0\u{1}lora\0\u{1}bluetooth\0\u{1}version\0\u{1}security\0")
fileprivate class _StorageClass {
var _device: Config.DeviceConfig? = nil
@ -327,15 +312,11 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
var _version: UInt32 = 0
var _security: Config.SecurityConfig? = nil
#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif
private init() {}
@ -444,22 +425,7 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
extension LocalModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".LocalModuleConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "mqtt"),
2: .same(proto: "serial"),
3: .standard(proto: "external_notification"),
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"),
11: .standard(proto: "neighbor_info"),
12: .standard(proto: "ambient_lighting"),
13: .standard(proto: "detection_sensor"),
14: .same(proto: "paxcounter"),
8: .same(proto: "version"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}mqtt\0\u{1}serial\0\u{3}external_notification\0\u{3}store_forward\0\u{3}range_test\0\u{1}telemetry\0\u{3}canned_message\0\u{1}version\0\u{1}audio\0\u{3}remote_hardware\0\u{3}neighbor_info\0\u{3}ambient_lighting\0\u{3}detection_sensor\0\u{1}paxcounter\0")
fileprivate class _StorageClass {
var _mqtt: ModuleConfig.MQTTConfig? = nil
@ -477,15 +443,11 @@ extension LocalModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
var _paxcounter: ModuleConfig.PaxcounterConfig? = nil
var _version: UInt32 = 0
#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif
private init() {}

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/module_config.proto
@ -7,7 +8,6 @@
// 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
@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
typealias Version = _2
}
public enum RemoteHardwarePinType: SwiftProtobuf.Enum {
public enum RemoteHardwarePinType: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -58,24 +58,18 @@ public enum RemoteHardwarePinType: SwiftProtobuf.Enum {
}
}
}
#if swift(>=4.2)
extension RemoteHardwarePinType: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [RemoteHardwarePinType] = [
.unknown,
.digitalRead,
.digitalWrite,
]
}
#endif // swift(>=4.2)
}
///
/// Module Config
public struct ModuleConfig {
public struct ModuleConfig: Sendable {
// 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.
@ -218,7 +212,7 @@ public struct ModuleConfig {
///
/// TODO: REPLACE
public enum OneOf_PayloadVariant: Equatable {
public enum OneOf_PayloadVariant: Equatable, Sendable {
///
/// TODO: REPLACE
case mqtt(ModuleConfig.MQTTConfig)
@ -259,73 +253,11 @@ public struct ModuleConfig {
/// TODO: REPLACE
case paxcounter(ModuleConfig.PaxcounterConfig)
#if !swift(>=4.1)
public static func ==(lhs: ModuleConfig.OneOf_PayloadVariant, rhs: ModuleConfig.OneOf_PayloadVariant) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.mqtt, .mqtt): return {
guard case .mqtt(let l) = lhs, case .mqtt(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.serial, .serial): return {
guard case .serial(let l) = lhs, case .serial(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.externalNotification, .externalNotification): return {
guard case .externalNotification(let l) = lhs, case .externalNotification(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.storeForward, .storeForward): return {
guard case .storeForward(let l) = lhs, case .storeForward(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.rangeTest, .rangeTest): return {
guard case .rangeTest(let l) = lhs, case .rangeTest(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.telemetry, .telemetry): return {
guard case .telemetry(let l) = lhs, case .telemetry(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.cannedMessage, .cannedMessage): return {
guard case .cannedMessage(let l) = lhs, case .cannedMessage(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.audio, .audio): return {
guard case .audio(let l) = lhs, case .audio(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.remoteHardware, .remoteHardware): return {
guard case .remoteHardware(let l) = lhs, case .remoteHardware(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.neighborInfo, .neighborInfo): return {
guard case .neighborInfo(let l) = lhs, case .neighborInfo(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.ambientLighting, .ambientLighting): return {
guard case .ambientLighting(let l) = lhs, case .ambientLighting(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.detectionSensor, .detectionSensor): return {
guard case .detectionSensor(let l) = lhs, case .detectionSensor(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.paxcounter, .paxcounter): return {
guard case .paxcounter(let l) = lhs, case .paxcounter(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
///
/// MQTT Client Config
public struct MQTTConfig {
public struct MQTTConfig: Sendable {
// 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.
@ -400,7 +332,7 @@ public struct ModuleConfig {
///
/// Settings for reporting unencrypted information about our node to a map via MQTT
public struct MapReportSettings {
public struct MapReportSettings: Sendable {
// 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.
@ -424,7 +356,7 @@ public struct ModuleConfig {
///
/// RemoteHardwareModule Config
public struct RemoteHardwareConfig {
public struct RemoteHardwareConfig: Sendable {
// 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.
@ -448,7 +380,7 @@ public struct ModuleConfig {
///
/// NeighborInfoModule Config
public struct NeighborInfoConfig {
public struct NeighborInfoConfig: Sendable {
// 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.
@ -474,7 +406,7 @@ public struct ModuleConfig {
///
/// Detection Sensor Module Config
public struct DetectionSensorConfig {
public struct DetectionSensorConfig: Sendable {
// 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.
@ -521,7 +453,7 @@ public struct ModuleConfig {
public var unknownFields = SwiftProtobuf.UnknownStorage()
public enum TriggerType: SwiftProtobuf.Enum {
public enum TriggerType: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
/// Event is triggered if pin is low
@ -573,6 +505,16 @@ public struct ModuleConfig {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [ModuleConfig.DetectionSensorConfig.TriggerType] = [
.logicLow,
.logicHigh,
.fallingEdge,
.risingEdge,
.eitherEdgeActiveLow,
.eitherEdgeActiveHigh,
]
}
public init() {}
@ -580,7 +522,7 @@ public struct ModuleConfig {
///
/// Audio Config for codec2 voice
public struct AudioConfig {
public struct AudioConfig: Sendable {
// 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.
@ -617,7 +559,7 @@ public struct ModuleConfig {
///
/// Baudrate for codec2 voice
public enum Audio_Baud: SwiftProtobuf.Enum {
public enum Audio_Baud: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
case codec2Default // = 0
case codec23200 // = 1
@ -664,6 +606,19 @@ public struct ModuleConfig {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [ModuleConfig.AudioConfig.Audio_Baud] = [
.codec2Default,
.codec23200,
.codec22400,
.codec21600,
.codec21400,
.codec21300,
.codec21200,
.codec2700,
.codec2700B,
]
}
public init() {}
@ -671,7 +626,7 @@ public struct ModuleConfig {
///
/// Config for the Paxcounter Module
public struct PaxcounterConfig {
public struct PaxcounterConfig: Sendable {
// 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.
@ -697,7 +652,7 @@ public struct ModuleConfig {
///
/// Serial Config
public struct SerialConfig {
public struct SerialConfig: Sendable {
// 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.
@ -740,7 +695,7 @@ public struct ModuleConfig {
///
/// TODO: REPLACE
public enum Serial_Baud: SwiftProtobuf.Enum {
public enum Serial_Baud: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
case baudDefault // = 0
case baud110 // = 1
@ -808,11 +763,31 @@ public struct ModuleConfig {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [ModuleConfig.SerialConfig.Serial_Baud] = [
.baudDefault,
.baud110,
.baud300,
.baud600,
.baud1200,
.baud2400,
.baud4800,
.baud9600,
.baud19200,
.baud38400,
.baud57600,
.baud115200,
.baud230400,
.baud460800,
.baud576000,
.baud921600,
]
}
///
/// TODO: REPLACE
public enum Serial_Mode: SwiftProtobuf.Enum {
public enum Serial_Mode: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
case `default` // = 0
case simple // = 1
@ -869,6 +844,19 @@ public struct ModuleConfig {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [ModuleConfig.SerialConfig.Serial_Mode] = [
.default,
.simple,
.proto,
.textmsg,
.nmea,
.caltopo,
.ws85,
.veDirect,
.msConfig,
]
}
public init() {}
@ -876,7 +864,7 @@ public struct ModuleConfig {
///
/// External Notifications Config
public struct ExternalNotificationConfig {
public struct ExternalNotificationConfig: Sendable {
// 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.
@ -959,7 +947,7 @@ public struct ModuleConfig {
///
/// Store and Forward Module Config
public struct StoreForwardConfig {
public struct StoreForwardConfig: Sendable {
// 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.
@ -995,7 +983,7 @@ public struct ModuleConfig {
///
/// Preferences for the RangeTestModule
public struct RangeTestConfig {
public struct RangeTestConfig: Sendable {
// 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.
@ -1025,7 +1013,7 @@ public struct ModuleConfig {
///
/// Configuration for both device and environment metrics
public struct TelemetryConfig {
public struct TelemetryConfig: Sendable {
// 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.
@ -1099,7 +1087,7 @@ public struct ModuleConfig {
///
/// Canned Messages Module Config
public struct CannedMessageConfig {
public struct CannedMessageConfig: Sendable {
// 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.
@ -1138,11 +1126,15 @@ public struct ModuleConfig {
///
/// Enable/disable CannedMessageModule.
///
/// NOTE: This field was marked as deprecated in the .proto file.
public var enabled: Bool = false
///
/// Input event origin accepted by the canned message module.
/// Can be e.g. "rotEnc1", "upDownEnc1", "scanAndSelect", "cardkb", "serialkb", or keyword "_any"
///
/// NOTE: This field was marked as deprecated in the .proto file.
public var allowInputSource: String = String()
///
@ -1154,7 +1146,7 @@ public struct ModuleConfig {
///
/// TODO: REPLACE
public enum InputEventChar: SwiftProtobuf.Enum {
public enum InputEventChar: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -1222,6 +1214,18 @@ public struct ModuleConfig {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [ModuleConfig.CannedMessageConfig.InputEventChar] = [
.none,
.up,
.down,
.left,
.right,
.select,
.back,
.cancel,
]
}
public init() {}
@ -1230,7 +1234,7 @@ public struct ModuleConfig {
///
///Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels.
///Initially created for the RAK14001 RGB LED module.
public struct AmbientLightingConfig {
public struct AmbientLightingConfig: Sendable {
// 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.
@ -1263,91 +1267,9 @@ public struct ModuleConfig {
public init() {}
}
#if swift(>=4.2)
extension ModuleConfig.DetectionSensorConfig.TriggerType: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [ModuleConfig.DetectionSensorConfig.TriggerType] = [
.logicLow,
.logicHigh,
.fallingEdge,
.risingEdge,
.eitherEdgeActiveLow,
.eitherEdgeActiveHigh,
]
}
extension ModuleConfig.AudioConfig.Audio_Baud: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [ModuleConfig.AudioConfig.Audio_Baud] = [
.codec2Default,
.codec23200,
.codec22400,
.codec21600,
.codec21400,
.codec21300,
.codec21200,
.codec2700,
.codec2700B,
]
}
extension ModuleConfig.SerialConfig.Serial_Baud: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [ModuleConfig.SerialConfig.Serial_Baud] = [
.baudDefault,
.baud110,
.baud300,
.baud600,
.baud1200,
.baud2400,
.baud4800,
.baud9600,
.baud19200,
.baud38400,
.baud57600,
.baud115200,
.baud230400,
.baud460800,
.baud576000,
.baud921600,
]
}
extension ModuleConfig.SerialConfig.Serial_Mode: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [ModuleConfig.SerialConfig.Serial_Mode] = [
.default,
.simple,
.proto,
.textmsg,
.nmea,
.caltopo,
.ws85,
.veDirect,
.msConfig,
]
}
extension ModuleConfig.CannedMessageConfig.InputEventChar: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [ModuleConfig.CannedMessageConfig.InputEventChar] = [
.none,
.up,
.down,
.left,
.right,
.select,
.back,
.cancel,
]
}
#endif // swift(>=4.2)
///
/// A GPIO pin definition for remote hardware module
public struct RemoteHardwarePin {
public struct RemoteHardwarePin: Sendable {
// 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.
@ -1369,61 +1291,17 @@ public struct RemoteHardwarePin {
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension RemoteHardwarePinType: @unchecked Sendable {}
extension ModuleConfig: @unchecked Sendable {}
extension ModuleConfig.OneOf_PayloadVariant: @unchecked Sendable {}
extension ModuleConfig.MQTTConfig: @unchecked Sendable {}
extension ModuleConfig.MapReportSettings: @unchecked Sendable {}
extension ModuleConfig.RemoteHardwareConfig: @unchecked Sendable {}
extension ModuleConfig.NeighborInfoConfig: @unchecked Sendable {}
extension ModuleConfig.DetectionSensorConfig: @unchecked Sendable {}
extension ModuleConfig.DetectionSensorConfig.TriggerType: @unchecked Sendable {}
extension ModuleConfig.AudioConfig: @unchecked Sendable {}
extension ModuleConfig.AudioConfig.Audio_Baud: @unchecked Sendable {}
extension ModuleConfig.PaxcounterConfig: @unchecked Sendable {}
extension ModuleConfig.SerialConfig: @unchecked Sendable {}
extension ModuleConfig.SerialConfig.Serial_Baud: @unchecked Sendable {}
extension ModuleConfig.SerialConfig.Serial_Mode: @unchecked Sendable {}
extension ModuleConfig.ExternalNotificationConfig: @unchecked Sendable {}
extension ModuleConfig.StoreForwardConfig: @unchecked Sendable {}
extension ModuleConfig.RangeTestConfig: @unchecked Sendable {}
extension ModuleConfig.TelemetryConfig: @unchecked Sendable {}
extension ModuleConfig.CannedMessageConfig: @unchecked Sendable {}
extension ModuleConfig.CannedMessageConfig.InputEventChar: @unchecked Sendable {}
extension ModuleConfig.AmbientLightingConfig: @unchecked Sendable {}
extension RemoteHardwarePin: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension RemoteHardwarePinType: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "UNKNOWN"),
1: .same(proto: "DIGITAL_READ"),
2: .same(proto: "DIGITAL_WRITE"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}DIGITAL_READ\0\u{1}DIGITAL_WRITE\0")
}
extension ModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".ModuleConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "mqtt"),
2: .same(proto: "serial"),
3: .standard(proto: "external_notification"),
4: .standard(proto: "store_forward"),
5: .standard(proto: "range_test"),
6: .same(proto: "telemetry"),
7: .standard(proto: "canned_message"),
8: .same(proto: "audio"),
9: .standard(proto: "remote_hardware"),
10: .standard(proto: "neighbor_info"),
11: .standard(proto: "ambient_lighting"),
12: .standard(proto: "detection_sensor"),
13: .same(proto: "paxcounter"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}mqtt\0\u{1}serial\0\u{3}external_notification\0\u{3}store_forward\0\u{3}range_test\0\u{1}telemetry\0\u{3}canned_message\0\u{1}audio\0\u{3}remote_hardware\0\u{3}neighbor_info\0\u{3}ambient_lighting\0\u{3}detection_sensor\0\u{1}paxcounter\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -1677,19 +1555,7 @@ extension ModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
extension ModuleConfig.MQTTConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".MQTTConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "enabled"),
2: .same(proto: "address"),
3: .same(proto: "username"),
4: .same(proto: "password"),
5: .standard(proto: "encryption_enabled"),
6: .standard(proto: "json_enabled"),
7: .standard(proto: "tls_enabled"),
8: .same(proto: "root"),
9: .standard(proto: "proxy_to_client_enabled"),
10: .standard(proto: "map_reporting_enabled"),
11: .standard(proto: "map_report_settings"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}enabled\0\u{1}address\0\u{1}username\0\u{1}password\0\u{3}encryption_enabled\0\u{3}json_enabled\0\u{3}tls_enabled\0\u{1}root\0\u{3}proxy_to_client_enabled\0\u{3}map_reporting_enabled\0\u{3}map_report_settings\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -1773,11 +1639,7 @@ extension ModuleConfig.MQTTConfig: SwiftProtobuf.Message, SwiftProtobuf._Message
extension ModuleConfig.MapReportSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".MapReportSettings"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "publish_interval_secs"),
2: .standard(proto: "position_precision"),
3: .standard(proto: "should_report_location"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}publish_interval_secs\0\u{3}position_precision\0\u{3}should_report_location\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -1817,11 +1679,7 @@ extension ModuleConfig.MapReportSettings: SwiftProtobuf.Message, SwiftProtobuf._
extension ModuleConfig.RemoteHardwareConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".RemoteHardwareConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "enabled"),
2: .standard(proto: "allow_undefined_pin_access"),
3: .standard(proto: "available_pins"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}enabled\0\u{3}allow_undefined_pin_access\0\u{3}available_pins\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -1861,11 +1719,7 @@ extension ModuleConfig.RemoteHardwareConfig: SwiftProtobuf.Message, SwiftProtobu
extension ModuleConfig.NeighborInfoConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".NeighborInfoConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "enabled"),
2: .standard(proto: "update_interval"),
3: .standard(proto: "transmit_over_lora"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}enabled\0\u{3}update_interval\0\u{3}transmit_over_lora\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -1905,16 +1759,7 @@ extension ModuleConfig.NeighborInfoConfig: SwiftProtobuf.Message, SwiftProtobuf.
extension ModuleConfig.DetectionSensorConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".DetectionSensorConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "enabled"),
2: .standard(proto: "minimum_broadcast_secs"),
3: .standard(proto: "state_broadcast_secs"),
4: .standard(proto: "send_bell"),
5: .same(proto: "name"),
6: .standard(proto: "monitor_pin"),
7: .standard(proto: "detection_trigger_type"),
8: .standard(proto: "use_pullup"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}enabled\0\u{3}minimum_broadcast_secs\0\u{3}state_broadcast_secs\0\u{3}send_bell\0\u{1}name\0\u{3}monitor_pin\0\u{3}detection_trigger_type\0\u{3}use_pullup\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -1978,27 +1823,12 @@ extension ModuleConfig.DetectionSensorConfig: SwiftProtobuf.Message, SwiftProtob
}
extension ModuleConfig.DetectionSensorConfig.TriggerType: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "LOGIC_LOW"),
1: .same(proto: "LOGIC_HIGH"),
2: .same(proto: "FALLING_EDGE"),
3: .same(proto: "RISING_EDGE"),
4: .same(proto: "EITHER_EDGE_ACTIVE_LOW"),
5: .same(proto: "EITHER_EDGE_ACTIVE_HIGH"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0LOGIC_LOW\0\u{1}LOGIC_HIGH\0\u{1}FALLING_EDGE\0\u{1}RISING_EDGE\0\u{1}EITHER_EDGE_ACTIVE_LOW\0\u{1}EITHER_EDGE_ACTIVE_HIGH\0")
}
extension ModuleConfig.AudioConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".AudioConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "codec2_enabled"),
2: .standard(proto: "ptt_pin"),
3: .same(proto: "bitrate"),
4: .standard(proto: "i2s_ws"),
5: .standard(proto: "i2s_sd"),
6: .standard(proto: "i2s_din"),
7: .standard(proto: "i2s_sck"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}codec2_enabled\0\u{3}ptt_pin\0\u{1}bitrate\0\u{3}i2s_ws\0\u{3}i2s_sd\0\u{3}i2s_din\0\u{3}i2s_sck\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2057,27 +1887,12 @@ extension ModuleConfig.AudioConfig: SwiftProtobuf.Message, SwiftProtobuf._Messag
}
extension ModuleConfig.AudioConfig.Audio_Baud: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "CODEC2_DEFAULT"),
1: .same(proto: "CODEC2_3200"),
2: .same(proto: "CODEC2_2400"),
3: .same(proto: "CODEC2_1600"),
4: .same(proto: "CODEC2_1400"),
5: .same(proto: "CODEC2_1300"),
6: .same(proto: "CODEC2_1200"),
7: .same(proto: "CODEC2_700"),
8: .same(proto: "CODEC2_700B"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0CODEC2_DEFAULT\0\u{1}CODEC2_3200\0\u{1}CODEC2_2400\0\u{1}CODEC2_1600\0\u{1}CODEC2_1400\0\u{1}CODEC2_1300\0\u{1}CODEC2_1200\0\u{1}CODEC2_700\0\u{1}CODEC2_700B\0")
}
extension ModuleConfig.PaxcounterConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".PaxcounterConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "enabled"),
2: .standard(proto: "paxcounter_update_interval"),
3: .standard(proto: "wifi_threshold"),
4: .standard(proto: "ble_threshold"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}enabled\0\u{3}paxcounter_update_interval\0\u{3}wifi_threshold\0\u{3}ble_threshold\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2122,16 +1937,7 @@ extension ModuleConfig.PaxcounterConfig: SwiftProtobuf.Message, SwiftProtobuf._M
extension ModuleConfig.SerialConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".SerialConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "enabled"),
2: .same(proto: "echo"),
3: .same(proto: "rxd"),
4: .same(proto: "txd"),
5: .same(proto: "baud"),
6: .same(proto: "timeout"),
7: .same(proto: "mode"),
8: .standard(proto: "override_console_serial_port"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}enabled\0\u{1}echo\0\u{1}rxd\0\u{1}txd\0\u{1}baud\0\u{1}timeout\0\u{1}mode\0\u{3}override_console_serial_port\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2195,59 +2001,16 @@ extension ModuleConfig.SerialConfig: SwiftProtobuf.Message, SwiftProtobuf._Messa
}
extension ModuleConfig.SerialConfig.Serial_Baud: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "BAUD_DEFAULT"),
1: .same(proto: "BAUD_110"),
2: .same(proto: "BAUD_300"),
3: .same(proto: "BAUD_600"),
4: .same(proto: "BAUD_1200"),
5: .same(proto: "BAUD_2400"),
6: .same(proto: "BAUD_4800"),
7: .same(proto: "BAUD_9600"),
8: .same(proto: "BAUD_19200"),
9: .same(proto: "BAUD_38400"),
10: .same(proto: "BAUD_57600"),
11: .same(proto: "BAUD_115200"),
12: .same(proto: "BAUD_230400"),
13: .same(proto: "BAUD_460800"),
14: .same(proto: "BAUD_576000"),
15: .same(proto: "BAUD_921600"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0BAUD_DEFAULT\0\u{1}BAUD_110\0\u{1}BAUD_300\0\u{1}BAUD_600\0\u{1}BAUD_1200\0\u{1}BAUD_2400\0\u{1}BAUD_4800\0\u{1}BAUD_9600\0\u{1}BAUD_19200\0\u{1}BAUD_38400\0\u{1}BAUD_57600\0\u{1}BAUD_115200\0\u{1}BAUD_230400\0\u{1}BAUD_460800\0\u{1}BAUD_576000\0\u{1}BAUD_921600\0")
}
extension ModuleConfig.SerialConfig.Serial_Mode: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "DEFAULT"),
1: .same(proto: "SIMPLE"),
2: .same(proto: "PROTO"),
3: .same(proto: "TEXTMSG"),
4: .same(proto: "NMEA"),
5: .same(proto: "CALTOPO"),
6: .same(proto: "WS85"),
7: .same(proto: "VE_DIRECT"),
8: .same(proto: "MS_CONFIG"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DEFAULT\0\u{1}SIMPLE\0\u{1}PROTO\0\u{1}TEXTMSG\0\u{1}NMEA\0\u{1}CALTOPO\0\u{1}WS85\0\u{1}VE_DIRECT\0\u{1}MS_CONFIG\0")
}
extension ModuleConfig.ExternalNotificationConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".ExternalNotificationConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "enabled"),
2: .standard(proto: "output_ms"),
3: .same(proto: "output"),
8: .standard(proto: "output_vibra"),
9: .standard(proto: "output_buzzer"),
4: .same(proto: "active"),
5: .standard(proto: "alert_message"),
10: .standard(proto: "alert_message_vibra"),
11: .standard(proto: "alert_message_buzzer"),
6: .standard(proto: "alert_bell"),
12: .standard(proto: "alert_bell_vibra"),
13: .standard(proto: "alert_bell_buzzer"),
7: .standard(proto: "use_pwm"),
14: .standard(proto: "nag_timeout"),
15: .standard(proto: "use_i2s_as_buzzer"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}enabled\0\u{3}output_ms\0\u{1}output\0\u{1}active\0\u{3}alert_message\0\u{3}alert_bell\0\u{3}use_pwm\0\u{3}output_vibra\0\u{3}output_buzzer\0\u{3}alert_message_vibra\0\u{3}alert_message_buzzer\0\u{3}alert_bell_vibra\0\u{3}alert_bell_buzzer\0\u{3}nag_timeout\0\u{3}use_i2s_as_buzzer\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2347,14 +2110,7 @@ extension ModuleConfig.ExternalNotificationConfig: SwiftProtobuf.Message, SwiftP
extension ModuleConfig.StoreForwardConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".StoreForwardConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "enabled"),
2: .same(proto: "heartbeat"),
3: .same(proto: "records"),
4: .standard(proto: "history_return_max"),
5: .standard(proto: "history_return_window"),
6: .standard(proto: "is_server"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}enabled\0\u{1}heartbeat\0\u{1}records\0\u{3}history_return_max\0\u{3}history_return_window\0\u{3}is_server\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2409,12 +2165,7 @@ extension ModuleConfig.StoreForwardConfig: SwiftProtobuf.Message, SwiftProtobuf.
extension ModuleConfig.RangeTestConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".RangeTestConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "enabled"),
2: .same(proto: "sender"),
3: .same(proto: "save"),
4: .standard(proto: "clear_on_reboot"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}enabled\0\u{1}sender\0\u{1}save\0\u{3}clear_on_reboot\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2459,22 +2210,7 @@ extension ModuleConfig.RangeTestConfig: SwiftProtobuf.Message, SwiftProtobuf._Me
extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".TelemetryConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "device_update_interval"),
2: .standard(proto: "environment_update_interval"),
3: .standard(proto: "environment_measurement_enabled"),
4: .standard(proto: "environment_screen_enabled"),
5: .standard(proto: "environment_display_fahrenheit"),
6: .standard(proto: "air_quality_enabled"),
7: .standard(proto: "air_quality_interval"),
8: .standard(proto: "power_measurement_enabled"),
9: .standard(proto: "power_update_interval"),
10: .standard(proto: "power_screen_enabled"),
11: .standard(proto: "health_measurement_enabled"),
12: .standard(proto: "health_update_interval"),
13: .standard(proto: "health_screen_enabled"),
14: .standard(proto: "device_telemetry_enabled"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}device_update_interval\0\u{3}environment_update_interval\0\u{3}environment_measurement_enabled\0\u{3}environment_screen_enabled\0\u{3}environment_display_fahrenheit\0\u{3}air_quality_enabled\0\u{3}air_quality_interval\0\u{3}power_measurement_enabled\0\u{3}power_update_interval\0\u{3}power_screen_enabled\0\u{3}health_measurement_enabled\0\u{3}health_update_interval\0\u{3}health_screen_enabled\0\u{3}device_telemetry_enabled\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2569,19 +2305,7 @@ extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._Me
extension ModuleConfig.CannedMessageConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".CannedMessageConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "rotary1_enabled"),
2: .standard(proto: "inputbroker_pin_a"),
3: .standard(proto: "inputbroker_pin_b"),
4: .standard(proto: "inputbroker_pin_press"),
5: .standard(proto: "inputbroker_event_cw"),
6: .standard(proto: "inputbroker_event_ccw"),
7: .standard(proto: "inputbroker_event_press"),
8: .standard(proto: "updown1_enabled"),
9: .same(proto: "enabled"),
10: .standard(proto: "allow_input_source"),
11: .standard(proto: "send_bell"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}rotary1_enabled\0\u{3}inputbroker_pin_a\0\u{3}inputbroker_pin_b\0\u{3}inputbroker_pin_press\0\u{3}inputbroker_event_cw\0\u{3}inputbroker_event_ccw\0\u{3}inputbroker_event_press\0\u{3}updown1_enabled\0\u{1}enabled\0\u{3}allow_input_source\0\u{3}send_bell\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2660,27 +2384,12 @@ extension ModuleConfig.CannedMessageConfig: SwiftProtobuf.Message, SwiftProtobuf
}
extension ModuleConfig.CannedMessageConfig.InputEventChar: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "NONE"),
10: .same(proto: "SELECT"),
17: .same(proto: "UP"),
18: .same(proto: "DOWN"),
19: .same(proto: "LEFT"),
20: .same(proto: "RIGHT"),
24: .same(proto: "CANCEL"),
27: .same(proto: "BACK"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0NONE\0\u{2}\u{a}SELECT\0\u{2}\u{7}UP\0\u{1}DOWN\0\u{1}LEFT\0\u{1}RIGHT\0\u{2}\u{4}CANCEL\0\u{2}\u{3}BACK\0")
}
extension ModuleConfig.AmbientLightingConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = ModuleConfig.protoMessageName + ".AmbientLightingConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "led_state"),
2: .same(proto: "current"),
3: .same(proto: "red"),
4: .same(proto: "green"),
5: .same(proto: "blue"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}led_state\0\u{1}current\0\u{1}red\0\u{1}green\0\u{1}blue\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2730,11 +2439,7 @@ extension ModuleConfig.AmbientLightingConfig: SwiftProtobuf.Message, SwiftProtob
extension RemoteHardwarePin: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".RemoteHardwarePin"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "gpio_pin"),
2: .same(proto: "name"),
3: .same(proto: "type"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}gpio_pin\0\u{1}name\0\u{1}type\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/mqtt.proto
@ -7,7 +8,6 @@
// 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
@ -22,7 +22,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
///
/// This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
public struct ServiceEnvelope {
public struct ServiceEnvelope: Sendable {
// 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.
@ -57,7 +57,7 @@ public struct ServiceEnvelope {
///
/// Information about a node intended to be reported unencrypted to a map using MQTT.
public struct MapReport {
public struct MapReport: Sendable {
// 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.
@ -126,22 +126,13 @@ public struct MapReport {
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension ServiceEnvelope: @unchecked Sendable {}
extension MapReport: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension ServiceEnvelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".ServiceEnvelope"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "packet"),
2: .standard(proto: "channel_id"),
3: .standard(proto: "gateway_id"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}packet\0\u{3}channel_id\0\u{3}gateway_id\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -185,22 +176,7 @@ extension ServiceEnvelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen
extension MapReport: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".MapReport"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "long_name"),
2: .standard(proto: "short_name"),
3: .same(proto: "role"),
4: .standard(proto: "hw_model"),
5: .standard(proto: "firmware_version"),
6: .same(proto: "region"),
7: .standard(proto: "modem_preset"),
8: .standard(proto: "has_default_channel"),
9: .standard(proto: "latitude_i"),
10: .standard(proto: "longitude_i"),
11: .same(proto: "altitude"),
12: .standard(proto: "position_precision"),
13: .standard(proto: "num_online_local_nodes"),
14: .standard(proto: "has_opted_report_location"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}long_name\0\u{3}short_name\0\u{1}role\0\u{3}hw_model\0\u{3}firmware_version\0\u{1}region\0\u{3}modem_preset\0\u{3}has_default_channel\0\u{3}latitude_i\0\u{3}longitude_i\0\u{1}altitude\0\u{3}position_precision\0\u{3}num_online_local_nodes\0\u{3}has_opted_report_location\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/paxcount.proto
@ -7,7 +8,6 @@
// 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
@ -22,7 +22,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
///
/// TODO: REPLACE
public struct Paxcount {
public struct Paxcount: Sendable {
// 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.
@ -44,21 +44,13 @@ public struct Paxcount {
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension Paxcount: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension Paxcount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".Paxcount"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "wifi"),
2: .same(proto: "ble"),
3: .same(proto: "uptime"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}wifi\0\u{1}ble\0\u{1}uptime\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/portnums.proto
@ -7,7 +8,6 @@
// 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
@ -33,7 +33,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
/// Note: This was formerly a Type enum named 'typ' with the same id #
/// We have change to this 'portnum' based scheme for specifying app handlers for particular payloads.
/// This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically.
public enum PortNum: SwiftProtobuf.Enum {
public enum PortNum: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -131,6 +131,13 @@ public enum PortNum: SwiftProtobuf.Enum {
/// ENCODING: protobuf
case paxcounterApp // = 34
///
/// Store and Forward++ module included in the firmware
/// ENCODING: protobuf
/// This module is specifically for Native Linux nodes, and provides a Git-style
/// chain of messages.
case storeForwardPlusplusApp // = 35
///
/// 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
@ -246,6 +253,7 @@ public enum PortNum: SwiftProtobuf.Enum {
case 32: self = .replyApp
case 33: self = .ipTunnelApp
case 34: self = .paxcounterApp
case 35: self = .storeForwardPlusplusApp
case 64: self = .serialApp
case 65: self = .storeForwardApp
case 66: self = .rangeTestApp
@ -284,6 +292,7 @@ public enum PortNum: SwiftProtobuf.Enum {
case .replyApp: return 32
case .ipTunnelApp: return 33
case .paxcounterApp: return 34
case .storeForwardPlusplusApp: return 35
case .serialApp: return 64
case .storeForwardApp: return 65
case .rangeTestApp: return 66
@ -304,11 +313,6 @@ public enum PortNum: SwiftProtobuf.Enum {
}
}
}
#if swift(>=4.2)
extension PortNum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [PortNum] = [
.unknownApp,
@ -327,6 +331,7 @@ extension PortNum: CaseIterable {
.replyApp,
.ipTunnelApp,
.paxcounterApp,
.storeForwardPlusplusApp,
.serialApp,
.storeForwardApp,
.rangeTestApp,
@ -344,49 +349,11 @@ extension PortNum: CaseIterable {
.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 {
public 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"),
10: .same(proto: "DETECTION_SENSOR_APP"),
11: .same(proto: "ALERT_APP"),
12: .same(proto: "KEY_VERIFICATION_APP"),
32: .same(proto: "REPLY_APP"),
33: .same(proto: "IP_TUNNEL_APP"),
34: .same(proto: "PAXCOUNTER_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"),
71: .same(proto: "NEIGHBORINFO_APP"),
72: .same(proto: "ATAK_PLUGIN"),
73: .same(proto: "MAP_REPORT_APP"),
74: .same(proto: "POWERSTRESS_APP"),
76: .same(proto: "RETICULUM_TUNNEL_APP"),
77: .same(proto: "CAYENNE_APP"),
256: .same(proto: "PRIVATE_APP"),
257: .same(proto: "ATAK_FORWARDER"),
511: .same(proto: "MAX"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_APP\0\u{1}TEXT_MESSAGE_APP\0\u{1}REMOTE_HARDWARE_APP\0\u{1}POSITION_APP\0\u{1}NODEINFO_APP\0\u{1}ROUTING_APP\0\u{1}ADMIN_APP\0\u{1}TEXT_MESSAGE_COMPRESSED_APP\0\u{1}WAYPOINT_APP\0\u{1}AUDIO_APP\0\u{1}DETECTION_SENSOR_APP\0\u{1}ALERT_APP\0\u{1}KEY_VERIFICATION_APP\0\u{2}\u{14}REPLY_APP\0\u{1}IP_TUNNEL_APP\0\u{1}PAXCOUNTER_APP\0\u{1}STORE_FORWARD_PLUSPLUS_APP\0\u{2}\u{1d}SERIAL_APP\0\u{1}STORE_FORWARD_APP\0\u{1}RANGE_TEST_APP\0\u{1}TELEMETRY_APP\0\u{1}ZPS_APP\0\u{1}SIMULATOR_APP\0\u{1}TRACEROUTE_APP\0\u{1}NEIGHBORINFO_APP\0\u{1}ATAK_PLUGIN\0\u{1}MAP_REPORT_APP\0\u{1}POWERSTRESS_APP\0\u{2}\u{2}RETICULUM_TUNNEL_APP\0\u{1}CAYENNE_APP\0\u{2}s\u{2}PRIVATE_APP\0\u{1}ATAK_FORWARDER\0\u{2}~\u{3}MAX\0")
}

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/powermon.proto
@ -7,7 +8,6 @@
// 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
@ -22,7 +22,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
/// Note: There are no 'PowerMon' messages normally in use (PowerMons are sent only as structured logs - slogs).
/// But we wrap our State enum in this message to effectively nest a namespace (without our linter yelling at us)
public struct PowerMon {
public struct PowerMon: Sendable {
// 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.
@ -31,7 +31,7 @@ public struct PowerMon {
/// Any significant power changing event in meshtastic should be tagged with a powermon state transition.
/// If you are making new meshtastic features feel free to add new entries at the end of this definition.
public enum State: SwiftProtobuf.Enum {
public enum State: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
case none // = 0
case cpuDeepSleep // = 1
@ -104,37 +104,31 @@ public struct PowerMon {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [PowerMon.State] = [
.none,
.cpuDeepSleep,
.cpuLightSleep,
.vext1On,
.loraRxon,
.loraTxon,
.loraRxactive,
.btOn,
.ledOn,
.screenOn,
.screenDrawing,
.wifiOn,
.gpsActive,
]
}
public init() {}
}
#if swift(>=4.2)
extension PowerMon.State: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [PowerMon.State] = [
.none,
.cpuDeepSleep,
.cpuLightSleep,
.vext1On,
.loraRxon,
.loraTxon,
.loraRxactive,
.btOn,
.ledOn,
.screenOn,
.screenDrawing,
.wifiOn,
.gpsActive,
]
}
#endif // swift(>=4.2)
///
/// PowerStress testing support via the C++ PowerStress module
public struct PowerStressMessage {
public struct PowerStressMessage: Sendable {
// 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.
@ -151,7 +145,7 @@ public struct PowerStressMessage {
/// What operation would we like the UUT to perform.
/// note: senders should probably set want_response in their request packets, so that they can know when the state
/// machine has started processing their request
public enum Opcode: SwiftProtobuf.Enum {
public enum Opcode: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -272,48 +266,35 @@ public struct PowerStressMessage {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [PowerStressMessage.Opcode] = [
.unset,
.printInfo,
.forceQuiet,
.endQuiet,
.screenOn,
.screenOff,
.cpuIdle,
.cpuDeepsleep,
.cpuFullon,
.ledOn,
.ledOff,
.loraOff,
.loraTx,
.loraRx,
.btOff,
.btOn,
.wifiOff,
.wifiOn,
.gpsOff,
.gpsOn,
]
}
public init() {}
}
#if swift(>=4.2)
extension PowerStressMessage.Opcode: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [PowerStressMessage.Opcode] = [
.unset,
.printInfo,
.forceQuiet,
.endQuiet,
.screenOn,
.screenOff,
.cpuIdle,
.cpuDeepsleep,
.cpuFullon,
.ledOn,
.ledOff,
.loraOff,
.loraTx,
.loraRx,
.btOff,
.btOn,
.wifiOff,
.wifiOn,
.gpsOff,
.gpsOn,
]
}
#endif // swift(>=4.2)
#if swift(>=5.5) && canImport(_Concurrency)
extension PowerMon: @unchecked Sendable {}
extension PowerMon.State: @unchecked Sendable {}
extension PowerStressMessage: @unchecked Sendable {}
extension PowerStressMessage.Opcode: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
@ -323,8 +304,8 @@ extension PowerMon: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB
public static let _protobuf_nameMap = SwiftProtobuf._NameMap()
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let _ = try decoder.nextFieldNumber() {
}
// Load everything into unknown fields
while try decoder.nextFieldNumber() != nil {}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
@ -338,29 +319,12 @@ extension PowerMon: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationB
}
extension PowerMon.State: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "None"),
1: .same(proto: "CPU_DeepSleep"),
2: .same(proto: "CPU_LightSleep"),
4: .same(proto: "Vext1_On"),
8: .same(proto: "Lora_RXOn"),
16: .same(proto: "Lora_TXOn"),
32: .same(proto: "Lora_RXActive"),
64: .same(proto: "BT_On"),
128: .same(proto: "LED_On"),
256: .same(proto: "Screen_On"),
512: .same(proto: "Screen_Drawing"),
1024: .same(proto: "Wifi_On"),
2048: .same(proto: "GPS_Active"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0None\0\u{1}CPU_DeepSleep\0\u{1}CPU_LightSleep\0\u{2}\u{2}Vext1_On\0\u{2}\u{4}Lora_RXOn\0\u{2}\u{8}Lora_TXOn\0\u{2}\u{10}Lora_RXActive\0\u{2} BT_On\0\u{2}@\u{1}LED_On\0\u{2}@\u{2}Screen_On\0\u{2}@\u{4}Screen_Drawing\0\u{2}@\u{8}Wifi_On\0\u{2}@\u{10}GPS_Active\0")
}
extension PowerStressMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".PowerStressMessage"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "cmd"),
2: .standard(proto: "num_seconds"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}cmd\0\u{3}num_seconds\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -379,7 +343,7 @@ extension PowerStressMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImple
if self.cmd != .unset {
try visitor.visitSingularEnumField(value: self.cmd, fieldNumber: 1)
}
if self.numSeconds != 0 {
if self.numSeconds.bitPattern != 0 {
try visitor.visitSingularFloatField(value: self.numSeconds, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)
@ -394,26 +358,5 @@ extension PowerStressMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImple
}
extension PowerStressMessage.Opcode: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "UNSET"),
1: .same(proto: "PRINT_INFO"),
2: .same(proto: "FORCE_QUIET"),
3: .same(proto: "END_QUIET"),
16: .same(proto: "SCREEN_ON"),
17: .same(proto: "SCREEN_OFF"),
32: .same(proto: "CPU_IDLE"),
33: .same(proto: "CPU_DEEPSLEEP"),
34: .same(proto: "CPU_FULLON"),
48: .same(proto: "LED_ON"),
49: .same(proto: "LED_OFF"),
64: .same(proto: "LORA_OFF"),
65: .same(proto: "LORA_TX"),
66: .same(proto: "LORA_RX"),
80: .same(proto: "BT_OFF"),
81: .same(proto: "BT_ON"),
96: .same(proto: "WIFI_OFF"),
97: .same(proto: "WIFI_ON"),
112: .same(proto: "GPS_OFF"),
113: .same(proto: "GPS_ON"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNSET\0\u{1}PRINT_INFO\0\u{1}FORCE_QUIET\0\u{1}END_QUIET\0\u{2}\u{d}SCREEN_ON\0\u{1}SCREEN_OFF\0\u{2}\u{f}CPU_IDLE\0\u{1}CPU_DEEPSLEEP\0\u{1}CPU_FULLON\0\u{2}\u{e}LED_ON\0\u{1}LED_OFF\0\u{2}\u{f}LORA_OFF\0\u{1}LORA_TX\0\u{1}LORA_RX\0\u{2}\u{e}BT_OFF\0\u{1}BT_ON\0\u{2}\u{f}WIFI_OFF\0\u{1}WIFI_ON\0\u{2}\u{f}GPS_OFF\0\u{1}GPS_ON\0")
}

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/remote_hardware.proto
@ -7,7 +8,6 @@
// 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
@ -30,7 +30,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
/// because no security yet (beyond the channel mechanism).
/// It should be off by default and then protected based on some TBD mechanism
/// (a special channel once multichannel support is included?)
public struct HardwareMessage {
public struct HardwareMessage: Sendable {
// 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.
@ -52,7 +52,7 @@ public struct HardwareMessage {
///
/// TODO: REPLACE
public enum TypeEnum: SwiftProtobuf.Enum {
public enum TypeEnum: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -110,43 +110,28 @@ public struct HardwareMessage {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [HardwareMessage.TypeEnum] = [
.unset,
.writeGpios,
.watchGpios,
.gpiosChanged,
.readGpios,
.readGpiosReply,
]
}
public init() {}
}
#if swift(>=4.2)
extension HardwareMessage.TypeEnum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let 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.
fileprivate let _protobuf_package = "meshtastic"
extension HardwareMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".HardwareMessage"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "type"),
2: .standard(proto: "gpio_mask"),
3: .standard(proto: "gpio_value"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}gpio_mask\0\u{3}gpio_value\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -185,12 +170,5 @@ extension HardwareMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen
}
extension HardwareMessage.TypeEnum: SwiftProtobuf._ProtoNameProviding {
public 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"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNSET\0\u{1}WRITE_GPIOS\0\u{1}WATCH_GPIOS\0\u{1}GPIOS_CHANGED\0\u{1}READ_GPIOS\0\u{1}READ_GPIOS_REPLY\0")
}

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/rtttl.proto
@ -7,7 +8,6 @@
// 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
@ -22,7 +22,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
///
/// Canned message module configuration.
public struct RTTTLConfig {
public struct RTTTLConfig: Sendable {
// 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.
@ -36,19 +36,13 @@ public struct RTTTLConfig {
public 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.
fileprivate let _protobuf_package = "meshtastic"
extension RTTTLConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".RTTTLConfig"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "ringtone"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}ringtone\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/storeforward.proto
@ -22,7 +23,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
///
/// TODO: REPLACE
public struct StoreAndForward {
public struct StoreAndForward: Sendable {
// 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.
@ -79,7 +80,7 @@ public struct StoreAndForward {
///
/// TODO: REPLACE
public enum OneOf_Variant: Equatable {
public enum OneOf_Variant: Equatable, Sendable {
///
/// TODO: REPLACE
case stats(StoreAndForward.Statistics)
@ -93,38 +94,12 @@ public struct StoreAndForward {
/// Text from history message.
case text(Data)
#if !swift(>=4.1)
public static func ==(lhs: StoreAndForward.OneOf_Variant, rhs: StoreAndForward.OneOf_Variant) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
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 (.text, .text): return {
guard case .text(let l) = lhs, case .text(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
///
/// 001 - 063 = From Router
/// 064 - 127 = From Client
public enum RequestResponse: SwiftProtobuf.Enum {
public enum RequestResponse: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -242,11 +217,31 @@ public struct StoreAndForward {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [StoreAndForward.RequestResponse] = [
.unset,
.routerError,
.routerHeartbeat,
.routerPing,
.routerPong,
.routerBusy,
.routerHistory,
.routerStats,
.routerTextDirect,
.routerTextBroadcast,
.clientError,
.clientHistory,
.clientStats,
.clientPing,
.clientPong,
.clientAbort,
]
}
///
/// TODO: REPLACE
public struct Statistics {
public struct Statistics: Sendable {
// 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.
@ -294,7 +289,7 @@ public struct StoreAndForward {
///
/// TODO: REPLACE
public struct History {
public struct History: Sendable {
// 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.
@ -319,7 +314,7 @@ public struct StoreAndForward {
///
/// TODO: REPLACE
public struct Heartbeat {
public struct Heartbeat: Sendable {
// 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.
@ -340,54 +335,13 @@ public struct StoreAndForward {
public init() {}
}
#if swift(>=4.2)
extension StoreAndForward.RequestResponse: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [StoreAndForward.RequestResponse] = [
.unset,
.routerError,
.routerHeartbeat,
.routerPing,
.routerPong,
.routerBusy,
.routerHistory,
.routerStats,
.routerTextDirect,
.routerTextBroadcast,
.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.
fileprivate let _protobuf_package = "meshtastic"
extension StoreAndForward: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".StoreAndForward"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "rr"),
2: .same(proto: "stats"),
3: .same(proto: "history"),
4: .same(proto: "heartbeat"),
5: .same(proto: "text"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}rr\0\u{1}stats\0\u{1}history\0\u{1}heartbeat\0\u{1}text\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -487,39 +441,12 @@ extension StoreAndForward: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen
}
extension StoreAndForward.RequestResponse: SwiftProtobuf._ProtoNameProviding {
public 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"),
8: .same(proto: "ROUTER_TEXT_DIRECT"),
9: .same(proto: "ROUTER_TEXT_BROADCAST"),
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"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNSET\0\u{1}ROUTER_ERROR\0\u{1}ROUTER_HEARTBEAT\0\u{1}ROUTER_PING\0\u{1}ROUTER_PONG\0\u{1}ROUTER_BUSY\0\u{1}ROUTER_HISTORY\0\u{1}ROUTER_STATS\0\u{1}ROUTER_TEXT_DIRECT\0\u{1}ROUTER_TEXT_BROADCAST\0\u{2}7CLIENT_ERROR\0\u{1}CLIENT_HISTORY\0\u{1}CLIENT_STATS\0\u{1}CLIENT_PING\0\u{1}CLIENT_PONG\0\u{2}&CLIENT_ABORT\0")
}
extension StoreAndForward.Statistics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = StoreAndForward.protoMessageName + ".Statistics"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "messages_total"),
2: .standard(proto: "messages_saved"),
3: .standard(proto: "messages_max"),
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"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}messages_total\0\u{3}messages_saved\0\u{3}messages_max\0\u{3}up_time\0\u{1}requests\0\u{3}requests_history\0\u{1}heartbeat\0\u{3}return_max\0\u{3}return_window\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -589,11 +516,7 @@ extension StoreAndForward.Statistics: SwiftProtobuf.Message, SwiftProtobuf._Mess
extension StoreAndForward.History: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = StoreAndForward.protoMessageName + ".History"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "history_messages"),
2: .same(proto: "window"),
3: .standard(proto: "last_request"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}history_messages\0\u{1}window\0\u{3}last_request\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -633,10 +556,7 @@ extension StoreAndForward.History: SwiftProtobuf.Message, SwiftProtobuf._Message
extension StoreAndForward.Heartbeat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = StoreAndForward.protoMessageName + ".Heartbeat"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "period"),
2: .same(proto: "secondary"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}period\0\u{1}secondary\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/telemetry.proto
@ -7,7 +8,6 @@
// 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
@ -22,7 +22,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
///
/// Supported I2C Sensors for telemetry in Meshtastic
public enum TelemetrySensorType: SwiftProtobuf.Enum {
public enum TelemetrySensorType: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
///
@ -204,6 +204,10 @@ public enum TelemetrySensorType: SwiftProtobuf.Enum {
///
/// TSL2561 light sensor
case tsl2561 // = 44
///
/// BH1750 light sensor
case bh1750 // = 45
case UNRECOGNIZED(Int)
public init() {
@ -257,6 +261,7 @@ public enum TelemetrySensorType: SwiftProtobuf.Enum {
case 42: self = .sfa30
case 43: self = .sen5X
case 44: self = .tsl2561
case 45: self = .bh1750
default: self = .UNRECOGNIZED(rawValue)
}
}
@ -308,15 +313,11 @@ public enum TelemetrySensorType: SwiftProtobuf.Enum {
case .sfa30: return 42
case .sen5X: return 43
case .tsl2561: return 44
case .bh1750: return 45
case .UNRECOGNIZED(let i): return i
}
}
}
#if swift(>=4.2)
extension TelemetrySensorType: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [TelemetrySensorType] = [
.sensorUnset,
@ -364,14 +365,14 @@ extension TelemetrySensorType: CaseIterable {
.sfa30,
.sen5X,
.tsl2561,
.bh1750,
]
}
#endif // swift(>=4.2)
}
///
/// Key native device metrics such as battery level
public struct DeviceMetrics {
public struct DeviceMetrics: Sendable {
// 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.
@ -444,7 +445,7 @@ public struct DeviceMetrics {
///
/// Weather station or other environmental metrics
public struct EnvironmentMetrics {
public struct EnvironmentMetrics: @unchecked Sendable {
// 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.
@ -702,7 +703,7 @@ public struct EnvironmentMetrics {
///
/// Power Metrics (voltage / current / etc)
public struct PowerMetrics {
public struct PowerMetrics: Sendable {
// 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.
@ -907,7 +908,7 @@ public struct PowerMetrics {
///
/// Air quality metrics
public struct AirQualityMetrics {
public struct AirQualityMetrics: @unchecked Sendable {
// 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.
@ -1196,7 +1197,7 @@ public struct AirQualityMetrics {
///
/// Local device mesh statistics
public struct LocalStats {
public struct LocalStats: Sendable {
// 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.
@ -1255,6 +1256,10 @@ public struct LocalStats {
/// Number of bytes free in the heap
public var heapFreeBytes: UInt32 = 0
///
/// Number of packets that were dropped because the transmit queue was full.
public var numTxDropped: UInt32 = 0
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
@ -1262,7 +1267,7 @@ public struct LocalStats {
///
/// Health telemetry metrics
public struct HealthMetrics {
public struct HealthMetrics: Sendable {
// 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.
@ -1311,7 +1316,7 @@ public struct HealthMetrics {
///
/// Linux host metrics
public struct HostMetrics {
public struct HostMetrics: Sendable {
// 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.
@ -1385,7 +1390,7 @@ public struct HostMetrics {
///
/// Types of Measurements the telemetry module is equipped to handle
public struct Telemetry {
public struct Telemetry: @unchecked Sendable {
// 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.
@ -1474,7 +1479,7 @@ public struct Telemetry {
public var unknownFields = SwiftProtobuf.UnknownStorage()
public enum OneOf_Variant: Equatable {
public enum OneOf_Variant: Equatable, Sendable {
///
/// Key native device metrics such as battery level
case deviceMetrics(DeviceMetrics)
@ -1497,44 +1502,6 @@ public struct Telemetry {
/// Linux host metrics
case hostMetrics(HostMetrics)
#if !swift(>=4.1)
public static func ==(lhs: Telemetry.OneOf_Variant, rhs: Telemetry.OneOf_Variant) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
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
}()
case (.airQualityMetrics, .airQualityMetrics): return {
guard case .airQualityMetrics(let l) = lhs, case .airQualityMetrics(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.powerMetrics, .powerMetrics): return {
guard case .powerMetrics(let l) = lhs, case .powerMetrics(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.localStats, .localStats): return {
guard case .localStats(let l) = lhs, case .localStats(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.healthMetrics, .healthMetrics): return {
guard case .healthMetrics(let l) = lhs, case .healthMetrics(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.hostMetrics, .hostMetrics): return {
guard case .hostMetrics(let l) = lhs, case .hostMetrics(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
@ -1544,7 +1511,7 @@ public struct Telemetry {
///
/// NAU7802 Telemetry configuration, for saving to flash
public struct Nau7802Config {
public struct Nau7802Config: Sendable {
// 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.
@ -1562,83 +1529,17 @@ public struct Nau7802Config {
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension TelemetrySensorType: @unchecked Sendable {}
extension DeviceMetrics: @unchecked Sendable {}
extension EnvironmentMetrics: @unchecked Sendable {}
extension PowerMetrics: @unchecked Sendable {}
extension AirQualityMetrics: @unchecked Sendable {}
extension LocalStats: @unchecked Sendable {}
extension HealthMetrics: @unchecked Sendable {}
extension HostMetrics: @unchecked Sendable {}
extension Telemetry: @unchecked Sendable {}
extension Telemetry.OneOf_Variant: @unchecked Sendable {}
extension Nau7802Config: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension TelemetrySensorType: SwiftProtobuf._ProtoNameProviding {
public 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"),
13: .same(proto: "PMSA003I"),
14: .same(proto: "INA3221"),
15: .same(proto: "BMP085"),
16: .same(proto: "RCWL9620"),
17: .same(proto: "SHT4X"),
18: .same(proto: "VEML7700"),
19: .same(proto: "MLX90632"),
20: .same(proto: "OPT3001"),
21: .same(proto: "LTR390UV"),
22: .same(proto: "TSL25911FN"),
23: .same(proto: "AHT10"),
24: .same(proto: "DFROBOT_LARK"),
25: .same(proto: "NAU7802"),
26: .same(proto: "BMP3XX"),
27: .same(proto: "ICM20948"),
28: .same(proto: "MAX17048"),
29: .same(proto: "CUSTOM_SENSOR"),
30: .same(proto: "MAX30102"),
31: .same(proto: "MLX90614"),
32: .same(proto: "SCD4X"),
33: .same(proto: "RADSENS"),
34: .same(proto: "INA226"),
35: .same(proto: "DFROBOT_RAIN"),
36: .same(proto: "DPS310"),
37: .same(proto: "RAK12035"),
38: .same(proto: "MAX17261"),
39: .same(proto: "PCT2075"),
40: .same(proto: "ADS1X15"),
41: .same(proto: "ADS1X15_ALT"),
42: .same(proto: "SFA30"),
43: .same(proto: "SEN5X"),
44: .same(proto: "TSL2561"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0SENSOR_UNSET\0\u{1}BME280\0\u{1}BME680\0\u{1}MCP9808\0\u{1}INA260\0\u{1}INA219\0\u{1}BMP280\0\u{1}SHTC3\0\u{1}LPS22\0\u{1}QMC6310\0\u{1}QMI8658\0\u{1}QMC5883L\0\u{1}SHT31\0\u{1}PMSA003I\0\u{1}INA3221\0\u{1}BMP085\0\u{1}RCWL9620\0\u{1}SHT4X\0\u{1}VEML7700\0\u{1}MLX90632\0\u{1}OPT3001\0\u{1}LTR390UV\0\u{1}TSL25911FN\0\u{1}AHT10\0\u{1}DFROBOT_LARK\0\u{1}NAU7802\0\u{1}BMP3XX\0\u{1}ICM20948\0\u{1}MAX17048\0\u{1}CUSTOM_SENSOR\0\u{1}MAX30102\0\u{1}MLX90614\0\u{1}SCD4X\0\u{1}RADSENS\0\u{1}INA226\0\u{1}DFROBOT_RAIN\0\u{1}DPS310\0\u{1}RAK12035\0\u{1}MAX17261\0\u{1}PCT2075\0\u{1}ADS1X15\0\u{1}ADS1X15_ALT\0\u{1}SFA30\0\u{1}SEN5X\0\u{1}TSL2561\0\u{1}BH1750\0")
}
extension DeviceMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".DeviceMetrics"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "battery_level"),
2: .same(proto: "voltage"),
3: .standard(proto: "channel_utilization"),
4: .standard(proto: "air_util_tx"),
5: .standard(proto: "uptime_seconds"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}battery_level\0\u{1}voltage\0\u{3}channel_utilization\0\u{3}air_util_tx\0\u{3}uptime_seconds\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -1692,30 +1593,7 @@ extension DeviceMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".EnvironmentMetrics"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "temperature"),
2: .standard(proto: "relative_humidity"),
3: .standard(proto: "barometric_pressure"),
4: .standard(proto: "gas_resistance"),
5: .same(proto: "voltage"),
6: .same(proto: "current"),
7: .same(proto: "iaq"),
8: .same(proto: "distance"),
9: .same(proto: "lux"),
10: .standard(proto: "white_lux"),
11: .standard(proto: "ir_lux"),
12: .standard(proto: "uv_lux"),
13: .standard(proto: "wind_direction"),
14: .standard(proto: "wind_speed"),
15: .same(proto: "weight"),
16: .standard(proto: "wind_gust"),
17: .standard(proto: "wind_lull"),
18: .same(proto: "radiation"),
19: .standard(proto: "rainfall_1h"),
20: .standard(proto: "rainfall_24h"),
21: .standard(proto: "soil_moisture"),
22: .standard(proto: "soil_temperature"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}temperature\0\u{3}relative_humidity\0\u{3}barometric_pressure\0\u{3}gas_resistance\0\u{1}voltage\0\u{1}current\0\u{1}iaq\0\u{1}distance\0\u{1}lux\0\u{3}white_lux\0\u{3}ir_lux\0\u{3}uv_lux\0\u{3}wind_direction\0\u{3}wind_speed\0\u{1}weight\0\u{3}wind_gust\0\u{3}wind_lull\0\u{1}radiation\0\u{3}rainfall_1h\0\u{3}rainfall_24h\0\u{3}soil_moisture\0\u{3}soil_temperature\0")
fileprivate class _StorageClass {
var _temperature: Float? = nil
@ -1741,15 +1619,11 @@ extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImple
var _soilMoisture: UInt32? = nil
var _soilTemperature: Float? = nil
#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif
private init() {}
@ -1936,24 +1810,7 @@ extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImple
extension PowerMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".PowerMetrics"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "ch1_voltage"),
2: .standard(proto: "ch1_current"),
3: .standard(proto: "ch2_voltage"),
4: .standard(proto: "ch2_current"),
5: .standard(proto: "ch3_voltage"),
6: .standard(proto: "ch3_current"),
7: .standard(proto: "ch4_voltage"),
8: .standard(proto: "ch4_current"),
9: .standard(proto: "ch5_voltage"),
10: .standard(proto: "ch5_current"),
11: .standard(proto: "ch6_voltage"),
12: .standard(proto: "ch6_current"),
13: .standard(proto: "ch7_voltage"),
14: .standard(proto: "ch7_current"),
15: .standard(proto: "ch8_voltage"),
16: .standard(proto: "ch8_current"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}ch1_voltage\0\u{3}ch1_current\0\u{3}ch2_voltage\0\u{3}ch2_current\0\u{3}ch3_voltage\0\u{3}ch3_current\0\u{3}ch4_voltage\0\u{3}ch4_current\0\u{3}ch5_voltage\0\u{3}ch5_current\0\u{3}ch6_voltage\0\u{3}ch6_current\0\u{3}ch7_voltage\0\u{3}ch7_current\0\u{3}ch8_voltage\0\u{3}ch8_current\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2062,33 +1919,7 @@ extension PowerMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".AirQualityMetrics"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "pm10_standard"),
2: .standard(proto: "pm25_standard"),
3: .standard(proto: "pm100_standard"),
4: .standard(proto: "pm10_environmental"),
5: .standard(proto: "pm25_environmental"),
6: .standard(proto: "pm100_environmental"),
7: .standard(proto: "particles_03um"),
8: .standard(proto: "particles_05um"),
9: .standard(proto: "particles_10um"),
10: .standard(proto: "particles_25um"),
11: .standard(proto: "particles_50um"),
12: .standard(proto: "particles_100um"),
13: .same(proto: "co2"),
14: .standard(proto: "co2_temperature"),
15: .standard(proto: "co2_humidity"),
16: .standard(proto: "form_formaldehyde"),
17: .standard(proto: "form_humidity"),
18: .standard(proto: "form_temperature"),
19: .standard(proto: "pm40_standard"),
20: .standard(proto: "particles_40um"),
21: .standard(proto: "pm_temperature"),
22: .standard(proto: "pm_humidity"),
23: .standard(proto: "pm_voc_idx"),
24: .standard(proto: "pm_nox_idx"),
25: .standard(proto: "particles_tps"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}pm10_standard\0\u{3}pm25_standard\0\u{3}pm100_standard\0\u{3}pm10_environmental\0\u{3}pm25_environmental\0\u{3}pm100_environmental\0\u{3}particles_03um\0\u{3}particles_05um\0\u{3}particles_10um\0\u{3}particles_25um\0\u{3}particles_50um\0\u{3}particles_100um\0\u{1}co2\0\u{3}co2_temperature\0\u{3}co2_humidity\0\u{3}form_formaldehyde\0\u{3}form_humidity\0\u{3}form_temperature\0\u{3}pm40_standard\0\u{3}particles_40um\0\u{3}pm_temperature\0\u{3}pm_humidity\0\u{3}pm_voc_idx\0\u{3}pm_nox_idx\0\u{3}particles_tps\0")
fileprivate class _StorageClass {
var _pm10Standard: UInt32? = nil
@ -2117,15 +1948,11 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
var _pmNoxIdx: Float? = nil
var _particlesTps: Float? = nil
#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif
private init() {}
@ -2330,21 +2157,7 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
extension LocalStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".LocalStats"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "uptime_seconds"),
2: .standard(proto: "channel_utilization"),
3: .standard(proto: "air_util_tx"),
4: .standard(proto: "num_packets_tx"),
5: .standard(proto: "num_packets_rx"),
6: .standard(proto: "num_packets_rx_bad"),
7: .standard(proto: "num_online_nodes"),
8: .standard(proto: "num_total_nodes"),
9: .standard(proto: "num_rx_dupe"),
10: .standard(proto: "num_tx_relay"),
11: .standard(proto: "num_tx_relay_canceled"),
12: .standard(proto: "heap_total_bytes"),
13: .standard(proto: "heap_free_bytes"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}uptime_seconds\0\u{3}channel_utilization\0\u{3}air_util_tx\0\u{3}num_packets_tx\0\u{3}num_packets_rx\0\u{3}num_packets_rx_bad\0\u{3}num_online_nodes\0\u{3}num_total_nodes\0\u{3}num_rx_dupe\0\u{3}num_tx_relay\0\u{3}num_tx_relay_canceled\0\u{3}heap_total_bytes\0\u{3}heap_free_bytes\0\u{3}num_tx_dropped\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2365,6 +2178,7 @@ extension LocalStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio
case 11: try { try decoder.decodeSingularUInt32Field(value: &self.numTxRelayCanceled) }()
case 12: try { try decoder.decodeSingularUInt32Field(value: &self.heapTotalBytes) }()
case 13: try { try decoder.decodeSingularUInt32Field(value: &self.heapFreeBytes) }()
case 14: try { try decoder.decodeSingularUInt32Field(value: &self.numTxDropped) }()
default: break
}
}
@ -2374,10 +2188,10 @@ extension LocalStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio
if self.uptimeSeconds != 0 {
try visitor.visitSingularUInt32Field(value: self.uptimeSeconds, fieldNumber: 1)
}
if self.channelUtilization != 0 {
if self.channelUtilization.bitPattern != 0 {
try visitor.visitSingularFloatField(value: self.channelUtilization, fieldNumber: 2)
}
if self.airUtilTx != 0 {
if self.airUtilTx.bitPattern != 0 {
try visitor.visitSingularFloatField(value: self.airUtilTx, fieldNumber: 3)
}
if self.numPacketsTx != 0 {
@ -2410,6 +2224,9 @@ extension LocalStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio
if self.heapFreeBytes != 0 {
try visitor.visitSingularUInt32Field(value: self.heapFreeBytes, fieldNumber: 13)
}
if self.numTxDropped != 0 {
try visitor.visitSingularUInt32Field(value: self.numTxDropped, fieldNumber: 14)
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2427,6 +2244,7 @@ extension LocalStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio
if lhs.numTxRelayCanceled != rhs.numTxRelayCanceled {return false}
if lhs.heapTotalBytes != rhs.heapTotalBytes {return false}
if lhs.heapFreeBytes != rhs.heapFreeBytes {return false}
if lhs.numTxDropped != rhs.numTxDropped {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
@ -2434,11 +2252,7 @@ extension LocalStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio
extension HealthMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".HealthMetrics"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "heart_bpm"),
2: .same(proto: "spO2"),
3: .same(proto: "temperature"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}heart_bpm\0\u{1}spO2\0\u{1}temperature\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2482,17 +2296,7 @@ extension HealthMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
extension HostMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".HostMetrics"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "uptime_seconds"),
2: .standard(proto: "freemem_bytes"),
3: .standard(proto: "diskfree1_bytes"),
4: .standard(proto: "diskfree2_bytes"),
5: .standard(proto: "diskfree3_bytes"),
6: .same(proto: "load1"),
7: .same(proto: "load5"),
8: .same(proto: "load15"),
9: .standard(proto: "user_string"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}uptime_seconds\0\u{3}freemem_bytes\0\u{3}diskfree1_bytes\0\u{3}diskfree2_bytes\0\u{3}diskfree3_bytes\0\u{1}load1\0\u{1}load5\0\u{1}load15\0\u{3}user_string\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2566,30 +2370,17 @@ extension HostMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
extension Telemetry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".Telemetry"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "time"),
2: .standard(proto: "device_metrics"),
3: .standard(proto: "environment_metrics"),
4: .standard(proto: "air_quality_metrics"),
5: .standard(proto: "power_metrics"),
6: .standard(proto: "local_stats"),
7: .standard(proto: "health_metrics"),
8: .standard(proto: "host_metrics"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}time\0\u{3}device_metrics\0\u{3}environment_metrics\0\u{3}air_quality_metrics\0\u{3}power_metrics\0\u{3}local_stats\0\u{3}health_metrics\0\u{3}host_metrics\0")
fileprivate class _StorageClass {
var _time: UInt32 = 0
var _variant: Telemetry.OneOf_Variant?
#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif
private init() {}
@ -2774,10 +2565,7 @@ extension Telemetry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation
extension Nau7802Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".Nau7802Config"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "zeroOffset"),
2: .same(proto: "calibrationFactor"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}zeroOffset\0\u{1}calibrationFactor\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -2796,7 +2584,7 @@ extension Nau7802Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
if self.zeroOffset != 0 {
try visitor.visitSingularInt32Field(value: self.zeroOffset, fieldNumber: 1)
}
if self.calibrationFactor != 0 {
if self.calibrationFactor.bitPattern != 0 {
try visitor.visitSingularFloatField(value: self.calibrationFactor, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)

View file

@ -1,5 +1,6 @@
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/xmodem.proto
@ -20,7 +21,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
typealias Version = _2
}
public struct XModem {
public struct XModem: Sendable {
// 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.
@ -35,7 +36,7 @@ public struct XModem {
public var unknownFields = SwiftProtobuf.UnknownStorage()
public enum Control: SwiftProtobuf.Enum {
public enum Control: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
case nul // = 0
case soh // = 1
@ -79,46 +80,30 @@ public struct XModem {
}
}
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [XModem.Control] = [
.nul,
.soh,
.stx,
.eot,
.ack,
.nak,
.can,
.ctrlz,
]
}
public init() {}
}
#if swift(>=4.2)
extension XModem.Control: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let 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.
fileprivate let _protobuf_package = "meshtastic"
extension XModem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".XModem"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "control"),
2: .same(proto: "seq"),
3: .same(proto: "crc16"),
4: .same(proto: "buffer"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}control\0\u{1}seq\0\u{1}crc16\0\u{1}buffer\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
@ -162,14 +147,5 @@ extension XModem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas
}
extension XModem.Control: SwiftProtobuf._ProtoNameProviding {
public 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"),
]
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0NUL\0\u{1}SOH\0\u{1}STX\0\u{2}\u{2}EOT\0\u{2}\u{2}ACK\0\u{2}\u{f}NAK\0\u{2}\u{3}CAN\0\u{2}\u{2}CTRLZ\0")
}

@ -1 +1 @@
Subproject commit c1e31a9655e9920a8b5b8eccdf7c69ef1ae42a49
Subproject commit 62ef17b3d1625fc6d78ed661f614d0baad4be9ef