47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
///
|
|
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
|
/// Author: Milan Hanajík
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.BenchInfo.Munich
|
|
{
|
|
/// <summary>
|
|
/// Holds information identifying the test bench - serializable configuration.
|
|
/// </summary>
|
|
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public IComponent GetComponent(IList<IComponent> components) { return new Component(this); }
|
|
public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public string TestBenchName;
|
|
public int TestBenchId;
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
ComponentCfg()
|
|
{
|
|
Name = "BenchInfo";
|
|
ParentName = string.Empty;
|
|
TestBenchName = "1";
|
|
TestBenchId = 1;
|
|
}
|
|
|
|
public ComponentCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Bench name={1}, Bench Id={2}", Name, TestBenchName, TestBenchId);
|
|
}
|
|
}
|
|
}
|