2015-04-15 18:32:56 +00:00
|
|
|
|
///
|
2022-04-15 11:30:58 +00:00
|
|
|
|
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
|
2015-04-15 18:32:56 +00:00
|
|
|
|
///
|
|
|
|
|
|
using System.Collections.Generic;
|
2021-10-26 09:23:57 +00:00
|
|
|
|
using TBF.Rig.GenericDevices;
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2021-10-26 09:23:57 +00:00
|
|
|
|
namespace TBF.Rig
|
2014-07-28 07:54:35 +00:00
|
|
|
|
{
|
|
|
|
|
|
public class MetersPath
|
|
|
|
|
|
{
|
|
|
|
|
|
public int ItemNr;
|
|
|
|
|
|
public string Name;
|
2020-11-05 08:31:43 +00:00
|
|
|
|
public IRegReader[] RegisterReaders;
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
|
|
|
|
|
/// Constructor from name, the rest is empty
|
|
|
|
|
|
public MetersPath(string name, int itemNr)
|
|
|
|
|
|
{
|
|
|
|
|
|
ItemNr = itemNr;
|
|
|
|
|
|
Name = name;
|
2021-09-19 20:04:16 +00:00
|
|
|
|
RegisterReaders = new IRegReader[TBF.Data.WMsCount];
|
2014-07-28 07:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-10-26 09:23:57 +00:00
|
|
|
|
public MetersPath(Config.Entities.MetersPath entity, IList<Rig.Generic.IComponent> components)
|
2014-07-28 07:54:35 +00:00
|
|
|
|
: this(entity.Name, entity.ItemNr)
|
|
|
|
|
|
{
|
2021-09-19 20:04:16 +00:00
|
|
|
|
for (int i = 0; i < TBF.Data.WMsCount; i++)
|
2014-07-28 07:54:35 +00:00
|
|
|
|
{
|
2022-04-15 11:30:58 +00:00
|
|
|
|
RegisterReaders[i] = TbfComponents.FindComponent(entity.GetSensor(i), components) as IRegReader;
|
2014-07-28 07:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|