40 lines
1.0 KiB
Swift
40 lines
1.0 KiB
Swift
//
|
|
// CDDataDictionary+CoreDataProperties.swift
|
|
// app
|
|
//
|
|
// Created by Sebastian Pobel on 08.02.20.
|
|
// Copyright © 2020 Marcus Handte. All rights reserved.
|
|
//
|
|
//
|
|
|
|
import Foundation
|
|
import CoreData
|
|
|
|
|
|
extension CDDataDictionary {
|
|
|
|
@nonobjc public class func fetchRequest() -> NSFetchRequest<CDDataDictionary> {
|
|
return NSFetchRequest<CDDataDictionary>(entityName: "CDDataDictionary")
|
|
}
|
|
|
|
@NSManaged public var key: String?
|
|
@NSManaged public var value: String?
|
|
@NSManaged public var measurement: CDMeasurement?
|
|
|
|
}
|
|
|
|
enum MeasurementDataContext: String {
|
|
case BatteryCharging = "BATTERY_CHARGING"
|
|
case CpuFrequency = "CPU_FREQUENCY"
|
|
case ScreenEnabled = "SCREEN_ENABLED"
|
|
|
|
case BatteryTemperature = "BATTERY_TEMPERATURE"
|
|
case CpuTemperature = "CPU_TEMPERATURE"
|
|
case SensorTemperature = "SENSOR_TEMPERATURE"
|
|
case SensorPressure = "SENSOR_PRESSURE"
|
|
case SensorHumidity = "SENSOR_HUMIDITY"
|
|
|
|
case BatteryVoltage = "BATTERY_VOLTAGE"
|
|
case SolarVoltage = "SOLAR_VOLTAGE"
|
|
}
|