2016-06-28 16:04:52 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2016 Sensus Metering Systems
|
|
|
|
|
|
///
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using TBF.BenchControl.GenericDevices;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TBF.BenchControl
|
|
|
|
|
|
{
|
|
|
|
|
|
public class HeatMetersPath
|
|
|
|
|
|
{
|
|
|
|
|
|
public int ItemNr;
|
|
|
|
|
|
public string Name;
|
2016-07-07 09:08:25 +00:00
|
|
|
|
|
|
|
|
|
|
public ITempMeter TempMeterWarmRef;
|
|
|
|
|
|
public ITempMeter TempMeterColdRef;
|
|
|
|
|
|
|
|
|
|
|
|
public ITempMeter TempMeterBath1;
|
|
|
|
|
|
public ITempMeter TempMeterBath2;
|
|
|
|
|
|
public ITempMeter TempMeterBath3;
|
|
|
|
|
|
public ITempMeter TempMeterBath4;
|
|
|
|
|
|
|
|
|
|
|
|
public ITempMeter[] TempMetersWarm;
|
|
|
|
|
|
public ITempMeter[] TempMetersCold;
|
2016-06-28 16:04:52 +00:00
|
|
|
|
|
|
|
|
|
|
/// Constructor from name, the rest is empty
|
|
|
|
|
|
public HeatMetersPath(string name, int itemNr)
|
|
|
|
|
|
{
|
|
|
|
|
|
ItemNr = itemNr;
|
|
|
|
|
|
Name = name;
|
2016-07-07 09:08:25 +00:00
|
|
|
|
TempMetersWarm = new ITempMeter[Config.Data.WMsCount];
|
|
|
|
|
|
TempMetersCold = new ITempMeter[Config.Data.WMsCount];
|
|
|
|
|
|
}
|
2016-06-28 16:04:52 +00:00
|
|
|
|
|
|
|
|
|
|
/// Constructor from data entity
|
|
|
|
|
|
public HeatMetersPath(Config.Entities.HeatMetersPath entity, IList<BenchControl.Generic.IComponent> components)
|
|
|
|
|
|
: this(entity.Name, entity.ItemNr)
|
|
|
|
|
|
{
|
2016-07-07 09:08:25 +00:00
|
|
|
|
TempMeterWarmRef = TbfComponents.FindComponent(entity.TempWarmRef, components) as ITempMeter;
|
|
|
|
|
|
TempMeterColdRef = TbfComponents.FindComponent(entity.TempColdRef, components) as ITempMeter;
|
|
|
|
|
|
|
|
|
|
|
|
TempMeterBath1 = TbfComponents.FindComponent(entity.TempBath1, components) as ITempMeter;
|
|
|
|
|
|
TempMeterBath2 = TbfComponents.FindComponent(entity.TempBath2, components) as ITempMeter;
|
|
|
|
|
|
TempMeterBath3 = TbfComponents.FindComponent(entity.TempBath3, components) as ITempMeter;
|
|
|
|
|
|
TempMeterBath4 = TbfComponents.FindComponent(entity.TempBath4, components) as ITempMeter;
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < Config.Data.WMsCount; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
TempMetersWarm[i] = (ITempMeter)TbfComponents.FindComponent(entity.GetTempWarm(i), components);
|
|
|
|
|
|
TempMetersCold[i] = (ITempMeter)TbfComponents.FindComponent(entity.GetTempCold(i), components);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2016-06-28 16:04:52 +00:00
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
|
|
|
|
|
return string.Format("{0}", Name);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|