Koncim: IBox, etc.

This commit is contained in:
Milan Hanajik 2014-07-31 17:04:09 +02:00
parent 9a9a09f16d
commit 66feec63de
43 changed files with 749 additions and 287 deletions

View File

@ -2,9 +2,10 @@
using System.Diagnostics; using System.Diagnostics;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;
using log4net;
using TBF.BenchControl; using TBF.BenchControl;
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using log4net; using TBF.Boxes;
namespace TBF.BenchControl.Cameras.CameraRoi namespace TBF.BenchControl.Cameras.CameraRoi
{ {

View File

@ -1,5 +1,6 @@
using System; using System;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.Cameras.CameraRoi namespace TBF.BenchControl.Cameras.CameraRoi
{ {
@ -45,10 +46,10 @@ namespace TBF.BenchControl.Cameras.CameraRoi
private void ReadPulses() private void ReadPulses()
{ {
pulses.N = camera.Idc100.Pulses; pulses.Val = camera.Idc100.Pulses;
if (refPulses != null) if (refPulses != null)
{ {
refPulses.N = 0; refPulses.Val = 0;
} }
} }

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.FlowMeter namespace TBF.BenchControl.Elde.FlowMeter
{ {

View File

@ -1,5 +1,6 @@
using System; using System;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.FlowMeter namespace TBF.BenchControl.Elde.FlowMeter
{ {
@ -48,7 +49,7 @@ namespace TBF.BenchControl.Elde.FlowMeter
{ {
if (flowMeterNr == (int)(controlBoard.StatusP & StatusP.RefFlowMeterMask)) if (flowMeterNr == (int)(controlBoard.StatusP & StatusP.RefFlowMeterMask))
{ {
flow.F = controlBoard.ReferenceFlow; flow.Val = controlBoard.ReferenceFlow;
return eventDone; return eventDone;
} }
else else

View File

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.PressureMeter namespace TBF.BenchControl.Elde.PressureMeter
{ {

View File

@ -1,5 +1,6 @@
using System; using System;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.PressureMeter namespace TBF.BenchControl.Elde.PressureMeter
{ {
@ -46,7 +47,7 @@ namespace TBF.BenchControl.Elde.PressureMeter
/// </returns> /// </returns>
public Event Run() public Event Run()
{ {
pressure.F = controlBoardDev.Pressure(pressureMeterNr); pressure.Val = controlBoardDev.Pressure(pressureMeterNr);
return eventDone; return eventDone;
} }

View File

@ -1,5 +1,6 @@
using System; using System;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.RegisterReader namespace TBF.BenchControl.Elde.RegisterReader
{ {
@ -46,7 +47,7 @@ namespace TBF.BenchControl.Elde.RegisterReader
/// </returns> /// </returns>
public Event Run() public Event Run()
{ {
pulses.N = (int)controlBoard.EtPulses(registerNr); pulses.Val = (int)controlBoard.EtPulses(registerNr);
return eventDone; return eventDone;
} }

View File

@ -1,5 +1,6 @@
using System; using System;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.RegisterReader namespace TBF.BenchControl.Elde.RegisterReader
{ {
@ -42,10 +43,10 @@ namespace TBF.BenchControl.Elde.RegisterReader
private void ReadPulses() private void ReadPulses()
{ {
pulses.N = (int)reader.ControlBoard.WMeterPulses(reader.Position); pulses.Val = (int)reader.ControlBoard.WMeterPulses(reader.Position);
if (refPulses != null) if (refPulses != null)
{ {
refPulses.N = (int)reader.ControlBoard.EtPulses(reader.Position); refPulses.Val = (int)reader.ControlBoard.EtPulses(reader.Position);
} }
} }

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.RegisterReader namespace TBF.BenchControl.Elde.RegisterReader
{ {

View File

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.RegulValve namespace TBF.BenchControl.Elde.RegulValve
{ {

View File

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using TBF.BenchControl.GenericDevices; using TBF.BenchControl.GenericDevices;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.RegulValve namespace TBF.BenchControl.Elde.RegulValve
{ {
@ -172,7 +173,7 @@ namespace TBF.BenchControl.Elde.RegulValve
float flowMtrFreq = controlBoard.ReferenceFreq; float flowMtrFreq = controlBoard.ReferenceFreq;
float flow = flowMtrFreq * flowMeter.NominalFlow / 2000.0f; float flow = flowMtrFreq * flowMeter.NominalFlow / 2000.0f;
if (measuredFlow != null) measuredFlow.F = flow; if (measuredFlow != null) measuredFlow.Val = flow;
log.InfoFormat("Run(): rv#={0} pos={1}% freq={2} flow={3} opState={4}", log.InfoFormat("Run(): rv#={0} pos={1}% freq={2} flow={3} opState={4}",
regulValveNr, rvPosition.ToString("F1"), flowMtrFreq, flow, opState); regulValveNr, rvPosition.ToString("F1"), flowMtrFreq, flow, opState);

View File

@ -1,5 +1,6 @@
using System; using System;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.TempMeter namespace TBF.BenchControl.Elde.TempMeter
{ {
@ -45,7 +46,7 @@ namespace TBF.BenchControl.Elde.TempMeter
/// </returns> /// </returns>
public Event Run() public Event Run()
{ {
temp.F = controlBoardDev.Temperature(tempMeterNr); temp.Val = controlBoardDev.Temperature(tempMeterNr);
return eventDone; return eventDone;
} }

View File

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.TempMeter namespace TBF.BenchControl.Elde.TempMeter
{ {

View File

@ -1,22 +0,0 @@
namespace TBF.BenchControl
{
public class FloatBox
{
public float F;
public FloatBox()
{
F = 0.0f;
}
public FloatBox(float f)
{
F = f;
}
public override string ToString()
{
return F.ToString();
}
}
}

View File

@ -1,4 +1,5 @@
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.GenericDevices namespace TBF.BenchControl.GenericDevices
{ {

View File

@ -1,5 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.GenericDevices namespace TBF.BenchControl.GenericDevices
{ {

View File

@ -1,5 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.GenericDevices namespace TBF.BenchControl.GenericDevices
{ {

View File

@ -1,5 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.GenericDevices namespace TBF.BenchControl.GenericDevices
{ {

View File

@ -1,4 +1,5 @@
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.GenericDevices namespace TBF.BenchControl.GenericDevices
{ {

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.GenericDevices namespace TBF.BenchControl.GenericDevices
{ {

View File

@ -1,4 +1,5 @@
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.GenericDevices namespace TBF.BenchControl.GenericDevices
{ {

View File

@ -5,6 +5,7 @@ using System.IO.Ports;
using System.Text; using System.Text;
using log4net; using log4net;
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.Greco namespace TBF.BenchControl.Greco
{ {
@ -172,9 +173,9 @@ namespace TBF.BenchControl.Greco
/// </returns> /// </returns>
public Event Run() public Event Run()
{ {
tempBox.F = temperature; tempBox.Val = temperature;
pressureBox.F = pressure; pressureBox.Val = pressure;
humiBox.F = humidity; humiBox.Val = humidity;
return Event.AmbientDone; return Event.AmbientDone;
} }

View File

@ -1,22 +0,0 @@
namespace TBF.BenchControl
{
public class IntBox
{
public int N;
public IntBox()
{
N = 0;
}
public IntBox(int n)
{
N = n;
}
public override string ToString()
{
return N.ToString();
}
}
}

View File

@ -5,6 +5,7 @@ using System.Text;
using System.IO.Ports; using System.IO.Ports;
using log4net; using log4net;
using TBF.BenchControl.Generic; using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.MettlerToledo namespace TBF.BenchControl.MettlerToledo
{ {

View File

@ -1,5 +1,6 @@
using System; using System;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.MettlerToledo namespace TBF.BenchControl.MettlerToledo
{ {
@ -51,7 +52,7 @@ namespace TBF.BenchControl.MettlerToledo
if (balanceDev.MsrmntState == MsrmntState.Valid) if (balanceDev.MsrmntState == MsrmntState.Valid)
{ {
result.F = balanceDev.Mass; result.Val = balanceDev.Mass;
done = true; done = true;
return Event.BalanceDone; /// Mass read OK return Event.BalanceDone; /// Mass read OK
} }

View File

@ -1,5 +1,6 @@
using System; using System;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.MettlerToledo namespace TBF.BenchControl.MettlerToledo
{ {
@ -71,7 +72,7 @@ namespace TBF.BenchControl.MettlerToledo
for (int i = 1; i < totalReadingsCount - 1; i++) calcMass += massReadings[i]; for (int i = 1; i < totalReadingsCount - 1; i++) calcMass += massReadings[i];
calcMass = (calcMass / (totalReadingsCount - 2)); calcMass = (calcMass / (totalReadingsCount - 2));
result.F = calcMass; result.Val = calcMass;
return Event.BalanceDone; /// Mass has just been calculated return Event.BalanceDone; /// Mass has just been calculated
} }
} }

View File

@ -1,5 +1,6 @@
using System; using System;
using log4net; using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.MettlerToledo namespace TBF.BenchControl.MettlerToledo
{ {
@ -50,14 +51,14 @@ namespace TBF.BenchControl.MettlerToledo
if (balanceDev.MsrmntState == MsrmntState.Overload) if (balanceDev.MsrmntState == MsrmntState.Overload)
{ {
tara.F = balanceDev.Capacity; tara.Val = balanceDev.Capacity;
done = true; done = true;
return Event.BalanceOverload; return Event.BalanceOverload;
} }
if (balanceDev.MsrmntState == MsrmntState.Valid) if (balanceDev.MsrmntState == MsrmntState.Valid)
{ {
tara.F = balanceDev.Mass; tara.Val = balanceDev.Mass;
done = true; done = true;
return Event.BalanceDone; /// Taring completed return Event.BalanceDone; /// Taring completed
} }

View File

@ -1,6 +1,7 @@
using System; using System;
using log4net; using log4net;
using TBF.BenchControl; using TBF.BenchControl;
using TBF.Boxes;
namespace TBF.BenchControl.Operations namespace TBF.BenchControl.Operations
{ {
@ -107,10 +108,10 @@ namespace TBF.BenchControl.Operations
if (readRegOps[i] != null) if (readRegOps[i] != null)
{ {
Event evnt = readRegOps[i].Run(); Event evnt = readRegOps[i].Run();
iPulses[i] = pulses[i].N; iPulses[i] = pulses[i].Val;
if (iRefPulses != null) if (iRefPulses != null)
{ {
iRefPulses[i] = refPulses[i].N; iRefPulses[i] = refPulses[i].Val;
} }
if (evnt == Event.Error) anyError = true; if (evnt == Event.Error) anyError = true;
if (evnt != Event.ReadRegisterDone) allDone = false; if (evnt != Event.ReadRegisterDone) allDone = false;

View File

@ -4,6 +4,7 @@ using log4net;
using TBF.UiBridge; using TBF.UiBridge;
using TBF.BenchControl.Operations; using TBF.BenchControl.Operations;
using TBF.BenchControl.GenericDevices; using TBF.BenchControl.GenericDevices;
using TBF.Boxes;
using TBF.Resources; using TBF.Resources;
namespace TBF.BenchControl.Sequences namespace TBF.BenchControl.Sequences
@ -184,7 +185,7 @@ namespace TBF.BenchControl.Sequences
do { e = StateMachine.WaitRunDevsRunOps(); } do { e = StateMachine.WaitRunDevsRunOps(); }
while (!e.Contains(Event.ValvesSet)); while (!e.Contains(Event.ValvesSet));
} }
else if ((emptying1 == true) && (mass1.F < (StateMachine.Balance1.Capacity / 100.0f + 20.0f))) else if ((emptying1 == true) && (mass1.Val < (StateMachine.Balance1.Capacity / 100.0f + 20.0f)))
{ {
State.Create("MainSeq : Close emptying valve 1") State.Create("MainSeq : Close emptying valve 1")
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.EmptyTankValve1)) .AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.EmptyTankValve1))
@ -193,7 +194,7 @@ namespace TBF.BenchControl.Sequences
while (!e.Contains(Event.ValvesSet)); while (!e.Contains(Event.ValvesSet));
emptying1 = false; emptying1 = false;
} }
else if ((emptying2 == true) && (mass1.F < (StateMachine.Balance1.Capacity / 100.0f + 20.0f))) else if ((emptying2 == true) && (mass1.Val < (StateMachine.Balance1.Capacity / 100.0f + 20.0f)))
{ {
State.Create("MainSeq : Close emptying valve 2") State.Create("MainSeq : Close emptying valve 2")
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.EmptyTankValve2)) .AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.EmptyTankValve2))
@ -371,7 +372,7 @@ namespace TBF.BenchControl.Sequences
do { e = StateMachine.WaitRunDevsRunOps(); } do { e = StateMachine.WaitRunDevsRunOps(); }
while (!e.Contains(Event.ValvesSet)); while (!e.Contains(Event.ValvesSet));
} }
else if ((emptying1 == true) && (mass1.F < (StateMachine.Balance1.Capacity / 100.0f + 20.0f))) else if ((emptying1 == true) && (mass1.Val < (StateMachine.Balance1.Capacity / 100.0f + 20.0f)))
{ {
State.Create("MainSeq : Close emptying valve 1") State.Create("MainSeq : Close emptying valve 1")
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.EmptyTankValve1)) .AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.EmptyTankValve1))
@ -380,7 +381,7 @@ namespace TBF.BenchControl.Sequences
while (!e.Contains(Event.ValvesSet)); while (!e.Contains(Event.ValvesSet));
emptying1 = false; emptying1 = false;
} }
else if ((emptying2 == true) && (mass1.F < (StateMachine.Balance1.Capacity / 100.0f + 20.0f))) else if ((emptying2 == true) && (mass1.Val < (StateMachine.Balance1.Capacity / 100.0f + 20.0f)))
{ {
State.Create("MainSeq : Close emptying valve 2") State.Create("MainSeq : Close emptying valve 2")
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.EmptyTankValve2)) .AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.EmptyTankValve2))

View File

@ -1,11 +1,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using TBF.BenchControl.GenericDevices;
using TBF.UiBridge;
using TBF.Resources;
using TBF.BenchControl.Operations;
using log4net; using log4net;
using TBF.BenchControl.GenericDevices;
using TBF.BenchControl.Operations;
using TBF.Boxes;
using TBF.Resources;
using TBF.UiBridge;
namespace TBF.BenchControl.Sequences namespace TBF.BenchControl.Sequences
{ {
@ -150,14 +151,14 @@ namespace TBF.BenchControl.Sequences
/// ///
protected void AccumulateAveragedData() protected void AccumulateAveragedData()
{ {
tempInSum += tempIn.F; tempInSum += tempIn.Val;
tempOutSum += tempOut.F; tempOutSum += tempOut.Val;
tempDivSum += tempDiv.F; tempDivSum += tempDiv.Val;
pressInSum += pressIn.F; pressInSum += pressIn.Val;
pressOutSum += pressOut.F; pressOutSum += pressOut.Val;
ambientTempSum += airTemperature.F; ambientTempSum += airTemperature.Val;
ambientPressSum += airPressure.F; ambientPressSum += airPressure.Val;
ambientHumiSum += airHumidity.F; ambientHumiSum += airHumidity.Val;
/// ///
averagedDataCount++; averagedDataCount++;
} }
@ -235,7 +236,7 @@ namespace TBF.BenchControl.Sequences
} }
while (!e.Contains(Event.BalanceDone)); while (!e.Contains(Event.BalanceDone));
} }
while (mass.F > (Balance.Capacity / 100.0f + 20.0f)); while (mass.Val > (Balance.Capacity / 100.0f + 20.0f));
quit_emptying: quit_emptying:
//-------------------------------- //--------------------------------
@ -429,22 +430,24 @@ namespace TBF.BenchControl.Sequences
float refPulsesPerLtr = 7200.0f / outPath.FlowMeter.NominalFlow; /// [pulse/ltr] float refPulsesPerLtr = 7200.0f / outPath.FlowMeter.NominalFlow; /// [pulse/ltr]
data.RefPulses = currentRefPulses; data.RefPulses = currentRefPulses;
data.Flow = measuredFlow.F; data.Flow = measuredFlow.Val;
data.Volume = Formulas.VolumeFromPulses(currentRefPulses, refPulsesPerLtr); data.Volume = Formulas.VolumeFromPulses(currentRefPulses, refPulsesPerLtr);
data.Time = time; data.Time = time;
data.Mass = mass.Val;
data.Progress = progress; data.Progress = progress;
float estCurrentTime = TimeEstimateBeginRpts + ((float)(tstRslt.RepetitionNr - 1) + progress) * TimeEstimateOneTest; float estCurrentTime = TimeEstimateBeginRpts + ((float)(tstRslt.RepetitionNr - 1) + progress) * TimeEstimateOneTest;
data.OveralProgress = estCurrentTime / TimeEstimateTotal; data.OveralProgress = estCurrentTime / TimeEstimateTotal;
data.Tin = tempIn.F; data.Tin = tempIn.Val;
data.Tout = tempOut.F; data.Tout = tempOut.Val;
data.Tdiv = tempDiv.F; data.Tdiv = tempDiv.Val;
data.Pin = pressIn.F; data.Pin = pressIn.Val;
data.Pout = pressOut.F; data.Pout = pressOut.Val;
data.AmbientTemp = airTemperature.F;
data.AmbientPressure = airPressure.F; data.AmbientTemp = airTemperature.Val;
data.AmbientHumidity = airHumidity.F; data.AmbientPressure = airPressure.Val;
data.AmbientHumidity = airHumidity.Val;
for (int i = 0; i < Program.WMsCount; i++) for (int i = 0; i < Program.WMsCount; i++)
{ {

View File

@ -105,7 +105,7 @@ namespace TBF.BenchControl.TestMethods.CameraRoiDetection
flow_set: flow_set:
int time = StateMachine.CurrentTime; int time = StateMachine.CurrentTime;
float currentFlow = measuredFlow.F; float currentFlow = measuredFlow.Val;
//------------------------------------------------ //------------------------------------------------
Bridge.OnActivity(this, Strings.ROI_Detection_in_Progress); Bridge.OnActivity(this, Strings.ROI_Detection_in_Progress);

View File

@ -2,9 +2,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using log4net; using log4net;
using TBF.UiBridge;
using TBF.BenchControl; using TBF.BenchControl;
using TBF.Boxes;
using TBF.Resources; using TBF.Resources;
using TBF.UiBridge;
namespace TBF.BenchControl.TestMethods.CombinedMeters namespace TBF.BenchControl.TestMethods.CombinedMeters
{ {
@ -107,7 +108,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
} }
while (!e.Contains(Event.BalanceDone)); while (!e.Contains(Event.BalanceDone));
float estimatedEndMass = mass.F + test.Volume; float estimatedEndMass = mass.Val + test.Volume;
if (estimatedEndMass < outPath.Balance.Capacity * Constants.TankFullFactor) if (estimatedEndMass < outPath.Balance.Capacity * Constants.TankFullFactor)
{ {
goto set_flow; /// Enough room in the tank -> skip emptying goto set_flow; /// Enough room in the tank -> skip emptying
@ -152,7 +153,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
while (!e.Contains(Event.FlowReached)); while (!e.Contains(Event.FlowReached));
int time = StateMachine.CurrentTime; int time = StateMachine.CurrentTime;
float currentFlow = measuredFlow.F; float currentFlow = measuredFlow.Val;
/// Extract cameras from the current sensors path, add operations to the detection state /// Extract cameras from the current sensors path, add operations to the detection state
IList<IOperation> measureOperations = new List<IOperation>(); IList<IOperation> measureOperations = new List<IOperation>();
@ -179,8 +180,8 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
while (!e.Contains(Event.BalanceDone)); while (!e.Contains(Event.BalanceDone));
tstRslt.TimeStart = DateTime.Now; tstRslt.TimeStart = DateTime.Now;
tstRslt.MassStartRaw = stableMass.F; tstRslt.MassStartRaw = stableMass.Val;
mass.F = stableMass.F; mass.Val = stableMass.Val;
//------------------------------------------------ //------------------------------------------------
Bridge.OnActivity(this, Strings.Test_in_progress); Bridge.OnActivity(this, Strings.Test_in_progress);
@ -221,19 +222,19 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
if (firstTime) if (firstTime)
{ {
firstTime = false; /// Do the following only once firstTime = false; /// Do the following only once
tstRslt.TempInStart = tempIn.F; tstRslt.TempInStart = tempIn.Val;
tstRslt.TempOutStart = tempOut.F; tstRslt.TempOutStart = tempOut.Val;
tstRslt.TempDivStart = tempDiv.F; tstRslt.TempDivStart = tempDiv.Val;
tstRslt.PressInStart = pressIn.F; tstRslt.PressInStart = pressIn.Val;
tstRslt.PressOutStart = pressOut.F; tstRslt.PressOutStart = pressOut.Val;
} }
tstRslt.TempInEnd = tempIn.F; tstRslt.TempInEnd = tempIn.Val;
tstRslt.TempOutEnd = tempOut.F; tstRslt.TempOutEnd = tempOut.Val;
tstRslt.TempDivEnd = tempDiv.F; tstRslt.TempDivEnd = tempDiv.Val;
tstRslt.PressInEnd = pressIn.F; tstRslt.PressInEnd = pressIn.Val;
tstRslt.PressOutEnd = pressOut.F; tstRslt.PressOutEnd = pressOut.Val;
tstRslt.MassEndRaw = mass.F; tstRslt.MassEndRaw = mass.Val;
AccumulateAveragedData(); AccumulateAveragedData();
@ -273,7 +274,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
} }
while (!e.Contains(Event.BalanceDone)); while (!e.Contains(Event.BalanceDone));
/// ///
tstRslt.MassEndRaw = stableMass.F; tstRslt.MassEndRaw = stableMass.Val;
tstRslt.TimeEnd = DateTime.Now; tstRslt.TimeEnd = DateTime.Now;
//------------------------------------------------ //------------------------------------------------

View File

@ -2,9 +2,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using log4net; using log4net;
using TBF.UiBridge;
using TBF.BenchControl; using TBF.BenchControl;
using TBF.Resources; using TBF.Resources;
using TBF.UiBridge;
namespace TBF.BenchControl.TestMethods.CombinedWithDetection namespace TBF.BenchControl.TestMethods.CombinedWithDetection
{ {
@ -109,7 +109,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
} }
while (!e.Contains(Event.BalanceDone)); while (!e.Contains(Event.BalanceDone));
float estimatedEndMass = mass.F + test.Volume; float estimatedEndMass = mass.Val + test.Volume;
if (estimatedEndMass < outPath.Balance.Capacity * Constants.TankFullFactor) if (estimatedEndMass < outPath.Balance.Capacity * Constants.TankFullFactor)
{ {
goto switching_flow_detection; /// Enough room in the tank -> skip emptying goto switching_flow_detection; /// Enough room in the tank -> skip emptying
@ -179,7 +179,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
float[] pulseFreqsForDetection = new float[DetectionBufferSize]; float[] pulseFreqsForDetection = new float[DetectionBufferSize];
/// Current values /// Current values
flowsForDetection[0] = measuredFlow.F; flowsForDetection[0] = measuredFlow.Val;
pulseFreqsForDetection[0] = 0.0f; pulseFreqsForDetection[0] = 0.0f;
int startTime = StateMachine.CurrentTime; int startTime = StateMachine.CurrentTime;
int lastTime = StateMachine.CurrentTime; int lastTime = StateMachine.CurrentTime;
@ -364,8 +364,8 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
while (!e.Contains(Event.BalanceDone)); while (!e.Contains(Event.BalanceDone));
tstRslt.TimeStart = DateTime.Now; tstRslt.TimeStart = DateTime.Now;
tstRslt.MassStartRaw = stableMass.F; tstRslt.MassStartRaw = stableMass.Val;
mass.F = stableMass.F; mass.Val = stableMass.Val;
//------------------------------------------------ //------------------------------------------------
Bridge.OnActivity(this, Strings.Test_in_progress); Bridge.OnActivity(this, Strings.Test_in_progress);
@ -406,19 +406,19 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
if (firstTime) if (firstTime)
{ {
firstTime = false; /// Do the following only once firstTime = false; /// Do the following only once
tstRslt.TempInStart = tempIn.F; tstRslt.TempInStart = tempIn.Val;
tstRslt.TempOutStart = tempOut.F; tstRslt.TempOutStart = tempOut.Val;
tstRslt.TempDivStart = tempDiv.F; tstRslt.TempDivStart = tempDiv.Val;
tstRslt.PressInStart = pressIn.F; tstRslt.PressInStart = pressIn.Val;
tstRslt.PressOutStart = pressOut.F; tstRslt.PressOutStart = pressOut.Val;
} }
tstRslt.TempInEnd = tempIn.F; tstRslt.TempInEnd = tempIn.Val;
tstRslt.TempOutEnd = tempOut.F; tstRslt.TempOutEnd = tempOut.Val;
tstRslt.TempDivEnd = tempDiv.F; tstRslt.TempDivEnd = tempDiv.Val;
tstRslt.PressInEnd = pressIn.F; tstRslt.PressInEnd = pressIn.Val;
tstRslt.PressOutEnd = pressOut.F; tstRslt.PressOutEnd = pressOut.Val;
tstRslt.MassEndRaw = mass.F; tstRslt.MassEndRaw = mass.Val;
AccumulateAveragedData(); AccumulateAveragedData();
@ -458,7 +458,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
} }
while (!e.Contains(Event.BalanceDone)); while (!e.Contains(Event.BalanceDone));
/// ///
tstRslt.MassEndRaw = stableMass.F; tstRslt.MassEndRaw = stableMass.Val;
tstRslt.TimeEnd = DateTime.Now; tstRslt.TimeEnd = DateTime.Now;
//------------------------------------------------ //------------------------------------------------

View File

@ -99,7 +99,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
} }
while (!e.Contains(Event.BalanceDone)); while (!e.Contains(Event.BalanceDone));
float estimatedEndMass = mass.F + test.Volume; float estimatedEndMass = mass.Val + test.Volume;
if (estimatedEndMass < outPath.Balance.Capacity * Constants.TankFullFactor) if (estimatedEndMass < outPath.Balance.Capacity * Constants.TankFullFactor)
{ {
goto set_flow; /// Enough room in the tank -> skip emptying goto set_flow; /// Enough room in the tank -> skip emptying
@ -146,7 +146,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
flow_set: flow_set:
int time = StateMachine.CurrentTime; int time = StateMachine.CurrentTime;
float currentFlow = measuredFlow.F; float currentFlow = measuredFlow.Val;
/// Extract cameras from the current sensors path, add operations to the detection state /// Extract cameras from the current sensors path, add operations to the detection state
IList<IOperation> measureOperations = new List<IOperation>(); IList<IOperation> measureOperations = new List<IOperation>();
@ -173,8 +173,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
while (!e.Contains(Event.BalanceDone)); while (!e.Contains(Event.BalanceDone));
tstRslt.TimeStart = DateTime.Now; tstRslt.TimeStart = DateTime.Now;
tstRslt.MassStartRaw = stableMass.F; tstRslt.MassStartRaw = stableMass.Val;
mass.F = stableMass.F; mass.Val = stableMass.Val;
//------------------------------------------------ //------------------------------------------------
Bridge.OnActivity(this, Strings.Test_in_progress); Bridge.OnActivity(this, Strings.Test_in_progress);
@ -215,25 +215,25 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
if (firstTime) if (firstTime)
{ {
firstTime = false; /// Do the following only once firstTime = false; /// Do the following only once
tstRslt.TempInStart = tempIn.F; tstRslt.TempInStart = tempIn.Val;
tstRslt.TempOutStart = tempOut.F; tstRslt.TempOutStart = tempOut.Val;
tstRslt.TempDivStart = tempDiv.F; tstRslt.TempDivStart = tempDiv.Val;
tstRslt.PressInStart = pressIn.F; tstRslt.PressInStart = pressIn.Val;
tstRslt.PressOutStart = pressOut.F; tstRslt.PressOutStart = pressOut.Val;
} }
tstRslt.TempInEnd = tempIn.F; tstRslt.TempInEnd = tempIn.Val;
tstRslt.TempOutEnd = tempOut.F; tstRslt.TempOutEnd = tempOut.Val;
tstRslt.TempDivEnd = tempDiv.F; tstRslt.TempDivEnd = tempDiv.Val;
tstRslt.PressInEnd = pressIn.F; tstRslt.PressInEnd = pressIn.Val;
tstRslt.PressOutEnd = pressOut.F; tstRslt.PressOutEnd = pressOut.Val;
tstRslt.MassEndRaw = mass.F; tstRslt.MassEndRaw = mass.Val;
AccumulateAveragedData(); AccumulateAveragedData();
tstRslt.AmbientTempAve = airTemperature.F; tstRslt.AmbientTempAve = airTemperature.Val;
tstRslt.AmbientPressAve = airPressure.F; tstRslt.AmbientPressAve = airPressure.Val;
tstRslt.AmbientHumiAve = airHumidity.F; tstRslt.AmbientHumiAve = airHumidity.Val;
string logstr = string.Format("E={0} f={1} q={2}", cBrd.EtPulses(0), cBrd.ReferenceFreq, string logstr = string.Format("E={0} f={1} q={2}", cBrd.EtPulses(0), cBrd.ReferenceFreq,
@ -268,7 +268,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
} }
while (!e.Contains(Event.BalanceDone)); while (!e.Contains(Event.BalanceDone));
/// ///
tstRslt.MassEndRaw = stableMass.F; tstRslt.MassEndRaw = stableMass.Val;
tstRslt.TimeEnd = DateTime.Now; tstRslt.TimeEnd = DateTime.Now;
//------------------------------------------------ //------------------------------------------------

View File

@ -0,0 +1,141 @@
namespace TBF.Boxes
{
public class FloatBox : IBox
{
/// Box value
private float val;
public float Val
{
get { return (valid ? val : 0); }
set { val = value; valid = true; }
}
/// Box name
private string name;
public string Name
{
get { return name; }
}
/// Validity flag: true = the box value is valid
private bool valid = false;
public bool Valid
{
get { return valid; }
}
/// <summary> Parameterless constructor </summary>
public FloatBox() { }
/// <summary> Constructor that initializes the value </summary>
public FloatBox(float val) { this.Val = val; }
/// <summary> Constructor that initializes the format </summary>
public FloatBox(string format) { SetFormat(format); }
/// <summary> Constructor that initializes the complex format </summary>
public FloatBox(string name, string format, string formatInvalid, string formatEx)
{
SetFormat(name, format, formatInvalid, formatEx);
}
/// <summary> Constructor that initializes the value and the format </summary>
public FloatBox(float val, string format)
: this(val)
{
SetFormat(format);
}
/// <summary> Constructor that initializes the value and the complex format </summary>
public FloatBox(float val, string name, string format, string formatInvalid, string formatEx)
: this(val)
{
SetFormat(name, format, formatInvalid, formatEx);
}
/// <summary>
/// Clear the box value and the valid flag
/// </summary>
public void Clear()
{
val = 0;
valid = false;
}
/// Specifies a conversion to a string. In the most complex case the conversion is:
/// string.Format(formatEx, val.ToString(format))
/// If the value is invalid, the conversion result is 'formatInvalid'.
string format = null;
string formatInvalid = "---";
string formatEx = "{0}";
/// <summary>
/// Set a basic format for the conversion to a string representation
/// </summary>
public void SetFormat(string format)
{
this.format = format;
}
public void SetFormat(string name, string format, string formatInvalid, string formatEx)
{
this.name = name;
this.format = format;
this.formatInvalid = formatInvalid;
this.formatEx = formatEx;
}
/// <summary>
/// Converts the box value to a string representation
/// </summary>
public override string ToString()
{
if (!valid)
{
return formatInvalid;
}
else if (format == null)
{
return string.Format(formatEx, Val);
}
else
{
return string.Format(formatEx, Val.ToString(format));
}
}
/// <summary>
/// Validate the string representation of the box value
/// </summary>
/// <param name="strVal">String representation of the parameter</param>
/// <returns>true = string is OK, false = string is wrong (see 'message')</returns>
public bool ValidateParam(string strVal)
{
float dummy;
return Utils.TryParseSFloat(strVal, out dummy);
}
/// <summary>
/// Update the parameter from a string
/// </summary>
/// <param name="strVal">String representation of the box value</param>
public void UpdateParam(string strVal)
{
try
{
Val = Utils.ParseSFloat(strVal);
}
catch { };
}
public FloatBox Clone()
{
if (valid)
{
return new FloatBox(val, name, format, formatInvalid, formatEx);
}
else
{
return new FloatBox(name, format, formatInvalid, formatEx);
}
}
}
}

View File

@ -0,0 +1,54 @@
using System;
using System.Text;
namespace TBF.Boxes
{
interface IBox
{
/// <summary>
/// Box name
/// </summary>
string Name { get; }
/// <summary>
/// Validity flag: true = the box value is valid
/// </summary>
bool Valid { get; }
/// <summary>
/// Set the name and the format for a conversion to a string.
/// In the most complex case the conversion is:
/// string.Format(formatEx, val.ToString(format))
/// If the value is invalid, the conversion result is 'formatInvalid'.
/// </summary>
void SetFormat(string name, string format, string formatInvalid, string formatEx);
/// <summary>
/// Set only the basic format. 'formatInvalid' is "---".
/// </summary>
void SetFormat(string format);
/// <summary>
/// Clear the box value and the valid flag
/// </summary>
void Clear();
/// <summary>
/// Convert the box value to a string representation
/// </summary>
string ToString();
/// <summary>
/// Validate the string representation of the box value
/// </summary>
/// <param name="strVal">String representation of the parameter</param>
/// <returns>true = string is OK, false = string is wrong (see 'message')</returns>
bool ValidateParam(string strVal);
/// <summary>
/// Update the parameter from a string
/// </summary>
/// <param name="strVal">String representation of the box value</param>
void UpdateParam(string strVal);
}
}

View File

@ -0,0 +1,142 @@
using System;
using System.Text;
namespace TBF.Boxes
{
public class IntBox : IBox
{
/// Box value
private int val;
public int Val
{
get { return (valid ? val : 0); }
set { val = value; valid = true; }
}
/// Box name
private string name;
public string Name
{
get { return name; }
}
/// Validity flag: true = the box value is valid
private bool valid = false;
public bool Valid
{
get { return valid; }
}
/// <summary> Parameterless constructor </summary>
public IntBox() { }
/// <summary> Constructor that initializes the value </summary>
public IntBox(int val) { this.Val = val; }
/// <summary> Constructor that initializes the format </summary>
public IntBox(string format) { SetFormat(format); }
/// <summary> Constructor that initializes the complex format </summary>
public IntBox(string name, string format, string formatInvalid, string formatEx)
{
SetFormat(name, format, formatInvalid, formatEx);
}
/// <summary> Constructor that initializes the value and the format </summary>
public IntBox(int val, string format)
: this(val)
{
SetFormat(format);
}
/// <summary> Constructor that initializes the value and the complex format </summary>
public IntBox(int val, string name, string format, string formatInvalid, string formatEx)
: this(val)
{
SetFormat(name, format, formatInvalid, formatEx);
}
/// <summary>
/// Clear the box value and the valid flag
/// </summary>
public void Clear()
{
val = 0;
valid = false;
}
/// Format for a conversion to a string. In the most complex case the conversion is:
/// string.Format(FormatEx, val.ToString(Format))
string format = null;
string formatInvalid = "---";
string formatEx = "{0}";
/// <summary>
/// Set a format for the conversion to a string representation
/// </summary>
public void SetFormat(string format)
{
this.format = format;
}
public void SetFormat(string name, string format, string formatInvalid, string formatEx)
{
this.name = name;
this.format = format;
this.formatInvalid = formatInvalid;
this.formatEx = formatEx;
}
/// <summary>
/// Converts the box value to a string representation
/// </summary>
public override string ToString()
{
if (!valid)
{
return formatInvalid;
}
else if (format == null)
{
return string.Format(formatEx, Val);
}
else
{
return string.Format(formatEx, Val.ToString(format));
}
}
/// <summary>
/// Validates the string representation of the box value
/// </summary>
/// <param name="strVal">String representation of the parameter</param>
/// <returns>true = string is OK, false = string is wrong (see 'message')</returns>
public bool ValidateParam(string strVal)
{
int dummy;
return int.TryParse(strVal, out dummy);
}
/// <summary>
/// Update the parameter from a string
/// </summary>
/// <param name="strVal">String representation of the box value</param>
public void UpdateParam(string strVal)
{
try
{
Val = int.Parse(strVal);
}
catch { };
}
public IntBox Clone()
{
if (valid)
{
return new IntBox(val, name, format, formatInvalid, formatEx);
}
else
{
return new IntBox(name, format, formatInvalid, formatEx);
}
}
}
}

View File

@ -122,46 +122,31 @@ namespace TBF
Bridge.ButtonsEtcHandler += delegate(object sndr, ButtonsEtcEventArgs args) Bridge.ButtonsEtcHandler += delegate(object sndr, ButtonsEtcEventArgs args)
{ {
if (InvokeRequired) if (InvokeRequired) { Invoke(new EventHandler<ButtonsEtcEventArgs>(OnButtonsEtc), sndr, args); }
{
Invoke(new EventHandler<ButtonsEtcEventArgs>(OnButtonsEtc), sndr, args);
}
else OnButtonsEtc(sndr, args); else OnButtonsEtc(sndr, args);
}; };
Bridge.ActivityHandler += delegate(object sndr, UiBridge.ActivityEventArgs args) Bridge.ActivityHandler += delegate(object sndr, UiBridge.ActivityEventArgs args)
{ {
if (InvokeRequired) if (InvokeRequired) { Invoke(new EventHandler<UiBridge.ActivityEventArgs>(OnActivity), sndr, args); }
{
Invoke(new EventHandler<UiBridge.ActivityEventArgs>(OnActivity), sndr, args);
}
else OnActivity(sndr, args); else OnActivity(sndr, args);
}; };
Bridge.StateChangedHandler += delegate(object sndr, UiBridge.StateChangedEventArgs args) Bridge.StateChangedHandler += delegate(object sndr, UiBridge.StateChangedEventArgs args)
{ {
if (InvokeRequired) if (InvokeRequired) { Invoke(new EventHandler<UiBridge.StateChangedEventArgs>(OnStateChanged), sndr, args); }
{
Invoke(new EventHandler<UiBridge.StateChangedEventArgs>(OnStateChanged), sndr, args);
}
else OnStateChanged(sndr, args); else OnStateChanged(sndr, args);
}; };
Bridge.TestProgressHandler += delegate(object sndr, UiBridge.TestProgressEventArgs args) Bridge.TestProgressHandler += delegate(object sndr, UiBridge.TestProgressEventArgs args)
{ {
if (InvokeRequired) if (InvokeRequired) { Invoke(new EventHandler<UiBridge.TestProgressEventArgs>(OnTestProgress), sndr, args); }
{
Invoke(new EventHandler<UiBridge.TestProgressEventArgs>(OnTestProgress), sndr, args);
}
else OnTestProgress(sndr, args); else OnTestProgress(sndr, args);
}; };
Bridge.ProcedureSelectedHandler += delegate(object sndr, UiBridge.ProcedureSelectedEventArgs args) Bridge.ProcedureSelectedHandler += delegate(object sndr, UiBridge.ProcedureSelectedEventArgs args)
{ {
if (InvokeRequired) if (InvokeRequired) { Invoke(new EventHandler<UiBridge.ProcedureSelectedEventArgs>(OnProcedureSelected), sndr, args); }
{
Invoke(new EventHandler<UiBridge.ProcedureSelectedEventArgs>(OnProcedureSelected), sndr, args);
}
else OnProcedureSelected(sndr, args); else OnProcedureSelected(sndr, args);
}; };
} }

View File

@ -28,6 +28,7 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProcessTabPageCtrl));
this.sensor1Label = new System.Windows.Forms.Label(); this.sensor1Label = new System.Windows.Forms.Label();
this.pulses1Label = new System.Windows.Forms.Label(); this.pulses1Label = new System.Windows.Forms.Label();
this.refPulses1Label = new System.Windows.Forms.Label(); this.refPulses1Label = new System.Windows.Forms.Label();
@ -113,9 +114,19 @@
this.airTempLabel = new System.Windows.Forms.Label(); this.airTempLabel = new System.Windows.Forms.Label();
this.airPressLabel = new System.Windows.Forms.Label(); this.airPressLabel = new System.Windows.Forms.Label();
this.airHumiLabel = new System.Windows.Forms.Label(); this.airHumiLabel = new System.Windows.Forms.Label();
this.reservoirPictureBox = new System.Windows.Forms.PictureBox();
this.pumpPictureBox = new System.Windows.Forms.PictureBox();
this.watermeterPictureBox1 = new System.Windows.Forms.PictureBox();
this.watermeterPictureBox2 = new System.Windows.Forms.PictureBox();
this.watermeterPictureBox3 = new System.Windows.Forms.PictureBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.reservoirPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pumpPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox3)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// sensor1Label // sensor1Label
@ -913,11 +924,61 @@
this.airHumiLabel.TabIndex = 66; this.airHumiLabel.TabIndex = 66;
this.airHumiLabel.Text = "airHumi"; this.airHumiLabel.Text = "airHumi";
// //
// reservoirPictureBox
//
this.reservoirPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("reservoirPictureBox.Image")));
this.reservoirPictureBox.Location = new System.Drawing.Point(740, 386);
this.reservoirPictureBox.Name = "reservoirPictureBox";
this.reservoirPictureBox.Size = new System.Drawing.Size(142, 109);
this.reservoirPictureBox.TabIndex = 67;
this.reservoirPictureBox.TabStop = false;
//
// pumpPictureBox
//
this.pumpPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("pumpPictureBox.Image")));
this.pumpPictureBox.Location = new System.Drawing.Point(643, 458);
this.pumpPictureBox.Name = "pumpPictureBox";
this.pumpPictureBox.Size = new System.Drawing.Size(38, 38);
this.pumpPictureBox.TabIndex = 68;
this.pumpPictureBox.TabStop = false;
//
// watermeterPictureBox1
//
this.watermeterPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("watermeterPictureBox1.Image")));
this.watermeterPictureBox1.Location = new System.Drawing.Point(177, 331);
this.watermeterPictureBox1.Name = "watermeterPictureBox1";
this.watermeterPictureBox1.Size = new System.Drawing.Size(38, 30);
this.watermeterPictureBox1.TabIndex = 69;
this.watermeterPictureBox1.TabStop = false;
//
// watermeterPictureBox2
//
this.watermeterPictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("watermeterPictureBox2.Image")));
this.watermeterPictureBox2.Location = new System.Drawing.Point(322, 331);
this.watermeterPictureBox2.Name = "watermeterPictureBox2";
this.watermeterPictureBox2.Size = new System.Drawing.Size(38, 30);
this.watermeterPictureBox2.TabIndex = 70;
this.watermeterPictureBox2.TabStop = false;
//
// watermeterPictureBox3
//
this.watermeterPictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("watermeterPictureBox3.Image")));
this.watermeterPictureBox3.Location = new System.Drawing.Point(469, 331);
this.watermeterPictureBox3.Name = "watermeterPictureBox3";
this.watermeterPictureBox3.Size = new System.Drawing.Size(38, 30);
this.watermeterPictureBox3.TabIndex = 71;
this.watermeterPictureBox3.TabStop = false;
//
// ProcessTabPageCtrl // ProcessTabPageCtrl
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control; this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.watermeterPictureBox3);
this.Controls.Add(this.watermeterPictureBox2);
this.Controls.Add(this.watermeterPictureBox1);
this.Controls.Add(this.pumpPictureBox);
this.Controls.Add(this.reservoirPictureBox);
this.Controls.Add(this.airHumiLabel); this.Controls.Add(this.airHumiLabel);
this.Controls.Add(this.airPressLabel); this.Controls.Add(this.airPressLabel);
this.Controls.Add(this.airTempLabel); this.Controls.Add(this.airTempLabel);
@ -983,6 +1044,11 @@
this.groupBox2.PerformLayout(); this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false); this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout(); this.groupBox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.reservoirPictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pumpPictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox3)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -1075,6 +1141,11 @@
private System.Windows.Forms.Label airTempLabel; private System.Windows.Forms.Label airTempLabel;
private System.Windows.Forms.Label airPressLabel; private System.Windows.Forms.Label airPressLabel;
private System.Windows.Forms.Label airHumiLabel; private System.Windows.Forms.Label airHumiLabel;
private System.Windows.Forms.PictureBox reservoirPictureBox;
private System.Windows.Forms.PictureBox pumpPictureBox;
private System.Windows.Forms.PictureBox watermeterPictureBox1;
private System.Windows.Forms.PictureBox watermeterPictureBox2;
private System.Windows.Forms.PictureBox watermeterPictureBox3;
} }

View File

@ -9,48 +9,36 @@ namespace TBF.Screens
{ {
static readonly ILog log = LogManager.GetLogger(typeof(ProcessTabPageCtrl)); static readonly ILog log = LogManager.GetLogger(typeof(ProcessTabPageCtrl));
/// <summary>
/// Constructor, initializes anonymous event handlers
/// </summary>
public ProcessTabPageCtrl() public ProcessTabPageCtrl()
{ {
InitializeComponent(); InitializeComponent();
Bridge.ProcedureSelectedHandler += delegate(object sender, ProcedureSelectedEventArgs args) Bridge.ProcedureSelectedHandler += delegate(object sndr, ProcedureSelectedEventArgs args)
{ {
if (InvokeRequired) if (InvokeRequired) { Invoke(new EventHandler<ProcedureSelectedEventArgs>(OnProcedureSelected), sndr, args); }
{ else OnProcedureSelected(sndr, args);
Invoke(new EventHandler<ProcedureSelectedEventArgs>(OnProcedureSelected), sender, args);
}
else OnProcedureSelected(sender, args);
}; };
Bridge.TestSelectedHandler += delegate(object sender, TestSelectedEventArgs args) Bridge.TestSelectedHandler += delegate(object sender, TestSelectedEventArgs args)
{ {
if (InvokeRequired) if (InvokeRequired) { Invoke(new EventHandler<TestSelectedEventArgs>(OnTestSelected), sender, args); }
{
Invoke(new EventHandler<TestSelectedEventArgs>(OnTestSelected), sender, args);
}
else OnTestSelected(sender, args); else OnTestSelected(sender, args);
}; };
Bridge.TestProgressHandler += delegate(object sender, TestProgressEventArgs args) Bridge.TestProgressHandler += delegate(object sender, TestProgressEventArgs args)
{ {
if (InvokeRequired) if (InvokeRequired) { Invoke(new EventHandler<TestProgressEventArgs>(OnTestProgress), sender, args); }
{
Invoke(new EventHandler<TestProgressEventArgs>(OnTestProgress), sender, args);
}
else OnTestProgress(sender, args); else OnTestProgress(sender, args);
}; };
Bridge.TestCompletedHandler += delegate(object sender, TestCompletedEventArgs args) Bridge.TestCompletedHandler += delegate(object sender, TestCompletedEventArgs args)
{ {
if (InvokeRequired) if (InvokeRequired) { Invoke(new EventHandler<TestCompletedEventArgs>(OnTestCompleted), sender, args); }
{
Invoke(new EventHandler<TestCompletedEventArgs>(OnTestCompleted), sender, args);
}
else OnTestCompleted(sender, args); else OnTestCompleted(sender, args);
}; };
Bridge.ProcedureCompletedHandler += delegate(object sender, ProcedureCompletedEventArgs args) Bridge.ProcedureCompletedHandler += delegate(object sender, ProcedureCompletedEventArgs args)
{ {
if (InvokeRequired) if (InvokeRequired) { Invoke(new EventHandler<ProcedureCompletedEventArgs>(OnProcedureCompleted), sender, args); }
{
Invoke(new EventHandler<ProcedureCompletedEventArgs>(OnProcedureCompleted), sender, args);
}
else OnProcedureCompleted(sender, args); else OnProcedureCompleted(sender, args);
}; };
} }
@ -58,7 +46,8 @@ namespace TBF.Screens
private void ProcessTabPageCtrl_Load(object sender, EventArgs e) private void ProcessTabPageCtrl_Load(object sender, EventArgs e)
{ {
Once(); Once();
Reset(); ResetLabelsAndTargetVals();
ResetReadings();
} }
void Once() void Once()
@ -66,62 +55,99 @@ namespace TBF.Screens
} }
void Reset() /// <summary>
/// Called when a new procedure is selected
/// </summary>
void ResetLabelsAndTargetVals()
{ {
prInCmpntLabel.Text = "---"; /// Top part
prOutCmpntLabel.Text = "---";
tInCmpntLabel.Text = "---";
tOutCmpntLabel.Text = "---";
tDivCmpntLabel.Text = "---";
refFlowCmpntLabel.Text = "---";
regValveCmpntLabel.Text = "---";
scaleCmpntLabel.Text = "---";
sensor1Label.Text = "---";
sensor2Label.Text = "---";
sensor3Label.Text = "---";
targetFlowLowLabel.Text = "---"; targetFlowLowLabel.Text = "---";
targetFlowHighLabel.Text = "---"; targetFlowHighLabel.Text = "---";
targetVolumeLabel.Text = "---"; targetVolumeLabel.Text = "---";
targetRefCountLabel.Text = "---"; targetRefCountLabel.Text = "---";
estmtdTimeLabel.Text = "---"; estmtdTimeLabel.Text = "---";
pulses1Label.Text = "---"; refFlowCmpntLabel.Text = "---";
pulses2Label.Text = "---"; regValveCmpntLabel.Text = "---";
pulses3Label.Text = "---"; tDivCmpntLabel.Text = "---";
refPulses1Label.Text = "---";
refPulses2Label.Text = "---"; /// Bottom part
refPulses3Label.Text = "---"; prInCmpntLabel.Text = "---";
volume1Label.Text = "---"; prOutCmpntLabel.Text = "---";
volume2Label.Text = "---";
volume3Label.Text = "---"; sensor1Label.Text = "---";
error1Label.Text = "---"; sensor2Label.Text = "---";
error2Label.Text = "---"; sensor3Label.Text = "---";
error3Label.Text = "---";
tInLabel.Text = "---"; tInCmpntLabel.Text = "---";
tOutLabel.Text = "---"; tOutCmpntLabel.Text = "---";
tDivLabel.Text = "---";
prInLabel.Text = "---"; scaleCmpntLabel.Text = "---";
prOutLabel.Text = "---"; }
/// <summary>
/// Called when a new procedure or a new test procedure is selected
/// </summary>
void ResetReadings()
{
/// Top part
airTempLabel.Text = "---"; airTempLabel.Text = "---";
airPressLabel.Text = "---"; airPressLabel.Text = "---";
airHumiLabel.Text = "---"; airHumiLabel.Text = "---";
refPulsesLabel.Text = "---"; refPulsesLabel.Text = "---";
//refFreqLabel.Text = "---"; refFreqLabel.Text = "---";
refFlowLabel.Text = "---"; refFlowLabel.Text = "---";
refVolumeLabel.Text = "---"; refVolumeLabel.Text = "---";
//regValvePosLabel.Text = "---";
//massLabel.Text = "---"; regValvePosLabel.Text = "---";
tDivLabel.Text = "---";
/// Bottom part
pulses1Label.Text = "---";
refPulses1Label.Text = "---";
volume1Label.Text = "---";
error1Label.Text = "---";
passed1Label.Text = "---";
pulses2Label.Text = "---";
refPulses2Label.Text = "---";
volume2Label.Text = "---";
error2Label.Text = "---";
passed2Label.Text = "---";
pulses3Label.Text = "---";
refPulses3Label.Text = "---";
volume3Label.Text = "---";
error3Label.Text = "---";
passed3Label.Text = "---";
tInLabel.Text = "---";
tOutLabel.Text = "---";
prInLabel.Text = "---";
prOutLabel.Text = "---";
massLabel.Text = "---";
massDiffLabel.Text = "---";
volumeCtvLabel.Text = "---";
refErrorLabel.Text = "---";
} }
void OnProcedureSelected(object sender, ProcedureSelectedEventArgs args) void OnProcedureSelected(object sender, ProcedureSelectedEventArgs args)
{ {
Reset(); ResetLabelsAndTargetVals();
ResetReadings();
} }
void OnTestSelected(object sender, TestSelectedEventArgs args) void OnTestSelected(object sender, TestSelectedEventArgs args)
{ {
/// Target values
targetFlowLowLabel.Text = args.Test.Qfrom.ToString("F3");
targetFlowHighLabel.Text = args.Test.Qto.ToString("F3");
targetVolumeLabel.Text = args.Test.Volume.ToString("F1");
targetRefCountLabel.Text = args.TotalPulses.ToString();
estmtdTimeLabel.Text = args.Test.TstTime.ToString("F1");
/// Names of virtual bench components /// Names of virtual bench components
prInCmpntLabel.Text = args.BenchPath.PressIn.Cfg.Name; prInCmpntLabel.Text = args.BenchPath.PressIn.Cfg.Name;
prOutCmpntLabel.Text = args.BenchPath.PressOut.Cfg.Name; prOutCmpntLabel.Text = args.BenchPath.PressOut.Cfg.Name;
@ -135,49 +161,26 @@ namespace TBF.Screens
sensor2Label.Text = (args.MetersPath.RegisterReaders[1] == null) ? "" : args.MetersPath.RegisterReaders[1].Cfg.Name; sensor2Label.Text = (args.MetersPath.RegisterReaders[1] == null) ? "" : args.MetersPath.RegisterReaders[1].Cfg.Name;
sensor3Label.Text = (args.MetersPath.RegisterReaders[2] == null) ? "" : args.MetersPath.RegisterReaders[2].Cfg.Name; sensor3Label.Text = (args.MetersPath.RegisterReaders[2] == null) ? "" : args.MetersPath.RegisterReaders[2].Cfg.Name;
/// Target values /// Readings and target values
targetFlowLowLabel.Text = args.Test.Qfrom.ToString("F3"); ResetReadings();
targetFlowHighLabel.Text = args.Test.Qto.ToString("F3");
targetVolumeLabel.Text = args.Test.Volume.ToString("F1");
targetRefCountLabel.Text = args.TotalPulses.ToString();
estmtdTimeLabel.Text = args.Test.TstTime.ToString("F1");
/// Invalidate other values
pulses1Label.Text = "---";
pulses2Label.Text = "---";
pulses3Label.Text = "---";
refPulses1Label.Text = "---";
refPulses2Label.Text = "---";
refPulses3Label.Text = "---";
volume1Label.Text = "---";
volume2Label.Text = "---";
volume3Label.Text = "---";
error1Label.Text = "---";
error2Label.Text = "---";
error3Label.Text = "---";
tInLabel.Text = "---";
tOutLabel.Text = "---";
tDivLabel.Text = "---";
prInLabel.Text = "---";
prOutLabel.Text = "---";
airTempLabel.Text = "---";
airPressLabel.Text = "---";
airHumiLabel.Text = "---";
refPulsesLabel.Text = "---";
//refFreqLabel.Text = "---";
refFlowLabel.Text = "---";
refVolumeLabel.Text = "---";
//regValvePosLabel.Text = "---";
//massLabel.Text = "---";
} }
void OnTestProgress(object sender, TestProgressEventArgs args) void OnTestProgress(object sender, TestProgressEventArgs args)
{ {
targetFlowLowLabel.Text = args.TestResult.Qfrom.ToString("F3"); /// Top part
targetFlowHighLabel.Text = args.TestResult.Qto.ToString("F3"); airTempLabel.Text = args.AmbientTemp.ToString("F1");
estmtdTimeLabel.Text = args.TestResult.TstTime.ToString("F1"); airPressLabel.Text = args.AmbientPressure.ToString("F1");
airHumiLabel.Text = args.AmbientHumidity.ToString("F1");
refPulsesLabel.Text = args.RefPulses.ToString();
refFreqLabel.Text = args.FlowMtrFreq.ToString("F1");
refFlowLabel.Text = args.Flow.ToString("F2");
refVolumeLabel.Text = args.Volume.ToString("F2");
regValvePosLabel.Text = args.RegValvePos.ToString("F1");
tDivLabel.Text = args.Tdiv.ToString("F2");
/// Bottom part
pulses1Label.Text = args.WmPulses[0].ToString(); pulses1Label.Text = args.WmPulses[0].ToString();
pulses2Label.Text = args.WmPulses[1].ToString(); pulses2Label.Text = args.WmPulses[1].ToString();
pulses3Label.Text = args.WmPulses[2].ToString(); pulses3Label.Text = args.WmPulses[2].ToString();
@ -190,21 +193,14 @@ namespace TBF.Screens
error1Label.Text = args.WmErrPct[0].ToString("F2"); error1Label.Text = args.WmErrPct[0].ToString("F2");
error2Label.Text = args.WmErrPct[1].ToString("F2"); error2Label.Text = args.WmErrPct[1].ToString("F2");
error3Label.Text = args.WmErrPct[2].ToString("F2"); error3Label.Text = args.WmErrPct[2].ToString("F2");
tInLabel.Text = args.Tin.ToString("F2"); tInLabel.Text = args.Tin.ToString("F2");
tOutLabel.Text = args.Tout.ToString("F2"); tOutLabel.Text = args.Tout.ToString("F2");
tDivLabel.Text = args.Tdiv.ToString("F2");
prInLabel.Text = args.Pin.ToString("F1"); prInLabel.Text = args.Pin.ToString("F1");
prOutLabel.Text = args.Pout.ToString("F1"); prOutLabel.Text = args.Pout.ToString("F1");
airTempLabel.Text = args.AmbientTemp.ToString("F1");
airPressLabel.Text = args.AmbientPressure.ToString("F1");
airHumiLabel.Text = args.AmbientHumidity.ToString("F1");
refPulsesLabel.Text = args.RefPulses.ToString(); massLabel.Text = args.Mass.ToString("F1");
//refFreqLabel.Text = args. massDiffLabel.Text = (args.Mass - args.TestResult.MassStartRaw).ToString("F1");
refFlowLabel.Text = args.Flow.ToString("F2");
refVolumeLabel.Text = args.Volume.ToString("F2");
//regValvePosLabel.Text = args.
//massLabel.Text = args.
} }
void OnTestCompleted(object sender, TestCompletedEventArgs args) void OnTestCompleted(object sender, TestCompletedEventArgs args)
@ -240,6 +236,9 @@ namespace TBF.Screens
refVolumeLabel.Text = tRes.VolumeCTV.ToString("F2"); refVolumeLabel.Text = tRes.VolumeCTV.ToString("F2");
//regValvePosLabel.Text = tstRslt. //regValvePosLabel.Text = tstRslt.
//massLabel.Text = tstRslt. //massLabel.Text = tstRslt.
volumeCtvLabel.Text = args.TestResult.VolumeCTV.ToString("F1");
refErrorLabel.Text = "---"; // TODO
} }
else if (tRes.MetersKind == Entities.MetersKind.Combined) else if (tRes.MetersKind == Entities.MetersKind.Combined)
{ {
@ -270,6 +269,9 @@ namespace TBF.Screens
refVolumeLabel.Text = tRes.VolumeCTV.ToString("F2"); refVolumeLabel.Text = tRes.VolumeCTV.ToString("F2");
//regValvePosLabel.Text = tstRslt. //regValvePosLabel.Text = tstRslt.
//massLabel.Text = tstRslt. //massLabel.Text = tstRslt.
volumeCtvLabel.Text = args.TestResult.VolumeCTV.ToString("F1");
refErrorLabel.Text = "---"; // TODO
} }
} }

View File

@ -117,4 +117,79 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="reservoirPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAI4AAABtCAYAAAB3LVkkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAEuSURBVHhe7dIxDoAwEAQx/v/pQFJQBaRM7ZN8zbZzPTcg
mG/AAeGQCIdEOCTCIREOiXBIhEMiHBLhkAiHRDgkwiERDolwSIRDIhwS4ZAIh0Q4JMIhEQ6JcEiEQyIc
EuGQCIdEOCTCIREOiXBIhEMiHBLhkAiHRDgkwiERDolwSIRDIhwS4ZAIh0Q4JMIhEQ6JcEiEQyIcEuGQ
CIdEOCTCIREOiXBIhEMiHBLhkAiHRDgkwiERDolwSIRDIhwS4ZAIh0Q4JMIhEQ6JcEiEQyIcEuGQCIdE
OCTCIREOiXBIhEMiHJIVzm6AP8IhEQ6JcEiEQyIcEuGQCIdEOCTCIREOiXBIhEMiHBLhkKxw5tuN8EU4
JMIhEQ6JcEiEQyIcEuGQCIdEOCTCIXnDgRPXuAF1p5ji1T6jKwAAAABJRU5ErkJggg==
</value>
</data>
<data name="pumpPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAALTSURBVFhH7Ze9ajJBFIZXjZAiCQT8gYC1vSnUQnIBglhq
EEm0sPAOcgGWgp2kSWGV0jIkvSZgk4hNGiF3kCrdZN/Vs3N29xiV7PDxQYoHdp0z7zw4u8sca7lcqt8Q
iUSUZVkBpNp92FssnU47cIlisagajYYLHzs4OHDqR6ORmLeJncQmk4mq1+ueBXu93k5UKhV3TjKZVN1u
V1zDz1axQqHgESIkCQkuxlksFuJ6xI9i2WxWDAWShMQmMWyxtCYhig2HQ1UqldyQ01PL3gJL3dzoYElC
gos9PFjq8lJnxGIxVS6XA+sDUYxLnZ1ZSqkVvxWjnIsLSx0d6azZbBZwCIjx7bu702FhioGPD52Ff87v
4RHjDzr/p4gwxcDLi87DMzefz4Ni+CRQEZ4pfwgIWwxgW2m83+8Hxfh3Cg+6FGJCDNA4CIjRQKslTwam
xPC2Uk2tViMf/WMsZqnnZ3kyMCUGslmdvUbfHB/LkwiTYk9POnuNvpEmcEyKgZMTnW+jb6Rizj8Rq9fl
Yo5psc9PnW+zumg25WKOaTFAtTariz+xLVCtzeriT2wLVGujb6RCjmmx/+s7Bm5v5QmESTEcHA8Pdb6F
ni8ajTo3OO5+fckTgUmx+3ud7YAjBppR+uHxUZ4ITIpRTT6fV+PxWJ/HEomEO4jzkTTZlFixqHMHg4H3
oIgOmQbRYkkBJsTe33VmPB53XDxizs26AOAs7g8JW+z1FU2IzpxOp7IY2nZYowgvAt4UHhS22NWVzms2
m64H8IgR6PNoAlosCgpL7O3NUtfXOqvVagUcRDG07TQJ0LaGIYZnim8fkBxEMYC2nf9z4PxcX0sSElyM
v32g3W6La4ONYgQ6ZB5GSBISXIzjf6b8bBVD244O2R8sSUj4xfBy8bdvE1vFOGhGaYFcLufS6XQ8Mnws
k8k49fii08dzF/YS46RSKQcS9UPj1WpVnP8zS/UNpuG+NDsbMtsAAAAASUVORK5CYII=
</value>
</data>
<data name="watermeterPictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACYAAAAeCAYAAABAFGxuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAIfSURBVFhH7dexS2pRHAfw0wukyUChpUkRoqFVF5fGApHW
N8TL1cE50L9AHBoFHaPVNWrQFh1cHk+CBwqXtzwIgmqqll/fc+65eo/3p2Xee23owMfi/s79/b54L3Wv
sCyLPqrZbJIQwhdcf7fvYNO4/m6fCLYG20vapF6vR6PRiJ0jfSJYBGhJ9yAokUhQvV5nZ60omEP2y1Ay
maRisWjMWihYqVRCIz+DOdpg33udTkfNwu/eG3O2H8A19ksa1kHNkx9VkKnf8we4hn4awTjYpT74VYQY
rNHo0+7uI1vzCjFYJnNP7XZb/eTqphCDSVdXNyrc4eF/tj4xJ1ilcquaBGV//84zc2KFwa6vOxSLvXjm
2lYYbGvr2TNzYk6wIDj32N7eA1ufCDHY8bGlQu3sPLF1U4jBqtXf7HFeiMEWMw72Eyr64CrIb1POdyBT
Op0myQ6Y0l6BaxCEvyBUBjeUzGUHlM9cFzDdJAgnlMvlPM9+KJlrMBjgH24DJ8iAOVeDIPwC/sUEZXM5
hVqtRtlsFiduwplu5KdbENRqtYxADmwx1/SGVCpFkYi8tKfwTzddlh2q2+165jmwzVzcpn6/rxoJsaEb
L8O+fPINae7rm84zXtwmR6FQUE2FONBDFnEC9vP8rMvnhlPMxW1yGw6HFI/H1QAhzjUuiCT/7Mj6kTon
n8+zPTk43VzcJk65XMZAGW6+aDSKx5sY22M2i94AIhVFdRKKXCQAAAAASUVORK5CYII=
</value>
</data>
<data name="watermeterPictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACYAAAAeCAYAAABAFGxuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAIfSURBVFhH7dexS2pRHAfw0wukyUChpUkRoqFVF5fGApHW
N8TL1cE50L9AHBoFHaPVNWrQFh1cHk+CBwqXtzwIgmqqll/fc+65eo/3p2Xee23owMfi/s79/b54L3Wv
sCyLPqrZbJIQwhdcf7fvYNO4/m6fCLYG20vapF6vR6PRiJ0jfSJYBGhJ9yAokUhQvV5nZ60omEP2y1Ay
maRisWjMWihYqVRCIz+DOdpg33udTkfNwu/eG3O2H8A19ksa1kHNkx9VkKnf8we4hn4awTjYpT74VYQY
rNHo0+7uI1vzCjFYJnNP7XZb/eTqphCDSVdXNyrc4eF/tj4xJ1ilcquaBGV//84zc2KFwa6vOxSLvXjm
2lYYbGvr2TNzYk6wIDj32N7eA1ufCDHY8bGlQu3sPLF1U4jBqtXf7HFeiMEWMw72Eyr64CrIb1POdyBT
Op0myQ6Y0l6BaxCEvyBUBjeUzGUHlM9cFzDdJAgnlMvlPM9+KJlrMBjgH24DJ8iAOVeDIPwC/sUEZXM5
hVqtRtlsFiduwplu5KdbENRqtYxADmwx1/SGVCpFkYi8tKfwTzddlh2q2+165jmwzVzcpn6/rxoJsaEb
L8O+fPINae7rm84zXtwmR6FQUE2FONBDFnEC9vP8rMvnhlPMxW1yGw6HFI/H1QAhzjUuiCT/7Mj6kTon
n8+zPTk43VzcJk65XMZAGW6+aDSKx5sY22M2i94AIhVFdRKKXCQAAAAASUVORK5CYII=
</value>
</data>
<data name="watermeterPictureBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACYAAAAeCAYAAABAFGxuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAIfSURBVFhH7dexS2pRHAfw0wukyUChpUkRoqFVF5fGApHW
N8TL1cE50L9AHBoFHaPVNWrQFh1cHk+CBwqXtzwIgmqqll/fc+65eo/3p2Xee23owMfi/s79/b54L3Wv
sCyLPqrZbJIQwhdcf7fvYNO4/m6fCLYG20vapF6vR6PRiJ0jfSJYBGhJ9yAokUhQvV5nZ60omEP2y1Ay
maRisWjMWihYqVRCIz+DOdpg33udTkfNwu/eG3O2H8A19ksa1kHNkx9VkKnf8we4hn4awTjYpT74VYQY
rNHo0+7uI1vzCjFYJnNP7XZb/eTqphCDSVdXNyrc4eF/tj4xJ1ilcquaBGV//84zc2KFwa6vOxSLvXjm
2lYYbGvr2TNzYk6wIDj32N7eA1ufCDHY8bGlQu3sPLF1U4jBqtXf7HFeiMEWMw72Eyr64CrIb1POdyBT
Op0myQ6Y0l6BaxCEvyBUBjeUzGUHlM9cFzDdJAgnlMvlPM9+KJlrMBjgH24DJ8iAOVeDIPwC/sUEZXM5
hVqtRtlsFiduwplu5KdbENRqtYxADmwx1/SGVCpFkYi8tKfwTzddlh2q2+165jmwzVzcpn6/rxoJsaEb
L8O+fPINae7rm84zXtwmR6FQUE2FONBDFnEC9vP8rMvnhlPMxW1yGw6HFI/H1QAhzjUuiCT/7Mj6kTon
n8+zPTk43VzcJk65XMZAGW6+aDSKx5sY22M2i94AIhVFdRKKXCQAAAAASUVORK5CYII=
</value>
</data>
</root> </root>

View File

@ -324,8 +324,6 @@
<Compile Include="BenchControl\FeedingPath.cs" /> <Compile Include="BenchControl\FeedingPath.cs" />
<Compile Include="BenchControl\Operations\SetAllRegulValvesOp.cs" /> <Compile Include="BenchControl\Operations\SetAllRegulValvesOp.cs" />
<Compile Include="BenchControl\OutputPath.cs" /> <Compile Include="BenchControl\OutputPath.cs" />
<Compile Include="BenchControl\FloatBox.cs" />
<Compile Include="BenchControl\IntBox.cs" />
<Compile Include="BenchControl\ResultsPrinters\Basic\Printer.cs" /> <Compile Include="BenchControl\ResultsPrinters\Basic\Printer.cs" />
<Compile Include="BenchControl\ResultsPrinters\Basic\PrinterCfg.cs" /> <Compile Include="BenchControl\ResultsPrinters\Basic\PrinterCfg.cs" />
<Compile Include="BenchControl\ResultsPrinters\Basic\PrinterCfgCtrl.cs"> <Compile Include="BenchControl\ResultsPrinters\Basic\PrinterCfgCtrl.cs">
@ -406,6 +404,9 @@
<DependentUpon>WaterMeterCfgCtrl.cs</DependentUpon> <DependentUpon>WaterMeterCfgCtrl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="BenchControl\WaterMeter\WaterMeterFactory.cs" /> <Compile Include="BenchControl\WaterMeter\WaterMeterFactory.cs" />
<Compile Include="Boxes\FloatBox.cs" />
<Compile Include="Boxes\IBox.cs" />
<Compile Include="Boxes\IntBox.cs" />
<Compile Include="Entities\IHasValves.cs" /> <Compile Include="Entities\IHasValves.cs" />
<Compile Include="Entities\TransitionSequence.cs" /> <Compile Include="Entities\TransitionSequence.cs" />
<Compile Include="Entities\TransitionStep.cs" /> <Compile Include="Entities\TransitionStep.cs" />

View File

@ -4,12 +4,16 @@ namespace TBF.UiBridge
{ {
public class TestProgressEventArgs : EventArgs public class TestProgressEventArgs : EventArgs
{ {
public float Progress;
public float OveralProgress;
public int RefPulses; public int RefPulses;
public float RegValvePos;
public float FlowMtrFreq;
public float Flow; public float Flow;
public float Volume; public float Volume;
public float Time; public float Time;
public float Progress; public float Mass;
public float OveralProgress;
public float Tin; public float Tin;
public float Tout; public float Tout;