2015-04-15 18:32:56 +00:00
|
|
|
|
///
|
2021-01-14 08:50:11 +00:00
|
|
|
|
/// Copyright (c) 2013-2021 Sensus Metering Systems
|
2015-04-15 18:32:56 +00:00
|
|
|
|
///
|
|
|
|
|
|
using System;
|
2015-02-19 07:37:37 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using log4net;
|
2015-12-04 16:17:20 +00:00
|
|
|
|
using Config.Entities;
|
2015-02-19 07:37:37 +00:00
|
|
|
|
using TBF.BenchControl;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TBF.BenchControl.TestMethods.PMaxTest
|
|
|
|
|
|
{
|
|
|
|
|
|
public class TestMethod : ComponentBase, GenericDevices.ITestMethod
|
|
|
|
|
|
{
|
|
|
|
|
|
private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod));
|
2019-07-09 08:49:13 +00:00
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
|
|
|
|
|
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
|
|
|
|
|
}
|
2015-02-19 07:37:37 +00:00
|
|
|
|
|
2015-12-04 16:17:20 +00:00
|
|
|
|
public bool CanTest(MetersKind meters) { return true; }
|
2017-12-02 16:54:38 +00:00
|
|
|
|
public bool DoTransitions() { return true; }
|
2020-05-14 08:44:36 +00:00
|
|
|
|
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
|
|
|
|
|
|
{
|
2021-01-14 08:50:11 +00:00
|
|
|
|
return PMaxTestSeq.CheckDeviceCaps(test, devices, out message);
|
2020-05-14 08:44:36 +00:00
|
|
|
|
}
|
2015-02-19 07:37:37 +00:00
|
|
|
|
|
2017-07-25 13:10:06 +00:00
|
|
|
|
|
2020-05-14 08:44:36 +00:00
|
|
|
|
readonly TestMethodCfg testMethodCfg;
|
2015-06-29 09:14:33 +00:00
|
|
|
|
|
2020-05-14 08:44:36 +00:00
|
|
|
|
public TestMethod() { }
|
|
|
|
|
|
///
|
|
|
|
|
|
public TestMethod(Generic.IComponentCfg cfg)
|
2015-02-19 07:37:37 +00:00
|
|
|
|
: base(cfg)
|
|
|
|
|
|
{
|
2016-08-05 12:32:36 +00:00
|
|
|
|
testMethodCfg = cfg as TestMethodCfg;
|
2015-02-19 07:37:37 +00:00
|
|
|
|
log.Debug(this.ToString());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-12-02 16:54:38 +00:00
|
|
|
|
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
2015-02-19 07:37:37 +00:00
|
|
|
|
{
|
2017-12-08 10:45:37 +00:00
|
|
|
|
return (new PMaxTestSeq()).Execute(test, repetNr, isLastRepetition, testMethodCfg.TestParams);
|
2015-02-19 07:37:37 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|