import Foundation import CoreBluetooth /// Beacon hardware type — CP-28 (DX-Smart) only for now. /// Other types will be added when we start using different beacon hardware. enum BeaconType: String, CaseIterable { case dxsmart = "DX-Smart" } /// A BLE beacon discovered during scanning struct DiscoveredBeacon: Identifiable { let id: UUID // CBPeripheral identifier let peripheral: CBPeripheral let name: String let type: BeaconType var rssi: Int var lastSeen: Date var displayName: String { name.isEmpty ? "\(id.uuidString.prefix(8))…" : name } var signalDescription: String { switch rssi { case -50...0: return "Excellent" case -65 ... -51: return "Good" case -80 ... -66: return "Fair" default: return "Weak" } } }