2015-08-11 06:50:32 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2015 Sensus Metering Systems
|
|
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using log4net;
|
2015-12-04 16:17:20 +00:00
|
|
|
|
using Config.Entities;
|
2015-08-11 06:50:32 +00:00
|
|
|
|
using TBF.BenchControl;
|
2016-01-03 01:05:35 +00:00
|
|
|
|
using TBF.BenchControl.Sequences;
|
2015-08-11 06:50:32 +00:00
|
|
|
|
using TBF.Boxes;
|
|
|
|
|
|
using TBF.Resources;
|
|
|
|
|
|
using TBF.UiBridge;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
|
|
|
|
|
{
|
|
|
|
|
|
public class iPerlCommunicationSeq : Sequences.SequenceBase
|
|
|
|
|
|
{
|
|
|
|
|
|
private static readonly ILog log = LogManager.GetLogger(typeof(iPerlCommunicationSeq));
|
|
|
|
|
|
|
2015-09-04 11:49:04 +00:00
|
|
|
|
|
2015-08-11 06:50:32 +00:00
|
|
|
|
System.Windows.Forms.Form modelessDlg;
|
|
|
|
|
|
///
|
2016-01-03 01:05:35 +00:00
|
|
|
|
delegate void iPerlCommFormDlgt(iPerlCommunicationSeq myRef, TestMethodCfg cfg, string testName, iPerlCommunicationParams testParams);
|
2015-08-11 06:50:32 +00:00
|
|
|
|
///
|
2016-01-03 01:05:35 +00:00
|
|
|
|
void OpenIPerlCommForm(iPerlCommunicationSeq myRef, TestMethodCfg cfg, string testName, iPerlCommunicationParams testParams)
|
2015-08-11 06:50:32 +00:00
|
|
|
|
{
|
2015-11-25 07:48:24 +00:00
|
|
|
|
StringBuilder sb = new StringBuilder();
|
2015-08-19 11:04:47 +00:00
|
|
|
|
IList<GenericDevices.IWaterMeter> wMtrs = new List<GenericDevices.IWaterMeter>();
|
|
|
|
|
|
foreach (var rr in sensPath.RegisterReaders)
|
|
|
|
|
|
{
|
2015-11-25 07:48:24 +00:00
|
|
|
|
if (rr is GenericDevices.IWaterMeter)
|
|
|
|
|
|
{
|
|
|
|
|
|
GenericDevices.IWaterMeter wm = rr as GenericDevices.IWaterMeter;
|
|
|
|
|
|
wMtrs.Add(wm);
|
|
|
|
|
|
sb.AppendFormat(" {0}", wm.Name);
|
|
|
|
|
|
}
|
2015-08-19 11:04:47 +00:00
|
|
|
|
}
|
2015-11-25 07:48:24 +00:00
|
|
|
|
log.ErrorFormat("OpenIPerlCommForm(wms:{0})", sb);
|
2016-01-03 01:05:35 +00:00
|
|
|
|
myRef.modelessDlg = new iPerlCommunicationForm(WaterMeters, cfg, testName, testParams);
|
2015-09-04 11:49:04 +00:00
|
|
|
|
myRef.modelessDlg.Show();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CloseIPerlCommForm()
|
|
|
|
|
|
{
|
|
|
|
|
|
UiBridge.Bridge.OnCloseModelessForm(this, null);
|
|
|
|
|
|
modelessDlg = null;
|
2015-08-11 06:50:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-09-04 11:49:04 +00:00
|
|
|
|
|
2015-08-11 06:50:32 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Flying start mass collection method sequence
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="test">Test entity</param>
|
|
|
|
|
|
/// <returns>
|
|
|
|
|
|
/// Event.Done . . . . . . . OK
|
|
|
|
|
|
/// Event.UiCmdStop . . . . Stopped by the user using the on-screen button STOP
|
|
|
|
|
|
/// Event.OpArgumentError . Target flow is out of range
|
|
|
|
|
|
/// Event.Error . . . . . . Unspecified error
|
|
|
|
|
|
/// </returns>
|
2015-12-04 16:17:20 +00:00
|
|
|
|
public IList<Event> Execute(Config.Entities.Test test, TestMethodCfg cfg, iPerlCommunicationParams testParams)
|
2015-08-11 06:50:32 +00:00
|
|
|
|
{
|
|
|
|
|
|
IList<Event> e = new List<Event>(); /// Events from currently running operations
|
|
|
|
|
|
Event retVal = Event.Done;
|
|
|
|
|
|
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
2015-09-04 11:49:04 +00:00
|
|
|
|
modelessDlg = null;
|
2015-08-11 06:50:32 +00:00
|
|
|
|
|
|
|
|
|
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
|
|
|
|
|
|
2015-09-06 20:21:54 +00:00
|
|
|
|
const string Q2correctedFromCmd = "q2 corrected from ";
|
2015-08-25 09:47:21 +00:00
|
|
|
|
|
2015-09-06 20:21:54 +00:00
|
|
|
|
if (testParams.Activity.ToLower().Contains(Q2correctedFromCmd))
|
2015-08-25 09:47:21 +00:00
|
|
|
|
{
|
2016-01-10 00:44:28 +00:00
|
|
|
|
TestProgressEventArgs.SetEstimatedTimes(new int[] { 0, 0, 0, 60, 0, 0, 0 });
|
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.JustStarted));
|
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
|
|
2015-08-25 09:47:21 +00:00
|
|
|
|
string fromTestName = testParams.Activity.Substring(Q2correctedFromCmd.Length);
|
|
|
|
|
|
|
2016-01-03 01:05:35 +00:00
|
|
|
|
MakeCorrectedFrom(test.Name, fromTestName);
|
2015-08-26 16:00:46 +00:00
|
|
|
|
|
2016-01-10 00:44:28 +00:00
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.Completed));
|
2016-01-04 15:03:17 +00:00
|
|
|
|
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, test.Part));
|
2016-01-03 01:05:35 +00:00
|
|
|
|
allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file
|
2015-08-25 09:47:21 +00:00
|
|
|
|
|
2015-08-25 15:02:58 +00:00
|
|
|
|
IList<Event> rList = new List<Event>(1);
|
|
|
|
|
|
rList.Add(Event.Done);
|
|
|
|
|
|
return rList;
|
2015-08-25 09:47:21 +00:00
|
|
|
|
}
|
2015-09-06 20:21:54 +00:00
|
|
|
|
else if (testParams.Activity.ToLower().Contains("simulate "))
|
2015-08-11 06:50:32 +00:00
|
|
|
|
{
|
2016-01-08 18:18:45 +00:00
|
|
|
|
TestProgressEventArgs.SetEstimatedTimes(new int[] { 0, 0, 0, 60, 0, 0, 0 } );
|
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.JustStarted));
|
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
|
|
2016-01-03 01:05:35 +00:00
|
|
|
|
if (testParams.Activity.ToLower().Contains("q3")) MakeSimulated(test.Name, 1, 1, 0, -0.5f);
|
|
|
|
|
|
else if (testParams.Activity.ToLower().Contains("q2")) MakeSimulated(test.Name, 1, 1, 0, 0.5f);
|
|
|
|
|
|
else if (testParams.Activity.ToLower().Contains("q1")) MakeSimulated(test.Name, 1, 1, 0, -5.1f);
|
|
|
|
|
|
else if (testParams.Activity.ToLower().Contains("compound ok")) MakeSimulatedCompound(test.Name, 1, 1, 0, 0.7f, 1.0f);
|
|
|
|
|
|
else if (testParams.Activity.ToLower().Contains("compound nok")) MakeSimulatedCompound(test.Name, 1, 1, 0, 4.7f, 0.9f);
|
|
|
|
|
|
else if (testParams.Activity.ToLower().Contains("compound rise")) MakeSimulatedCompound(test.Name, 1, 1, 0, 0.7f, 0.0f);
|
|
|
|
|
|
else if (testParams.Activity.ToLower().Contains("compound fall")) MakeSimulatedCompound(test.Name, 1, 1, 0, 0.7f, 0.9f);
|
2015-08-11 06:50:32 +00:00
|
|
|
|
|
2016-01-08 18:18:45 +00:00
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.Completed));
|
2016-01-04 15:03:17 +00:00
|
|
|
|
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, test.Part));
|
2016-01-03 01:05:35 +00:00
|
|
|
|
allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file
|
2015-08-11 06:50:32 +00:00
|
|
|
|
|
2015-12-04 16:17:20 +00:00
|
|
|
|
for (int i = 0; i < Config.Data.WMsCount; i++)
|
2015-08-27 05:03:42 +00:00
|
|
|
|
{
|
|
|
|
|
|
WaterMeters.iPerl.WaterMeter iPerl = ((sensPath.RegisterReaders != null) && (i < sensPath.RegisterReaders.Length))
|
|
|
|
|
|
? (sensPath.RegisterReaders[i] as WaterMeters.iPerl.WaterMeter)
|
|
|
|
|
|
: null;
|
|
|
|
|
|
if (iPerl != null)
|
|
|
|
|
|
{
|
2016-01-03 01:05:35 +00:00
|
|
|
|
/// TODO: Reimplement
|
|
|
|
|
|
//iPerl.LastTestResult = meterRslt; /// Save this water meter test result to iPerl WM
|
2015-08-27 05:03:42 +00:00
|
|
|
|
iPerl.NominalTestFlow = 500.0 * (double)(test.Qfrom + test.Qto); /// Ave. + convert to liter/hour
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2015-09-06 20:21:54 +00:00
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------
|
|
|
|
|
|
Bridge.OnActivity(this, testParams.Activity);
|
|
|
|
|
|
//------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
State.Create(string.Format("iPerlCommunicationSeq : {0}", testParams.Activity))
|
|
|
|
|
|
.AddOperation(checkUiOp)
|
|
|
|
|
|
.EnterState();
|
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
|
|
|
|
|
|
|
if (e.Contains(Event.UiCmdStop)) retVal = Event.UiCmdStop;
|
2015-08-11 06:50:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
///
|
|
|
|
|
|
/// Show the modeless dialog with error indication
|
|
|
|
|
|
///
|
2016-01-08 18:18:45 +00:00
|
|
|
|
Program.MainWnd.Invoke(new iPerlCommFormDlgt(OpenIPerlCommForm), new object[] { this, cfg, test.Name, testParams });
|
2015-08-11 06:50:32 +00:00
|
|
|
|
|
2015-09-04 11:49:04 +00:00
|
|
|
|
//------------------------------------------------
|
|
|
|
|
|
Bridge.OnActivity(this, Strings.iPerl_Communication_in_progress);
|
|
|
|
|
|
//------------------------------------------------
|
2015-08-11 06:50:32 +00:00
|
|
|
|
|
2015-09-04 11:49:04 +00:00
|
|
|
|
bool stopPressed = false; /// true when STOP button pressed
|
|
|
|
|
|
bool completed = false;
|
2015-08-11 06:50:32 +00:00
|
|
|
|
|
2015-09-04 11:49:04 +00:00
|
|
|
|
State.Create("iPerlCommunicationSeq : Wait until the entry form is closed")
|
|
|
|
|
|
.AddOperation(checkUiOp)
|
|
|
|
|
|
.EnterState();
|
|
|
|
|
|
do
|
|
|
|
|
|
{
|
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
|
stopPressed = e.Contains(Event.UiCmdStop);
|
|
|
|
|
|
completed = (modelessDlg is GenericDevices.IHasCompleted)
|
|
|
|
|
|
&& (modelessDlg as GenericDevices.IHasCompleted).Completed;
|
|
|
|
|
|
}
|
|
|
|
|
|
while (!stopPressed && !completed);
|
2015-08-11 06:50:32 +00:00
|
|
|
|
|
2015-09-04 11:49:04 +00:00
|
|
|
|
if (stopPressed)
|
|
|
|
|
|
{
|
|
|
|
|
|
CloseIPerlCommForm();
|
|
|
|
|
|
retVal = Event.UiCmdStop;
|
|
|
|
|
|
}
|
2016-01-10 00:44:28 +00:00
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
TBF.UiBridge.Bridge.OnTestProgress(null, new TBF.UiBridge.TestProgressEventArgs(test.Name, Config.Entities.Progress.Completed));
|
|
|
|
|
|
}
|
2015-08-11 06:50:32 +00:00
|
|
|
|
|
2015-09-04 11:49:04 +00:00
|
|
|
|
/// Test 'Quit'
|
|
|
|
|
|
modelessDlg = null; /// Modeless dialog is closed now
|
2015-08-11 06:50:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Create a list with one item 'retVal' (default is Event.Done) and return it
|
|
|
|
|
|
IList<Event> retList = new List<Event>(1);
|
|
|
|
|
|
retList.Add(retVal);
|
|
|
|
|
|
return retList;
|
|
|
|
|
|
}
|
2015-08-25 15:02:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Virtually apply Q2 correction to a test used for the correction calculation.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="oriTestRslt">Q2Adj test result</param>
|
|
|
|
|
|
/// <returns>Virtual Q2 test result</returns>
|
2016-01-03 01:05:35 +00:00
|
|
|
|
/// <remarks>Assuming this test does not have multiple parts (part = 0)</remarks>
|
|
|
|
|
|
void MakeCorrectedFrom(string testName, string oriTestName)
|
2015-08-25 15:02:58 +00:00
|
|
|
|
{
|
2016-01-03 01:05:35 +00:00
|
|
|
|
Results.Entities.TestRslt oriTestRslt = ProcessData.BatchRslts.GetTestRslt(oriTestName, 0);
|
|
|
|
|
|
Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(testName, 0);
|
|
|
|
|
|
|
|
|
|
|
|
if (oriTestRslt == null || tstRslt == null) return;
|
|
|
|
|
|
|
|
|
|
|
|
tstRslt.Components = oriTestRslt.Components;
|
|
|
|
|
|
|
|
|
|
|
|
tstRslt.StartTime = oriTestRslt.StartTime;
|
|
|
|
|
|
tstRslt.EndTime = oriTestRslt.EndTime;
|
|
|
|
|
|
tstRslt.FlowSetTime = oriTestRslt.FlowSetTime;
|
|
|
|
|
|
tstRslt.TestTime = oriTestRslt.TestTime;
|
|
|
|
|
|
tstRslt.PulsesMaster = oriTestRslt.PulsesMaster;
|
|
|
|
|
|
tstRslt.ConstMaster = oriTestRslt.ConstMaster;
|
|
|
|
|
|
tstRslt.MassStartRaw = oriTestRslt.MassStartRaw;
|
2015-11-12 23:03:33 +00:00
|
|
|
|
tstRslt.MassStart = oriTestRslt.MassStart;
|
|
|
|
|
|
tstRslt.MassEndRaw = oriTestRslt.MassEndRaw;
|
|
|
|
|
|
tstRslt.MassEnd = oriTestRslt.MassEnd;
|
|
|
|
|
|
tstRslt.DensityIn = oriTestRslt.DensityIn;
|
|
|
|
|
|
tstRslt.DensityOut = oriTestRslt.DensityOut;
|
|
|
|
|
|
tstRslt.DensityDiv = oriTestRslt.DensityDiv;
|
|
|
|
|
|
tstRslt.Buoyancy = oriTestRslt.Buoyancy;
|
|
|
|
|
|
tstRslt.FlowMass = oriTestRslt.FlowMass;
|
|
|
|
|
|
tstRslt.FlowVolume = oriTestRslt.FlowVolume;
|
|
|
|
|
|
tstRslt.VolumeCTV = oriTestRslt.VolumeCTV;
|
|
|
|
|
|
tstRslt.VolumeMaster = oriTestRslt.VolumeMaster;
|
|
|
|
|
|
tstRslt.ErrorMaster = oriTestRslt.ErrorMaster;
|
2016-01-03 01:05:35 +00:00
|
|
|
|
|
|
|
|
|
|
tstRslt.AmbientTempAve = oriTestRslt.AmbientTempAve;
|
|
|
|
|
|
tstRslt.AmbientPressAve = oriTestRslt.AmbientPressAve;
|
|
|
|
|
|
tstRslt.AmbientHumiAve = oriTestRslt.AmbientHumiAve;
|
|
|
|
|
|
tstRslt.PressUpAvrg = oriTestRslt.PressUpAvrg;
|
|
|
|
|
|
tstRslt.PressUpStart = oriTestRslt.PressUpStart;
|
|
|
|
|
|
tstRslt.PressUpEnd = oriTestRslt.PressUpEnd;
|
|
|
|
|
|
tstRslt.PressUpMin = oriTestRslt.PressUpMin;
|
|
|
|
|
|
tstRslt.PressUpMax = oriTestRslt.PressUpMax;
|
|
|
|
|
|
tstRslt.PressDownAvrg = oriTestRslt.PressDownAvrg;
|
|
|
|
|
|
tstRslt.PressDownStart = oriTestRslt.PressDownStart;
|
|
|
|
|
|
tstRslt.PressDownEnd = oriTestRslt.PressDownEnd;
|
|
|
|
|
|
tstRslt.PressDownMin = oriTestRslt.PressDownMin;
|
|
|
|
|
|
tstRslt.PressDownMax = oriTestRslt.PressDownMax;
|
|
|
|
|
|
tstRslt.TempInAvrg = oriTestRslt.TempInAvrg;
|
|
|
|
|
|
tstRslt.TempInStart = oriTestRslt.TempInStart;
|
|
|
|
|
|
tstRslt.TempInEnd = oriTestRslt.TempInEnd;
|
|
|
|
|
|
tstRslt.TempInMin = oriTestRslt.TempInMin;
|
|
|
|
|
|
tstRslt.TempInMax = oriTestRslt.TempInMax;
|
|
|
|
|
|
tstRslt.TempOutAvrg = oriTestRslt.TempOutAvrg;
|
|
|
|
|
|
tstRslt.TempOutStart = oriTestRslt.TempOutStart;
|
|
|
|
|
|
tstRslt.TempOutEnd = oriTestRslt.TempOutEnd;
|
|
|
|
|
|
tstRslt.TempOutMin = oriTestRslt.TempOutMin;
|
|
|
|
|
|
tstRslt.TempOutMax = oriTestRslt.TempOutMax;
|
|
|
|
|
|
tstRslt.TempDivAvrg = oriTestRslt.TempDivAvrg;
|
|
|
|
|
|
tstRslt.TempDivStart = oriTestRslt.TempDivStart;
|
|
|
|
|
|
tstRslt.TempDivEnd = oriTestRslt.TempDivEnd;
|
|
|
|
|
|
tstRslt.TempDivMin = oriTestRslt.TempDivMin;
|
|
|
|
|
|
tstRslt.TempDivMax = oriTestRslt.TempDivMax;
|
|
|
|
|
|
tstRslt.FlowMin = oriTestRslt.FlowMin;
|
|
|
|
|
|
tstRslt.FlowMax = oriTestRslt.FlowMax;
|
|
|
|
|
|
|
|
|
|
|
|
tstRslt.Custom1 = oriTestRslt.Custom1;
|
|
|
|
|
|
tstRslt.Custom2 = oriTestRslt.Custom2;
|
|
|
|
|
|
tstRslt.Custom3 = oriTestRslt.Custom3;
|
|
|
|
|
|
tstRslt.Custom4 = oriTestRslt.Custom4;
|
|
|
|
|
|
tstRslt.Custom5 = oriTestRslt.Custom5;
|
|
|
|
|
|
tstRslt.Custom6 = oriTestRslt.Custom6;
|
|
|
|
|
|
tstRslt.Custom7 = oriTestRslt.Custom7;
|
|
|
|
|
|
tstRslt.Custom8 = oriTestRslt.Custom8;
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < ProcessData.BatchRslts.WMPositionsCount; i++)
|
2015-08-25 15:02:58 +00:00
|
|
|
|
{
|
2016-01-03 01:05:35 +00:00
|
|
|
|
Results.Entities.MeterTestRslt oriMeterRslt = ProcessData.BatchRslts.GetMeterTestRslt(oriTestName, i, CompoundMeterId.Single);
|
|
|
|
|
|
Results.Entities.MeterTestRslt meterRslt = ProcessData.BatchRslts.GetMeterTestRslt(testName, i, CompoundMeterId.Single);
|
|
|
|
|
|
|
2015-08-25 15:02:58 +00:00
|
|
|
|
/// Reference to iPerl water meter or null:
|
|
|
|
|
|
WaterMeters.iPerl.WaterMeter iPerl = ((sensPath.RegisterReaders != null) && (i < sensPath.RegisterReaders.Length))
|
|
|
|
|
|
? (sensPath.RegisterReaders[i] as WaterMeters.iPerl.WaterMeter)
|
|
|
|
|
|
: null;
|
|
|
|
|
|
|
2016-01-03 01:05:35 +00:00
|
|
|
|
if (meterRslt != null && oriMeterRslt != null)
|
2015-08-25 15:02:58 +00:00
|
|
|
|
{
|
2016-01-03 01:05:35 +00:00
|
|
|
|
meterRslt.PulsesMeter = oriMeterRslt.PulsesMeter;
|
|
|
|
|
|
meterRslt.PulsesMaster = oriMeterRslt.PulsesMaster;
|
|
|
|
|
|
meterRslt.PulsesPerLiter = oriMeterRslt.PulsesPerLiter;
|
|
|
|
|
|
meterRslt.VolumeRef = oriMeterRslt.VolumeRef;
|
|
|
|
|
|
meterRslt.TestTime = oriMeterRslt.TestTime;
|
|
|
|
|
|
|
|
|
|
|
|
if (iPerl == null ||
|
|
|
|
|
|
Math.Abs(oriMeterRslt.Error) <= 0.5f ||
|
|
|
|
|
|
oriMeterRslt.Error < oriTestRslt.ErrLimLo() + oriTestRslt.Uncertainty() ||
|
|
|
|
|
|
oriMeterRslt.Error > oriTestRslt.ErrLimHi() - oriTestRslt.Uncertainty())
|
|
|
|
|
|
{
|
|
|
|
|
|
/// Normal meter or iPerl without correction
|
|
|
|
|
|
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
|
|
|
|
|
|
meterRslt.VolumeEnd = oriMeterRslt.VolumeEnd;
|
|
|
|
|
|
meterRslt.VolumeMeter = oriMeterRslt.VolumeMeter;
|
|
|
|
|
|
meterRslt.Error = oriMeterRslt.Error;
|
|
|
|
|
|
meterRslt.Passed = oriMeterRslt.Passed;
|
|
|
|
|
|
meterRslt.TestDone = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
/// corrected iPerl
|
|
|
|
|
|
meterRslt.VolumeStart = 0;
|
|
|
|
|
|
meterRslt.VolumeEnd = 0;
|
|
|
|
|
|
meterRslt.VolumeMeter = oriMeterRslt.VolumeRef;
|
|
|
|
|
|
meterRslt.Error = 0;
|
|
|
|
|
|
meterRslt.Passed = true;
|
|
|
|
|
|
meterRslt.TestDone = true;
|
|
|
|
|
|
}
|
2015-08-25 15:02:58 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2015-08-11 06:50:32 +00:00
|
|
|
|
}
|