tbf/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterCfg.cs

50 lines
1.6 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.FlowMeterTwins
{
public class FlowMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg
{
public IComponentCfgCtrl GetControl() { return new FlowMeterCfgCtrl(); }
///
/// Serialized parameters
///
public float NominalFlow; /// Nominal flow in m3/h at output frequency 2000 Hz
public string FlowMeter1; /// Name of the flow meter 1 component
public string FlowMeter2; /// Name of the flow meter 2 component
/// Private parameterless constructor invoked by all other (public) constructors
FlowMeterCfg()
{
Name = "FlowMeterTwins";
ParentName = "CB";
NominalFlow = 1600;
FlowMeter1 = string.Empty;
FlowMeter2 = string.Empty;
}
public FlowMeterCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}, Parent={1}, NominalFlow={2}, Flowmeter1={3}, Flowmeter2={4}",
Name,
string.IsNullOrEmpty(ParentName) ? "-" : ParentName,
NominalFlow,
string.IsNullOrEmpty(FlowMeter1) ? "-" : FlowMeter1,
string.IsNullOrEmpty(FlowMeter2) ? "-" : FlowMeter2);
}
}
}