tbf/Config/Entities/OutputPath.cs

80 lines
2.8 KiB
C#
Raw Normal View History

///
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using Common;
namespace Config.Entities
{
public class OutputPath : IHasName, IHasItemNr, IHasValves
{
public virtual int Id { get; protected set; }
public virtual int ItemNr { get; set; }
public virtual string Name { get; set; }
public virtual string OriName { get; set; } /// Not mapped to database
public virtual double Qfrom { get; set; } /// Water flow in [m3/h]
public virtual double Qto { get; set; } /// Water flow in [m3/h]
public virtual Unit FlowUnit { get; set; } /// Not mapped to database, used in UI
public virtual string Selector { get; set; }
public virtual string RegValve { get; set; }
public virtual int RegulMinStep { get; set; }
public virtual string FlowMeter { get; set; }
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
public virtual string StartValve { get; set; }
public virtual string Diverter { get; set; }
public virtual string TempMtrDiv { get; set; }
public virtual string Scale { get; set; }
public virtual string RegVPositions { get; set; } /// Positions of regulation valves in Category.Output in % separated by ';'
/// Valves
public virtual string ValvesOpen { get; set; }
public virtual string ValvesClose { get; set; }
public virtual bool QfromTextChngd { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
public virtual bool QtoTextChngd { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
/// ------------- Additional stuff not mapped into the database -------------
public OutputPath()
{
ValvesOpen = string.Empty;
ValvesClose = string.Empty;
RegulMinStep = 0;
}
public OutputPath(string name, int itemNr)
: this()
{
Name = name;
ItemNr = itemNr;
RegulMinStep = 0;
}
public virtual OutputPath Clone(string name, int itemNr)
{
OutputPath result = new OutputPath(name, itemNr);
result.Name = Name;
result.Qfrom = Qfrom;
result.Qto = Qto;
result.FlowUnit = FlowUnit;
result.Selector = Selector;
result.RegValve = RegValve;
result.RegulMinStep = RegulMinStep;
result.FlowMeter = FlowMeter;
result.PidCoef = PidCoef;
result.StartValve = StartValve;
result.Diverter = Diverter;
result.TempMtrDiv = TempMtrDiv;
result.Scale = Scale;
result.RegVPositions= RegVPositions;
result.ValvesOpen = ValvesOpen;
result.ValvesClose = ValvesClose;
return result;
}
}
}