- all components, componentCfg-s and parameter providers use base classes - less boilerplate code, simpler access to test/procedure parameters from code - CreateTestParams(test), CreateProcedureParams(procedure) methods added - TestBenchSim class is made static, it is not inheritted by any device anymore
41 lines
1.4 KiB
C#
41 lines
1.4 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Elde.FlowMeterTwins
|
|
{
|
|
public class FlowMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
}
|