113 lines
3.6 KiB
C#
113 lines
3.6 KiB
C#
///
|
|
/// Copyright (c) 2016 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using log4net;
|
|
using TBF.BenchControl;
|
|
using Config.Entities;
|
|
|
|
namespace TBF.BenchControl.WaterMeters.Munich
|
|
{
|
|
/// <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));
|
|
public override string ToString() { return string.Format("WaterMeter({0})", Cfg.ToString(1)); }
|
|
|
|
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; } }
|
|
|
|
public double PulsesPerLtr { get { return (double)waterMeterCfg.ProcParams.PulsesPerLtr; } }
|
|
|
|
/// <summary>Pipe diameter [mm]</summary>
|
|
public float DN { get { return 0; } }
|
|
|
|
/// <summary>Build lenght [mm]</summary>
|
|
public float L { get { return 0; } }
|
|
|
|
public Mounting Mounting { get { return Config.Entities.Mounting.NotSpecified; } }
|
|
|
|
/// <summary>Nominal water flow in [m3/h]</summary>
|
|
public float Q4_Qmax { get { return 0; } }
|
|
public float Q3_Qn { get { return waterMeterCfg. ProcParams.Qn; } }
|
|
public float Q2_Qt { get { return 0; } }
|
|
public float Q1_Qmin { get { return 0; } }
|
|
|
|
/// <summary>Metrological class, etc</summary>
|
|
public string MetrologicalClass { get { return waterMeterCfg.ProcParams.MetrologicalClass; } }
|
|
public TemperatureClass TemperatureClass { get { return Config.Entities.TemperatureClass.NotSpecified; } }
|
|
public PressureLossClass PressureLossClass { get { return Config.Entities.PressureLossClass.NotSpecified; } }
|
|
public MaxAdmissiblePressure MaxAdmissiblePressure { get { return Config.Entities.MaxAdmissiblePressure.NotSpecified; } }
|
|
public FlowProfileSensitivityClass FlowProfileSensitivityClass { get { return Config.Entities.FlowProfileSensitivityClass.NotSpecified; } }
|
|
|
|
/// <summary>WaterMeter approval information or signature</summary>
|
|
public string ApprovalInfo { get { return waterMeterCfg.ProcParams.ApprovalInfo; } }
|
|
public string Certificate { get { return string.Empty; } }
|
|
|
|
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>
|
|
public Config.Entities.Medium WaterTemp { get { return Config.Entities.Medium.NotSpecified; } }
|
|
|
|
/// Properties set by the Begin and the End form
|
|
public string SerialNr
|
|
{
|
|
get { return serialNr; }
|
|
set { serialNr = value; }
|
|
}
|
|
string serialNr;
|
|
|
|
public string EndState
|
|
{
|
|
get { return endState; }
|
|
set { endState = value; }
|
|
}
|
|
string endState;
|
|
|
|
public string BeginState
|
|
{
|
|
get { return beginState; }
|
|
set { beginState = value; }
|
|
}
|
|
string beginState;
|
|
|
|
public bool Disabled
|
|
{
|
|
get { return disabled; }
|
|
set { disabled = value; }
|
|
}
|
|
bool disabled;
|
|
|
|
public WaterMeter()
|
|
{
|
|
ClearData();
|
|
}
|
|
|
|
public WaterMeter(WaterMeterCfg cfg)
|
|
: base(cfg)
|
|
{
|
|
ClearData();
|
|
waterMeterCfg = cfg;
|
|
log.Debug(this.ToString());
|
|
}
|
|
|
|
public void ClearData()
|
|
{
|
|
serialNr = string.Empty;
|
|
endState = string.Empty;
|
|
beginState = string.Empty;
|
|
disabled = false;
|
|
}
|
|
}
|
|
}
|