Bug fixes : 1 Saving results cannot be stopped, 2 Processing statistics, 3 SensusTestInfo

This commit is contained in:
Milan Hanajik
2022-01-04 15:30:10 +01:00
parent c8ff5f8813
commit 1133a2d5bf
8 changed files with 43 additions and 12 deletions
+2
View File
@@ -36,6 +36,8 @@ Results/bin/
Results/obj/
ResultsBrowser/bin/
ResultsBrowser/obj/
ResultsParser/bin/
ResultsParser/obj/
SharedDatabase/bin
SharedDatabase/obj
SchematicDrawing/bin
+15 -3
View File
@@ -14,6 +14,7 @@ namespace Results.Output
Just_Q3Q2adjQ1, /// pNrs = -1,3,2,1
Just_Q3Q2adjQ1_Alt, /// pNrs = -1,5,2,1
JustA0A4_Q3Q2adjQ1, /// pNrs = -2,-1,3,2,1 (Australia 169 MHz, raw data pNrs: -2,-1,4,3,2,1)
JustA0A4_Q3Q2Q1, /// pNrs = -2,-1,3,2,1 (Australia 169 MHz smart, raw data pNrs: -2,-1,3,2,1)
DEWA, /// Q4, Q3, Q2adj, Q2, Q1
DEWA_wo_Q2, /// Q4, Q3, Q2adj, Q1
Suez, /// Two directions, with Q2 and Q2ac
@@ -280,6 +281,17 @@ namespace Results.Output
new SensusTestInfo("Q2", 2, "Q2", 2, "02", 2, "Q2", Range.R100_110),
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
case LogType.JustA0A4_Q3Q2Q1: /// Australia 169 MHz with default Q2 corrections and conditional update at the end of cycle
return new SensusTestInfo[]
{
/// TBF Oracle DB Opto RAW LU logfiles
new SensusTestInfo("Qjust_A0", -1, "Just", -1, "-1", -1, "Q-1", Range.R95_105),
new SensusTestInfo("Qjust_A4", -2, "Just", -2, "-2", -2, "Q-2", Range.R95_105),
new SensusTestInfo("Q3", 3, "Q3", 3, "03", 3, "Q3", Range.R90_100),
new SensusTestInfo("Q2", 2, "Q2", 2, "02", 2, "Q2", Range.R100_110),
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
case LogType.DEWA: /// DEWA (with Q4 and Q2 after correction)
return new SensusTestInfo[]
@@ -437,7 +449,7 @@ namespace Results.Output
return new SensusTestInfo[]
{
/// TBF Oracle DB Opto RAW LU logfiles
new SensusTestInfo("Q3", 3, "Q3", 3, "04", 3, "Q3", Range.R90_100),
new SensusTestInfo("Q3", 3, "Q3", 3, "03", 3, "Q3", Range.R90_100),
new SensusTestInfo("Q2", 2, "Q2", 2, "02", 2, "Q2", Range.R100_110),
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
@@ -446,7 +458,7 @@ namespace Results.Output
return new SensusTestInfo[]
{
/// TBF Oracle DB Opto RAW LU logfiles
new SensusTestInfo("Q3", 5, "Q3", 5, "04", 5, "Q3", Range.R90_100),
new SensusTestInfo("Q3", 5, "Q3", 5, "05", 5, "Q3", Range.R90_100),
new SensusTestInfo("Q2", 2, "Q2", 2, "02", 2, "Q2", Range.R100_110),
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
@@ -455,7 +467,7 @@ namespace Results.Output
return new SensusTestInfo[]
{
/// TBF Oracle DB Opto RAW LU logfiles
new SensusTestInfo("Q4", 5, "Q4", 5, "04", 5, "Q4", Range.R90_100),
new SensusTestInfo("Q4", 5, "Q4", 5, "05", 5, "Q4", Range.R90_100),
new SensusTestInfo("Q2", 2, "Q2", 2, "02", 2, "Q2", Range.R100_110),
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
+9
View File
@@ -4002,6 +4002,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Processing statistics.
/// </summary>
internal static string Processing_statistics {
get {
return ResourceManager.GetString("Processing_statistics", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Producer.
/// </summary>
+3
View File
@@ -1701,4 +1701,7 @@
<data name="Do_you_really_want_to_delete_all_codes_Q" xml:space="preserve">
<value>Určitě chcete vymazat všechny kódy ?</value>
</data>
<data name="Processing_statistics" xml:space="preserve">
<value>Spracování statistik</value>
</data>
</root>
+3
View File
@@ -2356,4 +2356,7 @@
<data name="Database_and_water_meters_selection" xml:space="preserve">
<value>Database and water meters selection</value>
</data>
<data name="Processing_statistics" xml:space="preserve">
<value>Processing statistics</value>
</data>
</root>
+7 -7
View File
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using log4net;
using NHibernate;
using Common;
@@ -1331,18 +1332,14 @@ namespace TBF.Rig.Sequences
}
}
}
savingAndPrintingRslts.AddOperation(checkUiOp)
.EnterState();
savingAndPrintingRslts.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.Error)) goto error;
if (e.Contains(Event.UiCmdStop)) goto stop;
}
while (e.Contains(Event.Busy));
///
bool resultsSent = !e.Contains(Event.ErrorProcessingResults);
ProcessData.BatchRslts.Batch.RsltsSent = resultsSent;
ProcessData.BatchRslts.Batch.RsltsSent = !e.Contains(Event.ErrorProcessingResults);
///
/// Save results to 'Results' MySQL database
@@ -1352,7 +1349,8 @@ namespace TBF.Rig.Sequences
///
/// Save results to 'summary results' logger
///
foreach (var tr in ProcessData.BatchRslts.Batch.TestRslts)
log.WarnFormat("Saving SummaryResults of batch {0}", ProcessData.BatchRslts.Batch.BatchNr);
foreach (var tr in ProcessData.BatchRslts.Batch.TestRslts)
{
summaryResults.Info(TestResult2CsvLine(tr));
}
@@ -1381,6 +1379,8 @@ namespace TBF.Rig.Sequences
///
if (ProcessData.StatisticsMonitoringComp is IStatisticsMonitoring)
{
Bridge.OnActivity(this, Strings.Processing_statistics);
State.Create("MainSeq : Processing statistics")
.AddOperation((ProcessData.StatisticsMonitoringComp as IStatisticsMonitoring).ProcessStatisticsOp(ProcessData.BatchRslts.Batch.BatchNr))
.AddOperation(checkUiOp)
@@ -27,12 +27,12 @@ namespace TBF.Rig.Various.StatisticsMonitoring
: base(cfg)
{
statisticsCfg = cfg as StatisticsCfg;
log.Warn(this.ToString());
}
public override void Initialize()
{
ApplyConfig();
log.FatalFormat("{0} initialized: {1}", Name, this);
}
void ApplyConfig()
@@ -130,7 +130,7 @@ namespace TBF.Rig.Various.StatisticsMonitoring
{
usagesMin = 0;
IList<Results.Entities.Batch> batches = session.QueryOver<Results.Entities.Batch>()
.Where(x => x.Id == batchNr)
.Where(x => x.BatchNr == batchNr)
.List();
batchNr--;
if (batches.Count != 1 || batches[0].TestRslts.Count < 1 || batches[0].TestRslts[0].MethodClass != "TestMethods.iPerlCommunication")
+2
View File
@@ -40,6 +40,8 @@ rmdir /s /q Results\bin
rmdir /s /q Results\obj
rmdir /s /q ResultsBrowser\bin
rmdir /s /q ResultsBrowser\obj
rmdir /s /q ResultsParser\bin
rmdir /s /q ResultsParser\obj
rmdir /s /q SharedDatabase\bin
rmdir /s /q SharedDatabase\obj
rmdir /s /q SchematicDrawing\bin