Meshtastic-Apple/MeshtasticClient/Model/PeripheralModel.swift

27 lines
663 B
Swift
Raw Normal View History

import Foundation
import CoreBluetooth
2021-10-14 20:36:06 -07:00
struct Peripheral: Identifiable {
2021-11-16 10:14:20 -08:00
var id: String
var num: Int64
2021-11-16 10:14:20 -08:00
var name: String
2021-12-16 14:13:54 -08:00
var shortName: String
var longName: String
2021-12-15 23:53:45 -08:00
var firmwareVersion: String
2021-11-16 10:14:20 -08:00
var rssi: Int
var subscribed: Bool
var peripheral: CBPeripheral
2021-11-29 15:59:06 -08:00
init(id: String, num: Int64, name: String, shortName: String, longName: String, firmwareVersion: String, rssi: Int, subscribed: Bool, peripheral: CBPeripheral) {
2021-11-16 10:14:20 -08:00
self.id = id
self.num = num
2021-11-16 10:14:20 -08:00
self.name = name
2021-12-16 14:13:54 -08:00
self.shortName = shortName
self.longName = longName
2021-12-15 23:53:45 -08:00
self.firmwareVersion = firmwareVersion
2021-11-16 10:14:20 -08:00
self.rssi = rssi
self.subscribed = subscribed
self.peripheral = peripheral
}
}