tbf/TestBenchFramework/BenchControl/Elde/ControlBoardCfg.cs
2015-04-15 20:32:56 +02:00

41 lines
996 B
C#

///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System.IO;
using System.Collections.Generic;
using System.Xml.Serialization;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Elde
{
public class ControlBoardCfg : ComponentCfgBase, IComponentCfg
{
public IComponent GetComponent(IList<IComponent> components) { return new ControlBoardDev(this); }
public IComponentCfgCtrl GetControl() { return new ControlBoardCfgCtrl(); }
///
/// Serialized parameters
///
public int ComPortNr;
/// Private parameterless constructor invoked by all other (public) constructors
ControlBoardCfg()
{
Name = "CB";
ParentName = string.Empty;
ComPortNr = 1;
}
public ControlBoardCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}, Com{1}", Name, ComPortNr);
}
}
}