// Created with MonoDevelop
//
//    Copyright (C) 2019 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.LightSourceControl
{
    public class LightSourceQuery
    {
        public LightSourceQuery Clone()
        {
            return new LightSourceQuery()
            {
                SetLampVoltage_mV = this.SetLampVoltage_mV,
                ActLampCurrent_mA = this.ActLampCurrent_mA,
                ActLampVoltag_mV = this.ActLampVoltag_mV,
                LampSelection = this.LampSelection,
                State = this.State
            };
        }

        public override string ToString()
        {
            string state = "Lightsource state;\n";
            state += String.Format("\tState         : {0}\n", this.State);
            state += String.Format("\tLamp selection: {0}\n", this.LampSelection);
            state += String.Format("\tSet voltage   : {0}mV\n", this.SetLampVoltage_mV);
            state += String.Format("\tAct voltage   : {0}mV\n", this.ActLampVoltag_mV);
            state += String.Format("\t Act current  : {0}mA\n", this.ActLampCurrent_mA);

            return state;
        }

        public LightSourceState State { get; set; }
        public LampSelection LampSelection { get; set; }
        public UInt16 SetLampVoltage_mV { get; set; }
        public UInt16 ActLampVoltag_mV { get; set; }
        public float ActLampCurrent_mA { get; set; }
    }
}
