diff --git a/TestBenchFramework/BenchControl/BenchId/ComponentCfgCtrl.cs b/TestBenchFramework/BenchControl/BenchId/ComponentCfgCtrl.cs
index 2efd8e47a..f97b8d776 100644
--- a/TestBenchFramework/BenchControl/BenchId/ComponentCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/BenchId/ComponentCfgCtrl.cs
@@ -55,13 +55,13 @@ namespace TBF.BenchControl.BenchId
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
///
diff --git a/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiCfgCtrl.cs b/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiCfgCtrl.cs
index 963a3e7a8..f9c2f8cd5 100644
--- a/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiCfgCtrl.cs
@@ -73,7 +73,7 @@ namespace TBF.BenchControl.Cameras.CameraRoi
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
{
@@ -93,7 +93,7 @@ namespace TBF.BenchControl.Cameras.CameraRoi
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraCfgCtrl.cs b/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraCfgCtrl.cs
index 394d5ce84..fa6a88a13 100644
--- a/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraCfgCtrl.cs
@@ -61,7 +61,7 @@ namespace TBF.BenchControl.Cameras.IdcCamera
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy < 1 || dummy > 999)
@@ -85,7 +85,7 @@ namespace TBF.BenchControl.Cameras.IdcCamera
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormCfgCtrl.cs b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormCfgCtrl.cs
index 1f709dbff..dc796cc2b 100644
--- a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormCfgCtrl.cs
@@ -56,13 +56,13 @@ namespace TBF.BenchControl.DataEntry.Munich
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormCfgCtrl.cs b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormCfgCtrl.cs
index d26928b79..957a182fb 100644
--- a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormCfgCtrl.cs
@@ -56,13 +56,13 @@ namespace TBF.BenchControl.DataEntry.Munich3
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormCfgCtrl.cs b/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormCfgCtrl.cs
index 57cf9524d..1aac9711c 100644
--- a/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.DataEntry.WMStates
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/Elde/ControlBoardCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/ControlBoardCfgCtrl.cs
index dfab79120..50006850e 100644
--- a/TestBenchFramework/BenchControl/Elde/ControlBoardCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/ControlBoardCfgCtrl.cs
@@ -58,7 +58,7 @@ namespace TBF.BenchControl.Elde
/// See VerifyFlags
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy <= 0 || dummy > 999)
@@ -75,7 +75,7 @@ namespace TBF.BenchControl.Elde
///
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/Elde/Diverter/DiverterCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/Diverter/DiverterCfgCtrl.cs
index 8bb086e07..5b7500a79 100644
--- a/TestBenchFramework/BenchControl/Elde/Diverter/DiverterCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/Diverter/DiverterCfgCtrl.cs
@@ -71,7 +71,7 @@ namespace TBF.BenchControl.Elde.Diverter
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
@@ -89,7 +89,7 @@ namespace TBF.BenchControl.Elde.Diverter
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderCfgCtrl.cs
index 326c4f9c5..f9ee49191 100644
--- a/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderCfgCtrl.cs
@@ -69,7 +69,7 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
{
@@ -81,7 +81,7 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterCfgCtrl.cs
index 83b2018aa..e7a1af3aa 100644
--- a/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterCfgCtrl.cs
@@ -74,7 +74,7 @@ namespace TBF.BenchControl.Elde.FlowMeter
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
@@ -98,7 +98,7 @@ namespace TBF.BenchControl.Elde.FlowMeter
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterCfgCtrl.cs
index e0a690693..11d409a77 100644
--- a/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterCfgCtrl.cs
@@ -10,7 +10,7 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins
{
static readonly ILog log = LogManager.GetLogger(typeof(FlowMeterCfgCtrl));
- ComponentParametersDlg parent;
+ ComponentParametersDlg parentDlg;
public bool ShowMore { get { return false; } }
@@ -32,12 +32,12 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins
private void FlowMeterCfgCtrl_Load(object sender, EventArgs e)
{
- parent = ParentForm as ComponentParametersDlg;
- if (parent == null) return;
+ parentDlg = ParentForm as ComponentParametersDlg;
+ if (parentDlg == null) return;
- if (parent.TbfComponents != null)
+ if (parentDlg.TbfComponents != null)
{
- foreach (var cmpnt in parent.TbfComponents)
+ foreach (var cmpnt in parentDlg.TbfComponents)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -81,7 +81,7 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
{
@@ -109,7 +109,7 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterCfgCtrl.cs
index 028296c8d..69ff33c97 100644
--- a/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterCfgCtrl.cs
@@ -73,7 +73,7 @@ namespace TBF.BenchControl.Elde.PressureMeter
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
@@ -96,7 +96,7 @@ namespace TBF.BenchControl.Elde.PressureMeter
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/Elde/Pump/PumpCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/Pump/PumpCfgCtrl.cs
index d7b096e1c..28c064f74 100644
--- a/TestBenchFramework/BenchControl/Elde/Pump/PumpCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/Pump/PumpCfgCtrl.cs
@@ -73,7 +73,7 @@ namespace TBF.BenchControl.Elde.Pump
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
@@ -87,7 +87,7 @@ namespace TBF.BenchControl.Elde.Pump
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
diff --git a/TestBenchFramework/BenchControl/Elde/PumpTandem/Pump.cs b/TestBenchFramework/BenchControl/Elde/PumpTandem/Pump.cs
new file mode 100644
index 000000000..73faa9e3f
--- /dev/null
+++ b/TestBenchFramework/BenchControl/Elde/PumpTandem/Pump.cs
@@ -0,0 +1,128 @@
+using System;
+using System.Collections.Generic;
+using log4net;
+
+namespace TBF.BenchControl.Elde.PumpTandem
+{
+ public class Pump : ComponentBase, GenericDevices.IPumpFM, IOperation
+ {
+ private static readonly ILog log = LogManager.GetLogger(typeof(Pump));
+ public override string ToString() { return string.Format("PumpTandem({0})", Cfg.ToString(1)); }
+
+ readonly PumpCfg pumpCfg;
+
+ readonly GenericDevices.IPump pump1;
+ readonly GenericDevices.IPump pump2;
+
+ public bool State { get { return pump1.State || pump2.State; } }
+ public int Delay { get { return Math.Max(pump1.Delay, pump2.Delay); } }
+ public float Power { get { return pumpCfg.TestParams.Power; } }
+
+ public Pump(PumpCfg cfg, IList components)
+ : base(cfg)
+ {
+ pumpCfg = cfg;
+
+ pump1 = (GenericDevices.IPump)TbfComponents.FindComponent(cfg.Pump1, components);
+ if (pump1 == null) throw new Exception("Cannot find component Pump 1");
+
+ pump2 = (GenericDevices.IPump)TbfComponents.FindComponent(cfg.Pump2, components);
+ if (pump2 == null) throw new Exception("Cannot find component Pump 2");
+
+ log.Debug(this.ToString());
+ }
+
+
+ public void TurnOnDfltPower()
+ {
+ // TODO
+ }
+
+ public void TurnOn(float powerArg)
+ {
+ // TODO
+ }
+
+ public void TurnOff()
+ {
+ // TODO
+ }
+
+
+ ///
+ /// The currently running operation.
+ ///
+ public enum CurrentOp
+ {
+ None,
+ TurnOnDfltPower,
+ TurnOn,
+ TurnOff,
+ }
+ ///
+ CurrentOp currentOp;
+
+ float powerForOp;
+
+ ///
+ /// Turn the pump frequency inverter on.
+ ///
+ public IOperation TurnOnDfltPowerOp()
+ {
+ if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
+ currentOp = CurrentOp.TurnOnDfltPower;
+ return this;
+ }
+
+ ///
+ /// Turn the pump frequency inverter on.
+ ///
+ public IOperation TurnOnOp(float powerArg)
+ {
+ if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
+ currentOp = CurrentOp.TurnOn;
+ powerForOp = powerArg;
+ return this;
+ }
+
+ ///
+ /// Turn the pump frequency inverter on.
+ ///
+ public IOperation TurnOffOp()
+ {
+ if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
+ currentOp = CurrentOp.TurnOff;
+ return this;
+ }
+
+ /// Start the operation
+ public void Start()
+ {
+ switch (currentOp)
+ {
+ case CurrentOp.TurnOnDfltPower:
+ TurnOnDfltPower();
+ return;
+ case CurrentOp.TurnOn:
+ TurnOn(powerForOp);
+ return;
+ case CurrentOp.TurnOff:
+ default:
+ TurnOff();
+ return;
+ }
+ }
+
+ /// Run the operation
+ public Event Run()
+ {
+ return Event.TurnPumpOnOffDone;
+ }
+
+ /// Stop the operation
+ public void Stop()
+ {
+ currentOp = CurrentOp.None;
+ }
+ }
+}
diff --git a/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfg.cs b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfg.cs
new file mode 100644
index 000000000..c90a33cfd
--- /dev/null
+++ b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfg.cs
@@ -0,0 +1,53 @@
+using System.IO;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using TBF.BenchControl.Generic;
+
+namespace TBF.BenchControl.Elde.PumpTandem
+{
+ public class PumpCfg : ComponentCfgBase, IChildComponentCfg
+ {
+ public IComponent GetComponent(IList components) { return new Pump(this, components); }
+ public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); }
+
+ ///
+ /// Serialized parameters
+ ///
+ public string Pump1; /// Name of the pump 1 component
+ public string Pump2; /// Name of the pump 2 component
+
+ /// Test parameters
+ public PumpTestParams TestParams;
+ public override IParamsProvider GetTestParams() { return TestParams; }
+ public override IParamsProvider CreateTestParams(Entities.Test test)
+ {
+ PumpTestParams testParams = new PumpTestParams();
+ testParams.UpdateTestParams(Name, test);
+ return testParams;
+ }
+
+ /// Private parameterless constructor invoked by all other (public) constructors
+ PumpCfg()
+ {
+ Name = "PumpTandem";
+ ParentName = string.Empty;
+ Pump1 = string.Empty;
+ Pump2 = string.Empty;
+ TestParams = new PumpTestParams();
+ }
+
+ public PumpCfg(IComponentFactory factory)
+ : this()
+ {
+ this.Factory = factory;
+ }
+
+ public string ToString(int i)
+ {
+ return string.Format("Name={0}, Pump1={1}, Pump2={2}",
+ Name,
+ string.IsNullOrEmpty(Pump1) ? "-" : Pump1,
+ string.IsNullOrEmpty(Pump2) ? "-" : Pump2);
+ }
+ }
+}
diff --git a/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfgCtrl.Designer.cs b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfgCtrl.Designer.cs
new file mode 100644
index 000000000..d45497574
--- /dev/null
+++ b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfgCtrl.Designer.cs
@@ -0,0 +1,131 @@
+namespace TBF.BenchControl.Elde.PumpTandem
+{
+ partial class PumpCfgCtrl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.nameTextBox = new System.Windows.Forms.TextBox();
+ this.nameLabel = new System.Windows.Forms.Label();
+ this.classNameLabel = new System.Windows.Forms.Label();
+ this.pump2ComboBox = new System.Windows.Forms.ComboBox();
+ this.pump2Label = new System.Windows.Forms.Label();
+ this.pump1ComboBox = new System.Windows.Forms.ComboBox();
+ this.pump1Label = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // nameTextBox
+ //
+ this.nameTextBox.Enabled = false;
+ this.nameTextBox.Location = new System.Drawing.Point(140, 47);
+ this.nameTextBox.Name = "nameTextBox";
+ this.nameTextBox.Size = new System.Drawing.Size(130, 20);
+ this.nameTextBox.TabIndex = 2;
+ //
+ // nameLabel
+ //
+ this.nameLabel.AutoSize = true;
+ this.nameLabel.Location = new System.Drawing.Point(30, 50);
+ this.nameLabel.Name = "nameLabel";
+ this.nameLabel.Size = new System.Drawing.Size(35, 13);
+ this.nameLabel.TabIndex = 1;
+ this.nameLabel.Text = "Name";
+ //
+ // classNameLabel
+ //
+ this.classNameLabel.AutoSize = true;
+ this.classNameLabel.Location = new System.Drawing.Point(119, 21);
+ this.classNameLabel.Name = "classNameLabel";
+ this.classNameLabel.Size = new System.Drawing.Size(83, 13);
+ this.classNameLabel.TabIndex = 0;
+ this.classNameLabel.Text = "ComonentName";
+ //
+ // pump2ComboBox
+ //
+ this.pump2ComboBox.Enabled = false;
+ this.pump2ComboBox.FormattingEnabled = true;
+ this.pump2ComboBox.Location = new System.Drawing.Point(140, 96);
+ this.pump2ComboBox.Name = "pump2ComboBox";
+ this.pump2ComboBox.Size = new System.Drawing.Size(130, 21);
+ this.pump2ComboBox.TabIndex = 12;
+ //
+ // pump2Label
+ //
+ this.pump2Label.AutoSize = true;
+ this.pump2Label.Location = new System.Drawing.Point(30, 99);
+ this.pump2Label.Name = "pump2Label";
+ this.pump2Label.Size = new System.Drawing.Size(43, 13);
+ this.pump2Label.TabIndex = 11;
+ this.pump2Label.Text = "Pump 2";
+ //
+ // pump1ComboBox
+ //
+ this.pump1ComboBox.Enabled = false;
+ this.pump1ComboBox.FormattingEnabled = true;
+ this.pump1ComboBox.Location = new System.Drawing.Point(140, 71);
+ this.pump1ComboBox.Name = "pump1ComboBox";
+ this.pump1ComboBox.Size = new System.Drawing.Size(130, 21);
+ this.pump1ComboBox.TabIndex = 10;
+ //
+ // pump1Label
+ //
+ this.pump1Label.AutoSize = true;
+ this.pump1Label.Location = new System.Drawing.Point(30, 74);
+ this.pump1Label.Name = "pump1Label";
+ this.pump1Label.Size = new System.Drawing.Size(43, 13);
+ this.pump1Label.TabIndex = 9;
+ this.pump1Label.Text = "Pump 1";
+ //
+ // PumpCfgCtrl
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.pump2ComboBox);
+ this.Controls.Add(this.pump2Label);
+ this.Controls.Add(this.pump1ComboBox);
+ this.Controls.Add(this.pump1Label);
+ this.Controls.Add(this.nameTextBox);
+ this.Controls.Add(this.nameLabel);
+ this.Controls.Add(this.classNameLabel);
+ this.Name = "PumpCfgCtrl";
+ this.Size = new System.Drawing.Size(300, 200);
+ this.Load += new System.EventHandler(this.PumpCfgCtrl_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox nameTextBox;
+ private System.Windows.Forms.Label nameLabel;
+ private System.Windows.Forms.Label classNameLabel;
+ private System.Windows.Forms.ComboBox pump2ComboBox;
+ private System.Windows.Forms.Label pump2Label;
+ private System.Windows.Forms.ComboBox pump1ComboBox;
+ private System.Windows.Forms.Label pump1Label;
+ }
+}
diff --git a/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfgCtrl.cs
new file mode 100644
index 000000000..370038119
--- /dev/null
+++ b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfgCtrl.cs
@@ -0,0 +1,104 @@
+using System;
+using System.Windows.Forms;
+using log4net;
+using TBF.BenchControl.Generic;
+
+namespace TBF.BenchControl.Elde.PumpTandem
+{
+ public partial class PumpCfgCtrl : UserControl, IComponentCfgCtrl
+ {
+ static readonly ILog log = LogManager.GetLogger(typeof(PumpCfgCtrl));
+
+ ComponentParametersDlg parentDlg;
+
+ public bool ShowMore { get { return false; } }
+
+ PumpCfg config;
+ public IComponentCfg Config
+ {
+ get { return config as IComponentCfg; }
+ set
+ {
+ config = value as PumpCfg;
+ Redraw();
+ }
+ }
+
+ public PumpCfgCtrl()
+ {
+ InitializeComponent();
+ }
+
+ private void PumpCfgCtrl_Load(object sender, EventArgs e)
+ {
+ parentDlg = ParentForm as ComponentParametersDlg;
+ if (parentDlg == null) return;
+
+ if (parentDlg.TbfComponents != null)
+ {
+ foreach (var cmpnt in parentDlg.TbfComponents)
+ {
+ if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.Pump.PumpFactory ||
+ TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.PumpWithFM.PumpFactory)
+ {
+ pump1ComboBox.Items.Add(cmpnt.Name);
+ pump2ComboBox.Items.Add(cmpnt.Name);
+ }
+ }
+ }
+
+ Redraw();
+ }
+
+ public void Closing()
+ {
+ }
+
+ void Redraw()
+ {
+ if (config == null) return; /// Control was not loaded, settings were not changed
+
+ classNameLabel.Text = config.Factory.ClassName;
+ nameTextBox.Text = config.Name;
+ pump1ComboBox.Text = string.IsNullOrEmpty(config.Pump1) ? "---" : config.Pump1;
+ pump2ComboBox.Text = string.IsNullOrEmpty(config.Pump2) ? "---" : config.Pump2;
+ }
+
+ public void Unlock()
+ {
+ nameTextBox.Enabled = true;
+ pump1ComboBox.Enabled = true;
+ pump2ComboBox.Enabled = true;
+ }
+
+ public CfgUpdateFlags VerifyCfg(ref string message)
+ {
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
+
+ if (!pump1ComboBox.Items.Contains(pump1ComboBox.Text))
+ {
+ flags |= CfgUpdateFlags.Error;
+ message += Environment.NewLine + "Invalid 'Pump 1'";
+ }
+ if (!pump2ComboBox.Items.Contains(pump2ComboBox.Text))
+ {
+ flags |= CfgUpdateFlags.Error;
+ message += Environment.NewLine + "Invalid 'Pump 2'";
+ }
+ return flags;
+ }
+
+ public CfgUpdateFlags UpdateCfg()
+ {
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
+
+ if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
+
+ config.Name = nameTextBox.Text;
+ config.Pump1 = pump1ComboBox.Text.Equals("---") ? string.Empty : pump1ComboBox.Text;
+ config.Pump2 = pump2ComboBox.Text.Equals("---") ? string.Empty : pump2ComboBox.Text;
+
+ return flags;
+ }
+ }
+}
diff --git a/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfgCtrl.resx b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfgCtrl.resx
new file mode 100644
index 000000000..1af7de150
--- /dev/null
+++ b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfgCtrl.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpFactory.cs b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpFactory.cs
new file mode 100644
index 000000000..83534a8a6
--- /dev/null
+++ b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpFactory.cs
@@ -0,0 +1,18 @@
+using TBF.BenchControl.Generic;
+
+namespace TBF.BenchControl.Elde.PumpTandem
+{
+ public class PumpFactory : IComponentFactory
+ {
+ public string ClassName { get { return "PumpTandem"; } }
+
+ public void ResetStaticProperties() { Pump.ResetStaticProperties(); }
+
+ public IComponentCfg DefaultConfig() { return new PumpCfg(this); }
+
+ public IComponentCfg CmpntCfgFromCmpntEntity(Entities.Component component)
+ {
+ return ComponentCfgBase.CreateFromDbEntity(typeof(PumpCfg), component, this);
+ }
+ }
+}
diff --git a/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpTestParams.cs b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpTestParams.cs
new file mode 100644
index 000000000..fab22570a
--- /dev/null
+++ b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpTestParams.cs
@@ -0,0 +1,95 @@
+using System;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+using TBF.BenchControl.Generic;
+using TBF.Resources;
+
+namespace TBF.BenchControl.Elde.PumpTandem
+{
+ public class PumpTestParams : TestParamsBase, IParamsProvider, ITestParams
+ {
+ public float Power; /// Target=terminal flow durning detection when increasing or decreasing the flow
+
+ public override void InitializeAll()
+ {
+ Power = 50.0f;
+ }
+
+ string[] paramNames = new string[]
+ {
+ Strings.PowerPct,
+ };
+ public override string ParamName(int i) { return paramNames[i]; }
+ public override int ParamsCount() { return paramNames.Length; }
+
+
+ public override string ToString(int i)
+ {
+ switch (i)
+ {
+ case 0: return Power.ToString("F1");
+ default: return string.Empty;
+ }
+ }
+
+ public void UpdateParam(int i, string strValue)
+ {
+ switch (i)
+ {
+ case 0: Power = Utils.ParseUFloat(strValue); return;
+ default: return;
+ }
+ }
+
+ public bool ValidateParam(int i, string strValue, out string message)
+ {
+ message = string.Empty;
+
+ float dummy;
+ switch (i)
+ {
+ case 0:
+ if (Utils.TryParseUFloat(strValue, out dummy)) return true;
+ break;
+ default:
+ message = "Invalid index";
+ return false;
+ }
+
+ message = ParamName(i) + " is invalid";
+ return false;
+ }
+
+ public override void UpdateTestParams(Entities.ComponentTest dbEntity)
+ {
+ if (dbEntity == null) return;
+ try
+ {
+ PumpTestParams tmp = (PumpTestParams)(new XmlSerializer(typeof(PumpTestParams)))
+ .Deserialize(new StringReader(dbEntity.Parameters));
+
+ testParamsEntity = dbEntity;
+ componentName = dbEntity.CmpntName;
+ test = dbEntity.Test;
+
+ Power = tmp.Power;
+ }
+ catch
+ {
+ }
+ }
+
+ /// Parameterless constructor
+ public PumpTestParams()
+ {
+ }
+
+ public PumpTestParams(Entities.ComponentTest testParamsEntity, string componentName, Entities.Test test)
+ {
+ this.testParamsEntity = testParamsEntity;
+ this.componentName = componentName;
+ this.test = test;
+ }
+ }
+}
diff --git a/TestBenchFramework/BenchControl/Elde/PumpWithFM/Pump.cs b/TestBenchFramework/BenchControl/Elde/PumpWithFM/Pump.cs
index e76e30fd0..5df64b9ac 100644
--- a/TestBenchFramework/BenchControl/Elde/PumpWithFM/Pump.cs
+++ b/TestBenchFramework/BenchControl/Elde/PumpWithFM/Pump.cs
@@ -30,8 +30,6 @@ namespace TBF.BenchControl.Elde.PumpWithFM
get { return (controlBoard.Route & Mask) != 0; }
}
- public float powerForOp;
-
public Pump(PumpCfg cfg, IList components)
: base(cfg)
{
@@ -77,7 +75,9 @@ namespace TBF.BenchControl.Elde.PumpWithFM
///
CurrentOp currentOp;
- ///
+ float powerForOp;
+
+ ///
/// Turn the pump frequency inverter on.
///
public IOperation TurnOnDfltPowerOp()
diff --git a/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpCfgCtrl.cs
index bf50900c0..6e59ca421 100644
--- a/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpCfgCtrl.cs
@@ -75,7 +75,7 @@ namespace TBF.BenchControl.Elde.PumpWithFM
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
@@ -90,7 +90,7 @@ namespace TBF.BenchControl.Elde.PumpWithFM
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
diff --git a/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderCfgCtrl.cs
index 6d71dcadf..c133eb506 100644
--- a/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderCfgCtrl.cs
@@ -71,7 +71,7 @@ namespace TBF.BenchControl.Elde.RegisterReader
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
@@ -89,7 +89,7 @@ namespace TBF.BenchControl.Elde.RegisterReader
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.cs
index 12d68fd3c..d0739ed9e 100644
--- a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.cs
@@ -96,7 +96,7 @@ namespace TBF.BenchControl.Elde.RegulValve
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
@@ -142,35 +142,35 @@ namespace TBF.BenchControl.Elde.RegulValve
if (!config.Name.Equals(nameTextBox.Text))
{
config.Name = nameTextBox.Text;
- flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
+ flags |= CfgUpdateFlags.RestartRqrd;
}
string parentname = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
if (!config.ParentName.Equals(parentname))
{
config.ParentName = parentname;
- flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
+ flags |= CfgUpdateFlags.RestartRqrd;
}
int tmp = int.Parse(positionTextBox.Text);
if (config.Idx1 != tmp)
{
config.Idx1 = tmp;
- flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
+ flags |= CfgUpdateFlags.RestartRqrd;
}
tmp = int.Parse(dacClosedTextBox.Text);
if (config.DacValueClosed != tmp)
{
config.DacValueClosed = tmp;
- flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
+ flags |= CfgUpdateFlags.RestartRqrd;
}
tmp = int.Parse(dacOpenTextBox.Text);
if (config.DacValueOpen != tmp)
{
config.DacValueOpen = tmp;
- flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
+ flags |= CfgUpdateFlags.RestartRqrd;
}
tmp = int.Parse(stableTimeTextBox.Text);
@@ -184,7 +184,7 @@ namespace TBF.BenchControl.Elde.RegulValve
if (config.StoredPositionReuse != btmp)
{
config.StoredPositionReuse = btmp;
- flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
+ flags |= CfgUpdateFlags.RestartRqrd;
}
tmp = int.Parse(flowStableSecTextBox.Text);
diff --git a/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterCfgCtrl.cs
index fae5edb01..1b8eade24 100644
--- a/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterCfgCtrl.cs
@@ -82,7 +82,7 @@ namespace TBF.BenchControl.Elde.TempMeter
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
@@ -132,7 +132,7 @@ namespace TBF.BenchControl.Elde.TempMeter
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/Elde/Valve/ValveCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/Valve/ValveCfgCtrl.cs
index b259037cc..e3e81a63b 100644
--- a/TestBenchFramework/BenchControl/Elde/Valve/ValveCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Elde/Valve/ValveCfgCtrl.cs
@@ -97,7 +97,7 @@ namespace TBF.BenchControl.Elde.Valve
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
@@ -123,7 +123,7 @@ namespace TBF.BenchControl.Elde.Valve
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
diff --git a/TestBenchFramework/BenchControl/GenericDevices/IPump.cs b/TestBenchFramework/BenchControl/GenericDevices/IPump.cs
index 8da3c6d72..8af071892 100644
--- a/TestBenchFramework/BenchControl/GenericDevices/IPump.cs
+++ b/TestBenchFramework/BenchControl/GenericDevices/IPump.cs
@@ -8,5 +8,10 @@ namespace TBF.BenchControl.GenericDevices
/// Pump state: true = on, false = off
///
bool State { get; }
- }
+
+ ///
+ /// Delay of the valve in [s] (open or close time, whichever is larger)
+ ///
+ int Delay { get; }
+ }
}
diff --git a/TestBenchFramework/BenchControl/Greco/AmbientCfgCtrl.cs b/TestBenchFramework/BenchControl/Greco/AmbientCfgCtrl.cs
index 380a826e5..4f96eaf58 100644
--- a/TestBenchFramework/BenchControl/Greco/AmbientCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Greco/AmbientCfgCtrl.cs
@@ -124,7 +124,7 @@ namespace TBF.BenchControl.Greco
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
@@ -141,7 +141,7 @@ namespace TBF.BenchControl.Greco
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy < 1 || dummy > 999)
diff --git a/TestBenchFramework/BenchControl/MettlerToledo/BalanceCfgCtrl.cs b/TestBenchFramework/BenchControl/MettlerToledo/BalanceCfgCtrl.cs
index e9a20e35e..eb372ae9b 100644
--- a/TestBenchFramework/BenchControl/MettlerToledo/BalanceCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/MettlerToledo/BalanceCfgCtrl.cs
@@ -131,7 +131,7 @@ namespace TBF.BenchControl.MettlerToledo
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy < 1 || dummy > 999)
@@ -171,7 +171,7 @@ namespace TBF.BenchControl.MettlerToledo
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterCfgCtrl.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterCfgCtrl.cs
index 426285f8a..a80a79ba1 100644
--- a/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.ResultsPrinters.Basic
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfgCtrl.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfgCtrl.cs
index d9490aa22..bda6fbae2 100644
--- a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/ResultsWriters/Basic/WriterCfgCtrl.cs b/TestBenchFramework/BenchControl/ResultsWriters/Basic/WriterCfgCtrl.cs
index a861739ea..9ab7ed75e 100644
--- a/TestBenchFramework/BenchControl/ResultsWriters/Basic/WriterCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/ResultsWriters/Basic/WriterCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.ResultsWriters.Basic
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/TbfComponents.cs b/TestBenchFramework/BenchControl/TbfComponents.cs
index 58cfb0513..f6041bd43 100644
--- a/TestBenchFramework/BenchControl/TbfComponents.cs
+++ b/TestBenchFramework/BenchControl/TbfComponents.cs
@@ -25,7 +25,8 @@ namespace TBF.BenchControl
Factories.Add(new Elde.PressureMeter.PressureMeterFactory());
Factories.Add(new Elde.Pump.PumpFactory());
Factories.Add(new Elde.PumpWithFM.PumpFactory());
- Factories.Add(new Elde.RegisterReader.RegisterReaderFactory());
+ Factories.Add(new Elde.PumpTandem.PumpFactory());
+ Factories.Add(new Elde.RegisterReader.RegisterReaderFactory());
Factories.Add(new Elde.RegulValve.RegulValveFactory());
Factories.Add(new Elde.TempMeter.TempMeterFactory());
Factories.Add(new Elde.Valve.ValveFactory());
diff --git a/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionCfgCtrl.cs
index 51c1971d7..aeceacd57 100644
--- a/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.TestMethods.CameraRoiDetection
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodCfgCtrl.cs
index 7dc738eb5..dbb082589 100644
--- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodCfgCtrl.cs
index c87d14c57..53adf561c 100644
--- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.cs
index 9c9a6cd72..23aa73fa2 100644
--- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.cs
index 103e5f74d..9e52dc498 100644
--- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/TestMethodCfgCtrl.cs
index ccd920004..13e5ca856 100644
--- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/TestMethodCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/TestMethodCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.cs
index a946b5de5..d9c0f7ee9 100644
--- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.cs
@@ -50,13 +50,13 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/BenchControl/WaterMeter/WaterMeterCfgCtrl.cs b/TestBenchFramework/BenchControl/WaterMeter/WaterMeterCfgCtrl.cs
index b69e79531..55b0318e6 100644
--- a/TestBenchFramework/BenchControl/WaterMeter/WaterMeterCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/WaterMeter/WaterMeterCfgCtrl.cs
@@ -52,13 +52,13 @@ namespace TBF.BenchControl.WaterMeter
public CfgUpdateFlags VerifyCfg(ref string message)
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
- CfgUpdateFlags flags = CfgUpdateFlags.AnyChange;
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
diff --git a/TestBenchFramework/ComponentsManagerDlg.cs b/TestBenchFramework/ComponentsManagerDlg.cs
index db5379240..c81bd429b 100644
--- a/TestBenchFramework/ComponentsManagerDlg.cs
+++ b/TestBenchFramework/ComponentsManagerDlg.cs
@@ -135,7 +135,7 @@ namespace TBF
if (debugCB.Text.Equals(level.ToString()))
{
cmpnt.Mode = level;
- flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
+ flags |= CfgUpdateFlags.RestartRqrd;
return;
}
}
@@ -148,7 +148,7 @@ namespace TBF
if (logCB.Text.Equals(level.ToString()))
{
cmpnt.Logging = level;
- flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
+ flags |= CfgUpdateFlags.RestartRqrd;
return;
}
}
@@ -253,6 +253,7 @@ namespace TBF
dr = cfgForm.ShowDialog();
if (dr != DialogResult.OK) return;
+ flags |= CfgUpdateFlags.RestartRqrd;
AddOne(cfgForm.Config.CreateDbEntity());
}
diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj
index 4a6f1e64d..2bcb7db49 100644
--- a/TestBenchFramework/TBF.csproj
+++ b/TestBenchFramework/TBF.csproj
@@ -248,6 +248,16 @@
+
+
+
+
+ UserControl
+
+
+ PumpCfgCtrl.cs
+
+
@@ -994,6 +1004,9 @@
PressureMeterCfgCtrl.cs
+
+ PumpCfgCtrl.cs
+
PumpCfgCtrl.cs