61 lines
1.8 KiB
C#
61 lines
1.8 KiB
C#
///
|
|
/// Copyright (c) 2015 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
|
{
|
|
public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public IComponent GetComponent(IList<IComponent> components) { return new TestMethod(this); }
|
|
public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public int RfidPortNrBoard1;
|
|
public int RfidPortNrBoard2;
|
|
public int RfidPortNrBoard3;
|
|
public int RfidPortNrBoard4;
|
|
|
|
/// <summary> Test parameters </summary>
|
|
[XmlIgnore]
|
|
public iPerlCommunicationParams TestParams;
|
|
public override IParamsProvider GetTestParams() { return TestParams; }
|
|
public override IParamsProvider CreateTestParams(Entities.Test test)
|
|
{
|
|
iPerlCommunicationParams testParams = new iPerlCommunicationParams();
|
|
testParams.UpdateTestParams(Name, test);
|
|
return testParams;
|
|
}
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
TestMethodCfg()
|
|
{
|
|
Name = "iPerlCommunication";
|
|
ParentName = string.Empty;
|
|
RfidPortNrBoard1 = 51;
|
|
RfidPortNrBoard1 = 52;
|
|
RfidPortNrBoard1 = 53;
|
|
RfidPortNrBoard1 = 54;
|
|
TestParams = new iPerlCommunicationParams();
|
|
}
|
|
|
|
public TestMethodCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Board#1=COM{1}, Board#2=COM{2}, Board#3=COM{3}, Board#4=COM{4}",
|
|
Name, RfidPortNrBoard1, RfidPortNrBoard2, RfidPortNrBoard3, RfidPortNrBoard4);
|
|
}
|
|
}
|
|
}
|