tbf/TBF/BenchControl/MetersPath.cs
2021-09-20 14:29:01 +02:00

33 lines
822 B
C#

///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl
{
public class MetersPath
{
public int ItemNr;
public string Name;
public IRegReader[] RegisterReaders;
/// Constructor from name, the rest is empty
public MetersPath(string name, int itemNr)
{
ItemNr = itemNr;
Name = name;
RegisterReaders = new IRegReader[TBF.Data.WMsCount];
}
public MetersPath(Config.Entities.MetersPath entity, IList<BenchControl.Generic.IComponent> components)
: this(entity.Name, entity.ItemNr)
{
for (int i = 0; i < TBF.Data.WMsCount; i++)
{
RegisterReaders[i] = (IRegReader)TbfComponents.FindComponent(entity.GetSensor(i), components);
}
}
}
}