Components Initialize() rewritten, double StartChangeHandler() calls avoided, ToString() methods are equl, use ClassName.

This commit is contained in:
Milan Hanajik
2021-04-08 12:03:18 +02:00
parent 331803e51d
commit 1d50b7206d
178 changed files with 2003 additions and 2151 deletions
@@ -12,24 +12,26 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
public class TestMethod : ComponentBase, GenericDevices.ITestMethod
{
private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod));
public override string ToString() { return string.Format("TestMethods.PulsesTest({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
public bool DoTransitions() { return true; }
readonly TestMethodCfg testMethodCfg;
public TestMethod()
{
}
public TestMethod() { }
public TestMethod(Generic.IComponentCfg cfg)
: base(cfg)
{
testMethodCfg = cfg as TestMethodCfg;
log.Warn(this.ToString());
}
public override void Initialize()
{
log.FatalFormat("{0} initialized: {1}", Name, this);
}
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
{
return (new PulseOutputsTestSeq()).Execute(test, repetNr, isLastRepetition, testMethodCfg.TestParams, DebugLevel);