(1) Store/restore RawTestInfos & CompleteTestInfos as well, (2) TestRslt.TestDone = true after RFID, ver. 2.25.1409
This commit is contained in:
parent
14a96ea3e8
commit
7dcb5ba6ce
@ -133,9 +133,6 @@ namespace Results.Entities
|
||||
public virtual DateTime StartTime() { return Batch.StartTime; }
|
||||
public virtual DateTime EndTime() { return Batch.EndTime; }
|
||||
|
||||
protected MeterTestRslt lastMeterTestRslts;
|
||||
public virtual MeterTestRslt LastMeterTestRslts() { return lastMeterTestRslts; }
|
||||
|
||||
|
||||
public virtual long ErrorFlagsFromTests()
|
||||
{
|
||||
@ -605,7 +602,21 @@ namespace Results.Entities
|
||||
writer.Write(HydrPruefung);
|
||||
writer.Write(WMTypeRevision);
|
||||
|
||||
/// TODO: Write RawTestInfos, CompleteTestInfos
|
||||
/// Write RawTestInfos
|
||||
IList<Results.Output.SensusTestInfo> rawTestInfos = RawTestInfos as IList<Results.Output.SensusTestInfo>;
|
||||
writer.Write((rawTestInfos != null) ? rawTestInfos.Count : 0);
|
||||
if (rawTestInfos != null)
|
||||
{
|
||||
for (int i = 0; i < rawTestInfos.Count; i++) rawTestInfos[i].WriteBinary(writer);
|
||||
}
|
||||
|
||||
/// Write CompleteTestInfos
|
||||
Results.Output.SensusTestInfo[] completeTestInfos = CompleteTestInfos as Results.Output.SensusTestInfo[];
|
||||
writer.Write((completeTestInfos != null) ? completeTestInfos.Length : 0);
|
||||
if (completeTestInfos != null)
|
||||
{
|
||||
for (int i = 0; i < completeTestInfos.Length; i++) completeTestInfos[i].WriteBinary(writer);
|
||||
}
|
||||
#endif
|
||||
writer.Write(ProcessId);
|
||||
writer.Write(SessionId);
|
||||
@ -624,14 +635,12 @@ namespace Results.Entities
|
||||
}
|
||||
|
||||
/// Write MeterTestRslts
|
||||
int mtrCount = MeterTestRslts != null ? MeterTestRslts.Count : 0;
|
||||
writer.Write(mtrCount);
|
||||
for (int i = 0; i < mtrCount; i++)
|
||||
int meterTestRsltsCount = MeterTestRslts != null ? MeterTestRslts.Count : 0;
|
||||
writer.Write(meterTestRsltsCount);
|
||||
for (int i = 0; i < meterTestRsltsCount; i++)
|
||||
{
|
||||
MeterTestRslts[i].WriteBinary(writer);
|
||||
}
|
||||
|
||||
/// TODO: lastMeterTestRslts ???
|
||||
}
|
||||
|
||||
public virtual void ReadBinary(BinaryReader reader, IList<WaterMeterData> wmDatasRetrievedSoFar, IList<TestRslt> testRslts)
|
||||
@ -685,8 +694,28 @@ namespace Results.Entities
|
||||
Pruefindex = reader.ReadInt32();
|
||||
HydrPruefung = reader.ReadInt32();
|
||||
WMTypeRevision = reader.ReadInt32();
|
||||
RawTestInfos = null; /// TODO
|
||||
CompleteTestInfos = null; /// TODO
|
||||
|
||||
/// Read RawTestInfos
|
||||
int rawTestInfosCount = reader.ReadInt32();
|
||||
IList<Results.Output.SensusTestInfo> rawTestInfos = new List<Results.Output.SensusTestInfo>();
|
||||
for (int i = 0; i < rawTestInfosCount; i++)
|
||||
{
|
||||
Results.Output.SensusTestInfo ti = new Results.Output.SensusTestInfo();
|
||||
ti.ReadBinary(reader);
|
||||
rawTestInfos.Add(ti);
|
||||
}
|
||||
RawTestInfos = rawTestInfos;
|
||||
|
||||
/// Read CompleteTestInfos
|
||||
int completeTestInfosLen = reader.ReadInt32();
|
||||
Results.Output.SensusTestInfo[] completeTestInfos = new Results.Output.SensusTestInfo[completeTestInfosLen];
|
||||
for (int i = 0; i < completeTestInfosLen; i++)
|
||||
{
|
||||
Results.Output.SensusTestInfo ti = new Results.Output.SensusTestInfo();
|
||||
ti.ReadBinary(reader);
|
||||
completeTestInfos[i] = ti;
|
||||
}
|
||||
CompleteTestInfos = completeTestInfos;
|
||||
#endif
|
||||
ProcessId = reader.ReadInt32();
|
||||
SessionId = reader.ReadInt32();
|
||||
@ -718,8 +747,6 @@ namespace Results.Entities
|
||||
mtr.ReadBinary(reader, testRslts);
|
||||
MeterTestRslts.Add(mtr);
|
||||
}
|
||||
|
||||
/// TODO: lastMeterTestRslts ???
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
///
|
||||
/// Copyright (c) 2018-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace TBF.BenchControl.Output
|
||||
namespace Results.Output
|
||||
{
|
||||
public enum LogType
|
||||
{
|
||||
@ -56,6 +57,8 @@ namespace TBF.BenchControl.Output
|
||||
public double Uncertainty;
|
||||
public string TestMethod;
|
||||
|
||||
public SensusTestInfo() { }
|
||||
|
||||
public SensusTestInfo(string tstName, int pnDB, string qbDB, int pnOpto, string qbOpto, int pnLog, string qbLog, Range range)
|
||||
{
|
||||
TestName = tstName;
|
||||
@ -418,5 +421,41 @@ namespace TBF.BenchControl.Output
|
||||
{
|
||||
return string.Format("{0} DB={1}/'{2}' Opto={3}/'{4}' Log={5}/'{6}'/{7}", TestName, PruefungsNrDB, QBezeichnungDB, PruefungsNrOpto, QBezeichnungOpto, PruefungsNrLog, QBezeichnungLog, Range);
|
||||
}
|
||||
|
||||
public void WriteBinary(BinaryWriter writer)
|
||||
{
|
||||
writer.Write((TestName != null) ? TestName : string.Empty);
|
||||
writer.Write(PruefungsNrDB);
|
||||
writer.Write((QBezeichnungDB != null) ? QBezeichnungDB : string.Empty);
|
||||
writer.Write(PruefungsNrOpto);
|
||||
writer.Write((QBezeichnungOpto != null) ? QBezeichnungOpto : string.Empty);
|
||||
writer.Write(PruefungsNrLog);
|
||||
writer.Write((QBezeichnungLog != null) ? QBezeichnungLog : string.Empty);
|
||||
writer.Write((int)Range);
|
||||
writer.Write(Flow);
|
||||
writer.Write(TestTime);
|
||||
writer.Write(ErrLimLoFromDB);
|
||||
writer.Write(ErrLimHiFromDB);
|
||||
writer.Write(Uncertainty);
|
||||
writer.Write((TestMethod != null) ? TestMethod : string.Empty);
|
||||
}
|
||||
|
||||
public void ReadBinary(BinaryReader reader)
|
||||
{
|
||||
TestName = reader.ReadString();
|
||||
PruefungsNrDB = reader.ReadInt32();
|
||||
QBezeichnungDB = reader.ReadString();
|
||||
PruefungsNrOpto = reader.ReadInt32();
|
||||
QBezeichnungOpto = reader.ReadString();
|
||||
PruefungsNrLog = reader.ReadInt32();
|
||||
QBezeichnungLog = reader.ReadString();
|
||||
Range = (Range)reader.ReadInt32();
|
||||
Flow = reader.ReadDouble();
|
||||
TestTime = reader.ReadInt32();
|
||||
ErrLimLoFromDB = reader.ReadDouble();
|
||||
ErrLimHiFromDB = reader.ReadDouble();
|
||||
Uncertainty = reader.ReadDouble();
|
||||
TestMethod = reader.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.25.1408.0")]
|
||||
[assembly: AssemblyFileVersion("2.25.1408.0")]
|
||||
[assembly: AssemblyVersion("2.25.1409.0")]
|
||||
[assembly: AssemblyFileVersion("2.25.1409.0")]
|
||||
|
||||
@ -165,6 +165,7 @@
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\Zapiska\ZapiskaPrinterCfg.cs" />
|
||||
<Compile Include="Output\SensusTestInfo.cs" />
|
||||
<Compile Include="Output\Table.cs" />
|
||||
<Compile Include="Output\WMChart.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@ -9,6 +9,7 @@ using log4net;
|
||||
using Oracle.DataAccess.Client; // ODP.NET Oracle managed provider
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using Results.Output;
|
||||
using System.Text;
|
||||
|
||||
namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
|
||||
@ -7,6 +7,7 @@ using System.IO;
|
||||
using log4net;
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using Results.Output;
|
||||
|
||||
namespace TBF.BenchControl.Output.FileWriters.IperlLogger
|
||||
{
|
||||
|
||||
@ -29,8 +29,8 @@ namespace TBF.BenchControl.Sequences
|
||||
public static bool IsQ2PreCorrectionCalculated;
|
||||
public static int CalculatedQ2PreCorrectionLR;
|
||||
public static int CalculatedQ2PreCorrectionRL;
|
||||
public static IList<Output.SensusTestInfo> RawTestInfos; /// Incomplete raw test infos from Oracle DB
|
||||
public static Output.SensusTestInfo[] CompleteTestInfos; /// Complete TBF test infos obtained as a best mathch
|
||||
public static IList<Results.Output.SensusTestInfo> RawTestInfos; /// Incomplete raw test infos from Oracle DB
|
||||
public static Results.Output.SensusTestInfo[] CompleteTestInfos; /// Complete TBF test infos obtained as a best mathch
|
||||
|
||||
|
||||
static ProcessData()
|
||||
|
||||
@ -2604,12 +2604,13 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
/// Auxiliary results ... not required
|
||||
|
||||
/// Main results
|
||||
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
|
||||
tstRslt.StartTime = tstRslt.Batch.StartTime;
|
||||
tstRslt.EndTime = endTime;
|
||||
tstRslt.FlowSetTime = 0;
|
||||
tstRslt.Buoyancy = Formulas.Buoyancy();
|
||||
tstRslt.TestTime += testTime; /// [s] total communication time of all tests
|
||||
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
|
||||
tstRslt.TestDone = true;
|
||||
tstRslt.StartTime = tstRslt.Batch.StartTime;
|
||||
tstRslt.EndTime = endTime;
|
||||
tstRslt.FlowSetTime = 0;
|
||||
tstRslt.Buoyancy = Formulas.Buoyancy();
|
||||
tstRslt.TestTime += testTime; /// [s] total communication time of all tests
|
||||
|
||||
for (int i = 0; i < iperlHeads.Count; i++)
|
||||
{
|
||||
|
||||
@ -556,7 +556,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
|
||||
string wmPosition = Name.Substring(5); /// WMPosition is extracted from a component name in form 'iPerl#'
|
||||
if (wmPosition.Length == 1) wmPosition = "0" + wmPosition;
|
||||
|
||||
SensusTestInfo[] testInfos = Sequences.ProcessData.CompleteTestInfos;
|
||||
Results.Output.SensusTestInfo[] testInfos = Sequences.ProcessData.CompleteTestInfos;
|
||||
optoDataLogFileName = null;
|
||||
///
|
||||
if (testInfos != null)
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.25.1408.0")]
|
||||
[assembly: AssemblyFileVersion("2.25.1408.0")]
|
||||
[assembly: AssemblyVersion("2.25.1409.0")]
|
||||
[assembly: AssemblyFileVersion("2.25.1409.0")]
|
||||
|
||||
@ -1032,7 +1032,6 @@
|
||||
<Compile Include="BenchControl\Output\FileWriters\Basic\WriterCfgCtrl.designer.cs">
|
||||
<DependentUpon>WriterCfgCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\Output\SensusTestInfo.cs" />
|
||||
<Compile Include="BenchControl\RegisterReaders\KPackE\DataEntryForRadio\CycleBeginningForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
||||
@ -2614,17 +2614,17 @@ namespace TBF.UI.Procedures
|
||||
double qfrom, qto;
|
||||
switch (ti.Range)
|
||||
{
|
||||
case Range.R90_100:
|
||||
case Results.Output.Range.R90_100:
|
||||
qfrom = 0.9 * ti.Flow;
|
||||
qto = ti.Flow;
|
||||
break;
|
||||
|
||||
case Range.R95_105:
|
||||
case Results.Output.Range.R95_105:
|
||||
qfrom = 0.95 * ti.Flow;
|
||||
qto = 1.05 * ti.Flow;
|
||||
break;
|
||||
|
||||
case Range.R100_110:
|
||||
case Results.Output.Range.R100_110:
|
||||
qfrom = ti.Flow;
|
||||
qto = 1.1 * ti.Flow;
|
||||
break;
|
||||
|
||||
@ -8,6 +8,7 @@ using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Oracle.DataAccess.Client;
|
||||
using Config.Entities;
|
||||
using Results.Output;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.BenchControl.Output;
|
||||
using TBF.BenchControl.Output.DB.SensusOracle;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user