From 6efa9985323bd4a14584f6d51a615ff0eecbe6fc Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 14 Apr 2016 12:29:14 +0200 Subject: [PATCH] Logging of a STOP command, ver.2.4.264. --- TestBenchFramework/BenchControl/BenchPath.cs | 7 +++++++ TestBenchFramework/BenchControl/FeedingPath.cs | 5 +++++ TestBenchFramework/BenchControl/OutputPath.cs | 12 +++++++++++- .../BenchControl/Sequences/SequenceBase.cs | 8 +++++--- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/TestBenchFramework/BenchControl/BenchPath.cs b/TestBenchFramework/BenchControl/BenchPath.cs index 0b90039cf..7fdf201ca 100644 --- a/TestBenchFramework/BenchControl/BenchPath.cs +++ b/TestBenchFramework/BenchControl/BenchPath.cs @@ -49,5 +49,12 @@ namespace TBF.BenchControl ValvesClose = new List(); foreach (var vName in vClose) ValvesClose.Add((IValve)TbfComponents.FindComponent(vName, components)); } + + public override string ToString() + { + return string.Format("{0} StopBF={1}", + Name, + (StopBFValve != null) ? StopBFValve.Name : "---"); + } } } diff --git a/TestBenchFramework/BenchControl/FeedingPath.cs b/TestBenchFramework/BenchControl/FeedingPath.cs index 64501c807..34d48854d 100644 --- a/TestBenchFramework/BenchControl/FeedingPath.cs +++ b/TestBenchFramework/BenchControl/FeedingPath.cs @@ -41,5 +41,10 @@ namespace TBF.BenchControl ValvesClose = new List(); foreach (var vName in vClose) ValvesClose.Add((IValve)TbfComponents.FindComponent(vName, components)); } + + public override string ToString() + { + return string.Format("{0} Pump={1}", Name, (Pump != null) ? Pump.Name : "---"); + } } } diff --git a/TestBenchFramework/BenchControl/OutputPath.cs b/TestBenchFramework/BenchControl/OutputPath.cs index ac27c1ac6..62d24b4d7 100644 --- a/TestBenchFramework/BenchControl/OutputPath.cs +++ b/TestBenchFramework/BenchControl/OutputPath.cs @@ -55,5 +55,15 @@ namespace TBF.BenchControl ValvesClose = new List(); foreach (var vName in vClose) ValvesClose.Add((IValve)TbfComponents.FindComponent(vName, components)); } - } + + public override string ToString() + { + return string.Format("{0} RV={1}, Flowm.={2}, Div.={3}, Scale={4}", + Name, + (RegulValve != null) ? RegulValve.Name : "---", + (FlowMeter != null) ? FlowMeter.Name : "---", + (Diverter != null) ? Diverter.Name : "---", + (Balance != null) ? Balance.Name : "---"); + } + } } diff --git a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs index d7ee44a8d..9534afc06 100644 --- a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs +++ b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs @@ -1027,13 +1027,15 @@ namespace TBF.BenchControl.Sequences if (test != null) { - log.FatalFormat("Test information:"); + log.FatalFormat("Process values:"); log.FatalFormat(" Method: {0}", test.Method); - log.FatalFormat(" Start time: {0}", TestStartTime.ToShortTimeString()); + log.FatalFormat(" Test start time: {0}", TestStartTime.ToShortTimeString()); log.FatalFormat(" Feeding path: {0}", (inPath != null) ? inPath.ToString() : "none"); log.FatalFormat(" Bench path: {0}", (benchPath != null) ? benchPath.ToString() : "none"); log.FatalFormat(" Output path: {0}", (outPath != null) ? outPath.ToString() : "none"); - log.FatalFormat(" Sensor path: {0}", (sensPath != null) ? sensPath.ToString() : "none"); + if (inPath.Pump is IPump) log.FatalFormat(" Pump power: {0}%", (inPath.Pump as IPump).Power); + else if (inPath.Pump is IValve) log.FatalFormat(" Feeding valve: {0}", (inPath.Pump as IValve).State ? "open" : "close"); + if (outPath.RegulValve is IRegulValve) log.FatalFormat(" Regulation valve position: {0}%", outPath.RegulValve.Position); log.FatalFormat(" Flow: {0}", RefFlow); log.FatalFormat(" Mass: {0}", Mass); log.FatalFormat(" Start mass: {0}", StartMass);