mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Update protos
This commit is contained in:
parent
20384e4899
commit
f98447bc98
23 changed files with 2238 additions and 713 deletions
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -25,7 +24,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: @unchecked Sendable {
|
||||
public struct AdminMessage {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -595,7 +594,7 @@ public struct AdminMessage: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public enum OneOf_PayloadVariant: Equatable, Sendable {
|
||||
public enum OneOf_PayloadVariant: Equatable {
|
||||
///
|
||||
/// Send the specified channel in the response to this message
|
||||
/// NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present)
|
||||
|
|
@ -770,11 +769,237 @@ public struct AdminMessage: @unchecked Sendable {
|
|||
/// Tell the node to reset the nodedb.
|
||||
case nodedbReset(Int32)
|
||||
|
||||
#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, Swift.CaseIterable {
|
||||
public enum ConfigType: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -854,25 +1079,11 @@ public struct AdminMessage: @unchecked Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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, Swift.CaseIterable {
|
||||
public enum ModuleConfigType: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -970,26 +1181,9 @@ public struct AdminMessage: @unchecked Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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, Swift.CaseIterable {
|
||||
public enum BackupLocation: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1021,17 +1215,11 @@ public struct AdminMessage: @unchecked Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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: Sendable {
|
||||
public struct InputEvent {
|
||||
// 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.
|
||||
|
|
@ -1060,9 +1248,56 @@ public struct AdminMessage: @unchecked Sendable {
|
|||
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: Sendable {
|
||||
public struct HamParameters {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1092,7 +1327,7 @@ public struct HamParameters: Sendable {
|
|||
|
||||
///
|
||||
/// Response envelope for node_remote_hardware_pins
|
||||
public struct NodeRemoteHardwarePinsResponse: Sendable {
|
||||
public struct NodeRemoteHardwarePinsResponse {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1106,7 +1341,7 @@ public struct NodeRemoteHardwarePinsResponse: Sendable {
|
|||
public init() {}
|
||||
}
|
||||
|
||||
public struct SharedContact: Sendable {
|
||||
public struct SharedContact {
|
||||
// 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.
|
||||
|
|
@ -1139,7 +1374,7 @@ public struct SharedContact: Sendable {
|
|||
|
||||
///
|
||||
/// This message is used by a client to initiate or complete a key verification
|
||||
public struct KeyVerificationAdmin: Sendable {
|
||||
public struct KeyVerificationAdmin {
|
||||
// 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.
|
||||
|
|
@ -1169,7 +1404,7 @@ public struct KeyVerificationAdmin: Sendable {
|
|||
|
||||
///
|
||||
/// Three stages of this request.
|
||||
public enum MessageType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum MessageType: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1214,14 +1449,6 @@ public struct KeyVerificationAdmin: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [KeyVerificationAdmin.MessageType] = [
|
||||
.initiateVerification,
|
||||
.provideSecurityNumber,
|
||||
.doVerify,
|
||||
.doNotVerify,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -1229,6 +1456,34 @@ public struct KeyVerificationAdmin: Sendable {
|
|||
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"
|
||||
|
|
@ -2186,7 +2441,7 @@ extension HamParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
|
|||
if self.txPower != 0 {
|
||||
try visitor.visitSingularInt32Field(value: self.txPower, fieldNumber: 2)
|
||||
}
|
||||
if self.frequency.bitPattern != 0 {
|
||||
if self.frequency != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.frequency, fieldNumber: 3)
|
||||
}
|
||||
if !self.shortName.isEmpty {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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: Sendable {
|
||||
public struct ChannelSet {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -53,6 +53,10 @@ public struct ChannelSet: Sendable {
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -21,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
|||
typealias Version = _2
|
||||
}
|
||||
|
||||
public enum Team: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum Team: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -131,6 +130,11 @@ public enum Team: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Team: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Team] = [
|
||||
.unspecifedColor,
|
||||
|
|
@ -149,12 +153,13 @@ public enum Team: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
.darkGreen,
|
||||
.brown,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
///
|
||||
/// Role of the group member
|
||||
public enum MemberRole: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum MemberRole: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -228,6 +233,11 @@ public enum MemberRole: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension MemberRole: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [MemberRole] = [
|
||||
.unspecifed,
|
||||
|
|
@ -240,12 +250,13 @@ public enum MemberRole: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
.rto,
|
||||
.k9,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
///
|
||||
/// Packets for the official ATAK Plugin
|
||||
public struct TAKPacket: @unchecked Sendable {
|
||||
public struct TAKPacket {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -326,7 +337,7 @@ public struct TAKPacket: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// The payload of the packet
|
||||
public enum OneOf_PayloadVariant: Equatable, @unchecked Sendable {
|
||||
public enum OneOf_PayloadVariant: Equatable {
|
||||
///
|
||||
/// TAK position report
|
||||
case pli(PLI)
|
||||
|
|
@ -338,6 +349,28 @@ public struct TAKPacket: @unchecked Sendable {
|
|||
/// 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() {}
|
||||
|
|
@ -349,7 +382,7 @@ public struct TAKPacket: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// ATAK GeoChat message
|
||||
public struct GeoChat: Sendable {
|
||||
public struct GeoChat {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -391,7 +424,7 @@ public struct GeoChat: Sendable {
|
|||
///
|
||||
/// ATAK Group
|
||||
/// <__group role='Team Member' name='Cyan'/>
|
||||
public struct Group: Sendable {
|
||||
public struct Group {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -413,7 +446,7 @@ public struct Group: Sendable {
|
|||
///
|
||||
/// ATAK EUD Status
|
||||
/// <status battery='100' />
|
||||
public struct Status: Sendable {
|
||||
public struct Status {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -430,7 +463,7 @@ public struct Status: Sendable {
|
|||
///
|
||||
/// ATAK Contact
|
||||
/// <contact endpoint='0.0.0.0:4242:tcp' phone='+12345678' callsign='FALKE'/>
|
||||
public struct Contact: Sendable {
|
||||
public struct Contact {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -450,7 +483,7 @@ public struct Contact: Sendable {
|
|||
|
||||
///
|
||||
/// Position Location Information from ATAK
|
||||
public struct PLI: Sendable {
|
||||
public struct PLI {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -482,6 +515,18 @@ public struct PLI: Sendable {
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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: Sendable {
|
||||
public struct CannedMessageModuleConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -36,6 +36,10 @@ public struct CannedMessageModuleConfig: Sendable {
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -37,15 +36,13 @@ 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: @unchecked Sendable {
|
||||
public struct ChannelSettings {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
||||
///
|
||||
/// Deprecated in favor of LoraConfig.channel_num
|
||||
///
|
||||
/// NOTE: This field was marked as deprecated in the .proto file.
|
||||
public var channelNum: UInt32 = 0
|
||||
|
||||
///
|
||||
|
|
@ -114,7 +111,7 @@ public struct ChannelSettings: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// This message is specifically for modules to store per-channel configuration data.
|
||||
public struct ModuleSettings: Sendable {
|
||||
public struct ModuleSettings {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -135,7 +132,7 @@ public struct ModuleSettings: Sendable {
|
|||
|
||||
///
|
||||
/// A pair of a channel number, mode and the (sharable) settings for that channel
|
||||
public struct Channel: Sendable {
|
||||
public struct Channel {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -173,7 +170,7 @@ public struct Channel: Sendable {
|
|||
/// 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, Swift.CaseIterable {
|
||||
public enum Role: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -212,13 +209,6 @@ public struct Channel: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Channel.Role] = [
|
||||
.disabled,
|
||||
.primary,
|
||||
.secondary,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -226,6 +216,26 @@ public struct Channel: Sendable {
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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: Sendable {
|
||||
public struct DeviceProfile {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -130,6 +130,10 @@ public struct DeviceProfile: Sendable {
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
// swiftlint:disable all
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: meshtastic/config.proto
|
||||
|
|
@ -21,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
|||
typealias Version = _2
|
||||
}
|
||||
|
||||
public struct Config: Sendable {
|
||||
public struct Config {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -114,7 +113,7 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Payload Variant
|
||||
public enum OneOf_PayloadVariant: Equatable, Sendable {
|
||||
public enum OneOf_PayloadVariant: Equatable {
|
||||
case device(Config.DeviceConfig)
|
||||
case position(Config.PositionConfig)
|
||||
case power(Config.PowerConfig)
|
||||
|
|
@ -126,11 +125,61 @@ public struct Config: Sendable {
|
|||
case sessionkey(Config.SessionkeyConfig)
|
||||
case deviceUi(DeviceUIConfig)
|
||||
|
||||
#if !swift(>=4.1)
|
||||
public static func ==(lhs: Config.OneOf_PayloadVariant, rhs: Config.OneOf_PayloadVariant) -> Bool {
|
||||
// The use of inline closures is to circumvent an issue where the compiler
|
||||
// allocates stack space for every case branch when no optimizations are
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch (lhs, rhs) {
|
||||
case (.device, .device): return {
|
||||
guard case .device(let l) = lhs, case .device(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.position, .position): return {
|
||||
guard case .position(let l) = lhs, case .position(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.power, .power): return {
|
||||
guard case .power(let l) = lhs, case .power(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.network, .network): return {
|
||||
guard case .network(let l) = lhs, case .network(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.display, .display): return {
|
||||
guard case .display(let l) = lhs, case .display(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.lora, .lora): return {
|
||||
guard case .lora(let l) = lhs, case .lora(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.bluetooth, .bluetooth): return {
|
||||
guard case .bluetooth(let l) = lhs, case .bluetooth(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.security, .security): return {
|
||||
guard case .security(let l) = lhs, case .security(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.sessionkey, .sessionkey): return {
|
||||
guard case .sessionkey(let l) = lhs, case .sessionkey(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.deviceUi, .deviceUi): return {
|
||||
guard case .deviceUi(let l) = lhs, case .deviceUi(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
default: return false
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
///
|
||||
/// Configuration
|
||||
public struct DeviceConfig: Sendable {
|
||||
public struct DeviceConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -142,8 +191,6 @@ public struct Config: Sendable {
|
|||
///
|
||||
/// Disabling this will disable the SerialConsole by not initilizing the StreamAPI
|
||||
/// Moved to SecurityConfig
|
||||
///
|
||||
/// NOTE: This field was marked as deprecated in the .proto file.
|
||||
public var serialEnabled: Bool = false
|
||||
|
||||
///
|
||||
|
|
@ -173,8 +220,6 @@ public struct Config: Sendable {
|
|||
/// If true, device is considered to be "managed" by a mesh administrator
|
||||
/// Clients should then limit available configuration and administrative options inside the user interface
|
||||
/// Moved to SecurityConfig
|
||||
///
|
||||
/// NOTE: This field was marked as deprecated in the .proto file.
|
||||
public var isManaged: Bool = false
|
||||
|
||||
///
|
||||
|
|
@ -198,7 +243,7 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Defines the device's role on the Mesh network
|
||||
public enum Role: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum Role: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -216,8 +261,6 @@ public struct Config: Sendable {
|
|||
/// The wifi radio and the oled screen will be put to sleep.
|
||||
/// This mode may still potentially have higher power usage due to it's preference in message rebroadcasting on the mesh.
|
||||
case router // = 2
|
||||
|
||||
/// NOTE: This enum value was marked as deprecated in the .proto file
|
||||
case routerClient // = 3
|
||||
|
||||
///
|
||||
|
|
@ -318,27 +361,11 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DeviceConfig.Role] = [
|
||||
.client,
|
||||
.clientMute,
|
||||
.router,
|
||||
.routerClient,
|
||||
.repeater,
|
||||
.tracker,
|
||||
.sensor,
|
||||
.tak,
|
||||
.clientHidden,
|
||||
.lostAndFound,
|
||||
.takTracker,
|
||||
.routerLate,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
/// Defines the device's behavior for how messages are rebroadcast
|
||||
public enum RebroadcastMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum RebroadcastMode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -399,21 +426,11 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DeviceConfig.RebroadcastMode] = [
|
||||
.all,
|
||||
.allSkipDecoding,
|
||||
.localOnly,
|
||||
.knownOnly,
|
||||
.none,
|
||||
.corePortnumsOnly,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
/// Defines buzzer behavior for audio feedback
|
||||
public enum BuzzerMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum BuzzerMode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -470,15 +487,6 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DeviceConfig.BuzzerMode] = [
|
||||
.allEnabled,
|
||||
.disabled,
|
||||
.notificationsOnly,
|
||||
.systemOnly,
|
||||
.directMsgOnly,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -486,7 +494,7 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Position Config
|
||||
public struct PositionConfig: Sendable {
|
||||
public struct PositionConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -508,8 +516,6 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Is GPS enabled for this node?
|
||||
///
|
||||
/// NOTE: This field was marked as deprecated in the .proto file.
|
||||
public var gpsEnabled: Bool = false
|
||||
|
||||
///
|
||||
|
|
@ -520,8 +526,6 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Deprecated in favor of using smart / regular broadcast intervals as implicit attempt time
|
||||
///
|
||||
/// NOTE: This field was marked as deprecated in the .proto file.
|
||||
public var gpsAttemptTime: UInt32 = 0
|
||||
|
||||
///
|
||||
|
|
@ -562,7 +566,7 @@ public struct Config: Sendable {
|
|||
/// are always included (also time if GPS-synced)
|
||||
/// NOTE: the more fields are included, the larger the message will be -
|
||||
/// leading to longer airtime and a higher risk of packet loss
|
||||
public enum PositionFlags: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum PositionFlags: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -652,24 +656,9 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.PositionConfig.PositionFlags] = [
|
||||
.unset,
|
||||
.altitude,
|
||||
.altitudeMsl,
|
||||
.geoidalSeparation,
|
||||
.dop,
|
||||
.hvdop,
|
||||
.satinview,
|
||||
.seqNo,
|
||||
.timestamp,
|
||||
.heading,
|
||||
.speed,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public enum GpsMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum GpsMode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -707,13 +696,6 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.PositionConfig.GpsMode] = [
|
||||
.disabled,
|
||||
.enabled,
|
||||
.notPresent,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -722,7 +704,7 @@ public struct Config: Sendable {
|
|||
///
|
||||
/// Power Config\
|
||||
/// See [Power Config](/docs/settings/config/power) for additional power config details.
|
||||
public struct PowerConfig: Sendable {
|
||||
public struct PowerConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -782,7 +764,7 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Network Config
|
||||
public struct NetworkConfig: Sendable {
|
||||
public struct NetworkConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -837,7 +819,7 @@ public struct Config: Sendable {
|
|||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public enum AddressMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum AddressMode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -869,17 +851,11 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.NetworkConfig.AddressMode] = [
|
||||
.dhcp,
|
||||
.static,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
/// Available flags auxiliary network protocols
|
||||
public enum ProtocolFlags: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum ProtocolFlags: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -911,15 +887,9 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.NetworkConfig.ProtocolFlags] = [
|
||||
.noBroadcast,
|
||||
.udpBroadcast,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public struct IpV4Config: Sendable {
|
||||
public struct IpV4Config {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -952,7 +922,7 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Display Config
|
||||
public struct DisplayConfig: Sendable {
|
||||
public struct DisplayConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -965,8 +935,6 @@ public struct Config: Sendable {
|
|||
///
|
||||
/// Deprecated in 2.7.4: Unused
|
||||
/// How the GPS coordinates are formatted on the OLED screen.
|
||||
///
|
||||
/// NOTE: This field was marked as deprecated in the .proto file.
|
||||
public var gpsFormat: Config.DisplayConfig.GpsCoordinateFormat = .dec
|
||||
|
||||
///
|
||||
|
|
@ -1016,7 +984,7 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// How the GPS coordinates are displayed on the OLED screen.
|
||||
public enum GpsCoordinateFormat: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum GpsCoordinateFormat: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1079,21 +1047,11 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DisplayConfig.GpsCoordinateFormat] = [
|
||||
.dec,
|
||||
.dms,
|
||||
.utm,
|
||||
.mgrs,
|
||||
.olc,
|
||||
.osgr,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
/// Unit display preference
|
||||
public enum DisplayUnits: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum DisplayUnits: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1125,17 +1083,11 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DisplayConfig.DisplayUnits] = [
|
||||
.metric,
|
||||
.imperial,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
/// Override OLED outo detect with this if it fails.
|
||||
public enum OledType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum OledType: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1185,18 +1137,9 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DisplayConfig.OledType] = [
|
||||
.oledAuto,
|
||||
.oledSsd1306,
|
||||
.oledSh1106,
|
||||
.oledSh1107,
|
||||
.oledSh110712864,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public enum DisplayMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum DisplayMode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1240,17 +1183,9 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DisplayConfig.DisplayMode] = [
|
||||
.default,
|
||||
.twocolor,
|
||||
.inverted,
|
||||
.color,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public enum CompassOrientation: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum CompassOrientation: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1318,18 +1253,6 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DisplayConfig.CompassOrientation] = [
|
||||
.degrees0,
|
||||
.degrees90,
|
||||
.degrees180,
|
||||
.degrees270,
|
||||
.degrees0Inverted,
|
||||
.degrees90Inverted,
|
||||
.degrees180Inverted,
|
||||
.degrees270Inverted,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -1337,7 +1260,7 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Lora Config
|
||||
public struct LoRaConfig: @unchecked Sendable {
|
||||
public struct LoRaConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1501,7 +1424,7 @@ public struct Config: Sendable {
|
|||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public enum RegionCode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum RegionCode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1603,6 +1526,14 @@ public struct Config: Sendable {
|
|||
///
|
||||
/// Kazakhstan 863MHz
|
||||
case kz863 // = 24
|
||||
|
||||
///
|
||||
/// Nepal 865MHz
|
||||
case np865 // = 25
|
||||
|
||||
///
|
||||
/// Brazil 902MHz
|
||||
case br902 // = 26
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
public init() {
|
||||
|
|
@ -1636,6 +1567,8 @@ public struct Config: Sendable {
|
|||
case 22: self = .anz433
|
||||
case 23: self = .kz433
|
||||
case 24: self = .kz863
|
||||
case 25: self = .np865
|
||||
case 26: self = .br902
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
|
@ -1667,45 +1600,18 @@ public struct Config: Sendable {
|
|||
case .anz433: return 22
|
||||
case .kz433: return 23
|
||||
case .kz863: return 24
|
||||
case .np865: return 25
|
||||
case .br902: return 26
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.LoRaConfig.RegionCode] = [
|
||||
.unset,
|
||||
.us,
|
||||
.eu433,
|
||||
.eu868,
|
||||
.cn,
|
||||
.jp,
|
||||
.anz,
|
||||
.kr,
|
||||
.tw,
|
||||
.ru,
|
||||
.in,
|
||||
.nz865,
|
||||
.th,
|
||||
.lora24,
|
||||
.ua433,
|
||||
.ua868,
|
||||
.my433,
|
||||
.my919,
|
||||
.sg923,
|
||||
.ph433,
|
||||
.ph868,
|
||||
.ph915,
|
||||
.anz433,
|
||||
.kz433,
|
||||
.kz863,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
/// Standard predefined channel settings
|
||||
/// Note: these mappings must match ModemPreset Choice in the device code.
|
||||
public enum ModemPreset: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum ModemPreset: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1719,8 +1625,6 @@ public struct Config: Sendable {
|
|||
///
|
||||
/// Very Long Range - Slow
|
||||
/// Deprecated in 2.5: Works only with txco and is unusably slow
|
||||
///
|
||||
/// NOTE: This enum value was marked as deprecated in the .proto file
|
||||
case veryLongSlow // = 2
|
||||
|
||||
///
|
||||
|
|
@ -1784,19 +1688,6 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.LoRaConfig.ModemPreset] = [
|
||||
.longFast,
|
||||
.longSlow,
|
||||
.veryLongSlow,
|
||||
.mediumSlow,
|
||||
.mediumFast,
|
||||
.shortSlow,
|
||||
.shortFast,
|
||||
.longModerate,
|
||||
.shortTurbo,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -1804,7 +1695,7 @@ public struct Config: Sendable {
|
|||
fileprivate var _storage = _StorageClass.defaultInstance
|
||||
}
|
||||
|
||||
public struct BluetoothConfig: Sendable {
|
||||
public struct BluetoothConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1823,7 +1714,7 @@ public struct Config: Sendable {
|
|||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public enum PairingMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum PairingMode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1861,19 +1752,12 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.BluetoothConfig.PairingMode] = [
|
||||
.randomPin,
|
||||
.fixedPin,
|
||||
.noPin,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
}
|
||||
|
||||
public struct SecurityConfig: @unchecked Sendable {
|
||||
public struct SecurityConfig {
|
||||
// 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.
|
||||
|
|
@ -1917,7 +1801,7 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Blank config request, strictly for getting the session key
|
||||
public struct SessionkeyConfig: Sendable {
|
||||
public struct SessionkeyConfig {
|
||||
// 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.
|
||||
|
|
@ -1930,6 +1814,235 @@ public struct Config: Sendable {
|
|||
public init() {}
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Config.DeviceConfig.Role: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DeviceConfig.Role] = [
|
||||
.client,
|
||||
.clientMute,
|
||||
.router,
|
||||
.routerClient,
|
||||
.repeater,
|
||||
.tracker,
|
||||
.sensor,
|
||||
.tak,
|
||||
.clientHidden,
|
||||
.lostAndFound,
|
||||
.takTracker,
|
||||
.routerLate,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.DeviceConfig.RebroadcastMode: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DeviceConfig.RebroadcastMode] = [
|
||||
.all,
|
||||
.allSkipDecoding,
|
||||
.localOnly,
|
||||
.knownOnly,
|
||||
.none,
|
||||
.corePortnumsOnly,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.DeviceConfig.BuzzerMode: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DeviceConfig.BuzzerMode] = [
|
||||
.allEnabled,
|
||||
.disabled,
|
||||
.notificationsOnly,
|
||||
.systemOnly,
|
||||
.directMsgOnly,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.PositionConfig.PositionFlags: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.PositionConfig.PositionFlags] = [
|
||||
.unset,
|
||||
.altitude,
|
||||
.altitudeMsl,
|
||||
.geoidalSeparation,
|
||||
.dop,
|
||||
.hvdop,
|
||||
.satinview,
|
||||
.seqNo,
|
||||
.timestamp,
|
||||
.heading,
|
||||
.speed,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.PositionConfig.GpsMode: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.PositionConfig.GpsMode] = [
|
||||
.disabled,
|
||||
.enabled,
|
||||
.notPresent,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.NetworkConfig.AddressMode: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.NetworkConfig.AddressMode] = [
|
||||
.dhcp,
|
||||
.static,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.NetworkConfig.ProtocolFlags: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.NetworkConfig.ProtocolFlags] = [
|
||||
.noBroadcast,
|
||||
.udpBroadcast,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.DisplayConfig.GpsCoordinateFormat: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DisplayConfig.GpsCoordinateFormat] = [
|
||||
.dec,
|
||||
.dms,
|
||||
.utm,
|
||||
.mgrs,
|
||||
.olc,
|
||||
.osgr,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.DisplayConfig.DisplayUnits: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DisplayConfig.DisplayUnits] = [
|
||||
.metric,
|
||||
.imperial,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.DisplayConfig.OledType: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DisplayConfig.OledType] = [
|
||||
.oledAuto,
|
||||
.oledSsd1306,
|
||||
.oledSh1106,
|
||||
.oledSh1107,
|
||||
.oledSh110712864,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.DisplayConfig.DisplayMode: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DisplayConfig.DisplayMode] = [
|
||||
.default,
|
||||
.twocolor,
|
||||
.inverted,
|
||||
.color,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.DisplayConfig.CompassOrientation: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.DisplayConfig.CompassOrientation] = [
|
||||
.degrees0,
|
||||
.degrees90,
|
||||
.degrees180,
|
||||
.degrees270,
|
||||
.degrees0Inverted,
|
||||
.degrees90Inverted,
|
||||
.degrees180Inverted,
|
||||
.degrees270Inverted,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.LoRaConfig.RegionCode: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.LoRaConfig.RegionCode] = [
|
||||
.unset,
|
||||
.us,
|
||||
.eu433,
|
||||
.eu868,
|
||||
.cn,
|
||||
.jp,
|
||||
.anz,
|
||||
.kr,
|
||||
.tw,
|
||||
.ru,
|
||||
.in,
|
||||
.nz865,
|
||||
.th,
|
||||
.lora24,
|
||||
.ua433,
|
||||
.ua868,
|
||||
.my433,
|
||||
.my919,
|
||||
.sg923,
|
||||
.ph433,
|
||||
.ph868,
|
||||
.ph915,
|
||||
.anz433,
|
||||
.kz433,
|
||||
.kz863,
|
||||
.np865,
|
||||
.br902,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.LoRaConfig.ModemPreset: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.LoRaConfig.ModemPreset] = [
|
||||
.longFast,
|
||||
.longSlow,
|
||||
.veryLongSlow,
|
||||
.mediumSlow,
|
||||
.mediumFast,
|
||||
.shortSlow,
|
||||
.shortFast,
|
||||
.longModerate,
|
||||
.shortTurbo,
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.BluetoothConfig.PairingMode: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.BluetoothConfig.PairingMode] = [
|
||||
.randomPin,
|
||||
.fixedPin,
|
||||
.noPin,
|
||||
]
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension Config: @unchecked Sendable {}
|
||||
extension Config.OneOf_PayloadVariant: @unchecked Sendable {}
|
||||
extension Config.DeviceConfig: @unchecked Sendable {}
|
||||
extension Config.DeviceConfig.Role: @unchecked Sendable {}
|
||||
extension Config.DeviceConfig.RebroadcastMode: @unchecked Sendable {}
|
||||
extension Config.DeviceConfig.BuzzerMode: @unchecked Sendable {}
|
||||
extension Config.PositionConfig: @unchecked Sendable {}
|
||||
extension Config.PositionConfig.PositionFlags: @unchecked Sendable {}
|
||||
extension Config.PositionConfig.GpsMode: @unchecked Sendable {}
|
||||
extension Config.PowerConfig: @unchecked Sendable {}
|
||||
extension Config.NetworkConfig: @unchecked Sendable {}
|
||||
extension Config.NetworkConfig.AddressMode: @unchecked Sendable {}
|
||||
extension Config.NetworkConfig.ProtocolFlags: @unchecked Sendable {}
|
||||
extension Config.NetworkConfig.IpV4Config: @unchecked Sendable {}
|
||||
extension Config.DisplayConfig: @unchecked Sendable {}
|
||||
extension Config.DisplayConfig.GpsCoordinateFormat: @unchecked Sendable {}
|
||||
extension Config.DisplayConfig.DisplayUnits: @unchecked Sendable {}
|
||||
extension Config.DisplayConfig.OledType: @unchecked Sendable {}
|
||||
extension Config.DisplayConfig.DisplayMode: @unchecked Sendable {}
|
||||
extension Config.DisplayConfig.CompassOrientation: @unchecked Sendable {}
|
||||
extension Config.LoRaConfig: @unchecked Sendable {}
|
||||
extension Config.LoRaConfig.RegionCode: @unchecked Sendable {}
|
||||
extension Config.LoRaConfig.ModemPreset: @unchecked Sendable {}
|
||||
extension Config.BluetoothConfig: @unchecked Sendable {}
|
||||
extension Config.BluetoothConfig.PairingMode: @unchecked Sendable {}
|
||||
extension Config.SecurityConfig: @unchecked Sendable {}
|
||||
extension Config.SessionkeyConfig: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "meshtastic"
|
||||
|
|
@ -2453,7 +2566,7 @@ extension Config.PowerConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImple
|
|||
if self.onBatteryShutdownAfterSecs != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.onBatteryShutdownAfterSecs, fieldNumber: 2)
|
||||
}
|
||||
if self.adcMultiplierOverride.bitPattern != 0 {
|
||||
if self.adcMultiplierOverride != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.adcMultiplierOverride, fieldNumber: 3)
|
||||
}
|
||||
if self.waitBluetoothSecs != 0 {
|
||||
|
|
@ -2927,7 +3040,7 @@ extension Config.LoRaConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
|
|||
if _storage._codingRate != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: _storage._codingRate, fieldNumber: 5)
|
||||
}
|
||||
if _storage._frequencyOffset.bitPattern != 0 {
|
||||
if _storage._frequencyOffset != 0 {
|
||||
try visitor.visitSingularFloatField(value: _storage._frequencyOffset, fieldNumber: 6)
|
||||
}
|
||||
if _storage._region != .unset {
|
||||
|
|
@ -2951,7 +3064,7 @@ extension Config.LoRaConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
|
|||
if _storage._sx126XRxBoostedGain != false {
|
||||
try visitor.visitSingularBoolField(value: _storage._sx126XRxBoostedGain, fieldNumber: 13)
|
||||
}
|
||||
if _storage._overrideFrequency.bitPattern != 0 {
|
||||
if _storage._overrideFrequency != 0 {
|
||||
try visitor.visitSingularFloatField(value: _storage._overrideFrequency, fieldNumber: 14)
|
||||
}
|
||||
if _storage._paFanDisabled != false {
|
||||
|
|
@ -3029,6 +3142,8 @@ extension Config.LoRaConfig.RegionCode: SwiftProtobuf._ProtoNameProviding {
|
|||
22: .same(proto: "ANZ_433"),
|
||||
23: .same(proto: "KZ_433"),
|
||||
24: .same(proto: "KZ_863"),
|
||||
25: .same(proto: "NP_865"),
|
||||
26: .same(proto: "BR_902"),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -3171,8 +3286,8 @@ extension Config.SessionkeyConfig: SwiftProtobuf.Message, SwiftProtobuf._Message
|
|||
public static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
// Load everything into unknown fields
|
||||
while try decoder.nextFieldNumber() != nil {}
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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: Sendable {
|
||||
public struct DeviceConnectionStatus {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -81,7 +81,7 @@ public struct DeviceConnectionStatus: Sendable {
|
|||
|
||||
///
|
||||
/// WiFi connection status
|
||||
public struct WifiConnectionStatus: Sendable {
|
||||
public struct WifiConnectionStatus {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -114,7 +114,7 @@ public struct WifiConnectionStatus: Sendable {
|
|||
|
||||
///
|
||||
/// Ethernet connection status
|
||||
public struct EthernetConnectionStatus: Sendable {
|
||||
public struct EthernetConnectionStatus {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -139,7 +139,7 @@ public struct EthernetConnectionStatus: Sendable {
|
|||
|
||||
///
|
||||
/// Ethernet or WiFi connection status
|
||||
public struct NetworkConnectionStatus: Sendable {
|
||||
public struct NetworkConnectionStatus {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -167,7 +167,7 @@ public struct NetworkConnectionStatus: Sendable {
|
|||
|
||||
///
|
||||
/// Bluetooth connection status
|
||||
public struct BluetoothConnectionStatus: Sendable {
|
||||
public struct BluetoothConnectionStatus {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -191,7 +191,7 @@ public struct BluetoothConnectionStatus: Sendable {
|
|||
|
||||
///
|
||||
/// Serial connection status
|
||||
public struct SerialConnectionStatus: Sendable {
|
||||
public struct SerialConnectionStatus {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -209,6 +209,15 @@ public struct SerialConnectionStatus: Sendable {
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -21,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
|||
typealias Version = _2
|
||||
}
|
||||
|
||||
public enum CompassMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum CompassMode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -59,16 +58,22 @@ public enum CompassMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#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,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public enum Theme: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
public enum Theme: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -106,18 +111,24 @@ public enum Theme: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#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, Swift.CaseIterable {
|
||||
public enum Language: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -257,6 +268,11 @@ public enum Language: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Language: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Language] = [
|
||||
.english,
|
||||
|
|
@ -280,10 +296,11 @@ public enum Language: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
.simplifiedChinese,
|
||||
.traditionalChinese,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public struct DeviceUIConfig: @unchecked Sendable {
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
public struct DeviceUIConfig {
|
||||
// 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.
|
||||
|
|
@ -427,7 +444,7 @@ public struct DeviceUIConfig: @unchecked Sendable {
|
|||
fileprivate var _storage = _StorageClass.defaultInstance
|
||||
}
|
||||
|
||||
public struct NodeFilter: Sendable {
|
||||
public struct NodeFilter {
|
||||
// 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.
|
||||
|
|
@ -465,7 +482,7 @@ public struct NodeFilter: Sendable {
|
|||
public init() {}
|
||||
}
|
||||
|
||||
public struct NodeHighlight: Sendable {
|
||||
public struct NodeHighlight {
|
||||
// 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.
|
||||
|
|
@ -495,7 +512,7 @@ public struct NodeHighlight: Sendable {
|
|||
public init() {}
|
||||
}
|
||||
|
||||
public struct GeoPoint: Sendable {
|
||||
public struct GeoPoint {
|
||||
// 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.
|
||||
|
|
@ -517,7 +534,7 @@ public struct GeoPoint: Sendable {
|
|||
public init() {}
|
||||
}
|
||||
|
||||
public struct Map: Sendable {
|
||||
public struct Map {
|
||||
// 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.
|
||||
|
|
@ -548,6 +565,17 @@ public struct Map: Sendable {
|
|||
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 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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -23,7 +22,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
|||
|
||||
///
|
||||
/// Position with static location information only for NodeDBLite
|
||||
public struct PositionLite: Sendable {
|
||||
public struct PositionLite {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -58,15 +57,13 @@ public struct PositionLite: Sendable {
|
|||
public init() {}
|
||||
}
|
||||
|
||||
public struct UserLite: @unchecked Sendable {
|
||||
public struct UserLite {
|
||||
// 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()
|
||||
|
||||
///
|
||||
|
|
@ -118,7 +115,7 @@ public struct UserLite: @unchecked Sendable {
|
|||
fileprivate var _isUnmessagable: Bool? = nil
|
||||
}
|
||||
|
||||
public struct NodeInfoLite: @unchecked Sendable {
|
||||
public struct NodeInfoLite {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -248,7 +245,7 @@ public struct NodeInfoLite: @unchecked Sendable {
|
|||
/// 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: @unchecked Sendable {
|
||||
public struct DeviceState {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -308,8 +305,6 @@ public struct DeviceState: @unchecked Sendable {
|
|||
/// 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}
|
||||
|
|
@ -318,8 +313,6 @@ public struct DeviceState: @unchecked Sendable {
|
|||
///
|
||||
/// 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}
|
||||
|
|
@ -352,7 +345,7 @@ public struct DeviceState: @unchecked Sendable {
|
|||
fileprivate var _storage = _StorageClass.defaultInstance
|
||||
}
|
||||
|
||||
public struct NodeDatabase: Sendable {
|
||||
public struct NodeDatabase {
|
||||
// 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.
|
||||
|
|
@ -374,7 +367,7 @@ public struct NodeDatabase: Sendable {
|
|||
|
||||
///
|
||||
/// The on-disk saved channels
|
||||
public struct ChannelFile: Sendable {
|
||||
public struct ChannelFile {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -396,7 +389,7 @@ public struct ChannelFile: Sendable {
|
|||
|
||||
///
|
||||
/// The on-disk backup of the node's preferences
|
||||
public struct BackupPreferences: Sendable {
|
||||
public struct BackupPreferences {
|
||||
// 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,6 +456,16 @@ public struct BackupPreferences: Sendable {
|
|||
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"
|
||||
|
|
@ -712,7 +715,7 @@ extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
try { if let v = _storage._position {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
||||
} }()
|
||||
if _storage._snr.bitPattern != 0 {
|
||||
if _storage._snr != 0 {
|
||||
try visitor.visitSingularFloatField(value: _storage._snr, fieldNumber: 4)
|
||||
}
|
||||
if _storage._lastHeard != 0 {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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, Swift.CaseIterable {
|
||||
public enum MessageType: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
case ack // = 0
|
||||
|
||||
|
|
@ -82,6 +82,11 @@ public enum MessageType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension MessageType: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [MessageType] = [
|
||||
.ack,
|
||||
|
|
@ -97,10 +102,11 @@ public enum MessageType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
.aht20Humidity,
|
||||
.tvocIndex,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public struct SensorData: Sendable {
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
public struct SensorData {
|
||||
// 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,16 +136,34 @@ public struct SensorData: Sendable {
|
|||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
/// The sensor data, either as a float or an uint32
|
||||
public enum OneOf_Data: Equatable, Sendable {
|
||||
public enum OneOf_Data: Equatable {
|
||||
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: Sendable {
|
||||
public struct InterdeviceMessage {
|
||||
// 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.
|
||||
|
|
@ -166,15 +190,41 @@ public struct InterdeviceMessage: Sendable {
|
|||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
/// The message data
|
||||
public enum OneOf_Data: Equatable, Sendable {
|
||||
public enum OneOf_Data: Equatable {
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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: @unchecked Sendable {
|
||||
public struct LocalConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -129,7 +129,7 @@ public struct LocalConfig: @unchecked Sendable {
|
|||
fileprivate var _storage = _StorageClass.defaultInstance
|
||||
}
|
||||
|
||||
public struct LocalModuleConfig: @unchecked Sendable {
|
||||
public struct LocalModuleConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -293,6 +293,11 @@ public struct LocalModuleConfig: @unchecked Sendable {
|
|||
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"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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, Swift.CaseIterable {
|
||||
public enum RemoteHardwarePinType: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -58,18 +58,24 @@ public enum RemoteHardwarePinType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#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: Sendable {
|
||||
public struct ModuleConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -212,7 +218,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public enum OneOf_PayloadVariant: Equatable, Sendable {
|
||||
public enum OneOf_PayloadVariant: Equatable {
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
case mqtt(ModuleConfig.MQTTConfig)
|
||||
|
|
@ -253,11 +259,73 @@ public struct ModuleConfig: Sendable {
|
|||
/// 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: Sendable {
|
||||
public struct MQTTConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -332,7 +400,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Settings for reporting unencrypted information about our node to a map via MQTT
|
||||
public struct MapReportSettings: Sendable {
|
||||
public struct MapReportSettings {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -356,7 +424,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// RemoteHardwareModule Config
|
||||
public struct RemoteHardwareConfig: Sendable {
|
||||
public struct RemoteHardwareConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -380,7 +448,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// NeighborInfoModule Config
|
||||
public struct NeighborInfoConfig: Sendable {
|
||||
public struct NeighborInfoConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -406,7 +474,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Detection Sensor Module Config
|
||||
public struct DetectionSensorConfig: Sendable {
|
||||
public struct DetectionSensorConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -453,7 +521,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public enum TriggerType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum TriggerType: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
/// Event is triggered if pin is low
|
||||
|
|
@ -505,16 +573,6 @@ public struct ModuleConfig: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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() {}
|
||||
|
|
@ -522,7 +580,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Audio Config for codec2 voice
|
||||
public struct AudioConfig: Sendable {
|
||||
public struct AudioConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -559,7 +617,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Baudrate for codec2 voice
|
||||
public enum Audio_Baud: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum Audio_Baud: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
case codec2Default // = 0
|
||||
case codec23200 // = 1
|
||||
|
|
@ -606,19 +664,6 @@ public struct ModuleConfig: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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() {}
|
||||
|
|
@ -626,7 +671,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Config for the Paxcounter Module
|
||||
public struct PaxcounterConfig: Sendable {
|
||||
public struct PaxcounterConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -652,7 +697,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Serial Config
|
||||
public struct SerialConfig: Sendable {
|
||||
public struct SerialConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -695,7 +740,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public enum Serial_Baud: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum Serial_Baud: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
case baudDefault // = 0
|
||||
case baud110 // = 1
|
||||
|
|
@ -763,31 +808,11 @@ public struct ModuleConfig: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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, Swift.CaseIterable {
|
||||
public enum Serial_Mode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
case `default` // = 0
|
||||
case simple // = 1
|
||||
|
|
@ -804,6 +829,10 @@ public struct ModuleConfig: Sendable {
|
|||
/// VE.Direct is a serial protocol used by Victron Energy products
|
||||
/// https://beta.ivc.no/wiki/index.php/Victron_VE_Direct_DIY_Cable
|
||||
case veDirect // = 7
|
||||
|
||||
///Used to configure and view some parameters of MeshSolar.
|
||||
///https://heltec.org/project/meshsolar/
|
||||
case msConfig // = 8
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
public init() {
|
||||
|
|
@ -820,6 +849,7 @@ public struct ModuleConfig: Sendable {
|
|||
case 5: self = .caltopo
|
||||
case 6: self = .ws85
|
||||
case 7: self = .veDirect
|
||||
case 8: self = .msConfig
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
|
@ -834,22 +864,11 @@ public struct ModuleConfig: Sendable {
|
|||
case .caltopo: return 5
|
||||
case .ws85: return 6
|
||||
case .veDirect: return 7
|
||||
case .msConfig: return 8
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
// 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,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -857,7 +876,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// External Notifications Config
|
||||
public struct ExternalNotificationConfig: Sendable {
|
||||
public struct ExternalNotificationConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -940,7 +959,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Store and Forward Module Config
|
||||
public struct StoreForwardConfig: Sendable {
|
||||
public struct StoreForwardConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -976,7 +995,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Preferences for the RangeTestModule
|
||||
public struct RangeTestConfig: Sendable {
|
||||
public struct RangeTestConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1001,7 +1020,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Configuration for both device and environment metrics
|
||||
public struct TelemetryConfig: Sendable {
|
||||
public struct TelemetryConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1070,7 +1089,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Canned Messages Module Config
|
||||
public struct CannedMessageConfig: Sendable {
|
||||
public struct CannedMessageConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1125,7 +1144,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public enum InputEventChar: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum InputEventChar: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1193,18 +1212,6 @@ public struct ModuleConfig: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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() {}
|
||||
|
|
@ -1213,7 +1220,7 @@ public struct ModuleConfig: Sendable {
|
|||
///
|
||||
///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: Sendable {
|
||||
public struct AmbientLightingConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1246,9 +1253,91 @@ public struct ModuleConfig: Sendable {
|
|||
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: Sendable {
|
||||
public struct RemoteHardwarePin {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1270,6 +1359,32 @@ public struct RemoteHardwarePin: Sendable {
|
|||
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"
|
||||
|
|
@ -2100,6 +2215,7 @@ extension ModuleConfig.SerialConfig.Serial_Mode: SwiftProtobuf._ProtoNameProvidi
|
|||
5: .same(proto: "CALTOPO"),
|
||||
6: .same(proto: "WS85"),
|
||||
7: .same(proto: "VE_DIRECT"),
|
||||
8: .same(proto: "MS_CONFIG"),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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: Sendable {
|
||||
public struct ServiceEnvelope {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -57,7 +57,7 @@ public struct ServiceEnvelope: Sendable {
|
|||
|
||||
///
|
||||
/// Information about a node intended to be reported unencrypted to a map using MQTT.
|
||||
public struct MapReport: Sendable {
|
||||
public struct MapReport {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -126,6 +126,11 @@ public struct MapReport: Sendable {
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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: Sendable {
|
||||
public struct Paxcount {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -44,6 +44,10 @@ public struct Paxcount: Sendable {
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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, Swift.CaseIterable {
|
||||
public enum PortNum: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -304,6 +304,11 @@ public enum PortNum: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension PortNum: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [PortNum] = [
|
||||
.unknownApp,
|
||||
|
|
@ -339,9 +344,14 @@ public enum PortNum: SwiftProtobuf.Enum, Swift.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 {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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: Sendable {
|
||||
public struct PowerMon {
|
||||
// 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: Sendable {
|
|||
|
||||
/// 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, Swift.CaseIterable {
|
||||
public enum State: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
case none // = 0
|
||||
case cpuDeepSleep // = 1
|
||||
|
|
@ -104,31 +104,37 @@ public struct PowerMon: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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: Sendable {
|
||||
public struct PowerStressMessage {
|
||||
// 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.
|
||||
|
|
@ -145,7 +151,7 @@ public struct PowerStressMessage: Sendable {
|
|||
/// 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, Swift.CaseIterable {
|
||||
public enum Opcode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -266,35 +272,48 @@ public struct PowerStressMessage: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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"
|
||||
|
|
@ -304,8 +323,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 {
|
||||
// Load everything into unknown fields
|
||||
while try decoder.nextFieldNumber() != nil {}
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
|
|
@ -360,7 +379,7 @@ extension PowerStressMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImple
|
|||
if self.cmd != .unset {
|
||||
try visitor.visitSingularEnumField(value: self.cmd, fieldNumber: 1)
|
||||
}
|
||||
if self.numSeconds.bitPattern != 0 {
|
||||
if self.numSeconds != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.numSeconds, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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: Sendable {
|
||||
public struct HardwareMessage {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -52,7 +52,7 @@ public struct HardwareMessage: Sendable {
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public enum TypeEnum: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum TypeEnum: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -110,21 +110,32 @@ public struct HardwareMessage: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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: Sendable {
|
||||
public struct RTTTLConfig {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -36,6 +36,10 @@ public struct RTTTLConfig: Sendable {
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -23,7 +22,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public struct StoreAndForward: @unchecked Sendable {
|
||||
public struct StoreAndForward {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -80,7 +79,7 @@ public struct StoreAndForward: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public enum OneOf_Variant: Equatable, @unchecked Sendable {
|
||||
public enum OneOf_Variant: Equatable {
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
case stats(StoreAndForward.Statistics)
|
||||
|
|
@ -94,12 +93,38 @@ public struct StoreAndForward: @unchecked Sendable {
|
|||
/// 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, Swift.CaseIterable {
|
||||
public enum RequestResponse: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -217,31 +242,11 @@ public struct StoreAndForward: @unchecked Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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: Sendable {
|
||||
public struct Statistics {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -289,7 +294,7 @@ public struct StoreAndForward: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public struct History: Sendable {
|
||||
public struct History {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -314,7 +319,7 @@ public struct StoreAndForward: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public struct Heartbeat: Sendable {
|
||||
public struct Heartbeat {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -335,6 +340,41 @@ public struct StoreAndForward: @unchecked Sendable {
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -8,6 +7,7 @@
|
|||
// 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, Swift.CaseIterable {
|
||||
public enum TelemetrySensorType: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -196,6 +196,10 @@ public enum TelemetrySensorType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
///
|
||||
/// Sensirion SFA30 Formaldehyde sensor
|
||||
case sfa30 // = 42
|
||||
|
||||
///
|
||||
/// SEN5X PM SENSORS
|
||||
case sen5X // = 43
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
public init() {
|
||||
|
|
@ -247,6 +251,7 @@ public enum TelemetrySensorType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
case 40: self = .ads1X15
|
||||
case 41: self = .ads1X15Alt
|
||||
case 42: self = .sfa30
|
||||
case 43: self = .sen5X
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
|
@ -296,10 +301,16 @@ public enum TelemetrySensorType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
case .ads1X15: return 40
|
||||
case .ads1X15Alt: return 41
|
||||
case .sfa30: return 42
|
||||
case .sen5X: return 43
|
||||
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,
|
||||
|
|
@ -345,13 +356,15 @@ public enum TelemetrySensorType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
.ads1X15,
|
||||
.ads1X15Alt,
|
||||
.sfa30,
|
||||
.sen5X,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
///
|
||||
/// Key native device metrics such as battery level
|
||||
public struct DeviceMetrics: Sendable {
|
||||
public struct DeviceMetrics {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -424,7 +437,7 @@ public struct DeviceMetrics: Sendable {
|
|||
|
||||
///
|
||||
/// Weather station or other environmental metrics
|
||||
public struct EnvironmentMetrics: @unchecked Sendable {
|
||||
public struct EnvironmentMetrics {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -682,7 +695,7 @@ public struct EnvironmentMetrics: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// Power Metrics (voltage / current / etc)
|
||||
public struct PowerMetrics: Sendable {
|
||||
public struct PowerMetrics {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -887,13 +900,13 @@ public struct PowerMetrics: Sendable {
|
|||
|
||||
///
|
||||
/// Air quality metrics
|
||||
public struct AirQualityMetrics: @unchecked Sendable {
|
||||
public struct AirQualityMetrics {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
||||
///
|
||||
/// Concentration Units Standard PM1.0
|
||||
/// Concentration Units Standard PM1.0 in ug/m3
|
||||
public var pm10Standard: UInt32 {
|
||||
get {return _storage._pm10Standard ?? 0}
|
||||
set {_uniqueStorage()._pm10Standard = newValue}
|
||||
|
|
@ -904,7 +917,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearPm10Standard() {_uniqueStorage()._pm10Standard = nil}
|
||||
|
||||
///
|
||||
/// Concentration Units Standard PM2.5
|
||||
/// Concentration Units Standard PM2.5 in ug/m3
|
||||
public var pm25Standard: UInt32 {
|
||||
get {return _storage._pm25Standard ?? 0}
|
||||
set {_uniqueStorage()._pm25Standard = newValue}
|
||||
|
|
@ -915,7 +928,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearPm25Standard() {_uniqueStorage()._pm25Standard = nil}
|
||||
|
||||
///
|
||||
/// Concentration Units Standard PM10.0
|
||||
/// Concentration Units Standard PM10.0 in ug/m3
|
||||
public var pm100Standard: UInt32 {
|
||||
get {return _storage._pm100Standard ?? 0}
|
||||
set {_uniqueStorage()._pm100Standard = newValue}
|
||||
|
|
@ -926,7 +939,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearPm100Standard() {_uniqueStorage()._pm100Standard = nil}
|
||||
|
||||
///
|
||||
/// Concentration Units Environmental PM1.0
|
||||
/// Concentration Units Environmental PM1.0 in ug/m3
|
||||
public var pm10Environmental: UInt32 {
|
||||
get {return _storage._pm10Environmental ?? 0}
|
||||
set {_uniqueStorage()._pm10Environmental = newValue}
|
||||
|
|
@ -937,7 +950,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearPm10Environmental() {_uniqueStorage()._pm10Environmental = nil}
|
||||
|
||||
///
|
||||
/// Concentration Units Environmental PM2.5
|
||||
/// Concentration Units Environmental PM2.5 in ug/m3
|
||||
public var pm25Environmental: UInt32 {
|
||||
get {return _storage._pm25Environmental ?? 0}
|
||||
set {_uniqueStorage()._pm25Environmental = newValue}
|
||||
|
|
@ -948,7 +961,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearPm25Environmental() {_uniqueStorage()._pm25Environmental = nil}
|
||||
|
||||
///
|
||||
/// Concentration Units Environmental PM10.0
|
||||
/// Concentration Units Environmental PM10.0 in ug/m3
|
||||
public var pm100Environmental: UInt32 {
|
||||
get {return _storage._pm100Environmental ?? 0}
|
||||
set {_uniqueStorage()._pm100Environmental = newValue}
|
||||
|
|
@ -959,7 +972,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearPm100Environmental() {_uniqueStorage()._pm100Environmental = nil}
|
||||
|
||||
///
|
||||
/// 0.3um Particle Count
|
||||
/// 0.3um Particle Count in #/0.1l
|
||||
public var particles03Um: UInt32 {
|
||||
get {return _storage._particles03Um ?? 0}
|
||||
set {_uniqueStorage()._particles03Um = newValue}
|
||||
|
|
@ -970,7 +983,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearParticles03Um() {_uniqueStorage()._particles03Um = nil}
|
||||
|
||||
///
|
||||
/// 0.5um Particle Count
|
||||
/// 0.5um Particle Count in #/0.1l
|
||||
public var particles05Um: UInt32 {
|
||||
get {return _storage._particles05Um ?? 0}
|
||||
set {_uniqueStorage()._particles05Um = newValue}
|
||||
|
|
@ -981,7 +994,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearParticles05Um() {_uniqueStorage()._particles05Um = nil}
|
||||
|
||||
///
|
||||
/// 1.0um Particle Count
|
||||
/// 1.0um Particle Count in #/0.1l
|
||||
public var particles10Um: UInt32 {
|
||||
get {return _storage._particles10Um ?? 0}
|
||||
set {_uniqueStorage()._particles10Um = newValue}
|
||||
|
|
@ -992,7 +1005,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearParticles10Um() {_uniqueStorage()._particles10Um = nil}
|
||||
|
||||
///
|
||||
/// 2.5um Particle Count
|
||||
/// 2.5um Particle Count in #/0.1l
|
||||
public var particles25Um: UInt32 {
|
||||
get {return _storage._particles25Um ?? 0}
|
||||
set {_uniqueStorage()._particles25Um = newValue}
|
||||
|
|
@ -1003,7 +1016,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearParticles25Um() {_uniqueStorage()._particles25Um = nil}
|
||||
|
||||
///
|
||||
/// 5.0um Particle Count
|
||||
/// 5.0um Particle Count in #/0.1l
|
||||
public var particles50Um: UInt32 {
|
||||
get {return _storage._particles50Um ?? 0}
|
||||
set {_uniqueStorage()._particles50Um = newValue}
|
||||
|
|
@ -1014,7 +1027,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
public mutating func clearParticles50Um() {_uniqueStorage()._particles50Um = nil}
|
||||
|
||||
///
|
||||
/// 10.0um Particle Count
|
||||
/// 10.0um Particle Count in #/0.1l
|
||||
public var particles100Um: UInt32 {
|
||||
get {return _storage._particles100Um ?? 0}
|
||||
set {_uniqueStorage()._particles100Um = newValue}
|
||||
|
|
@ -1090,6 +1103,83 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
/// Clears the value of `formTemperature`. Subsequent reads from it will return its default value.
|
||||
public mutating func clearFormTemperature() {_uniqueStorage()._formTemperature = nil}
|
||||
|
||||
///
|
||||
/// Concentration Units Standard PM4.0 in ug/m3
|
||||
public var pm40Standard: UInt32 {
|
||||
get {return _storage._pm40Standard ?? 0}
|
||||
set {_uniqueStorage()._pm40Standard = newValue}
|
||||
}
|
||||
/// Returns true if `pm40Standard` has been explicitly set.
|
||||
public var hasPm40Standard: Bool {return _storage._pm40Standard != nil}
|
||||
/// Clears the value of `pm40Standard`. Subsequent reads from it will return its default value.
|
||||
public mutating func clearPm40Standard() {_uniqueStorage()._pm40Standard = nil}
|
||||
|
||||
///
|
||||
/// 4.0um Particle Count in #/0.1l
|
||||
public var particles40Um: UInt32 {
|
||||
get {return _storage._particles40Um ?? 0}
|
||||
set {_uniqueStorage()._particles40Um = newValue}
|
||||
}
|
||||
/// Returns true if `particles40Um` has been explicitly set.
|
||||
public var hasParticles40Um: Bool {return _storage._particles40Um != nil}
|
||||
/// Clears the value of `particles40Um`. Subsequent reads from it will return its default value.
|
||||
public mutating func clearParticles40Um() {_uniqueStorage()._particles40Um = nil}
|
||||
|
||||
///
|
||||
/// PM Sensor Temperature
|
||||
public var pmTemperature: Float {
|
||||
get {return _storage._pmTemperature ?? 0}
|
||||
set {_uniqueStorage()._pmTemperature = newValue}
|
||||
}
|
||||
/// Returns true if `pmTemperature` has been explicitly set.
|
||||
public var hasPmTemperature: Bool {return _storage._pmTemperature != nil}
|
||||
/// Clears the value of `pmTemperature`. Subsequent reads from it will return its default value.
|
||||
public mutating func clearPmTemperature() {_uniqueStorage()._pmTemperature = nil}
|
||||
|
||||
///
|
||||
/// PM Sensor humidity
|
||||
public var pmHumidity: Float {
|
||||
get {return _storage._pmHumidity ?? 0}
|
||||
set {_uniqueStorage()._pmHumidity = newValue}
|
||||
}
|
||||
/// Returns true if `pmHumidity` has been explicitly set.
|
||||
public var hasPmHumidity: Bool {return _storage._pmHumidity != nil}
|
||||
/// Clears the value of `pmHumidity`. Subsequent reads from it will return its default value.
|
||||
public mutating func clearPmHumidity() {_uniqueStorage()._pmHumidity = nil}
|
||||
|
||||
///
|
||||
/// PM Sensor VOC Index
|
||||
public var pmVocIdx: Float {
|
||||
get {return _storage._pmVocIdx ?? 0}
|
||||
set {_uniqueStorage()._pmVocIdx = newValue}
|
||||
}
|
||||
/// Returns true if `pmVocIdx` has been explicitly set.
|
||||
public var hasPmVocIdx: Bool {return _storage._pmVocIdx != nil}
|
||||
/// Clears the value of `pmVocIdx`. Subsequent reads from it will return its default value.
|
||||
public mutating func clearPmVocIdx() {_uniqueStorage()._pmVocIdx = nil}
|
||||
|
||||
///
|
||||
/// PM Sensor NOx Index
|
||||
public var pmNoxIdx: Float {
|
||||
get {return _storage._pmNoxIdx ?? 0}
|
||||
set {_uniqueStorage()._pmNoxIdx = newValue}
|
||||
}
|
||||
/// Returns true if `pmNoxIdx` has been explicitly set.
|
||||
public var hasPmNoxIdx: Bool {return _storage._pmNoxIdx != nil}
|
||||
/// Clears the value of `pmNoxIdx`. Subsequent reads from it will return its default value.
|
||||
public mutating func clearPmNoxIdx() {_uniqueStorage()._pmNoxIdx = nil}
|
||||
|
||||
///
|
||||
/// Typical Particle Size in um
|
||||
public var particlesTps: Float {
|
||||
get {return _storage._particlesTps ?? 0}
|
||||
set {_uniqueStorage()._particlesTps = newValue}
|
||||
}
|
||||
/// Returns true if `particlesTps` has been explicitly set.
|
||||
public var hasParticlesTps: Bool {return _storage._particlesTps != nil}
|
||||
/// Clears the value of `particlesTps`. Subsequent reads from it will return its default value.
|
||||
public mutating func clearParticlesTps() {_uniqueStorage()._particlesTps = nil}
|
||||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public init() {}
|
||||
|
|
@ -1099,7 +1189,7 @@ public struct AirQualityMetrics: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// Local device mesh statistics
|
||||
public struct LocalStats: Sendable {
|
||||
public struct LocalStats {
|
||||
// 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.
|
||||
|
|
@ -1165,7 +1255,7 @@ public struct LocalStats: Sendable {
|
|||
|
||||
///
|
||||
/// Health telemetry metrics
|
||||
public struct HealthMetrics: Sendable {
|
||||
public struct HealthMetrics {
|
||||
// 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.
|
||||
|
|
@ -1214,7 +1304,7 @@ public struct HealthMetrics: Sendable {
|
|||
|
||||
///
|
||||
/// Linux host metrics
|
||||
public struct HostMetrics: Sendable {
|
||||
public struct HostMetrics {
|
||||
// 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.
|
||||
|
|
@ -1288,7 +1378,7 @@ public struct HostMetrics: Sendable {
|
|||
|
||||
///
|
||||
/// Types of Measurements the telemetry module is equipped to handle
|
||||
public struct Telemetry: @unchecked Sendable {
|
||||
public struct Telemetry {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1377,7 +1467,7 @@ public struct Telemetry: @unchecked Sendable {
|
|||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public enum OneOf_Variant: Equatable, Sendable {
|
||||
public enum OneOf_Variant: Equatable {
|
||||
///
|
||||
/// Key native device metrics such as battery level
|
||||
case deviceMetrics(DeviceMetrics)
|
||||
|
|
@ -1400,6 +1490,44 @@ public struct Telemetry: @unchecked Sendable {
|
|||
/// 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() {}
|
||||
|
|
@ -1409,7 +1537,7 @@ public struct Telemetry: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// NAU7802 Telemetry configuration, for saving to flash
|
||||
public struct Nau7802Config: Sendable {
|
||||
public struct Nau7802Config {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -1427,6 +1555,20 @@ public struct Nau7802Config: Sendable {
|
|||
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"
|
||||
|
|
@ -1476,6 +1618,7 @@ extension TelemetrySensorType: SwiftProtobuf._ProtoNameProviding {
|
|||
40: .same(proto: "ADS1X15"),
|
||||
41: .same(proto: "ADS1X15_ALT"),
|
||||
42: .same(proto: "SFA30"),
|
||||
43: .same(proto: "SEN5X"),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -1930,6 +2073,13 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
|
|||
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"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
|
|
@ -1951,6 +2101,13 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
|
|||
var _formFormaldehyde: Float? = nil
|
||||
var _formHumidity: Float? = nil
|
||||
var _formTemperature: Float? = nil
|
||||
var _pm40Standard: UInt32? = nil
|
||||
var _particles40Um: UInt32? = nil
|
||||
var _pmTemperature: Float? = nil
|
||||
var _pmHumidity: Float? = nil
|
||||
var _pmVocIdx: Float? = nil
|
||||
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.
|
||||
|
|
@ -1983,6 +2140,13 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
|
|||
_formFormaldehyde = source._formFormaldehyde
|
||||
_formHumidity = source._formHumidity
|
||||
_formTemperature = source._formTemperature
|
||||
_pm40Standard = source._pm40Standard
|
||||
_particles40Um = source._particles40Um
|
||||
_pmTemperature = source._pmTemperature
|
||||
_pmHumidity = source._pmHumidity
|
||||
_pmVocIdx = source._pmVocIdx
|
||||
_pmNoxIdx = source._pmNoxIdx
|
||||
_particlesTps = source._particlesTps
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2019,6 +2183,13 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
|
|||
case 16: try { try decoder.decodeSingularFloatField(value: &_storage._formFormaldehyde) }()
|
||||
case 17: try { try decoder.decodeSingularFloatField(value: &_storage._formHumidity) }()
|
||||
case 18: try { try decoder.decodeSingularFloatField(value: &_storage._formTemperature) }()
|
||||
case 19: try { try decoder.decodeSingularUInt32Field(value: &_storage._pm40Standard) }()
|
||||
case 20: try { try decoder.decodeSingularUInt32Field(value: &_storage._particles40Um) }()
|
||||
case 21: try { try decoder.decodeSingularFloatField(value: &_storage._pmTemperature) }()
|
||||
case 22: try { try decoder.decodeSingularFloatField(value: &_storage._pmHumidity) }()
|
||||
case 23: try { try decoder.decodeSingularFloatField(value: &_storage._pmVocIdx) }()
|
||||
case 24: try { try decoder.decodeSingularFloatField(value: &_storage._pmNoxIdx) }()
|
||||
case 25: try { try decoder.decodeSingularFloatField(value: &_storage._particlesTps) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
|
|
@ -2085,6 +2256,27 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
|
|||
try { if let v = _storage._formTemperature {
|
||||
try visitor.visitSingularFloatField(value: v, fieldNumber: 18)
|
||||
} }()
|
||||
try { if let v = _storage._pm40Standard {
|
||||
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 19)
|
||||
} }()
|
||||
try { if let v = _storage._particles40Um {
|
||||
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 20)
|
||||
} }()
|
||||
try { if let v = _storage._pmTemperature {
|
||||
try visitor.visitSingularFloatField(value: v, fieldNumber: 21)
|
||||
} }()
|
||||
try { if let v = _storage._pmHumidity {
|
||||
try visitor.visitSingularFloatField(value: v, fieldNumber: 22)
|
||||
} }()
|
||||
try { if let v = _storage._pmVocIdx {
|
||||
try visitor.visitSingularFloatField(value: v, fieldNumber: 23)
|
||||
} }()
|
||||
try { if let v = _storage._pmNoxIdx {
|
||||
try visitor.visitSingularFloatField(value: v, fieldNumber: 24)
|
||||
} }()
|
||||
try { if let v = _storage._particlesTps {
|
||||
try visitor.visitSingularFloatField(value: v, fieldNumber: 25)
|
||||
} }()
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
|
@ -2112,6 +2304,13 @@ extension AirQualityMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
|
|||
if _storage._formFormaldehyde != rhs_storage._formFormaldehyde {return false}
|
||||
if _storage._formHumidity != rhs_storage._formHumidity {return false}
|
||||
if _storage._formTemperature != rhs_storage._formTemperature {return false}
|
||||
if _storage._pm40Standard != rhs_storage._pm40Standard {return false}
|
||||
if _storage._particles40Um != rhs_storage._particles40Um {return false}
|
||||
if _storage._pmTemperature != rhs_storage._pmTemperature {return false}
|
||||
if _storage._pmHumidity != rhs_storage._pmHumidity {return false}
|
||||
if _storage._pmVocIdx != rhs_storage._pmVocIdx {return false}
|
||||
if _storage._pmNoxIdx != rhs_storage._pmNoxIdx {return false}
|
||||
if _storage._particlesTps != rhs_storage._particlesTps {return false}
|
||||
return true
|
||||
}
|
||||
if !storagesAreEqual {return false}
|
||||
|
|
@ -2167,10 +2366,10 @@ extension LocalStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio
|
|||
if self.uptimeSeconds != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.uptimeSeconds, fieldNumber: 1)
|
||||
}
|
||||
if self.channelUtilization.bitPattern != 0 {
|
||||
if self.channelUtilization != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.channelUtilization, fieldNumber: 2)
|
||||
}
|
||||
if self.airUtilTx.bitPattern != 0 {
|
||||
if self.airUtilTx != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.airUtilTx, fieldNumber: 3)
|
||||
}
|
||||
if self.numPacketsTx != 0 {
|
||||
|
|
@ -2589,7 +2788,7 @@ extension Nau7802Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
|
|||
if self.zeroOffset != 0 {
|
||||
try visitor.visitSingularInt32Field(value: self.zeroOffset, fieldNumber: 1)
|
||||
}
|
||||
if self.calibrationFactor.bitPattern != 0 {
|
||||
if self.calibrationFactor != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.calibrationFactor, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// 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
|
||||
|
|
@ -21,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
|||
typealias Version = _2
|
||||
}
|
||||
|
||||
public struct XModem: @unchecked Sendable {
|
||||
public struct XModem {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -36,7 +35,7 @@ public struct XModem: @unchecked Sendable {
|
|||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public enum Control: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum Control: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
case nul // = 0
|
||||
case soh // = 1
|
||||
|
|
@ -80,23 +79,34 @@ public struct XModem: @unchecked Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue