tbf/TBF/BenchControl/Modbus/Novus/Factory.cs
2021-04-08 12:03:25 +02:00

25 lines
754 B
C#

///
/// Copyright (c) 2021 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Modbus.Novus
{
public class Factory : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
public IComponent DummyComponent() { return new Novus(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Novus(cfg, components); }
public IComponentCfg DefaultConfig() { return new NovusCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(NovusCfg.Serializer, component, this);
}
}
}