// Created with MonoDevelop
//
//    Copyright (C) 2023 Hiperscan GmbH Dresden, Germany
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.

using System;

namespace Hiperscan.SGS.Benchtop.TemperatureControl
{
    public class EnvironmentQuery
    {
        public override string ToString()
        {
            string query = "Environment Query;\n";
            query += String.Format("\tTouchBoardTemperature     : {0}°C\n", this.TouchBoardTemperature);
            query += String.Format("\tPeripheralBoardTemperature: {0}°C\n", this.PeripheralBoardTemperature);
            query += String.Format("\tAtmosphericPressure       : {0}hPa\n", this.AtmosphericPressure);
            query += String.Format("\tHumidity                  : {0}%\n", this.Humidity);

            return query;
        }

        public EnvironmentQuery Clone()
        {
            return new EnvironmentQuery()
            {
                Humidity = this.Humidity,
                AtmosphericPressure = this.AtmosphericPressure,
                TouchBoardTemperature = this.TouchBoardTemperature.Clone(),
                PeripheralBoardTemperature = this.PeripheralBoardTemperature.Clone()
            };
        }

        public Temperature TouchBoardTemperature { get; set; }
        public Temperature PeripheralBoardTemperature { get; set; }
        public float AtmosphericPressure { get; set; }
        public float Humidity { get; set; }
    }
}
