2016-08-17 10:24:24 +00:00
|
|
|
|
///
|
2021-04-13 14:54:40 +00:00
|
|
|
|
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
|
2016-08-17 10:24:24 +00:00
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using log4net;
|
|
|
|
|
|
using Config.Entities;
|
2021-04-13 14:54:40 +00:00
|
|
|
|
using TBF.Rig.Sequences;
|
|
|
|
|
|
using TBF.UiBridge;
|
2016-08-17 10:24:24 +00:00
|
|
|
|
|
2021-03-05 13:47:21 +00:00
|
|
|
|
namespace TBF.Rig.TestMethods.FlyingStartMassCollection.Single
|
2016-08-17 10:24:24 +00:00
|
|
|
|
{
|
|
|
|
|
|
public class Component : ComponentBase, GenericDevices.ITestMethod
|
|
|
|
|
|
{
|
|
|
|
|
|
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
2021-04-07 10:48:44 +00:00
|
|
|
|
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
2016-08-17 10:24:24 +00:00
|
|
|
|
|
|
|
|
|
|
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
|
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)
|
|
|
|
|
|
{
|
|
|
|
|
|
return FlyingStartMassCollectionSeq.CheckDeviceCaps(test, devices, out message);
|
|
|
|
|
|
}
|
2016-08-17 10:24:24 +00:00
|
|
|
|
|
2020-05-14 08:44:36 +00:00
|
|
|
|
public Component() { }
|
|
|
|
|
|
///
|
|
|
|
|
|
public Component(Generic.IComponentCfg cfg)
|
2016-08-17 10:24:24 +00:00
|
|
|
|
: base(cfg)
|
|
|
|
|
|
{
|
2021-02-19 08:48:00 +00:00
|
|
|
|
log.Warn(this.ToString());
|
2016-08-17 10:24:24 +00:00
|
|
|
|
}
|
2021-04-03 07:39:17 +00:00
|
|
|
|
///
|
|
|
|
|
|
public override void Initialize() { }
|
2016-08-17 10:24:24 +00:00
|
|
|
|
|
2017-12-02 16:54:38 +00:00
|
|
|
|
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
2016-08-17 10:24:24 +00:00
|
|
|
|
{
|
2021-04-13 14:54:40 +00:00
|
|
|
|
if (DebugLevel == DebugMode.Normal)
|
|
|
|
|
|
{
|
|
|
|
|
|
return (new FlyingStartMassCollectionSeq()).Execute(test, repetNr, isLastRepetition, null, null, DebugLevel);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
/// DebugLevel == DebugMode.Simulate
|
|
|
|
|
|
(new FlyingStartMassCollectionSeq()).MakeSimulatedTrivial(test, repetNr, test.Part);
|
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Progress.Completed));
|
|
|
|
|
|
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0)));
|
|
|
|
|
|
return new List<Event> { Event.Done };
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2016-08-17 10:24:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|