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
5f334e7855
commit
af508451f4
22 changed files with 2886 additions and 845 deletions
|
|
@ -24,11 +24,17 @@ 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: 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.
|
||||
|
||||
///
|
||||
/// The node generates this key and sends it with any get_x_response packets.
|
||||
/// The client MUST include the same key with any set_x commands. Key expires after 300 seconds.
|
||||
/// Prevents replay attacks for admin messages.
|
||||
public var sessionPasskey: Data = Data()
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public var payloadVariant: AdminMessage.OneOf_PayloadVariant? = nil
|
||||
|
|
@ -369,6 +375,17 @@ public struct AdminMessage: Sendable {
|
|||
set {payloadVariant = .removeFixedPosition(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
/// Set time only on the node
|
||||
/// Convenience method to set the time on the node (as Net quality) without any other position data
|
||||
public var setTimeOnly: UInt32 {
|
||||
get {
|
||||
if case .setTimeOnly(let v)? = payloadVariant {return v}
|
||||
return 0
|
||||
}
|
||||
set {payloadVariant = .setTimeOnly(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
/// Begins an edit transaction for config, module config, owner, and channel settings changes
|
||||
/// This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings)
|
||||
|
|
@ -390,6 +407,16 @@ public struct AdminMessage: Sendable {
|
|||
set {payloadVariant = .commitEditSettings(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
/// Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared.
|
||||
public var factoryResetDevice: Int32 {
|
||||
get {
|
||||
if case .factoryResetDevice(let v)? = payloadVariant {return v}
|
||||
return 0
|
||||
}
|
||||
set {payloadVariant = .factoryResetDevice(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
/// Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot)
|
||||
/// Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth.
|
||||
|
|
@ -433,13 +460,13 @@ public struct AdminMessage: Sendable {
|
|||
}
|
||||
|
||||
///
|
||||
/// Tell the node to factory reset, all device settings will be returned to factory defaults.
|
||||
public var factoryReset: Int32 {
|
||||
/// Tell the node to factory reset config; all device state and configuration will be returned to factory defaults; BLE bonds will be preserved.
|
||||
public var factoryResetConfig: Int32 {
|
||||
get {
|
||||
if case .factoryReset(let v)? = payloadVariant {return v}
|
||||
if case .factoryResetConfig(let v)? = payloadVariant {return v}
|
||||
return 0
|
||||
}
|
||||
set {payloadVariant = .factoryReset(newValue)}
|
||||
set {payloadVariant = .factoryResetConfig(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
|
|
@ -456,7 +483,7 @@ public struct AdminMessage: 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)
|
||||
|
|
@ -563,6 +590,10 @@ public struct AdminMessage: Sendable {
|
|||
/// Clear fixed position coordinates and then set position.fixed_position = false
|
||||
case removeFixedPosition(Bool)
|
||||
///
|
||||
/// Set time only on the node
|
||||
/// Convenience method to set the time on the node (as Net quality) without any other position data
|
||||
case setTimeOnly(UInt32)
|
||||
///
|
||||
/// Begins an edit transaction for config, module config, owner, and channel settings changes
|
||||
/// This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings)
|
||||
case beginEditSettings(Bool)
|
||||
|
|
@ -570,6 +601,9 @@ public struct AdminMessage: Sendable {
|
|||
/// Commits an open transaction for any edits made to config, module config, owner, and channel settings
|
||||
case commitEditSettings(Bool)
|
||||
///
|
||||
/// Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared.
|
||||
case factoryResetDevice(Int32)
|
||||
///
|
||||
/// Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot)
|
||||
/// Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth.
|
||||
case rebootOtaSeconds(Int32)
|
||||
|
|
@ -584,17 +618,199 @@ public struct AdminMessage: Sendable {
|
|||
/// Tell the node to shutdown in this many seconds (or <0 to cancel shutdown)
|
||||
case shutdownSeconds(Int32)
|
||||
///
|
||||
/// Tell the node to factory reset, all device settings will be returned to factory defaults.
|
||||
case factoryReset(Int32)
|
||||
/// Tell the node to factory reset config; all device state and configuration will be returned to factory defaults; BLE bonds will be preserved.
|
||||
case factoryResetConfig(Int32)
|
||||
///
|
||||
/// 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 (.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 (.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 (.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
|
||||
|
||||
///
|
||||
|
|
@ -624,6 +840,10 @@ public struct AdminMessage: Sendable {
|
|||
///
|
||||
/// TODO: REPLACE
|
||||
case bluetoothConfig // = 6
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
case securityConfig // = 7
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
public init() {
|
||||
|
|
@ -639,6 +859,7 @@ public struct AdminMessage: Sendable {
|
|||
case 4: self = .displayConfig
|
||||
case 5: self = .loraConfig
|
||||
case 6: self = .bluetoothConfig
|
||||
case 7: self = .securityConfig
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
|
@ -652,26 +873,16 @@ public struct AdminMessage: Sendable {
|
|||
case .displayConfig: return 4
|
||||
case .loraConfig: return 5
|
||||
case .bluetoothConfig: return 6
|
||||
case .securityConfig: return 7
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [AdminMessage.ConfigType] = [
|
||||
.deviceConfig,
|
||||
.positionConfig,
|
||||
.powerConfig,
|
||||
.networkConfig,
|
||||
.displayConfig,
|
||||
.loraConfig,
|
||||
.bluetoothConfig,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public enum ModuleConfigType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum ModuleConfigType: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -769,31 +980,51 @@ public struct AdminMessage: 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 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,
|
||||
]
|
||||
}
|
||||
|
||||
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,
|
||||
]
|
||||
}
|
||||
|
||||
#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.
|
||||
|
|
@ -823,7 +1054,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.
|
||||
|
|
@ -837,6 +1068,15 @@ public struct NodeRemoteHardwarePinsResponse: Sendable {
|
|||
public init() {}
|
||||
}
|
||||
|
||||
#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 HamParameters: @unchecked Sendable {}
|
||||
extension NodeRemoteHardwarePinsResponse: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "meshtastic"
|
||||
|
|
@ -844,6 +1084,7 @@ fileprivate let _protobuf_package = "meshtastic"
|
|||
extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
public static let protoMessageName: String = _protobuf_package + ".AdminMessage"
|
||||
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
101: .standard(proto: "session_passkey"),
|
||||
1: .standard(proto: "get_channel_request"),
|
||||
2: .standard(proto: "get_channel_response"),
|
||||
3: .standard(proto: "get_owner_request"),
|
||||
|
|
@ -877,13 +1118,15 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
40: .standard(proto: "remove_favorite_node"),
|
||||
41: .standard(proto: "set_fixed_position"),
|
||||
42: .standard(proto: "remove_fixed_position"),
|
||||
43: .standard(proto: "set_time_only"),
|
||||
64: .standard(proto: "begin_edit_settings"),
|
||||
65: .standard(proto: "commit_edit_settings"),
|
||||
94: .standard(proto: "factory_reset_device"),
|
||||
95: .standard(proto: "reboot_ota_seconds"),
|
||||
96: .standard(proto: "exit_simulator"),
|
||||
97: .standard(proto: "reboot_seconds"),
|
||||
98: .standard(proto: "shutdown_seconds"),
|
||||
99: .standard(proto: "factory_reset"),
|
||||
99: .standard(proto: "factory_reset_config"),
|
||||
100: .standard(proto: "nodedb_reset"),
|
||||
]
|
||||
|
||||
|
|
@ -1222,6 +1465,14 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
self.payloadVariant = .removeFixedPosition(v)
|
||||
}
|
||||
}()
|
||||
case 43: try {
|
||||
var v: UInt32?
|
||||
try decoder.decodeSingularFixed32Field(value: &v)
|
||||
if let v = v {
|
||||
if self.payloadVariant != nil {try decoder.handleConflictingOneOf()}
|
||||
self.payloadVariant = .setTimeOnly(v)
|
||||
}
|
||||
}()
|
||||
case 64: try {
|
||||
var v: Bool?
|
||||
try decoder.decodeSingularBoolField(value: &v)
|
||||
|
|
@ -1238,6 +1489,14 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
self.payloadVariant = .commitEditSettings(v)
|
||||
}
|
||||
}()
|
||||
case 94: try {
|
||||
var v: Int32?
|
||||
try decoder.decodeSingularInt32Field(value: &v)
|
||||
if let v = v {
|
||||
if self.payloadVariant != nil {try decoder.handleConflictingOneOf()}
|
||||
self.payloadVariant = .factoryResetDevice(v)
|
||||
}
|
||||
}()
|
||||
case 95: try {
|
||||
var v: Int32?
|
||||
try decoder.decodeSingularInt32Field(value: &v)
|
||||
|
|
@ -1275,7 +1534,7 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
try decoder.decodeSingularInt32Field(value: &v)
|
||||
if let v = v {
|
||||
if self.payloadVariant != nil {try decoder.handleConflictingOneOf()}
|
||||
self.payloadVariant = .factoryReset(v)
|
||||
self.payloadVariant = .factoryResetConfig(v)
|
||||
}
|
||||
}()
|
||||
case 100: try {
|
||||
|
|
@ -1286,6 +1545,7 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
self.payloadVariant = .nodedbReset(v)
|
||||
}
|
||||
}()
|
||||
case 101: try { try decoder.decodeSingularBytesField(value: &self.sessionPasskey) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
|
|
@ -1429,6 +1689,10 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
guard case .removeFixedPosition(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
try visitor.visitSingularBoolField(value: v, fieldNumber: 42)
|
||||
}()
|
||||
case .setTimeOnly?: try {
|
||||
guard case .setTimeOnly(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
try visitor.visitSingularFixed32Field(value: v, fieldNumber: 43)
|
||||
}()
|
||||
case .beginEditSettings?: try {
|
||||
guard case .beginEditSettings(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
try visitor.visitSingularBoolField(value: v, fieldNumber: 64)
|
||||
|
|
@ -1437,6 +1701,10 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
guard case .commitEditSettings(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
try visitor.visitSingularBoolField(value: v, fieldNumber: 65)
|
||||
}()
|
||||
case .factoryResetDevice?: try {
|
||||
guard case .factoryResetDevice(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
try visitor.visitSingularInt32Field(value: v, fieldNumber: 94)
|
||||
}()
|
||||
case .rebootOtaSeconds?: try {
|
||||
guard case .rebootOtaSeconds(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
try visitor.visitSingularInt32Field(value: v, fieldNumber: 95)
|
||||
|
|
@ -1453,8 +1721,8 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
guard case .shutdownSeconds(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
try visitor.visitSingularInt32Field(value: v, fieldNumber: 98)
|
||||
}()
|
||||
case .factoryReset?: try {
|
||||
guard case .factoryReset(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
case .factoryResetConfig?: try {
|
||||
guard case .factoryResetConfig(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
try visitor.visitSingularInt32Field(value: v, fieldNumber: 99)
|
||||
}()
|
||||
case .nodedbReset?: try {
|
||||
|
|
@ -1463,10 +1731,14 @@ extension AdminMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
}()
|
||||
case nil: break
|
||||
}
|
||||
if !self.sessionPasskey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.sessionPasskey, fieldNumber: 101)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
public static func ==(lhs: AdminMessage, rhs: AdminMessage) -> Bool {
|
||||
if lhs.sessionPasskey != rhs.sessionPasskey {return false}
|
||||
if lhs.payloadVariant != rhs.payloadVariant {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
|
|
@ -1482,6 +1754,7 @@ extension AdminMessage.ConfigType: SwiftProtobuf._ProtoNameProviding {
|
|||
4: .same(proto: "DISPLAY_CONFIG"),
|
||||
5: .same(proto: "LORA_CONFIG"),
|
||||
6: .same(proto: "BLUETOOTH_CONFIG"),
|
||||
7: .same(proto: "SECURITY_CONFIG"),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -1534,7 +1807,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 {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -20,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
|
||||
|
||||
///
|
||||
|
|
@ -130,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,
|
||||
|
|
@ -148,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
|
||||
|
||||
///
|
||||
|
|
@ -227,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,
|
||||
|
|
@ -239,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: 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.
|
||||
|
|
@ -314,7 +326,7 @@ public struct TAKPacket: Sendable {
|
|||
|
||||
///
|
||||
/// The payload of the packet
|
||||
public enum OneOf_PayloadVariant: Equatable, Sendable {
|
||||
public enum OneOf_PayloadVariant: Equatable {
|
||||
///
|
||||
/// TAK position report
|
||||
case pli(PLI)
|
||||
|
|
@ -322,6 +334,24 @@ public struct TAKPacket: Sendable {
|
|||
/// ATAK GeoChat message
|
||||
case chat(GeoChat)
|
||||
|
||||
#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
|
||||
}()
|
||||
default: return false
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -333,7 +363,7 @@ public struct TAKPacket: 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.
|
||||
|
|
@ -375,7 +405,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.
|
||||
|
|
@ -397,7 +427,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.
|
||||
|
|
@ -414,7 +444,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.
|
||||
|
|
@ -434,7 +464,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.
|
||||
|
|
@ -466,6 +496,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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -36,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
|
||||
|
||||
///
|
||||
|
|
@ -113,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.
|
||||
|
|
@ -134,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.
|
||||
|
|
@ -172,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
|
||||
|
||||
///
|
||||
|
|
@ -211,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() {}
|
||||
|
|
@ -225,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"
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -94,6 +94,10 @@ public struct DeviceProfile: Sendable {
|
|||
fileprivate var _moduleConfig: LocalModuleConfig? = 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"
|
||||
|
|
|
|||
|
|
@ -20,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.
|
||||
|
|
@ -85,11 +85,19 @@ public struct Config: Sendable {
|
|||
set {payloadVariant = .bluetooth(newValue)}
|
||||
}
|
||||
|
||||
public var security: Config.SecurityConfig {
|
||||
get {
|
||||
if case .security(let v)? = payloadVariant {return v}
|
||||
return Config.SecurityConfig()
|
||||
}
|
||||
set {payloadVariant = .security(newValue)}
|
||||
}
|
||||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
///
|
||||
/// 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)
|
||||
|
|
@ -97,12 +105,55 @@ public struct Config: Sendable {
|
|||
case display(Config.DisplayConfig)
|
||||
case lora(Config.LoRaConfig)
|
||||
case bluetooth(Config.BluetoothConfig)
|
||||
case security(Config.SecurityConfig)
|
||||
|
||||
#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
|
||||
}()
|
||||
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.
|
||||
|
|
@ -113,11 +164,13 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Disabling this will disable the SerialConsole by not initilizing the StreamAPI
|
||||
/// Moved to SecurityConfig
|
||||
public var serialEnabled: Bool = false
|
||||
|
||||
///
|
||||
/// By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).
|
||||
/// Set this to true to leave the debug log outputting even when API is active.
|
||||
/// Moved to SecurityConfig
|
||||
public var debugLogEnabled: Bool = false
|
||||
|
||||
///
|
||||
|
|
@ -146,6 +199,7 @@ 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
|
||||
public var isManaged: Bool = false
|
||||
|
||||
///
|
||||
|
|
@ -164,7 +218,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
|
||||
|
||||
///
|
||||
|
|
@ -182,8 +236,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
|
||||
|
||||
///
|
||||
|
|
@ -274,26 +326,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,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
/// 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
|
||||
|
||||
///
|
||||
|
|
@ -341,14 +378,6 @@ 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,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -356,7 +385,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.
|
||||
|
|
@ -378,8 +407,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
|
||||
|
||||
///
|
||||
|
|
@ -390,8 +417,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
|
||||
|
||||
///
|
||||
|
|
@ -432,7 +457,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
|
||||
|
||||
///
|
||||
|
|
@ -522,24 +547,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
|
||||
|
||||
///
|
||||
|
|
@ -577,13 +587,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() {}
|
||||
|
|
@ -592,7 +595,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.
|
||||
|
|
@ -652,7 +655,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.
|
||||
|
|
@ -699,7 +702,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
|
||||
|
||||
///
|
||||
|
|
@ -731,15 +734,9 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [Config.NetworkConfig.AddressMode] = [
|
||||
.dhcp,
|
||||
.static,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
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.
|
||||
|
|
@ -772,7 +769,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.
|
||||
|
|
@ -828,7 +825,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
|
||||
|
||||
///
|
||||
|
|
@ -891,21 +888,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
|
||||
|
||||
///
|
||||
|
|
@ -937,17 +924,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
|
||||
|
||||
///
|
||||
|
|
@ -991,17 +972,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,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public enum DisplayMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum DisplayMode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1045,17 +1018,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
|
||||
|
||||
///
|
||||
|
|
@ -1123,18 +1088,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() {}
|
||||
|
|
@ -1142,7 +1095,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.
|
||||
|
|
@ -1299,7 +1252,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
|
||||
|
||||
///
|
||||
|
|
@ -1433,35 +1386,12 @@ public struct Config: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
/// 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
|
||||
|
||||
///
|
||||
|
|
@ -1474,6 +1404,7 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Very Long Range - Slow
|
||||
/// Deprecated in 2.5: Works only with txco and is unusably slow
|
||||
case veryLongSlow // = 2
|
||||
|
||||
///
|
||||
|
|
@ -1495,6 +1426,12 @@ public struct Config: Sendable {
|
|||
///
|
||||
/// Long Range - Moderately Fast
|
||||
case longModerate // = 7
|
||||
|
||||
///
|
||||
/// Short Range - Turbo
|
||||
/// This is the fastest preset and the only one with 500kHz bandwidth.
|
||||
/// It is not legal to use in all regions due to this wider bandwidth.
|
||||
case shortTurbo // = 8
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
public init() {
|
||||
|
|
@ -1511,6 +1448,7 @@ public struct Config: Sendable {
|
|||
case 5: self = .shortSlow
|
||||
case 6: self = .shortFast
|
||||
case 7: self = .longModerate
|
||||
case 8: self = .shortTurbo
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
|
@ -1525,22 +1463,11 @@ public struct Config: Sendable {
|
|||
case .shortSlow: return 5
|
||||
case .shortFast: return 6
|
||||
case .longModerate: return 7
|
||||
case .shortTurbo: return 8
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
||||
// 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,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -1548,7 +1475,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.
|
||||
|
|
@ -1567,11 +1494,12 @@ public struct Config: Sendable {
|
|||
|
||||
///
|
||||
/// Enables device (serial style logs) over Bluetooth
|
||||
/// Moved to SecurityConfig
|
||||
public var deviceLoggingEnabled: Bool = false
|
||||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public enum PairingMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum PairingMode: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1609,21 +1537,255 @@ 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 {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
||||
///
|
||||
/// The public key of the user's device.
|
||||
/// Sent out to other nodes on the mesh to allow them to compute a shared secret key.
|
||||
public var publicKey: Data = Data()
|
||||
|
||||
///
|
||||
/// The private key of the device.
|
||||
/// Used to create a shared key with a remote device.
|
||||
public var privateKey: Data = Data()
|
||||
|
||||
///
|
||||
/// The public key authorized to send admin messages to this node.
|
||||
public var adminKey: Data = Data()
|
||||
|
||||
///
|
||||
/// If true, device is considered to be "managed" by a mesh administrator via admin messages
|
||||
/// Device is managed by a mesh administrator.
|
||||
public var isManaged: Bool = false
|
||||
|
||||
///
|
||||
/// Serial Console over the Stream API."
|
||||
public var serialEnabled: Bool = false
|
||||
|
||||
///
|
||||
/// By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).
|
||||
/// Output live debug logging over serial.
|
||||
public var debugLogApiEnabled: Bool = false
|
||||
|
||||
///
|
||||
/// Enables device (serial style logs) over Bluetooth
|
||||
public var bluetoothLoggingEnabled: Bool = false
|
||||
|
||||
///
|
||||
/// Allow incoming device control over the insecure legacy admin channel.
|
||||
public var adminChannelEnabled: Bool = false
|
||||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public init() {}
|
||||
}
|
||||
|
||||
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,
|
||||
]
|
||||
}
|
||||
|
||||
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,
|
||||
]
|
||||
}
|
||||
|
||||
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.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,
|
||||
]
|
||||
}
|
||||
|
||||
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,
|
||||
]
|
||||
}
|
||||
|
||||
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.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.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 {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "meshtastic"
|
||||
|
|
@ -1638,6 +1800,7 @@ extension Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas
|
|||
5: .same(proto: "display"),
|
||||
6: .same(proto: "lora"),
|
||||
7: .same(proto: "bluetooth"),
|
||||
8: .same(proto: "security"),
|
||||
]
|
||||
|
||||
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
|
@ -1737,6 +1900,19 @@ extension Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas
|
|||
self.payloadVariant = .bluetooth(v)
|
||||
}
|
||||
}()
|
||||
case 8: try {
|
||||
var v: Config.SecurityConfig?
|
||||
var hadOneofValue = false
|
||||
if let current = self.payloadVariant {
|
||||
hadOneofValue = true
|
||||
if case .security(let m) = current {v = m}
|
||||
}
|
||||
try decoder.decodeSingularMessageField(value: &v)
|
||||
if let v = v {
|
||||
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
||||
self.payloadVariant = .security(v)
|
||||
}
|
||||
}()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
|
|
@ -1776,6 +1952,10 @@ extension Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBas
|
|||
guard case .bluetooth(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
|
||||
}()
|
||||
case .security?: try {
|
||||
guard case .security(let v)? = self.payloadVariant else { preconditionFailure() }
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
|
||||
}()
|
||||
case nil: break
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
|
|
@ -2080,7 +2260,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 {
|
||||
|
|
@ -2524,7 +2704,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 {
|
||||
|
|
@ -2548,7 +2728,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 {
|
||||
|
|
@ -2629,6 +2809,7 @@ extension Config.LoRaConfig.ModemPreset: SwiftProtobuf._ProtoNameProviding {
|
|||
5: .same(proto: "SHORT_SLOW"),
|
||||
6: .same(proto: "SHORT_FAST"),
|
||||
7: .same(proto: "LONG_MODERATE"),
|
||||
8: .same(proto: "SHORT_TURBO"),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -2689,3 +2870,77 @@ extension Config.BluetoothConfig.PairingMode: SwiftProtobuf._ProtoNameProviding
|
|||
2: .same(proto: "NO_PIN"),
|
||||
]
|
||||
}
|
||||
|
||||
extension Config.SecurityConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
public static let protoMessageName: String = Config.protoMessageName + ".SecurityConfig"
|
||||
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "public_key"),
|
||||
2: .standard(proto: "private_key"),
|
||||
3: .standard(proto: "admin_key"),
|
||||
4: .standard(proto: "is_managed"),
|
||||
5: .standard(proto: "serial_enabled"),
|
||||
6: .standard(proto: "debug_log_api_enabled"),
|
||||
7: .standard(proto: "bluetooth_logging_enabled"),
|
||||
8: .standard(proto: "admin_channel_enabled"),
|
||||
]
|
||||
|
||||
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
// The use of inline closures is to circumvent an issue where the compiler
|
||||
// allocates stack space for every case branch when no optimizations are
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }()
|
||||
case 2: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }()
|
||||
case 3: try { try decoder.decodeSingularBytesField(value: &self.adminKey) }()
|
||||
case 4: try { try decoder.decodeSingularBoolField(value: &self.isManaged) }()
|
||||
case 5: try { try decoder.decodeSingularBoolField(value: &self.serialEnabled) }()
|
||||
case 6: try { try decoder.decodeSingularBoolField(value: &self.debugLogApiEnabled) }()
|
||||
case 7: try { try decoder.decodeSingularBoolField(value: &self.bluetoothLoggingEnabled) }()
|
||||
case 8: try { try decoder.decodeSingularBoolField(value: &self.adminChannelEnabled) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.publicKey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 1)
|
||||
}
|
||||
if !self.privateKey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 2)
|
||||
}
|
||||
if !self.adminKey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.adminKey, fieldNumber: 3)
|
||||
}
|
||||
if self.isManaged != false {
|
||||
try visitor.visitSingularBoolField(value: self.isManaged, fieldNumber: 4)
|
||||
}
|
||||
if self.serialEnabled != false {
|
||||
try visitor.visitSingularBoolField(value: self.serialEnabled, fieldNumber: 5)
|
||||
}
|
||||
if self.debugLogApiEnabled != false {
|
||||
try visitor.visitSingularBoolField(value: self.debugLogApiEnabled, fieldNumber: 6)
|
||||
}
|
||||
if self.bluetoothLoggingEnabled != false {
|
||||
try visitor.visitSingularBoolField(value: self.bluetoothLoggingEnabled, fieldNumber: 7)
|
||||
}
|
||||
if self.adminChannelEnabled != false {
|
||||
try visitor.visitSingularBoolField(value: self.adminChannelEnabled, fieldNumber: 8)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
public static func ==(lhs: Config.SecurityConfig, rhs: Config.SecurityConfig) -> Bool {
|
||||
if lhs.publicKey != rhs.publicKey {return false}
|
||||
if lhs.privateKey != rhs.privateKey {return false}
|
||||
if lhs.adminKey != rhs.adminKey {return false}
|
||||
if lhs.isManaged != rhs.isManaged {return false}
|
||||
if lhs.serialEnabled != rhs.serialEnabled {return false}
|
||||
if lhs.debugLogApiEnabled != rhs.debugLogApiEnabled {return false}
|
||||
if lhs.bluetoothLoggingEnabled != rhs.bluetoothLoggingEnabled {return false}
|
||||
if lhs.adminChannelEnabled != rhs.adminChannelEnabled {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
|||
|
||||
///
|
||||
/// Font sizes for the device screen
|
||||
public enum ScreenFonts: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum ScreenFonts: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -60,18 +60,24 @@ public enum ScreenFonts: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension ScreenFonts: CaseIterable {
|
||||
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
||||
public static let allCases: [ScreenFonts] = [
|
||||
.fontSmall,
|
||||
.fontMedium,
|
||||
.fontLarge,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
///
|
||||
/// 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.
|
||||
|
|
@ -106,7 +112,52 @@ public struct PositionLite: Sendable {
|
|||
public init() {}
|
||||
}
|
||||
|
||||
public struct NodeInfoLite: @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.
|
||||
public var macaddr: Data = Data()
|
||||
|
||||
///
|
||||
/// A full name for this user, i.e. "Kevin Hester"
|
||||
public var longName: String = String()
|
||||
|
||||
///
|
||||
/// A VERY short name, ideally two characters.
|
||||
/// Suitable for a tiny OLED screen
|
||||
public var shortName: String = String()
|
||||
|
||||
///
|
||||
/// TBEAM, HELTEC, etc...
|
||||
/// Starting in 1.2.11 moved to hw_model enum in the NodeInfo object.
|
||||
/// Apps will still need the string here for older builds
|
||||
/// (so OTA update can find the right image), but if the enum is available it will be used instead.
|
||||
public var hwModel: HardwareModel = .unset
|
||||
|
||||
///
|
||||
/// In some regions Ham radio operators have different bandwidth limitations than others.
|
||||
/// If this user is a licensed operator, set this flag.
|
||||
/// Also, "long_name" should be their licence number.
|
||||
public var isLicensed: Bool = false
|
||||
|
||||
///
|
||||
/// Indicates that the user's role in the mesh
|
||||
public var role: Config.DeviceConfig.Role = .client
|
||||
|
||||
///
|
||||
/// The public key of the user's device.
|
||||
/// This is sent out to other nodes on the mesh to allow them to compute a shared secret key.
|
||||
public var publicKey: Data = Data()
|
||||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public init() {}
|
||||
}
|
||||
|
||||
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.
|
||||
|
|
@ -120,8 +171,8 @@ public struct NodeInfoLite: @unchecked Sendable {
|
|||
|
||||
///
|
||||
/// The user info for this node
|
||||
public var user: User {
|
||||
get {return _storage._user ?? User()}
|
||||
public var user: UserLite {
|
||||
get {return _storage._user ?? UserLite()}
|
||||
set {_uniqueStorage()._user = newValue}
|
||||
}
|
||||
/// Returns true if `user` has been explicitly set.
|
||||
|
|
@ -209,7 +260,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.
|
||||
|
|
@ -269,8 +320,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}
|
||||
|
|
@ -319,7 +368,7 @@ public struct DeviceState: @unchecked 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.
|
||||
|
|
@ -342,7 +391,7 @@ public struct ChannelFile: Sendable {
|
|||
///
|
||||
/// This can be used for customizing the firmware distribution. If populated,
|
||||
/// show a secondary bootup screen with custom logo and text for 2.5 seconds.
|
||||
public struct OEMStore: @unchecked Sendable {
|
||||
public struct OEMStore {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
|
|
@ -401,6 +450,16 @@ public struct OEMStore: @unchecked Sendable {
|
|||
fileprivate var _oemLocalModuleConfig: LocalModuleConfig? = nil
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension ScreenFonts: @unchecked Sendable {}
|
||||
extension PositionLite: @unchecked Sendable {}
|
||||
extension UserLite: @unchecked Sendable {}
|
||||
extension NodeInfoLite: @unchecked Sendable {}
|
||||
extension DeviceState: @unchecked Sendable {}
|
||||
extension ChannelFile: @unchecked Sendable {}
|
||||
extension OEMStore: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "meshtastic"
|
||||
|
|
@ -469,6 +528,74 @@ extension PositionLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
}
|
||||
}
|
||||
|
||||
extension UserLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
public static let protoMessageName: String = _protobuf_package + ".UserLite"
|
||||
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "macaddr"),
|
||||
2: .standard(proto: "long_name"),
|
||||
3: .standard(proto: "short_name"),
|
||||
4: .standard(proto: "hw_model"),
|
||||
5: .standard(proto: "is_licensed"),
|
||||
6: .same(proto: "role"),
|
||||
7: .standard(proto: "public_key"),
|
||||
]
|
||||
|
||||
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
// The use of inline closures is to circumvent an issue where the compiler
|
||||
// allocates stack space for every case branch when no optimizations are
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch fieldNumber {
|
||||
case 1: try { try decoder.decodeSingularBytesField(value: &self.macaddr) }()
|
||||
case 2: try { try decoder.decodeSingularStringField(value: &self.longName) }()
|
||||
case 3: try { try decoder.decodeSingularStringField(value: &self.shortName) }()
|
||||
case 4: try { try decoder.decodeSingularEnumField(value: &self.hwModel) }()
|
||||
case 5: try { try decoder.decodeSingularBoolField(value: &self.isLicensed) }()
|
||||
case 6: try { try decoder.decodeSingularEnumField(value: &self.role) }()
|
||||
case 7: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.macaddr.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.macaddr, fieldNumber: 1)
|
||||
}
|
||||
if !self.longName.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.longName, fieldNumber: 2)
|
||||
}
|
||||
if !self.shortName.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.shortName, fieldNumber: 3)
|
||||
}
|
||||
if self.hwModel != .unset {
|
||||
try visitor.visitSingularEnumField(value: self.hwModel, fieldNumber: 4)
|
||||
}
|
||||
if self.isLicensed != false {
|
||||
try visitor.visitSingularBoolField(value: self.isLicensed, fieldNumber: 5)
|
||||
}
|
||||
if self.role != .client {
|
||||
try visitor.visitSingularEnumField(value: self.role, fieldNumber: 6)
|
||||
}
|
||||
if !self.publicKey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 7)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
public static func ==(lhs: UserLite, rhs: UserLite) -> Bool {
|
||||
if lhs.macaddr != rhs.macaddr {return false}
|
||||
if lhs.longName != rhs.longName {return false}
|
||||
if lhs.shortName != rhs.shortName {return false}
|
||||
if lhs.hwModel != rhs.hwModel {return false}
|
||||
if lhs.isLicensed != rhs.isLicensed {return false}
|
||||
if lhs.role != rhs.role {return false}
|
||||
if lhs.publicKey != rhs.publicKey {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
public static let protoMessageName: String = _protobuf_package + ".NodeInfoLite"
|
||||
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
|
|
@ -486,7 +613,7 @@ extension NodeInfoLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat
|
|||
|
||||
fileprivate class _StorageClass {
|
||||
var _num: UInt32 = 0
|
||||
var _user: User? = nil
|
||||
var _user: UserLite? = nil
|
||||
var _position: PositionLite? = nil
|
||||
var _snr: Float = 0
|
||||
var _lastHeard: UInt32 = 0
|
||||
|
|
@ -568,7 +695,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 {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -111,6 +111,17 @@ public struct LocalConfig: @unchecked Sendable {
|
|||
set {_uniqueStorage()._version = newValue}
|
||||
}
|
||||
|
||||
///
|
||||
/// The part of the config that is specific to Security settings
|
||||
public var security: Config.SecurityConfig {
|
||||
get {return _storage._security ?? Config.SecurityConfig()}
|
||||
set {_uniqueStorage()._security = newValue}
|
||||
}
|
||||
/// Returns true if `security` has been explicitly set.
|
||||
public var hasSecurity: Bool {return _storage._security != nil}
|
||||
/// Clears the value of `security`. Subsequent reads from it will return its default value.
|
||||
public mutating func clearSecurity() {_uniqueStorage()._security = nil}
|
||||
|
||||
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
public init() {}
|
||||
|
|
@ -118,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.
|
||||
|
|
@ -282,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"
|
||||
|
|
@ -297,6 +313,7 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
|
|||
6: .same(proto: "lora"),
|
||||
7: .same(proto: "bluetooth"),
|
||||
8: .same(proto: "version"),
|
||||
9: .same(proto: "security"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
|
|
@ -308,6 +325,7 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
|
|||
var _lora: Config.LoRaConfig? = nil
|
||||
var _bluetooth: Config.BluetoothConfig? = nil
|
||||
var _version: UInt32 = 0
|
||||
var _security: Config.SecurityConfig? = nil
|
||||
|
||||
#if swift(>=5.10)
|
||||
// This property is used as the initial default value for new instances of the type.
|
||||
|
|
@ -330,6 +348,7 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
|
|||
_lora = source._lora
|
||||
_bluetooth = source._bluetooth
|
||||
_version = source._version
|
||||
_security = source._security
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -356,6 +375,7 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
|
|||
case 6: try { try decoder.decodeSingularMessageField(value: &_storage._lora) }()
|
||||
case 7: try { try decoder.decodeSingularMessageField(value: &_storage._bluetooth) }()
|
||||
case 8: try { try decoder.decodeSingularUInt32Field(value: &_storage._version) }()
|
||||
case 9: try { try decoder.decodeSingularMessageField(value: &_storage._security) }()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
|
|
@ -392,6 +412,9 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
|
|||
if _storage._version != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: _storage._version, fieldNumber: 8)
|
||||
}
|
||||
try { if let v = _storage._security {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
|
||||
} }()
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
|
@ -409,6 +432,7 @@ extension LocalConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati
|
|||
if _storage._lora != rhs_storage._lora {return false}
|
||||
if _storage._bluetooth != rhs_storage._bluetooth {return false}
|
||||
if _storage._version != rhs_storage._version {return false}
|
||||
if _storage._security != rhs_storage._security {return false}
|
||||
return true
|
||||
}
|
||||
if !storagesAreEqual {return false}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -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.
|
||||
|
|
@ -352,7 +420,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.
|
||||
|
|
@ -376,7 +444,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.
|
||||
|
|
@ -397,7 +465,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.
|
||||
|
|
@ -448,7 +516,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.
|
||||
|
|
@ -485,7 +553,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
|
||||
|
|
@ -532,19 +600,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() {}
|
||||
|
|
@ -552,7 +607,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.
|
||||
|
|
@ -578,7 +633,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.
|
||||
|
|
@ -621,7 +676,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
|
||||
|
|
@ -689,31 +744,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
|
||||
|
|
@ -758,17 +793,6 @@ public struct ModuleConfig: Sendable {
|
|||
}
|
||||
}
|
||||
|
||||
// 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,
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
|
@ -776,7 +800,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.
|
||||
|
|
@ -859,7 +883,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.
|
||||
|
|
@ -895,7 +919,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.
|
||||
|
|
@ -920,7 +944,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.
|
||||
|
|
@ -977,7 +1001,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
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.
|
||||
|
|
@ -1020,7 +1044,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// Input event origin accepted by the canned message module.
|
||||
/// Can be e.g. "rotEnc1", "upDownEnc1" or keyword "_any"
|
||||
/// Can be e.g. "rotEnc1", "upDownEnc1", "scanAndSelect", "cardkb", "serialkb", or keyword "_any"
|
||||
public var allowInputSource: String = String()
|
||||
|
||||
///
|
||||
|
|
@ -1032,7 +1056,7 @@ public struct ModuleConfig: Sendable {
|
|||
|
||||
///
|
||||
/// TODO: REPLACE
|
||||
public enum InputEventChar: SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
public enum InputEventChar: SwiftProtobuf.Enum {
|
||||
public typealias RawValue = Int
|
||||
|
||||
///
|
||||
|
|
@ -1100,18 +1124,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() {}
|
||||
|
|
@ -1120,7 +1132,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.
|
||||
|
|
@ -1153,9 +1165,77 @@ public struct ModuleConfig: Sendable {
|
|||
public init() {}
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
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,
|
||||
]
|
||||
}
|
||||
|
||||
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.
|
||||
|
|
@ -1177,6 +1257,31 @@ 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.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"
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -121,6 +121,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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
///
|
||||
|
|
@ -167,7 +167,7 @@ public enum PortNum: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|||
|
||||
///
|
||||
/// Provides a traceroute functionality to show the route a packet towards
|
||||
/// a certain destination would take on the mesh.
|
||||
/// a certain destination would take on the mesh. Contains a RouteDiscovery message as payload.
|
||||
/// ENCODING: Protobuf
|
||||
case tracerouteApp // = 70
|
||||
|
||||
|
|
@ -277,6 +277,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,
|
||||
|
|
@ -308,9 +313,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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -22,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.
|
||||
|
|
@ -79,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)
|
||||
|
|
@ -93,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
|
||||
|
||||
///
|
||||
|
|
@ -216,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.
|
||||
|
|
@ -288,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.
|
||||
|
|
@ -313,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.
|
||||
|
|
@ -334,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"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -20,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.
|
||||
|
|
@ -35,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
|
||||
|
|
@ -79,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"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2fa7d6a4b702fcd58b54b0d1d6e4b3b85164f649
|
||||
Subproject commit b623762940ebdb1887a3b31b86f4d9cdaa7e6ecf
|
||||
Loading…
Add table
Add a link
Reference in a new issue