tbf/TBF/Rig/TestMethods/FlyingStartMassCollection/HeatMeters/Component.cs

47 lines
1.5 KiB
C#
Raw Normal View History

2016-08-04 13:46:17 +00:00
///
/// Copyright (c) 2013-2023 Sensus Slovensko a.s.
2016-08-04 13:46:17 +00:00
///
using System;
using System.Collections.Generic;
using log4net;
using Common;
2016-08-04 13:46:17 +00:00
using Config.Entities;
2021-03-05 13:47:21 +00:00
namespace TBF.Rig.TestMethods.FlyingStartMassCollection.HeatMeters
2016-08-04 13:46:17 +00:00
{
public class Component : ComponentBase, GenericDevices.ITestMethod
2016-08-04 13:46:17 +00:00
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
2026-03-12 13:50:47 +00:00
public FlowType MethodFlowType => FlowType.volume;
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
2016-08-04 13:46:17 +00:00
public bool CanTest(MetersKind meters) { return meters == MetersKind.HeatMeter; }
public bool DoTransitions() { return true; }
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
{
return FlyingStartMassCollectionSeq.CheckDeviceCaps(test, devices, out message);
}
2016-08-04 13:46:17 +00:00
readonly TestMethodCfg testMethodCfg;
public Component() { }
///
public Component(Generic.IComponentCfg cfg)
2016-08-04 13:46:17 +00:00
: base(cfg)
{
testMethodCfg = cfg as TestMethodCfg;
log.Warn(this.ToString());
2016-08-04 13:46:17 +00:00
}
///
public override void Initialize() { }
2016-08-04 13:46:17 +00:00
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
2016-08-04 13:46:17 +00:00
{
return new FlyingStartMassCollectionSeq().Execute(test, repetNr, isLastRepetition,
testMethodCfg.TestParams.DelayedStart, null, testMethodCfg.TestParams, DebugLevel);
2016-08-04 13:46:17 +00:00
}
}
}