tbf/TBF/Rig/GenericDevices/ITestMethod.cs
2021-10-26 19:38:09 +02:00

36 lines
1.2 KiB
C#

///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System.Collections.Generic;
using Common;
using Config.Entities;
using TBF.Rig.Generic;
namespace TBF.Rig.GenericDevices
{
public interface ITestMethod : IComponent
{
/// <summary>
/// Check compatibility of the method with the watermeters
/// </summary>
/// <param name="meters">Type of watermeters</param>
/// <returns>true when the watermeters can be tested by this method</returns>
bool CanTest(MetersKind meters);
/// <summary>
/// Return true when test method requires start/end test transition execution
/// </summary>
/// <returns>true when transitions shold be executed</returns>
bool DoTransitions();
/// <summary>
/// Execute the test method
/// </summary>
/// <param name="test">Test entity</param>
/// <param name="repetitionNr">Test repetition number (1 .. test.Repeats)</param>
/// <param name="isLastRepetition">true when this is the last repetition count, or a single test is run, or ourterLoop Mode is active</param>
/// <returns>Event(s) indicating the result of execution</returns>
IList<Event> Execute(Test test, int repetitionNr, bool isLastRepetition);
}
}