2015-04-15 18:32:56 +00:00
|
|
|
|
///
|
2016-08-05 12:32:36 +00:00
|
|
|
|
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
2015-04-15 18:32:56 +00:00
|
|
|
|
///
|
|
|
|
|
|
using System.Collections.Generic;
|
2014-07-28 07:54:35 +00:00
|
|
|
|
using TBF.BenchControl.Generic;
|
|
|
|
|
|
|
2015-05-07 14:11:07 +00:00
|
|
|
|
namespace TBF.BenchControl.MettlerToledo.Standard
|
2014-07-28 07:54:35 +00:00
|
|
|
|
{
|
|
|
|
|
|
public class BalanceNewFactory : IComponentFactory
|
|
|
|
|
|
{
|
|
|
|
|
|
public string ClassName { get { return "MettlerToledoBalanceSN"; } }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Max. number of components of this class in the system</summary>
|
|
|
|
|
|
public int MaxCount { get { return 5; } }
|
|
|
|
|
|
|
2015-06-29 09:14:33 +00:00
|
|
|
|
public IComponent DummyComponent() { return new BalanceNewDev(); }
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2016-08-05 12:32:36 +00:00
|
|
|
|
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new BalanceNewDev(cfg); }
|
|
|
|
|
|
|
2015-06-29 09:14:33 +00:00
|
|
|
|
public IComponentCfg DefaultConfig() { return new BalanceCfg(this); }
|
|
|
|
|
|
|
|
|
|
|
|
public IComponentCfgCtrl CreateCfgCtrl() { return new BalanceCfgCtrl(); }
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
|
|
|
|
|
public IComponent ComponentFromCmpntCfg(IComponentCfg config, IList<Generic.IComponent> components)
|
|
|
|
|
|
{
|
2015-01-02 18:14:19 +00:00
|
|
|
|
return new BalanceNewDev((BalanceCfg)config);
|
2014-07-28 07:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-12-04 16:17:20 +00:00
|
|
|
|
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
2014-07-28 07:54:35 +00:00
|
|
|
|
{
|
2017-06-21 21:39:34 +00:00
|
|
|
|
return ComponentCfgBase.CreateFromDbEntity(BalanceCfg.Serializer, component, this);
|
2014-07-28 07:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|