2017-01-25 15:15:11 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2017 Sensus Metering Systems
|
|
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
using TBF.BenchControl.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TBF.BenchControl.Dummy.FlowMeter
|
|
|
|
|
|
{
|
2018-01-24 13:16:38 +00:00
|
|
|
|
public class FlowMeterCfg : ComponentCfgBase, IComponentCfg
|
2017-01-25 15:15:11 +00:00
|
|
|
|
{
|
2017-06-21 21:39:34 +00:00
|
|
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(FlowMeterCfg) })[0];
|
2018-06-18 10:44:37 +00:00
|
|
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
2017-06-21 21:39:34 +00:00
|
|
|
|
|
2017-01-25 15:15:11 +00:00
|
|
|
|
public IComponentCfgCtrl GetControl() { return new FlowMeterCfgCtrl(); }
|
|
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
/// Serialized parameters
|
|
|
|
|
|
///
|
|
|
|
|
|
public float NominalFlow; /// Nominal flow in m3/h at output frequency 2000 Hz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
|
|
|
|
FlowMeterCfg()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public FlowMeterCfg(string name, IComponentFactory factory)
|
|
|
|
|
|
: this()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = name;
|
|
|
|
|
|
Factory = factory;
|
|
|
|
|
|
NominalFlow = 1.0f;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string ToString(int i)
|
|
|
|
|
|
{
|
|
|
|
|
|
return string.Format("Name={0}, NominalFlow={1}", Name, NominalFlow);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|