PMaxTestSeq and LeakTestSeq.CheckDeviceCaps implemented, ver. 3.1.1578

This commit is contained in:
Milan Hanajik
2021-01-20 12:44:33 +01:00
parent 1fb76a2167
commit 1e8d2975f0
5 changed files with 49 additions and 11 deletions
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@@ -18,6 +18,26 @@ namespace TBF.BenchControl.TestMethods.LeakTest
{
private static readonly ILog log = LogManager.GetLogger(typeof(LeakTestSeq));
/// <summary>
/// Check capabilities of devces in the output path required for this test method
/// </summary>
/// <param name="devices">Devices</param>
/// <returns>true when capabilities of devices are OK</returns>
public static bool CheckDeviceCaps(Config.Entities.Test test, OutputPath devices, out string message)
{
if (!(StateMachine.ControlBoard is ControlBoard.Legacy.ControlBoardDev) &&
!(StateMachine.ControlBoard is ControlBoard.Papouch.CBoard) &&
!(StateMachine.ControlBoard is ControlBoard.New.CBoard))
{
/// Control board does not support this method
message = string.Format("{0}: {1}", test.Name, Strings.Test_bench_does_not_suport_selected_test_method);
return false;
}
message = string.Empty;
return true;
}
/// <summary>
/// Flying start mass collection method sequence
/// </summary>
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2016 Sensus Metering Systems
/// Copyright (c) 2013-2021 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -18,8 +18,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
public bool DoTransitions() { return true; }
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
{
message = string.Format("{0}: CheckDeviceCaps() is not implemented yet", Name);
return false;
return LeakTestSeq.CheckDeviceCaps(test, devices, out message);
}
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@@ -17,6 +17,26 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
{
private static readonly ILog log = LogManager.GetLogger(typeof(PMaxTestSeq));
/// <summary>
/// Check capabilities of devces in the output path required for this test method
/// </summary>
/// <param name="devices">Devices</param>
/// <returns>true when capabilities of devices are OK</returns>
public static bool CheckDeviceCaps(Config.Entities.Test test, OutputPath devices, out string message)
{
if (!(StateMachine.ControlBoard is ControlBoard.Legacy.ControlBoardDev) &&
!(StateMachine.ControlBoard is ControlBoard.Papouch.CBoard) &&
!(StateMachine.ControlBoard is ControlBoard.New.CBoard))
{
/// Control board does not support this method
message = string.Format("{0}: {1}", test.Name, Strings.Test_bench_does_not_suport_selected_test_method);
return false;
}
message = string.Empty;
return true;
}
/// <summary>
/// Pressure test sequence
/// </summary>
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2016 Sensus Metering Systems
/// Copyright (c) 2013-2021 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -21,8 +21,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
public bool DoTransitions() { return true; }
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
{
message = string.Format("{0}: CheckDeviceCaps() is not implemented yet", Name);
return false;
return PMaxTestSeq.CheckDeviceCaps(test, devices, out message);
}