package com.laseroptek.raman.data.model.serial

/*
    val temp = Temperature(ktp = 1.1f)
    val temperatureTimeStamp = TemperatureTimeStamp.fromTemperature(temp)
 */
data class TemperatureTimeStamp(
    val ktp: Float = 00.0f,
    val chamber1: Float = 00.0f,
    val chamber2: Float = 00.0f,
    val basePlate: Float = 00.0f,
    val water: Float = 00.0f,
    val intTemperature: Float = 00.0f,
    val intHumidity: Float = 00.0f,
    val extTemperature: Float = 00.0f,
    val extHumidity: Float = 00.0f,
    var timestamp: Long = 0L
) {
    companion object {
        fun fromTemperature(temperature: Temperature, timestamp: Long): TemperatureTimeStamp {
            return TemperatureTimeStamp(
                ktp = temperature.ktp,
                chamber1 = temperature.chamber1,
                chamber2 = temperature.chamber2,
                basePlate = temperature.basePlate,
                water = temperature.water,
                intTemperature = temperature.intTemperature,
                intHumidity = temperature.intHumidity,
                extTemperature = temperature.extTemperature,
                extHumidity = temperature.extHumidity,
                timestamp = timestamp
            )
        }
    }
}
