Refactorization : BenchControl -> Rig

This commit is contained in:
Milan Hanajik
2021-03-05 16:12:24 +01:00
parent 84c8ec26b6
commit 6cf3bd6160
1461 changed files with 6330 additions and 6330 deletions
+32
View File
@@ -0,0 +1,32 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.Rig.GenericDevices;
namespace TBF.Rig
{
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[Config.Data.WMsCount];
}
public MetersPath(Config.Entities.MetersPath entity, IList<Rig.Generic.IComponent> components)
: this(entity.Name, entity.ItemNr)
{
for (int i = 0; i < Config.Data.WMsCount; i++)
{
RegisterReaders[i] = (IRegReader)TbfComponents.FindComponent(entity.GetSensor(i), components);
}
}
}
}