2016-05-19 22:10:16 +00:00
|
|
|
|
///
|
2023-03-20 09:14:29 +00:00
|
|
|
|
/// Copyright (c) 2013-2023 Sensus Slovensko a.s.
|
2016-05-19 22:10:16 +00:00
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using log4net;
|
2021-09-23 09:46:40 +00:00
|
|
|
|
using Common;
|
2021-10-26 09:23:57 +00:00
|
|
|
|
using TBF.Rig;
|
2016-05-19 22:10:16 +00:00
|
|
|
|
|
2021-10-26 09:23:57 +00:00
|
|
|
|
namespace TBF.Rig.WaterMeters.Munich
|
2016-05-19 22:10:16 +00:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// This component = instance of this class is a placeholder for a combined main watermeter
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class WaterMeter : ComponentBase, GenericDevices.IWaterMeter
|
|
|
|
|
|
{
|
|
|
|
|
|
private static readonly ILog log = LogManager.GetLogger(typeof(WaterMeter));
|
2021-04-07 07:57:42 +00:00
|
|
|
|
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
2016-05-19 22:10:16 +00:00
|
|
|
|
|
|
|
|
|
|
readonly WaterMeterCfg waterMeterCfg;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>WaterMeter type (product name) and producer</summary>
|
|
|
|
|
|
public string ProductName { get { return waterMeterCfg.ProcParams.ProductName; } }
|
|
|
|
|
|
public string Producer { get { return waterMeterCfg.ProcParams.Producer; } }
|
|
|
|
|
|
|
2016-05-20 08:38:00 +00:00
|
|
|
|
public double PulsesPerLtr { get { return 1.0; } }
|
2016-05-19 22:10:16 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>Pipe diameter [mm]</summary>
|
|
|
|
|
|
public float DN { get { return 0; } }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Build lenght [mm]</summary>
|
|
|
|
|
|
public float L { get { return 0; } }
|
|
|
|
|
|
|
2021-09-23 09:46:40 +00:00
|
|
|
|
public Mounting Mounting { get { return Mounting.NotSpecified; } }
|
2016-05-19 22:10:16 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>Nominal water flow in [m3/h]</summary>
|
2023-03-20 09:14:29 +00:00
|
|
|
|
public FlowNames Qnames { get { return waterMeterCfg.ProcParams.NewQnames ? FlowNames.Q3Q2Q1 : FlowNames.QnQtQmin; } }
|
|
|
|
|
|
public double Q4_Qmax { get { return 0; } }
|
|
|
|
|
|
public double Q3_Qn { get { return waterMeterCfg.ProcParams.Qn; } }
|
|
|
|
|
|
public double Q2_Qt { get { return 0; } }
|
|
|
|
|
|
public double Q1_Qmin { get { return 0; } }
|
|
|
|
|
|
public double ErrLimHiQ { get { return 2.0; } }
|
|
|
|
|
|
public double ErrLimLoQ { get { return 5.0; } }
|
2016-05-19 22:10:16 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>Metrological class, etc</summary>
|
|
|
|
|
|
public string MetrologicalClass { get { return waterMeterCfg.ProcParams.MetrologicalClass; } }
|
2021-09-23 09:46:40 +00:00
|
|
|
|
public TemperatureClass TemperatureClass { get { return TemperatureClass.NotSpecified; } }
|
|
|
|
|
|
public PressureLossClass PressureLossClass { get { return PressureLossClass.NotSpecified; } }
|
|
|
|
|
|
public MaxAdmissiblePressure MaxAdmissiblePressure { get { return MaxAdmissiblePressure.NotSpecified; } }
|
|
|
|
|
|
public FlowProfileSensitivityClass FlowProfileSensitivityClass { get { return FlowProfileSensitivityClass.NotSpecified; } }
|
2016-05-19 22:10:16 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>WaterMeter approval information or signature</summary>
|
|
|
|
|
|
public string ApprovalInfo { get { return waterMeterCfg.ProcParams.ApprovalInfo; } }
|
|
|
|
|
|
public string Certificate { get { return string.Empty; } }
|
|
|
|
|
|
|
2018-04-13 09:40:51 +00:00
|
|
|
|
public Medium Medium { get { return Medium.ColdWater; } }
|
|
|
|
|
|
|
2016-05-19 22:10:16 +00:00
|
|
|
|
public string Text1 { get { return string.Empty; } }
|
|
|
|
|
|
public string Text2 { get { return string.Empty; } }
|
|
|
|
|
|
public string Text3 { get { return string.Empty; } }
|
|
|
|
|
|
public string Text4 { get { return string.Empty; } }
|
|
|
|
|
|
public string Text5 { get { return string.Empty; } }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Water: cold / hot</summary>
|
2021-09-23 09:46:40 +00:00
|
|
|
|
public Medium WaterTemp { get { return Medium.NotSpecified; } }
|
2016-05-19 22:10:16 +00:00
|
|
|
|
|
|
|
|
|
|
/// Properties set by the Begin and the End form
|
2021-04-07 07:57:42 +00:00
|
|
|
|
public string SerialNr { get; set; }
|
|
|
|
|
|
public string EndState { get; set; }
|
|
|
|
|
|
public string BeginState { get; set; }
|
|
|
|
|
|
public bool Disabled { get; set; }
|
2016-05-19 22:10:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
2021-04-07 07:57:42 +00:00
|
|
|
|
public WaterMeter() { }
|
2016-05-19 22:10:16 +00:00
|
|
|
|
|
2016-08-05 12:32:36 +00:00
|
|
|
|
public WaterMeter(Generic.IComponentCfg cfg)
|
2016-05-19 22:10:16 +00:00
|
|
|
|
: base(cfg)
|
|
|
|
|
|
{
|
2016-08-05 12:32:36 +00:00
|
|
|
|
waterMeterCfg = cfg as WaterMeterCfg;
|
2016-05-19 22:10:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-04-07 07:57:42 +00:00
|
|
|
|
public override void Initialize()
|
|
|
|
|
|
{
|
|
|
|
|
|
ClearData();
|
|
|
|
|
|
log.FatalFormat("{0} initialized: {1}", Name, this);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-05-19 22:10:16 +00:00
|
|
|
|
public void ClearData()
|
|
|
|
|
|
{
|
2021-04-07 07:57:42 +00:00
|
|
|
|
SerialNr = string.Empty;
|
|
|
|
|
|
EndState = string.Empty;
|
|
|
|
|
|
BeginState = string.Empty;
|
|
|
|
|
|
Disabled = false;
|
2016-05-19 22:10:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|