52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
///
|
|
/// Copyright (c) 2017-2019 Sensus Slovensko a.s.
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Xml.Serialization;
|
|
using Config.Entities;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Elde.FlowMeterTriplet
|
|
{
|
|
public class FlowMeterCfg : ComponentCfgBase, IChildComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(FlowMeterCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new FlowMeterCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public int Idx1; /// 1..7
|
|
public double NominalFlow; /// Nominal flow in m3/h at output frequency 6000 Hz (= 3 * 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);
|
|
}
|
|
}
|
|
}
|