Meshtastic-Apple/MeshtasticProtobufs/Sources/meshtastic/deviceonly.pb.swift
Garth Vander Houwen 3eef38926f
2.7.7 Working Changes (#1551)
* Bump version

* update the translations (#1540)

update the translations

* Don't alert (with sound: .default) when updating Live Activity (#1536)

* Fix adding channels (#1532)

* Full translation into Spanish (#1529)

* tapback with any emoji (#1538)

* Call clearStaleNodes at start of sendWantConfig (#1535)

* NFC Tag contact (#1537)

* Accessorymanager background discovery (#1542)

* Don't add new BLE  devices to the device list in the backgournd

* Bump version

* Update Meshtastic/MeshtasticApp.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Meshtastic/MeshtasticApp.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert "Full translation into Spanish (#1529)" (#1543)

This reverts commit f25fdfb89f.

* Revert "update the translations (#1540)" (#1544)

This reverts commit cb2fd8cc15.

* Revert "NFC Tag contact (#1537)" (#1545)

This reverts commit 5c22b8b6e0.

* Update Meshtastic/Views/Messages/TapbackInputView.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Meshtastic/Helpers/EmojiOnlyTextField.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert "Accessorymanager background discovery (#1542)" (#1553)

This reverts commit 487f24b99a.

* Update protobufs

* Remove UI Kit code, clean up waypoint form emoji picker

* Remove redundant nested Task in tapback emoji handler (#1552)

* Initial plan

* Remove nested Task block in tapback handler

Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>

* Delete empty file

* Handle nil for emoji keyboard type extension

* Remove UI kit method from waypoint form emoji picker

* Remove UI kit emoji picker from tapback

* Add Exchange User Info (#1550)

* Emoji keyboard (#1559)

* Add file missing from project, must have merged badly

* Remove ui kit emoji keyboard

* Discovery background fixes (#1561)

* Make BLE Transport an actor to fix background discovery crashes

* Protobufs

* Update Meshtastic/Accessory/Transports/Bluetooth Low Energy/BLETransport.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Throw too many retries error again, remove return

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Increase connection timeout

* Update protobufs

* Revert "Fix adding channels (#1532)" (#1562)

This reverts commit bff8ca018b.

---------

Co-authored-by: MGJ <62177301+MGJ520@users.noreply.github.com>
Co-authored-by: Mike Robbins <mrobbins@alum.mit.edu>
Co-authored-by: Benjamin Faershtein <119711889+RCGV1@users.noreply.github.com>
Co-authored-by: Alvaro Samudio <alvarosamudio@protonmail.com>
Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>
Co-authored-by: Brian Hardie <777730+bhardie@users.noreply.github.com>
2026-01-15 14:13:40 -08:00

997 lines
41 KiB
Swift

// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: meshtastic/deviceonly.proto
//
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/
import Foundation
import SwiftProtobuf
// If the compiler emits an error on this type, it is because this file
// was generated by a version of the `protoc` Swift plug-in that is
// incompatible with the version of SwiftProtobuf to which you are linking.
// Please ensure that you are building against the same version of the API
// that was used to generate this file.
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
typealias Version = _2
}
///
/// Position with static location information only for NodeDBLite
public struct PositionLite: Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
///
/// The new preferred location encoding, multiply by 1e-7 to get degrees
/// in floating point
public var latitudeI: Int32 = 0
///
/// TODO: REPLACE
public var longitudeI: Int32 = 0
///
/// In meters above MSL (but see issue #359)
public var altitude: Int32 = 0
///
/// This is usually not sent over the mesh (to save space), but it is sent
/// from the phone so that the local device can set its RTC If it is sent over
/// the mesh (because there are devices on the mesh without GPS), it will only
/// be sent by devices which has a hardware GPS clock.
/// seconds since 1970
public var time: UInt32 = 0
///
/// TODO: REPLACE
public var locationSource: Position.LocSource = .locUnset
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
public struct UserLite: Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
///
/// This is the addr of the radio.
///
/// NOTE: This field was marked as deprecated in the .proto file.
public var macaddr: Data = Data()
///
/// 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()
///
/// Whether or not the node can be messaged
public var isUnmessagable: Bool {
get {return _isUnmessagable ?? false}
set {_isUnmessagable = newValue}
}
/// Returns true if `isUnmessagable` has been explicitly set.
public var hasIsUnmessagable: Bool {return self._isUnmessagable != nil}
/// Clears the value of `isUnmessagable`. Subsequent reads from it will return its default value.
public mutating func clearIsUnmessagable() {self._isUnmessagable = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _isUnmessagable: Bool? = nil
}
public struct NodeInfoLite: @unchecked Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
///
/// The node number
public var num: UInt32 {
get {return _storage._num}
set {_uniqueStorage()._num = newValue}
}
///
/// The user info for this node
public var user: UserLite {
get {return _storage._user ?? UserLite()}
set {_uniqueStorage()._user = newValue}
}
/// Returns true if `user` has been explicitly set.
public var hasUser: Bool {return _storage._user != nil}
/// Clears the value of `user`. Subsequent reads from it will return its default value.
public mutating func clearUser() {_uniqueStorage()._user = nil}
///
/// This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.
/// Position.time now indicates the last time we received a POSITION from that node.
public var position: PositionLite {
get {return _storage._position ?? PositionLite()}
set {_uniqueStorage()._position = newValue}
}
/// Returns true if `position` has been explicitly set.
public var hasPosition: Bool {return _storage._position != nil}
/// Clears the value of `position`. Subsequent reads from it will return its default value.
public mutating func clearPosition() {_uniqueStorage()._position = nil}
///
/// Returns the Signal-to-noise ratio (SNR) of the last received message,
/// as measured by the receiver. Return SNR of the last received message in dB
public var snr: Float {
get {return _storage._snr}
set {_uniqueStorage()._snr = newValue}
}
///
/// Set to indicate the last time we received a packet from this node
public var lastHeard: UInt32 {
get {return _storage._lastHeard}
set {_uniqueStorage()._lastHeard = newValue}
}
///
/// The latest device metrics for the node.
public var deviceMetrics: DeviceMetrics {
get {return _storage._deviceMetrics ?? DeviceMetrics()}
set {_uniqueStorage()._deviceMetrics = newValue}
}
/// Returns true if `deviceMetrics` has been explicitly set.
public var hasDeviceMetrics: Bool {return _storage._deviceMetrics != nil}
/// Clears the value of `deviceMetrics`. Subsequent reads from it will return its default value.
public mutating func clearDeviceMetrics() {_uniqueStorage()._deviceMetrics = nil}
///
/// local channel index we heard that node on. Only populated if its not the default channel.
public var channel: UInt32 {
get {return _storage._channel}
set {_uniqueStorage()._channel = newValue}
}
///
/// True if we witnessed the node over MQTT instead of LoRA transport
public var viaMqtt: Bool {
get {return _storage._viaMqtt}
set {_uniqueStorage()._viaMqtt = newValue}
}
///
/// Number of hops away from us this node is (0 if direct neighbor)
public var hopsAway: UInt32 {
get {return _storage._hopsAway ?? 0}
set {_uniqueStorage()._hopsAway = newValue}
}
/// Returns true if `hopsAway` has been explicitly set.
public var hasHopsAway: Bool {return _storage._hopsAway != nil}
/// Clears the value of `hopsAway`. Subsequent reads from it will return its default value.
public mutating func clearHopsAway() {_uniqueStorage()._hopsAway = nil}
///
/// True if node is in our favorites list
/// Persists between NodeDB internal clean ups
public var isFavorite: Bool {
get {return _storage._isFavorite}
set {_uniqueStorage()._isFavorite = newValue}
}
///
/// True if node is in our ignored list
/// Persists between NodeDB internal clean ups
public var isIgnored: Bool {
get {return _storage._isIgnored}
set {_uniqueStorage()._isIgnored = newValue}
}
///
/// Last byte of the node number of the node that should be used as the next hop to reach this node.
public var nextHop: UInt32 {
get {return _storage._nextHop}
set {_uniqueStorage()._nextHop = newValue}
}
///
/// Bitfield for storing booleans.
/// LSB 0 is_key_manually_verified
/// LSB 1 is_muted
public var bitfield: UInt32 {
get {return _storage._bitfield}
set {_uniqueStorage()._bitfield = newValue}
}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _storage = _StorageClass.defaultInstance
}
///
/// This message is never sent over the wire, but it is used for serializing DB
/// state to flash in the device code
/// FIXME, since we write this each time we enter deep sleep (and have infinite
/// flash) it would be better to use some sort of append only data structure for
/// the receive queue and use the preferences store for the other stuff
public struct DeviceState: @unchecked Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
///
/// Read only settings/info about this node
public var myNode: MyNodeInfo {
get {return _storage._myNode ?? MyNodeInfo()}
set {_uniqueStorage()._myNode = newValue}
}
/// Returns true if `myNode` has been explicitly set.
public var hasMyNode: Bool {return _storage._myNode != nil}
/// Clears the value of `myNode`. Subsequent reads from it will return its default value.
public mutating func clearMyNode() {_uniqueStorage()._myNode = nil}
///
/// My owner info
public var owner: User {
get {return _storage._owner ?? User()}
set {_uniqueStorage()._owner = newValue}
}
/// Returns true if `owner` has been explicitly set.
public var hasOwner: Bool {return _storage._owner != nil}
/// Clears the value of `owner`. Subsequent reads from it will return its default value.
public mutating func clearOwner() {_uniqueStorage()._owner = nil}
///
/// Received packets saved for delivery to the phone
public var receiveQueue: [MeshPacket] {
get {return _storage._receiveQueue}
set {_uniqueStorage()._receiveQueue = newValue}
}
///
/// A version integer used to invalidate old save files when we make
/// incompatible changes This integer is set at build time and is private to
/// NodeDB.cpp in the device code.
public var version: UInt32 {
get {return _storage._version}
set {_uniqueStorage()._version = newValue}
}
///
/// We keep the last received text message (only) stored in the device flash,
/// so we can show it on the screen.
/// Might be null
public var rxTextMessage: MeshPacket {
get {return _storage._rxTextMessage ?? MeshPacket()}
set {_uniqueStorage()._rxTextMessage = newValue}
}
/// Returns true if `rxTextMessage` has been explicitly set.
public var hasRxTextMessage: Bool {return _storage._rxTextMessage != nil}
/// Clears the value of `rxTextMessage`. Subsequent reads from it will return its default value.
public mutating func clearRxTextMessage() {_uniqueStorage()._rxTextMessage = nil}
///
/// Used only during development.
/// Indicates developer is testing and changes should never be saved to flash.
/// Deprecated in 2.3.1
///
/// NOTE: This field was marked as deprecated in the .proto file.
public var noSave: Bool {
get {return _storage._noSave}
set {_uniqueStorage()._noSave = newValue}
}
///
/// Previously used to manage GPS factory resets.
/// Deprecated in 2.5.23
///
/// NOTE: This field was marked as deprecated in the .proto file.
public var didGpsReset: Bool {
get {return _storage._didGpsReset}
set {_uniqueStorage()._didGpsReset = newValue}
}
///
/// We keep the last received waypoint stored in the device flash,
/// so we can show it on the screen.
/// Might be null
public var rxWaypoint: MeshPacket {
get {return _storage._rxWaypoint ?? MeshPacket()}
set {_uniqueStorage()._rxWaypoint = newValue}
}
/// Returns true if `rxWaypoint` has been explicitly set.
public var hasRxWaypoint: Bool {return _storage._rxWaypoint != nil}
/// Clears the value of `rxWaypoint`. Subsequent reads from it will return its default value.
public mutating func clearRxWaypoint() {_uniqueStorage()._rxWaypoint = nil}
///
/// The mesh's nodes with their available gpio pins for RemoteHardware module
public var nodeRemoteHardwarePins: [NodeRemoteHardwarePin] {
get {return _storage._nodeRemoteHardwarePins}
set {_uniqueStorage()._nodeRemoteHardwarePins = newValue}
}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _storage = _StorageClass.defaultInstance
}
public struct NodeDatabase: Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
///
/// A version integer used to invalidate old save files when we make
/// incompatible changes This integer is set at build time and is private to
/// NodeDB.cpp in the device code.
public var version: UInt32 = 0
///
/// New lite version of NodeDB to decrease memory footprint
public var nodes: [NodeInfoLite] = []
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
///
/// The on-disk saved channels
public struct ChannelFile: Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
///
/// The channels our node knows about
public var channels: [Channel] = []
///
/// A version integer used to invalidate old save files when we make
/// incompatible changes This integer is set at build time and is private to
/// NodeDB.cpp in the device code.
public var version: UInt32 = 0
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
///
/// The on-disk backup of the node's preferences
public struct BackupPreferences: Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
///
/// The version of the backup
public var version: UInt32 = 0
///
/// The timestamp of the backup (if node has time)
public var timestamp: UInt32 = 0
///
/// The node's configuration
public var config: LocalConfig {
get {return _config ?? LocalConfig()}
set {_config = newValue}
}
/// Returns true if `config` has been explicitly set.
public var hasConfig: Bool {return self._config != nil}
/// Clears the value of `config`. Subsequent reads from it will return its default value.
public mutating func clearConfig() {self._config = nil}
///
/// The node's module configuration
public var moduleConfig: LocalModuleConfig {
get {return _moduleConfig ?? LocalModuleConfig()}
set {_moduleConfig = newValue}
}
/// Returns true if `moduleConfig` has been explicitly set.
public var hasModuleConfig: Bool {return self._moduleConfig != nil}
/// Clears the value of `moduleConfig`. Subsequent reads from it will return its default value.
public mutating func clearModuleConfig() {self._moduleConfig = nil}
///
/// The node's channels
public var channels: ChannelFile {
get {return _channels ?? ChannelFile()}
set {_channels = newValue}
}
/// Returns true if `channels` has been explicitly set.
public var hasChannels: Bool {return self._channels != nil}
/// Clears the value of `channels`. Subsequent reads from it will return its default value.
public mutating func clearChannels() {self._channels = nil}
///
/// The node's user (owner) information
public var owner: User {
get {return _owner ?? User()}
set {_owner = newValue}
}
/// Returns true if `owner` has been explicitly set.
public var hasOwner: Bool {return self._owner != nil}
/// Clears the value of `owner`. Subsequent reads from it will return its default value.
public mutating func clearOwner() {self._owner = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _config: LocalConfig? = nil
fileprivate var _moduleConfig: LocalModuleConfig? = nil
fileprivate var _channels: ChannelFile? = nil
fileprivate var _owner: User? = nil
}
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "meshtastic"
extension PositionLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".PositionLite"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}latitude_i\0\u{3}longitude_i\0\u{1}altitude\0\u{1}time\0\u{3}location_source\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// 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.decodeSingularSFixed32Field(value: &self.latitudeI) }()
case 2: try { try decoder.decodeSingularSFixed32Field(value: &self.longitudeI) }()
case 3: try { try decoder.decodeSingularInt32Field(value: &self.altitude) }()
case 4: try { try decoder.decodeSingularFixed32Field(value: &self.time) }()
case 5: try { try decoder.decodeSingularEnumField(value: &self.locationSource) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if self.latitudeI != 0 {
try visitor.visitSingularSFixed32Field(value: self.latitudeI, fieldNumber: 1)
}
if self.longitudeI != 0 {
try visitor.visitSingularSFixed32Field(value: self.longitudeI, fieldNumber: 2)
}
if self.altitude != 0 {
try visitor.visitSingularInt32Field(value: self.altitude, fieldNumber: 3)
}
if self.time != 0 {
try visitor.visitSingularFixed32Field(value: self.time, fieldNumber: 4)
}
if self.locationSource != .locUnset {
try visitor.visitSingularEnumField(value: self.locationSource, fieldNumber: 5)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: PositionLite, rhs: PositionLite) -> Bool {
if lhs.latitudeI != rhs.latitudeI {return false}
if lhs.longitudeI != rhs.longitudeI {return false}
if lhs.altitude != rhs.altitude {return false}
if lhs.time != rhs.time {return false}
if lhs.locationSource != rhs.locationSource {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension UserLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".UserLite"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}macaddr\0\u{3}long_name\0\u{3}short_name\0\u{3}hw_model\0\u{3}is_licensed\0\u{1}role\0\u{3}public_key\0\u{4}\u{2}is_unmessagable\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// 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) }()
case 9: try { try decoder.decodeSingularBoolField(value: &self._isUnmessagable) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
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 { if let v = self._isUnmessagable {
try visitor.visitSingularBoolField(value: v, fieldNumber: 9)
} }()
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._isUnmessagable != rhs._isUnmessagable {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(bytecode: "\0\u{1}num\0\u{1}user\0\u{1}position\0\u{1}snr\0\u{3}last_heard\0\u{3}device_metrics\0\u{1}channel\0\u{3}via_mqtt\0\u{3}hops_away\0\u{3}is_favorite\0\u{3}is_ignored\0\u{3}next_hop\0\u{1}bitfield\0")
fileprivate class _StorageClass {
var _num: UInt32 = 0
var _user: UserLite? = nil
var _position: PositionLite? = nil
var _snr: Float = 0
var _lastHeard: UInt32 = 0
var _deviceMetrics: DeviceMetrics? = nil
var _channel: UInt32 = 0
var _viaMqtt: Bool = false
var _hopsAway: UInt32? = nil
var _isFavorite: Bool = false
var _isIgnored: Bool = false
var _nextHop: UInt32 = 0
var _bitfield: UInt32 = 0
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
private init() {}
init(copying source: _StorageClass) {
_num = source._num
_user = source._user
_position = source._position
_snr = source._snr
_lastHeard = source._lastHeard
_deviceMetrics = source._deviceMetrics
_channel = source._channel
_viaMqtt = source._viaMqtt
_hopsAway = source._hopsAway
_isFavorite = source._isFavorite
_isIgnored = source._isIgnored
_nextHop = source._nextHop
_bitfield = source._bitfield
}
}
fileprivate mutating func _uniqueStorage() -> _StorageClass {
if !isKnownUniquelyReferenced(&_storage) {
_storage = _StorageClass(copying: _storage)
}
return _storage
}
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
_ = _uniqueStorage()
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularUInt32Field(value: &_storage._num) }()
case 2: try { try decoder.decodeSingularMessageField(value: &_storage._user) }()
case 3: try { try decoder.decodeSingularMessageField(value: &_storage._position) }()
case 4: try { try decoder.decodeSingularFloatField(value: &_storage._snr) }()
case 5: try { try decoder.decodeSingularFixed32Field(value: &_storage._lastHeard) }()
case 6: try { try decoder.decodeSingularMessageField(value: &_storage._deviceMetrics) }()
case 7: try { try decoder.decodeSingularUInt32Field(value: &_storage._channel) }()
case 8: try { try decoder.decodeSingularBoolField(value: &_storage._viaMqtt) }()
case 9: try { try decoder.decodeSingularUInt32Field(value: &_storage._hopsAway) }()
case 10: try { try decoder.decodeSingularBoolField(value: &_storage._isFavorite) }()
case 11: try { try decoder.decodeSingularBoolField(value: &_storage._isIgnored) }()
case 12: try { try decoder.decodeSingularUInt32Field(value: &_storage._nextHop) }()
case 13: try { try decoder.decodeSingularUInt32Field(value: &_storage._bitfield) }()
default: break
}
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
if _storage._num != 0 {
try visitor.visitSingularUInt32Field(value: _storage._num, fieldNumber: 1)
}
try { if let v = _storage._user {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
try { if let v = _storage._position {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
if _storage._snr.bitPattern != 0 {
try visitor.visitSingularFloatField(value: _storage._snr, fieldNumber: 4)
}
if _storage._lastHeard != 0 {
try visitor.visitSingularFixed32Field(value: _storage._lastHeard, fieldNumber: 5)
}
try { if let v = _storage._deviceMetrics {
try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
} }()
if _storage._channel != 0 {
try visitor.visitSingularUInt32Field(value: _storage._channel, fieldNumber: 7)
}
if _storage._viaMqtt != false {
try visitor.visitSingularBoolField(value: _storage._viaMqtt, fieldNumber: 8)
}
try { if let v = _storage._hopsAway {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 9)
} }()
if _storage._isFavorite != false {
try visitor.visitSingularBoolField(value: _storage._isFavorite, fieldNumber: 10)
}
if _storage._isIgnored != false {
try visitor.visitSingularBoolField(value: _storage._isIgnored, fieldNumber: 11)
}
if _storage._nextHop != 0 {
try visitor.visitSingularUInt32Field(value: _storage._nextHop, fieldNumber: 12)
}
if _storage._bitfield != 0 {
try visitor.visitSingularUInt32Field(value: _storage._bitfield, fieldNumber: 13)
}
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: NodeInfoLite, rhs: NodeInfoLite) -> Bool {
if lhs._storage !== rhs._storage {
let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
let _storage = _args.0
let rhs_storage = _args.1
if _storage._num != rhs_storage._num {return false}
if _storage._user != rhs_storage._user {return false}
if _storage._position != rhs_storage._position {return false}
if _storage._snr != rhs_storage._snr {return false}
if _storage._lastHeard != rhs_storage._lastHeard {return false}
if _storage._deviceMetrics != rhs_storage._deviceMetrics {return false}
if _storage._channel != rhs_storage._channel {return false}
if _storage._viaMqtt != rhs_storage._viaMqtt {return false}
if _storage._hopsAway != rhs_storage._hopsAway {return false}
if _storage._isFavorite != rhs_storage._isFavorite {return false}
if _storage._isIgnored != rhs_storage._isIgnored {return false}
if _storage._nextHop != rhs_storage._nextHop {return false}
if _storage._bitfield != rhs_storage._bitfield {return false}
return true
}
if !storagesAreEqual {return false}
}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension DeviceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".DeviceState"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{4}\u{2}my_node\0\u{1}owner\0\u{4}\u{2}receive_queue\0\u{4}\u{2}rx_text_message\0\u{1}version\0\u{3}no_save\0\u{4}\u{2}did_gps_reset\0\u{3}rx_waypoint\0\u{3}node_remote_hardware_pins\0")
fileprivate class _StorageClass {
var _myNode: MyNodeInfo? = nil
var _owner: User? = nil
var _receiveQueue: [MeshPacket] = []
var _version: UInt32 = 0
var _rxTextMessage: MeshPacket? = nil
var _noSave: Bool = false
var _didGpsReset: Bool = false
var _rxWaypoint: MeshPacket? = nil
var _nodeRemoteHardwarePins: [NodeRemoteHardwarePin] = []
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
private init() {}
init(copying source: _StorageClass) {
_myNode = source._myNode
_owner = source._owner
_receiveQueue = source._receiveQueue
_version = source._version
_rxTextMessage = source._rxTextMessage
_noSave = source._noSave
_didGpsReset = source._didGpsReset
_rxWaypoint = source._rxWaypoint
_nodeRemoteHardwarePins = source._nodeRemoteHardwarePins
}
}
fileprivate mutating func _uniqueStorage() -> _StorageClass {
if !isKnownUniquelyReferenced(&_storage) {
_storage = _StorageClass(copying: _storage)
}
return _storage
}
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
_ = _uniqueStorage()
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 2: try { try decoder.decodeSingularMessageField(value: &_storage._myNode) }()
case 3: try { try decoder.decodeSingularMessageField(value: &_storage._owner) }()
case 5: try { try decoder.decodeRepeatedMessageField(value: &_storage._receiveQueue) }()
case 7: try { try decoder.decodeSingularMessageField(value: &_storage._rxTextMessage) }()
case 8: try { try decoder.decodeSingularUInt32Field(value: &_storage._version) }()
case 9: try { try decoder.decodeSingularBoolField(value: &_storage._noSave) }()
case 11: try { try decoder.decodeSingularBoolField(value: &_storage._didGpsReset) }()
case 12: try { try decoder.decodeSingularMessageField(value: &_storage._rxWaypoint) }()
case 13: try { try decoder.decodeRepeatedMessageField(value: &_storage._nodeRemoteHardwarePins) }()
default: break
}
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = _storage._myNode {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
try { if let v = _storage._owner {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
if !_storage._receiveQueue.isEmpty {
try visitor.visitRepeatedMessageField(value: _storage._receiveQueue, fieldNumber: 5)
}
try { if let v = _storage._rxTextMessage {
try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
} }()
if _storage._version != 0 {
try visitor.visitSingularUInt32Field(value: _storage._version, fieldNumber: 8)
}
if _storage._noSave != false {
try visitor.visitSingularBoolField(value: _storage._noSave, fieldNumber: 9)
}
if _storage._didGpsReset != false {
try visitor.visitSingularBoolField(value: _storage._didGpsReset, fieldNumber: 11)
}
try { if let v = _storage._rxWaypoint {
try visitor.visitSingularMessageField(value: v, fieldNumber: 12)
} }()
if !_storage._nodeRemoteHardwarePins.isEmpty {
try visitor.visitRepeatedMessageField(value: _storage._nodeRemoteHardwarePins, fieldNumber: 13)
}
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: DeviceState, rhs: DeviceState) -> Bool {
if lhs._storage !== rhs._storage {
let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
let _storage = _args.0
let rhs_storage = _args.1
if _storage._myNode != rhs_storage._myNode {return false}
if _storage._owner != rhs_storage._owner {return false}
if _storage._receiveQueue != rhs_storage._receiveQueue {return false}
if _storage._version != rhs_storage._version {return false}
if _storage._rxTextMessage != rhs_storage._rxTextMessage {return false}
if _storage._noSave != rhs_storage._noSave {return false}
if _storage._didGpsReset != rhs_storage._didGpsReset {return false}
if _storage._rxWaypoint != rhs_storage._rxWaypoint {return false}
if _storage._nodeRemoteHardwarePins != rhs_storage._nodeRemoteHardwarePins {return false}
return true
}
if !storagesAreEqual {return false}
}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension NodeDatabase: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".NodeDatabase"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}nodes\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.version) }()
case 2: try { try decoder.decodeRepeatedMessageField(value: &self.nodes) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if self.version != 0 {
try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 1)
}
if !self.nodes.isEmpty {
try visitor.visitRepeatedMessageField(value: self.nodes, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: NodeDatabase, rhs: NodeDatabase) -> Bool {
if lhs.version != rhs.version {return false}
if lhs.nodes != rhs.nodes {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension ChannelFile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".ChannelFile"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}channels\0\u{1}version\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeRepeatedMessageField(value: &self.channels) }()
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.version) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.channels.isEmpty {
try visitor.visitRepeatedMessageField(value: self.channels, fieldNumber: 1)
}
if self.version != 0 {
try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: ChannelFile, rhs: ChannelFile) -> Bool {
if lhs.channels != rhs.channels {return false}
if lhs.version != rhs.version {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension BackupPreferences: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".BackupPreferences"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}timestamp\0\u{1}config\0\u{3}module_config\0\u{1}channels\0\u{1}owner\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.version) }()
case 2: try { try decoder.decodeSingularFixed32Field(value: &self.timestamp) }()
case 3: try { try decoder.decodeSingularMessageField(value: &self._config) }()
case 4: try { try decoder.decodeSingularMessageField(value: &self._moduleConfig) }()
case 5: try { try decoder.decodeSingularMessageField(value: &self._channels) }()
case 6: try { try decoder.decodeSingularMessageField(value: &self._owner) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
if self.version != 0 {
try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 1)
}
if self.timestamp != 0 {
try visitor.visitSingularFixed32Field(value: self.timestamp, fieldNumber: 2)
}
try { if let v = self._config {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
try { if let v = self._moduleConfig {
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
} }()
try { if let v = self._channels {
try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
} }()
try { if let v = self._owner {
try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
} }()
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: BackupPreferences, rhs: BackupPreferences) -> Bool {
if lhs.version != rhs.version {return false}
if lhs.timestamp != rhs.timestamp {return false}
if lhs._config != rhs._config {return false}
if lhs._moduleConfig != rhs._moduleConfig {return false}
if lhs._channels != rhs._channels {return false}
if lhs._owner != rhs._owner {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}