68 lines
1.9 KiB
C#
68 lines
1.9 KiB
C#
///
|
|
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Elde.FlowMeter
|
|
{
|
|
public class FlowMeterCfg : ComponentCfgBase, GenericDevices.ICalibInfoCfg, IChildComponentCfg
|
|
{
|
|
public IComponentCfgCtrl GetControl() { return new FlowMeterCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public int Idx1; /// 1..5
|
|
public float NominalFlow; /// Nominal flow in m3/h at output frequency 2000 Hz
|
|
|
|
/// Calibration info serialized parameters displayed in Metrology tab page
|
|
string calibCertificateNr;
|
|
DateTime calibDate;
|
|
DateTime calibValidDate;
|
|
public string CalibCertificateNr
|
|
{
|
|
get { return calibCertificateNr; }
|
|
set { calibCertificateNr = value; }
|
|
}
|
|
public DateTime CalibDate
|
|
{
|
|
get { return calibDate; }
|
|
set { calibDate = value; }
|
|
}
|
|
public DateTime CalibValidDate
|
|
{
|
|
get { return calibValidDate; }
|
|
set { calibValidDate = value; }
|
|
}
|
|
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
FlowMeterCfg()
|
|
{
|
|
Name = "FlowMeter";
|
|
ParentName = "CB";
|
|
Idx1 = 1;
|
|
NominalFlow = 1;
|
|
}
|
|
|
|
public FlowMeterCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Parent={1}, Idx1={2}, NominalFlow={3}",
|
|
Name,
|
|
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName),
|
|
Idx1,
|
|
NominalFlow);
|
|
}
|
|
}
|
|
}
|