tbf/TBF/BenchControl/Dummy/FlowMeter/FlowMeterCfg.cs

44 lines
1.1 KiB
C#

///
/// 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
{
public class FlowMeterCfg : ComponentCfgBase, IComponentCfg
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(FlowMeterCfg) })[0];
public override XmlSerializer GetSerializer() { return Serializer; }
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);
}
}
}