tbf/TestBenchFramework/BenchControl/Modbus/Common/Factory.cs

27 lines
796 B
C#

///
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Modbus.Common
{
public class Factory : IComponentFactory
{
public string ClassName { get { return "Modbus"; } }
public void ResetStaticProperties() { Modbus.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Modbus(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Modbus(cfg); }
public IComponentCfg DefaultConfig() { return new ModbusCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(ModbusCfg), component, this);
}
}
}