tbf/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterCfg.cs
Milan Hanajik 94de991bf6 Everything works OK after serious changes:
- 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
2015-01-02 12:51:27 +01:00

38 lines
1.0 KiB
C#

using System;
using System.IO;
using System.Xml.Serialization;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Elde.FlowMeter
{
public class FlowMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg
{
public int Idx1; /// 1..5
public float NominalFlow; /// Nominal flow in m3/h at output frequency 2000 Hz
/// 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);
}
}
}