Compare commits

...
49 changed files with 563 additions and 282 deletions
+2
View File
@@ -24,6 +24,8 @@ GraphLib/bin
GraphLib/obj
TracingDB/bin
TracingDB/obj
ResetBatchNr/bin
ResetBatchNr/obj
RestClient/bin
RestClient/obj
Results/bin/
+2 -2
View File
@@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -30,7 +30,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
+14 -10
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2016-2018 Sensus Slovensko a.s.
/// Copyright (c) 2016-2020 Sensus Slovensko a.s.
///
using System;
using System.Reflection;
@@ -27,14 +27,14 @@ namespace Config
[Description("m3/h")] m3ph, /// * 1 m3/h = 1000 l/h
[Description("g")] g, /// 0.001 kg
[Description("lb")] lb, /// 0.45359237 kg
[Description("kg")] kg, /// * 1 kilogram
[Description("t")] t, /// 1000 kg
[Description("lb")] lb, /// 0.45359237 kg
[Description("ms")] ms, /// 1 ms = 0.001 s
[Description("s")] s, /// * 1 second
[Description("min")] min, /// 1 min = 60 s
[Description("hr")] hour, /// 1 hour = 60 min = 3600 s
[Description("ms")] ms, /// 1 ms = 0.001 s
[Description("°C")] C, /// * degree Celsius (°C)
[Description("°F")] F, /// degree Fahrenheit
@@ -42,11 +42,12 @@ namespace Config
[Description("Pa")] Pa, /// 1 Pa = 0.01 hPa
[Description("hPa")] hPa, /// 1 hPa = 100 Pa
[Description("kPa")] kPa, /// 1 kPa = 10 HPa
[Description("MPa")] MPa, /// 1 MPa = 10000 hPa
[Description("mbar")] mbar, /// 1 mbar = 1 hPa = 100 Pa
[Description("bar")] bar, /// * 1 Bar = 1000 mbar = 0.1 MPa = 100000 Pa
[Description("kPa")] kPa, /// 1 kPa = 10 hPa = 10000 Pa
[Description("inHg")] inHg, /// 1 inHg = 33.864 hPa
[Description("psi")] psi, /// 1 psi = 0.0689475729 bar
[Description("bar")] bar, /// * 1 Bar = 1000 mbar = 0.1 MPa = 100000 Pa
[Description("MPa")] MPa, /// 1 MPa = 10000 hPa
[Description("R%")] RPct, /// * 1 R%
@@ -272,10 +273,11 @@ namespace Config
case Unit.hPa:
case Unit.mbar:
case Unit.kPa:
case Unit.inHg:
case Unit.psi:
case Unit.bar:
case Unit.MPa:
case Unit.inHg:
return Config.Quantity.Pressure;
return Config.Quantity.Pressure;
case Unit.RPct:
return Config.Quantity.Humidity;
@@ -379,9 +381,10 @@ namespace Config
case Unit.hPa: return 1000 * v; /// 1 hPa = 100 Pa
case Unit.mbar: return 1000 * v; /// 1 mbar = 1 hPa = 100 Pa
case Unit.kPa: return 100 * v; /// 1 kPa = 10 HPa
case Unit.inHg: return 29.53 * v; /// 1 inHg =
case Unit.psi: return 14.50377378 * v; /// 1 psi =
case Unit.bar: return v; /// 1 bar = 1000 mbar = 100000 Pa
case Unit.MPa: return 0.1 * v; /// 1 MPa = 10000 hPa
case Unit.inHg: return 29.53 * v; /// 1 inHg = 33.864 hPa
/// Error: internal representation in %
case Unit.Pct: return v; /// 1 %
@@ -452,9 +455,10 @@ namespace Config
case Unit.hPa: return 0.001 * v; /// 1 hPa = 100 Pa
case Unit.mbar: return 0.001 * v; /// 1 mbar = 1 hPa = 100 Pa
case Unit.kPa: return 0.01 * v; /// 1 kPa = 10 HPa
case Unit.inHg: return 0.033864 * v; /// 1 inHg = 33.864 hPa
case Unit.psi: return 0.0689475729 * v;/// 1 psi = 0.0689475729 bar
case Unit.bar: return v; /// 1 bar = 1000 mbar = 100000 Pa
case Unit.MPa: return 10 * v; /// 1 MPa = 10000 hPa
case Unit.inHg: return 0.033864 * v; /// 1 inHg = 33.864 hPa
/// Error: internal representation in %
case Unit.Pct: return v; /// 1 %
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
+46
View File
@@ -0,0 +1,46 @@
using System;
using System.IO;
using TBF;
namespace ResetBatchNr
{
class Program
{
static LocalSettings ls;
static void Main(string[] args)
{
if (!Directory.Exists(TBF.Program.ConfigDir)) return;
Environment.CurrentDirectory = TBF.Program.ConfigDir;
ls = LocalSettings.Load(TBF.Program.LocalSettingsFileName);
if (ls == null || ls.TestBenches == null)
{
/// Loading local seetings from regular config file failed. Use the backup
ls = LocalSettings.Load(TBF.Program.LocalSettingsBackupName);
if (ls == null || ls.TestBenches == null)
{
/// Neither config.xml, nor config.backup.xml could be loaded
Console.WriteLine(string.Format("Could not load file {0}, nor {1}.", TBF.Program.LocalSettingsFileName, TBF.Program.LocalSettingsBackupName));
Console.ReadLine();
return;
}
}
else
{
/// Loading local seetings from the regular config file was successful. Update the backup
File.Copy(TBF.Program.LocalSettingsFileName, TBF.Program.LocalSettingsBackupName, true);
}
///
/// Process local settings so that windows are shifted to the 1st monitor
///
ls.BatchNr = 1;
ls.Save();
Console.WriteLine("BatchNr was reset to 1");
Console.ReadLine();
return;
}
}
}
+36
View File
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ResetBatchNr")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ResetBatchNr")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("de8130eb-2f43-46a6-9f5b-bf96432a0c7c")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+72
View File
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D7F5A111-B2DF-4761-9574-AB730DF573A6}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ResetBatchNr</RootNamespace>
<AssemblyName>ResetBatchNr</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Config\Config.csproj">
<Project>{743df7db-c7b6-42eb-986d-0f485e5588e4}</Project>
<Name>Config</Name>
</ProjectReference>
<ProjectReference Include="..\TBF\TBF.csproj">
<Project>{8648fd92-cda1-4c3a-b5f9-fe547ce1fa48}</Project>
<Name>TBF</Name>
</ProjectReference>
<ProjectReference Include="..\Users\Users.csproj">
<Project>{6e5cb0e9-e1b6-4e5d-ac6e-b1049e180f2b}</Project>
<Name>Users</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
+5 -4
View File
@@ -66,13 +66,13 @@ namespace Results
switch (dbType)
{
default:
case Users.Entities.DBType.SQLite:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
break;
case Users.Entities.DBType.MySql:
cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString));
break;
}
case Users.Entities.DBType.SQLite:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
break;
}
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Entities.WaterMeterData>());
@@ -311,6 +311,7 @@ namespace Results
batch.TestRslts = session.QueryOver<TestRslt>()
.Where(x => (x.Batch.Id == batch.Id))
.List();
batch.WaterMeters = session.QueryOver<WaterMeter>()
.Where(x => (x.Batch.Id == batch.Id))
.List();
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@@ -29,7 +29,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
+16 -16
View File
@@ -210,22 +210,22 @@ namespace Results
///
/// Flow
///
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_from, string.Format("{0} {1}", Strings.VName_Flow, Strings.from), Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).Qfrom())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_to, string.Format("{0} {1}", Strings.VName_Flow, Strings.to), Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).Qto())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow, string.Format("{0} v r", Strings.VName_Flow), Strings.Tooltip_Q_v_r, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowVolume)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_mean, string.Format("{0} rim ()", Strings.VName_Flow), Strings.Tooltip_Q_rim, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_min, string.Format("{0} ref min ()", Strings.VName_Flow), Strings.Tooltip_Q_min, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMin)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_max, string.Format("{0} ref max ()", Strings.VName_Flow), Strings.Tooltip_Q_max, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMax)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_start, string.Format("{0} ref start ()",Strings.VName_Flow),Strings.Tooltip_Q_start, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowStart)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_end, string.Format("{0} ref end ()", Strings.VName_Flow), Strings.Tooltip_Q_end, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Qc, string.Format("Qc"), "Calculated water meter flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V5", (w.GetMeterTestRslt(t).TestTime == 0 || w.GetTestRslt(t).PulsesMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV / w.GetMeterTestRslt(t).TestTime * 3.6 * w.GetMeterTestRslt(t).PulsesMaster / w.GetTestRslt(t).PulsesMaster)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv, string.Format("{0} ctv ()", Strings.VName_Flow), "CTV of the flow (mean val.)", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V5", (w.GetMeterTestRslt(t).TestTime == 0 || w.GetTestRslt(t).PulsesMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV / w.GetMeterTestRslt(t).TestTime * 3.6 * w.GetMeterTestRslt(t).PulsesMaster / w.GetTestRslt(t).PulsesMaster)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_min, string.Format("{0} ctv min ()", Strings.VName_Flow), "Min. CTV of the flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).VolumeMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV * w.GetTestRslt(t).FlowMin / w.GetTestRslt(t).VolumeMaster)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_max, string.Format("{0} ctv max ()", Strings.VName_Flow), "Max. CTV of the flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).VolumeMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV * w.GetTestRslt(t).FlowMax / w.GetTestRslt(t).VolumeMaster)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_start, string.Format("{0} ctv start ()", Strings.VName_Flow), "Start flow CTV", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).VolumeMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV * w.GetTestRslt(t).FlowStart / w.GetTestRslt(t).VolumeMaster)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_end, string.Format("{0} ctv end ()", Strings.VName_Flow), "End flow CTV", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).VolumeMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV * w.GetTestRslt(t).FlowEnd / w.GetTestRslt(t).VolumeMaster)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_rise, string.Format("{0} {1}", Strings.VName_Flow, Strings.rise), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QRise == 0) ? "-" : FormatDbl(u, f, p, "V3", w.QRise)) : ""));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_fall, string.Format("{0} {1}", Strings.VName_Flow, Strings.fall), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QFall == 0) ? "-" : FormatDbl(u, f, p, "V3", w.QFall)) : ""));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_from, string.Format("{0} {1}", Strings.VName_Flow, Strings.from), Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).Qfrom())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_to, string.Format("{0} {1}", Strings.VName_Flow, Strings.to), Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).Qto())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow, string.Format("{0} v r", Strings.VName_Flow), Strings.Tooltip_Q_v_r, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowVolume)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_mean, string.Format("{0} rim ()", Strings.VName_Flow), Strings.Tooltip_Q_rim, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_min, string.Format("{0} ref min ()", Strings.VName_Flow), Strings.Tooltip_Q_min, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMin)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_max, string.Format("{0} ref max ()", Strings.VName_Flow), Strings.Tooltip_Q_max, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMax)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_start, string.Format("{0} ref start ()",Strings.VName_Flow),Strings.Tooltip_Q_start, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowStart)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_end, string.Format("{0} ref end ()", Strings.VName_Flow), Strings.Tooltip_Q_end, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Qc, string.Format("Qc"), "Calculated water meter flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V5", w.GetTestRslt(t).FlowVolume)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv, string.Format("{0} ctv ()", Strings.VName_Flow), "CTV of the flow (mean val.)", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V5", w.GetTestRslt(t).FlowVolume)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_min, string.Format("{0} ctv min ()", Strings.VName_Flow), "Min. CTV of the flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).FlowMean == 0) ? w.GetTestRslt(t).FlowMin : w.GetTestRslt(t).FlowVolume * w.GetTestRslt(t).FlowMin / w.GetTestRslt(t).FlowMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_max, string.Format("{0} ctv max ()", Strings.VName_Flow), "Max. CTV of the flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).FlowMean == 0) ? w.GetTestRslt(t).FlowMax : w.GetTestRslt(t).FlowVolume * w.GetTestRslt(t).FlowMax / w.GetTestRslt(t).FlowMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_start, string.Format("{0} ctv start ()", Strings.VName_Flow), "Start flow CTV", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).FlowMean == 0) ? w.GetTestRslt(t).FlowStart : w.GetTestRslt(t).FlowVolume * w.GetTestRslt(t).FlowStart / w.GetTestRslt(t).FlowMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_end, string.Format("{0} ctv end ()", Strings.VName_Flow), "End flow CTV", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).FlowMean == 0) ? w.GetTestRslt(t).FlowEnd : w.GetTestRslt(t).FlowVolume * w.GetTestRslt(t).FlowEnd / w.GetTestRslt(t).FlowMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_rise, string.Format("{0} {1}", Strings.VName_Flow, Strings.rise), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QRise == 0) ? "-" : FormatDbl(u, f, p, "V3", w.QRise)) : ""));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_fall, string.Format("{0} {1}", Strings.VName_Flow, Strings.fall), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QFall == 0) ? "-" : FormatDbl(u, f, p, "V3", w.QFall)) : ""));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_sensitivity, string.Format("{0} {1}", Strings.VName_Flow, Strings.sensitivity), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QRise == 0) ? "-" : FormatDbl(u, f, p, "V3", w.QRise)) : ""));
AllItems.Add(new WMeterRsltItemSpec(ItemID.ConstMaster, string.Format("k MID ()"), "Const. of the reference flow meter", Quantity.PulsePerLtr, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", ((w.GetTestRslt(t).ConstMaster < float.Epsilon) ? 0 : (1 / w.GetTestRslt(t).ConstMaster)))));
+1
View File
@@ -14,6 +14,7 @@ namespace ResultsBrowser
ListOfSerialNumbers,
WZTypeIdAndTimePeriod,
ProducedWithinTimePeriod,
BenchAndBatchNr,
Count,
}
@@ -39,6 +39,7 @@ namespace ResultsBrowser.Forms
//queryTypeComboBox.Items.Add(new CQSelectionItem(CQCriteria.ListOfSerialNumbers, "Všetky vodomery so sériovými číslami podľa zadaného zoznamu"));
queryTypeComboBox.Items.Add(new CQSelectionItem(CQCriteria.WZTypeIdAndTimePeriod, "Všetky vodomery so zadaným WZTypeID vyrobené v zadanom časovom období"));
queryTypeComboBox.Items.Add(new CQSelectionItem(CQCriteria.ProducedWithinTimePeriod, "Všetky vodomery vyrobené v zadanom časovom období"));
queryTypeComboBox.Items.Add(new CQSelectionItem(CQCriteria.BenchAndBatchNr, "Stanica a číslo dávky"));
queryTypeComboBox.Text = "Všetky vodomery vyrobené v zadanom časovom období";
destinationFileTextBox.Text = string.Format("vysledky_hladania_{0:ddMMyyyy_HHmm}.csv", DateTime.Now);
@@ -68,7 +69,8 @@ namespace ResultsBrowser.Forms
/// Update UI elements visibility
inputListGroupBox.Enabled = (CQCriteria == CQCriteria.ListOfOrders) ||
(CQCriteria == CQCriteria.ListOfPcbNumbers) ||
(CQCriteria == CQCriteria.ListOfSerialNumbers);
(CQCriteria == CQCriteria.ListOfSerialNumbers) ||
(CQCriteria == CQCriteria.BenchAndBatchNr);
timePeriodGroupBox.Enabled = (CQCriteria == CQCriteria.WZTypeIdAndTimePeriod) ||
(CQCriteria == CQCriteria.ProducedWithinTimePeriod);
@@ -78,6 +80,11 @@ namespace ResultsBrowser.Forms
parameterGroupBox.Enabled = true;
parameterNameLabel.Text = "WZ Type ID";
}
else if (CQCriteria == CQCriteria.BenchAndBatchNr)
{
parameterGroupBox.Enabled = true;
parameterNameLabel.Text = "Test bench number (e.g. 10 for WR10)";
}
else
{
parameterGroupBox.Enabled = false;
+3 -3
View File
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Sensus")]
[assembly: AssemblyProduct("ResultsBrowser")]
[assembly: AssemblyCopyright("Copyright © 2015 - 2018 Sensus Slovensko a.s.")]
[assembly: AssemblyCopyright("Copyright © 2015 - 2020 Sensus Slovensko a.s.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -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.1440.0")]
[assembly: AssemblyFileVersion("2.25.1440.0")]
[assembly: AssemblyVersion("2.26.1496.0")]
[assembly: AssemblyFileVersion("2.26.1496.0")]
+2 -2
View File
@@ -21,7 +21,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -32,7 +32,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
+168 -105
View File
@@ -28,8 +28,8 @@ namespace ResultsBrowser
IList<WaterMeter> waterMeters;
DateTime timePeriodStart;
DateTime timePeriodEnd;
DateTime timePeriodStart;
DateTime timePeriodEnd;
static IList<IComponent> tbfComponents;
static IList<IDevice> tbfDevices;
@@ -47,9 +47,9 @@ namespace ResultsBrowser
tbfComponents = new List<TBF.BenchControl.Generic.IComponent>();
tbfDevices = new List<IDevice>();
timePeriodStart = new DateTime(0);
timePeriodEnd = new DateTime(0);
}
timePeriodStart = new DateTime(0);
timePeriodEnd = new DateTime(0);
}
private void ResultsBrowserWnd_Load(object sender, EventArgs e)
{
@@ -102,15 +102,15 @@ namespace ResultsBrowser
checkBox6.Visible = !string.IsNullOrEmpty(checkBox6.Text);
}
string BenchName()
{
return checkBox1.Checked ? Program.LocalSettings.Bench1
: checkBox2.Checked ? Program.LocalSettings.Bench2
: checkBox3.Checked ? Program.LocalSettings.Bench3
: checkBox4.Checked ? Program.LocalSettings.Bench4
string BenchName()
{
return checkBox1.Checked ? Program.LocalSettings.Bench1
: checkBox2.Checked ? Program.LocalSettings.Bench2
: checkBox3.Checked ? Program.LocalSettings.Bench3
: checkBox4.Checked ? Program.LocalSettings.Bench4
: checkBox5.Checked ? Program.LocalSettings.Bench5
: Program.LocalSettings.Bench6;
}
}
void Localize()
{
@@ -118,19 +118,19 @@ namespace ResultsBrowser
resultsGroupBox.Text = Strings.Query_results;
settingsBtn.Text = Strings.Settings;
testBenchesGroupBox.Text = Strings.Test_benches;
clearFiltersBtn.Text = Strings.Clear_filters;
clearFiltersBtn.Text = Strings.Clear_filters;
addFilterBtn.Text = Strings.Add_filter;
formatOfResultsBtn.Text = Strings.Format_of_results;
printerConfigBtn.Text = Strings.Configure_printer;
loadConfigBtn.Text = Strings.Load_filters;
formatOfResultsBtn.Text = Strings.Format_of_results;
printerConfigBtn.Text = Strings.Configure_printer;
loadConfigBtn.Text = Strings.Load_filters;
saveConfigBtn.Text = Strings.Save_filters;
executeQueryBtn.Text = Strings.Execute_query;
executeQueryBtn.Text = Strings.Execute_query;
exportQueryResultsBtn.Text = Strings.Export_query_results;
printQueryResultsBtn.Text = Strings.Print_query_results;
statisticsBtn.Text = Strings.Statistics;
statisticsBtn.Text = Strings.Statistics;
}
private void settingsBtn_Click(object sender, EventArgs e)
@@ -176,40 +176,40 @@ namespace ResultsBrowser
}
}
private void formatOfResultsBtn_Click(object sender, EventArgs e)
{
Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg();
dlg.MetersKind = Config.Entities.MetersKind.Single;
dlg.SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(filtersConfig.ResultItems);
private void formatOfResultsBtn_Click(object sender, EventArgs e)
{
Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg();
dlg.MetersKind = Config.Entities.MetersKind.Single;
dlg.SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(filtersConfig.ResultItems);
if (dlg.ShowDialog() == DialogResult.OK)
{
filtersConfig.ResultItems = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems);
RedrawResults();
}
}
if (dlg.ShowDialog() == DialogResult.OK)
{
filtersConfig.ResultItems = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems);
RedrawResults();
}
}
private void printerConfigBtn_Click(object sender, EventArgs e)
{
Forms.PrinterConfigDlg dlg = new Forms.PrinterConfigDlg
{
PrinterClass = filtersConfig.PrinterClass,
PrinterCfg = filtersConfig.PrinterCfg
};
private void printerConfigBtn_Click(object sender, EventArgs e)
{
Forms.PrinterConfigDlg dlg = new Forms.PrinterConfigDlg
{
PrinterClass = filtersConfig.PrinterClass,
PrinterCfg = filtersConfig.PrinterCfg
};
if (dlg.ShowDialog() == DialogResult.OK)
{
filtersConfig.PrinterClass = dlg.PrinterClass;
filtersConfig.PrinterCfg = dlg.PrinterCfg;
}
}
if (dlg.ShowDialog() == DialogResult.OK)
{
filtersConfig.PrinterClass = dlg.PrinterClass;
filtersConfig.PrinterCfg = dlg.PrinterCfg;
}
}
private void loadConfigBtn_Click(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = string.Format("{0} (*.qry)|*.qry|{1} (*.*)|*.*", Strings.Query_files, Strings.All_files);
if (dlg.ShowDialog() == DialogResult.OK)
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = string.Format("{0} (*.qry)|*.qry|{1} (*.*)|*.*", Strings.Query_files, Strings.All_files);
if (dlg.ShowDialog() == DialogResult.OK)
{
LoadConfigFromFile(dlg.FileName);
}
}
@@ -269,8 +269,8 @@ namespace ResultsBrowser
private void executeQueryBtn_Click(object sender, EventArgs e)
{
timePeriodStart = new DateTime(0);
timePeriodEnd = new DateTime(0);
timePeriodStart = new DateTime(0);
timePeriodEnd = new DateTime(0);
try
{
@@ -291,11 +291,11 @@ namespace ResultsBrowser
foreach (var filter in filters)
{
if (filter is DateFilter)
{
timePeriodStart = (filter as DateFilter).From;
timePeriodEnd = (filter as DateFilter).To;
}
if (filter is DateFilter)
{
timePeriodStart = (filter as DateFilter).From;
timePeriodEnd = (filter as DateFilter).To;
}
waterMeters2 = filter.ExecuteQuery(sessions, waterMeters);
waterMeters = waterMeters2;
}
@@ -364,10 +364,10 @@ namespace ResultsBrowser
if (dlg.ShowDialog() == DialogResult.OK)
{
try
{
using (TextWriter writer = new StreamWriter(dlg.FileName, false, System.Text.Encoding.UTF8))
{
try
{
using (TextWriter writer = new StreamWriter(dlg.FileName, false, System.Text.Encoding.UTF8))
{
for (int i = 0; i < items.Count; i++)
{
writer.Write(items[i].Caption);
@@ -397,10 +397,10 @@ namespace ResultsBrowser
}
}
}
catch (Exception exc)
{
catch (Exception exc)
{
MessageBox.Show(exc.Message, Strings.Error_exporting_results, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
}
@@ -448,11 +448,11 @@ namespace ResultsBrowser
IComponent component = printerFactory.GetComponent(printerCfg, tbfComponents);
IResultsPrinter printer = component as IResultsPrinter;
if (printer== null)
if (printer == null)
{
MessageBox.Show(Strings.No_printer_defined);
return;
}
}
tbfComponents.Clear();
tbfDevices.Clear();
@@ -493,7 +493,7 @@ namespace ResultsBrowser
{
if (waterMeters == null || waterMeters.Count == 0) return;
IList<Results.WMeterRsltItemSpec> items = Results.WMeterRsltItemSpec.FromStrArray(filtersConfig.ResultItems);
IList<Results.WMeterRsltItemSpec> items = Results.WMeterRsltItemSpec.FromStrArray(filtersConfig.ResultItems);
///
/// Statistics options
@@ -529,24 +529,24 @@ namespace ResultsBrowser
}
/// <summary>
/// Updates component factory
/// </summary>
/// <param name="className">Component class name</param>
/// <param name="factory">Reference to a factory</param>
/// <returns>true when factory changed</returns>
IComponentFactory GetFactory(string className)
{
if (!string.IsNullOrEmpty(className))
{
foreach (var fac in TbfComponents.Factories)
{
if (fac.ClassName == className) return fac;
}
}
/// <summary>
/// Updates component factory
/// </summary>
/// <param name="className">Component class name</param>
/// <param name="factory">Reference to a factory</param>
/// <returns>true when factory changed</returns>
IComponentFactory GetFactory(string className)
{
if (!string.IsNullOrEmpty(className))
{
foreach (var fac in TbfComponents.Factories)
{
if (fac.ClassName == className) return fac;
}
}
return null;
}
return null;
}
private void customQueryButton_Click(object sender, EventArgs e)
{
@@ -639,7 +639,6 @@ namespace ResultsBrowser
return;
}
/// Add this test bench to the list of test benches if it was still missing
if (!testBenches.Contains(testBenchId)) testBenches.Add(testBenchId);
}
@@ -734,20 +733,11 @@ namespace ResultsBrowser
/// SUEZ specific
switch (testId)
{
case -2:
oraD.AdjErrA4 = error;
break;
case -1:
oraD.AdjErr = error;
break;
case 5:
oraD.Q3LrErr = error;
break;
case 10:
oraD.Q3RlErr = error;
break;
default:
break;
case -2: oraD.AdjErrA4 = error; break;
case -1: oraD.AdjErr = error; break;
case 5: oraD.Q3LrErr = error; break;
case 10: oraD.Q3RlErr = error; break;
default: break;
}
}
dr.Close();
@@ -756,6 +746,78 @@ namespace ResultsBrowser
oracleConnection.Close();
}
else if (dlg.CQCriteria == CQCriteria.BenchAndBatchNr)
{
switch (dlg.IntParameter)
{
case 10: Results.DB.ConnectionString = "SERVER=10.42.130.69; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 11: Results.DB.ConnectionString = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 13: Results.DB.ConnectionString = "SERVER=10.42.130.52; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 15: Results.DB.ConnectionString = "SERVER=10.42.130.71; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 14: Results.DB.ConnectionString = "SERVER=10.42.130.72; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 18: Results.DB.ConnectionString = "SERVER=10.42.130.165; DATABASE=st-wr18-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 19: Results.DB.ConnectionString = "SERVER=10.42.128.159; DATABASE=st-wr19-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 20: Results.DB.ConnectionString = "SERVER=10.42.130.76; DATABASE=st-wr20-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 21: Results.DB.ConnectionString = "SERVER=10.42.128.201; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
default: Results.DB.ConnectionString = string.Empty; break;
}
Results.DB.DbType = Users.Entities.DBType.MySql;
string[] fields = dlg.InputList.Split(new char[] { ',' });
int[] batchNrs = new int[fields.Length];
int batchNr;
for (int i = 0; i < batchNrs.Length; i++) if (int.TryParse(fields[i], out batchNr)) batchNrs[i] = batchNr;
IList<WaterMeter> waterMeters = new List<WaterMeter>();
if (!string.IsNullOrEmpty(Results.DB.ConnectionString))
{
ISession session = Results.DB.CreateSession();
for (int i = 0; i < batchNrs.Length; i++)
{
var batches = session.QueryOver<Batch>()
.Where(x => (x.BatchNr == batchNrs[i]))
.List();
if (batches.Count == 1)
{
var wms = session.QueryOver<WaterMeter>()
.Where(x => (x.Batch == batches[0]))
.List();
foreach (var wm in wms) waterMeters.Add(wm);
}
}
}
consoleTextBox.Text += "Collecting water meters\r\n";
foreach (var waterMeter in waterMeters)
{
oracleConnection = new OracleConnection("Data Source=STARA01.WORLD;User Id=deltachef;Password=deltachef;");
oracleConnection.Open();
OracleCommand cmd = new OracleCommand("select AUFTRAGSNUMMER, MAX_PRUEFINDEX, PREFIX, ZAEHLERNUMMER from VT_ZAEHLER_PD where VT_FERNUM = :1 AND ANBID = 4 order by ZAEHLERNUMMER", oracleConnection);
cmd.Parameters.Add(new OracleParameter { ParameterName = "1", OracleDbType = OracleDbType.Varchar2, Value = waterMeter.SerialNr });
OracleDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
int i = 0;
string queryResult = dr.GetString(i++);
int maxPruefIx = dr.GetInt32(i++);
int testBenchId = maxPruefIx / 100;
maxPruefIx = maxPruefIx % 100;
string prefix = dr.GetString(i++);
int sn = dr.GetInt32(i++);
if (sn == -1) continue;
/// Create 'OraData' object and add it to 'oraDatas' list
oraDatas.Add(new OraData() { PO = queryResult, PcbNr = waterMeter.SerialNr, TestBenchId = testBenchId, MaxPruefIx = maxPruefIx, Prefix = prefix, SN = sn });
/// Add this test bench to the list of test benches if it was still missing
if (!testBenches.Contains(testBenchId)) testBenches.Add(testBenchId);
}
}
}
else if (dlg.CQCriteria == CQCriteria.WZTypeIdAndTimePeriod)
{
}
@@ -795,18 +857,19 @@ namespace ResultsBrowser
/// Test bench databases
switch (testBenchId)
{
case 5: Results.DB.ConnectionString = "SERVER=10.42.130.69; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 6: Results.DB.ConnectionString = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 8: Results.DB.ConnectionString = "SERVER=10.42.128.61; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 9: Results.DB.ConnectionString = "SERVER=10.42.130.71; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 10: Results.DB.ConnectionString = "SERVER=10.42.130.72; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 5: Results.DB.ConnectionString = "SERVER=10.42.130.69; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 6: Results.DB.ConnectionString = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 8: Results.DB.ConnectionString = "SERVER=10.42.130.52; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 9: Results.DB.ConnectionString = "SERVER=10.42.130.71; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 10: Results.DB.ConnectionString = "SERVER=10.42.130.72; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 11: Results.DB.ConnectionString = "SERVER=10.42.130.165; DATABASE=st-wr18-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 12: Results.DB.ConnectionString = "SERVER=10.42.128.159; DATABASE=st-wr19-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 13: Results.DB.ConnectionString = "SERVER=10.42.130.76; DATABASE=st-wr20-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 13: Results.DB.ConnectionString = "SERVER=10.42.130.76; DATABASE=st-wr20-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 14: Results.DB.ConnectionString = "SERVER=10.42.128.201; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
default: Results.DB.ConnectionString = string.Empty; break;
}
#endif
Results.DB.DbType = Users.Entities.DBType.MySql;
if (!string.IsNullOrEmpty(Results.DB.ConnectionString))
{
@@ -854,7 +917,7 @@ namespace ResultsBrowser
consoleTextBox.Text += Environment.NewLine;
if (session != null) session.Close();
}
}
}
consoleTextBox.Text += "End reading additional data from MySQL\r\n";
+12
View File
@@ -69,6 +69,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataStreamInterface", "DataStreamInterface\DataStreamInterface.csproj", "{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResetBatchNr", "ResetBatchNr\ResetBatchNr.csproj", "{D7F5A111-B2DF-4761-9574-AB730DF573A6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -303,6 +305,16 @@ Global
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}.Release|x86.ActiveCfg = Release|Any CPU
{D7F5A111-B2DF-4761-9574-AB730DF573A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7F5A111-B2DF-4761-9574-AB730DF573A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7F5A111-B2DF-4761-9574-AB730DF573A6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{D7F5A111-B2DF-4761-9574-AB730DF573A6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{D7F5A111-B2DF-4761-9574-AB730DF573A6}.Debug|x86.ActiveCfg = Debug|Any CPU
{D7F5A111-B2DF-4761-9574-AB730DF573A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7F5A111-B2DF-4761-9574-AB730DF573A6}.Release|Any CPU.Build.0 = Release|Any CPU
{D7F5A111-B2DF-4761-9574-AB730DF573A6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{D7F5A111-B2DF-4761-9574-AB730DF573A6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{D7F5A111-B2DF-4761-9574-AB730DF573A6}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+1 -1
View File
@@ -590,7 +590,7 @@ namespace TBF.BenchControl.Sequences
{
ISequenceCondition seqCondition = TbfComponents.FindComponent(fields[0]) as ISequenceCondition;
int condID;
if (int.TryParse(fields[1], out condID))
if ((seqCondition != null) && int.TryParse(fields[1], out condID))
{
conditionOperation = seqCondition.ConditionOp(condID);
}
@@ -411,20 +411,21 @@ namespace TBF.BenchControl.TestMethods.Adjustment
tstRslt.MassEndRaw = 0;
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
double flow = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = tstRslt.ConstMasterCorr; /// Corrected master pulses per liter
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]
tstRslt.ErrorMaster = 0.0f; /// Cannot be determined without the collected water mass measurement
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = tstRslt.ConstMasterCorr; /// Corrected master pulses per liter
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]
tstRslt.ErrorMaster = 0.0f; /// Cannot be determined without the collected water mass measurement
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = 0;
tstRslt.DiverterEnd = 0;
@@ -523,7 +524,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -682,27 +682,28 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * cBrd.EtPulses(0) / tstRslt.TestTime; /// [m3/h]
double flow = 3.6 * LtrPerRefPulse * cBrd.EtPulses(0) / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.DensityLine; /// [l] commercially true volume
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(flow);
tstRslt.VolumeCTV *= tstRslt.TestTime + tstRslt.TestTimeCorrection;
tstRslt.VolumeCTV /= tstRslt.TestTime;
}
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
/// Calculated master pulses per liter
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
@@ -814,7 +814,6 @@ namespace TBF.BenchControl.TestMethods.FixedStart
tstRslt.MassEndRaw = 0;
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0;
tstRslt.FlowVolume = flowVolume; /// [m3/h]
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
@@ -823,11 +822,12 @@ namespace TBF.BenchControl.TestMethods.FixedStart
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]
tstRslt.ErrorMaster = 0;
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
@@ -1042,7 +1042,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart
do
{
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -686,7 +686,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -800,7 +800,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
tstRslt.MassEndRaw = 0;
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0;
tstRslt.FlowVolume = flowVolume; /// [m3/h]
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
tstRslt.VolumeCTV = volumeCTV; /// [l] 1000.0f is because density is in [kg/m3]
@@ -810,11 +809,12 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
/// Calculated master pulses per liter
tstRslt.ErrorMaster = 0;
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
@@ -855,7 +855,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } /// TODO: this is an endless loop !!!
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; } /// TODO: this is an endless loop !!!
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -945,21 +945,22 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = massEnd;
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
double flow = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.Buoyancy = buoyancy;
tstRslt.VolumeCTV = volumeCTV; /// [l] 1000.0f is because density is in [kg/m3]
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
/// Calculated master pulses per liter
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
@@ -1000,7 +1001,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } /// TODO: this is an endless loop !!!
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; } /// TODO: this is an endless loop !!!
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -992,21 +992,22 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = massEnd;
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
double flow = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.Buoyancy = buoyancy;
tstRslt.VolumeCTV = volumeCTV; /// [l] 1000.0f is because density is in [kg/m3]
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
/// Calculated master pulses per liter
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
@@ -1220,7 +1221,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -723,21 +723,22 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
tstRslt.MassEndRaw = 0;
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
double flow = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.Buoyancy = 0;
tstRslt.VolumeCTV = volumeCTV; /// [l] 1000.0f is because density is in [kg/m3]
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
/// Calculated master pulses per liter
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
@@ -882,7 +883,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
do
{
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -477,20 +477,21 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
tstRslt.MassEndRaw = 0;
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
double flow = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = tstRslt.ConstMasterCorr;
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]
tstRslt.ErrorMaster = 0.0; /// Cannot be determined without a mass measurement
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]
tstRslt.ErrorMaster = 0.0; /// Cannot be determined without a mass measurement
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = 0;
tstRslt.DiverterEnd = 0;
@@ -724,8 +725,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (e.Contains(Event.Error)) { retVal = Event.Error; break; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
}
while (!e.Contains(Event.FlowRegulationStopped));
@@ -749,7 +749,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
double massOfEvaporatedWater = tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
double flow = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
///
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
if (repetitionNr == 1)
@@ -762,13 +762,13 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.DensityLine; /// [l] commercially true volume
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(flow);
tstRslt.VolumeCTV *= tstRslt.TestTime + tstRslt.TestTimeCorrection;
tstRslt.VolumeCTV /= tstRslt.TestTime;
}
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
/// Calculated master pulses per liter
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
@@ -798,7 +798,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0;
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = tstResRepet1.ConstMaster; /// Master constant ( pulses per liter) from the first repetition (=against the scale)
tstRslt.VolumeMaster = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.VolumeCTV = tstRslt.VolumeMaster; /// [l] 1000.0f is because density is in [kg/m3]
@@ -818,11 +818,12 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
tstRslt.InfoFlags = infoFlags;
} /// [kg/h]
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
if (compoundTestParams != null)
@@ -871,27 +871,28 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = EndMass.Val + (refMass - (measuredRefMass.Val - StartMass.Val));
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
double flow = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.DensityLine; /// [l] commercially true volume
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(flow);
tstRslt.VolumeCTV *= tstRslt.TestTime + tstRslt.TestTimeCorrection;
tstRslt.VolumeCTV /= tstRslt.TestTime;
}
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
/// Calculated master pulses per liter
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.DiverterStart = outPath.Diverter.SwitchTimeStart.Val;
tstRslt.DivStart10 = 0;
@@ -818,26 +818,27 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) * totalPulses / (tstRslt.TestTime * massPulses); /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * totalPulses / tstRslt.TestTime; /// [m3/h]
double flow = 3.6 * LtrPerRefPulse * totalPulses / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Formulas.Buoyancy();
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.DensityLine; /// [l] commercially true volume of collected water
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(flow);
tstRslt.VolumeCTV *= tstRslt.TestTime + tstRslt.TestTimeCorrection;
tstRslt.VolumeCTV /= tstRslt.TestTime;
}
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = (massPulses == 0) ? tstRslt.ConstMasterCorr : (tstRslt.VolumeCTV / massPulses);
tstRslt.VolumeMaster = LtrPerRefPulse * massPulses; /// [l] volume from the master flow meter
tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * totalPulses * tstRslt.VolumeCTV / (massPulses * tstRslt.TestTime);
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = outPath.Diverter.SwitchTimeStart.Val;
tstRslt.DivStart10 = 0;
@@ -744,27 +744,28 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
double flow = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.DensityLine; /// [l] commercially true volume
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(flow);
tstRslt.VolumeCTV *= tstRslt.TestTime + tstRslt.TestTimeCorrection;
tstRslt.VolumeCTV /= tstRslt.TestTime;
}
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
/// Calculated master pulses per liter
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = outPath.Diverter.SwitchTimeStart.Val;
tstRslt.DivStart10 = 0;
@@ -501,27 +501,28 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
tstRslt.MassEndRaw = 0;
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0;
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
double flow = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = 0;
tstRslt.VolumeCTV = volumeBox.Val; /// [l]
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(flow);
tstRslt.VolumeCTV *= tstRslt.TestTime + tstRslt.TestTimeCorrection;
tstRslt.VolumeCTV /= tstRslt.TestTime;
}
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(flow, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
/// Calculated master pulses per liter
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.FlowVolume = 3.6 * tstRslt.VolumeCTV / tstRslt.TestTime;
tstRslt.FlowMean = Convert.ToSingle(RefFlowStat.Average);
tstRslt.FlowStart = Convert.ToSingle(RefFlowStat.First);
tstRslt.FlowEnd = Convert.ToSingle(RefFlowStat.Last);
tstRslt.FlowMin = Convert.ToSingle(RefFlowStat.Min);
tstRslt.FlowMax = Convert.ToSingle(RefFlowStat.Max);
tstRslt.DiverterStart = outPath.Diverter.SwitchTimeStart.Val;
tstRslt.DivStart10 = 0;
@@ -474,7 +474,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -302,7 +302,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -517,7 +517,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -508,7 +508,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
.EnterState();
do {
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
}
while (!e.Contains(Event.PreviousStopped));
}
@@ -37,8 +37,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
/// Any E# is 'true' on error, 'false' when OK
/// Average flow
double aveFlow = 3.6 * testRslt.VolumeCTV / testRslt.TestTime;
bool E1 = (aveFlow < testRslt.Qfrom()) || (aveFlow > testRslt.Qto());
bool E1 = (testRslt.FlowVolume < testRslt.Qfrom()) || (testRslt.FlowVolume > testRslt.Qto());
/// Max. and min. up and down water temperature
bool E2 = ProcessData.TempUpStat.Min < testRslt.TempLimLo()
@@ -94,8 +93,9 @@ namespace TBF.BenchControl.Various.ErrorFlags
|| ProcessData.PressDownStat.Max > errorsCfg.TestParams.Pressure_max;
/// Max. and min. flow
bool E21 = ProcessData.RefFlowStat.Min < testRslt.Qfrom()
|| ProcessData.RefFlowStat.Max > testRslt.Qto();
double rectifiedFlowMin = (testRslt.FlowMean == 0) ? testRslt.FlowMin : testRslt.FlowMin * testRslt.FlowVolume / testRslt.FlowMean;
double rectifiedFlowMax = (testRslt.FlowMean == 0) ? testRslt.FlowMax : testRslt.FlowMax * testRslt.FlowVolume / testRslt.FlowMean;
bool E21 = rectifiedFlowMin < testRslt.Qfrom() || rectifiedFlowMax > testRslt.Qto();
/// Electrical conductivity of water
bool E36 = ProcessData.ConductStat.Min < errorsCfg.TestParams.Conductivity_min
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.26.1463.0")]
[assembly: AssemblyFileVersion("2.26.1463.0")]
[assembly: AssemblyVersion("2.26.1496.0")]
[assembly: AssemblyFileVersion("2.26.1496.0")]
+24 -6
View File
@@ -39,7 +39,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -50,7 +50,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@@ -60,7 +60,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
@@ -70,7 +70,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
@@ -101,8 +101,8 @@
<SignManifests>false</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="ControlComponent3Munich">
<HintPath>..\packages\ControlBoard\Munich\ControlComponent3Munich.dll</HintPath>
<Reference Include="ControlComponent3U">
<HintPath>..\packages\ControlBoard\iPerlST\ControlComponent3U.dll</HintPath>
</Reference>
<Reference Include="FluentNHibernate">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
@@ -3507,6 +3507,24 @@
<None Include="Resources\RoiStyle1.bmp" />
<None Include="Resources\RoiStyle2.bmp" />
<None Include="Resources\RoiStyle3.bmp" />
<Content Include="libgcc_s_dw2-1.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="libRfid1.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="libRfid2.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="libRfid3.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="libRfid4.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="libstdc++-6.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Pictures\forward_dir_left.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
+2 -2
View File
@@ -54,9 +54,9 @@ namespace TBF.UI
this.horizontalSplitContainer = new System.Windows.Forms.SplitContainer();
this.mainTabControl = new System.Windows.Forms.TabControl();
this.homeTabPage = new System.Windows.Forms.TabPage();
this.ctrlBrdComponent = new ControlComponent3Munich.UserControl1();
this.ctrlBrdComponent = new ControlComponent_Torino2015.UserControl1();
this.processTabPage = new System.Windows.Forms.TabPage();
this.processTabPageCtrl = new TBF.UI.Process.ProcessTabPageCtrl6();
this.processTabPageCtrl = new TBF.UI.Process.ProcessTabPageCtrl48();
this.insertTabPage = new System.Windows.Forms.TabPage();
this.resultsTabPage = new System.Windows.Forms.TabPage();
this.resultsTabPageCtrl = new TBF.UI.ResultsMI.ResultsTabPageCtrl();
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE;TURA_IPERL;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
@@ -28,7 +28,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;TURA_IPERL;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
+2
View File
@@ -24,6 +24,8 @@ rmdir /s /q GraphLib\bin
rmdir /s /q GraphLib\obj
rmdir /s /q TracingDB\bin
rmdir /s /q TracingDB\obj
rmdir /s /q ResetBatchNr\bin
rmdir /s /q ResetBatchNr\obj
rmdir /s /q RestClient\bin
rmdir /s /q RestClient\obj
rmdir /s /q Results\bin