//
//  Characteristic.swift
//  MVM5G
//
//  Created by Matt Bruce on 4/13/22.
//  Copyright © 2022 Kyle. All rights reserved.
//

import Foundation
import CoreBluetooth

protocol CBUUIDIdentifiable {
    var uuid: CBUUID { get set}
}

public enum CharacteristicType: String {
    case speedTest        = "RouterSpeedTest"
    case speedTestResults = "RouterSpeedTestResults"
    case internetAccess   = "RouterPublicInternetAccess"
    case operationMode    = "ReceiverMode"
    case fotaCheck        = "FOTACheck"
    case fotaStatus       = "FOTAStatus"
    case fourGSignal      = "Fourg"
    case fiveGSignal      = "Fiveg"
    case fiveGCBandSignal = "FivegCBand"
    case routerWiFi       = "RouterWifi"
    case routerMode       = "RouterMode"
    case repeaterOperations = "RepeaterOperations"
    case repeaterPairStatus = "RepeaterPairStatus"
    case repeaterMode       = "RepeaterMode"
    case repeaterPair       = "RepeaterPair"
    case radiocontrol       = "Radiocontrol"
    case activation         = "Activation"
    case unknown            = "unknown"
}

public struct CharacteristicModel: CBUUIDIdentifiable, Equatable{
    var uuid: CBUUID
    var name: CharacteristicType
    
    public static func == (lhs: CharacteristicModel, rhs: CharacteristicModel) -> Bool {
        return lhs.uuid == rhs.uuid && lhs.name == rhs.name
    }
}
