123 lines
3.1 KiB
C#
123 lines
3.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Thermo.Active.Model.DTOModels.ThWarmers
|
|
{
|
|
public class DTOThermoCam
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// Thermo Image Size
|
|
/// </summary>
|
|
public Size ImageSize { get; set; } = new Size();
|
|
|
|
/// <summary>
|
|
/// Thermo Temperature Range
|
|
/// </summary>
|
|
public RangeVal RangeTemperature { get; set; } = new RangeVal();
|
|
|
|
/// <summary>
|
|
/// Modalità ThermoCamera (set by HMI)
|
|
/// </summary>
|
|
public bool ThermoCamMode { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Funzionamento ThermoCamera (set by HMI)
|
|
/// </summary>
|
|
public bool ThermoCamOnOff { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Stato connessione ThermoCamera (in rete)
|
|
/// </summary>
|
|
public bool ThermoCamConnected { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Opzione ThermoCamera (set by PLC)
|
|
/// </summary>
|
|
public bool ThermoOptionActive { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Data ultima acquisizione
|
|
/// </summary>
|
|
public DateTime LastTakenImage { get; set; } = new DateTime(0);
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Public Methods
|
|
|
|
/// <summary>
|
|
/// Equality test for class object
|
|
/// </summary>
|
|
/// <param name="obj"></param>
|
|
/// <returns></returns>
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (!(obj is DTOThermoCam item))
|
|
return false;
|
|
|
|
if (ThermoOptionActive != item.ThermoOptionActive)
|
|
return false;
|
|
if (ThermoCamMode != item.ThermoCamMode)
|
|
return false;
|
|
if (ThermoCamOnOff != item.ThermoCamOnOff)
|
|
return false;
|
|
if (ImageSize != item.ImageSize)
|
|
return false;
|
|
if (RangeTemperature != item.RangeTemperature)
|
|
return false;
|
|
if (LastTakenImage != item.LastTakenImage)
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Hash gen
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public override int GetHashCode()
|
|
{
|
|
return base.GetHashCode();
|
|
}
|
|
|
|
#endregion Public Methods
|
|
}
|
|
|
|
public class RangeVal
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// VAlore MASSIMO
|
|
/// </summary>
|
|
public double Max { get; set; } = 50;
|
|
|
|
/// <summary>
|
|
/// Valore minimo
|
|
/// </summary>
|
|
public double Min { get; set; } = 0;
|
|
|
|
#endregion Public Properties
|
|
}
|
|
|
|
public class Size
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// Dimensione X
|
|
/// </summary>
|
|
public int X { get; set; } = 100;
|
|
|
|
/// <summary>
|
|
/// Dimensione X
|
|
/// </summary>
|
|
public int Y { get; set; } = 100;
|
|
|
|
#endregion Public Properties
|
|
}
|
|
} |