Compare commits
25
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d30efeb6bd | ||
|
|
5bb94666a4 | ||
|
|
c1f23b8481 | ||
|
|
70c11ad6d9 | ||
|
|
3a8c6b4d3e | ||
|
|
b8f1b9293a | ||
|
|
6558951857 | ||
|
|
54e964ffde | ||
|
|
a5b270eec8 | ||
|
|
6f9c6596d5 | ||
|
|
d99c53bc8e | ||
|
|
3496fcbbba | ||
|
|
77a29dadfc | ||
|
|
6df9261697 | ||
|
|
1b81aaf752 | ||
|
|
78ec06fe5d | ||
|
|
db286ba721 | ||
|
|
c1b9bf0c5f | ||
|
|
435261831a | ||
|
|
3cbc845183 | ||
|
|
bc2804d0b9 | ||
|
|
05f72bc9f7 | ||
|
|
e7431ce6e2 | ||
|
|
0ea7b9b6d3 | ||
|
|
c4b3100057 |
+4
-1
@@ -2,6 +2,8 @@ Common/bin/
|
||||
Common/obj/
|
||||
Config/bin/
|
||||
Config/obj/
|
||||
DataStreamInterface/bin/
|
||||
DataStreamInterface/obj/
|
||||
Decrypt/bin/
|
||||
Decrypt/obj/
|
||||
DeviceTest/bin/
|
||||
@@ -22,6 +24,8 @@ GraphLib/bin
|
||||
GraphLib/obj
|
||||
TracingDB/bin
|
||||
TracingDB/obj
|
||||
ResetBatchNr/bin
|
||||
ResetBatchNr/obj
|
||||
RestClient/bin
|
||||
RestClient/obj
|
||||
Results/bin/
|
||||
@@ -40,7 +44,6 @@ Users/bin/
|
||||
Users/obj/
|
||||
UserManagement/bin/
|
||||
UserManagement/obj/
|
||||
Doc/
|
||||
.vs/
|
||||
*.suo
|
||||
*.bak
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;GELSENWASSER;LANG_DE</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;GELSENWASSER;LANG_DE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Config
|
||||
/// <summary>
|
||||
/// Test bench database settings, contains bench name and settings od several databases
|
||||
/// </summary>
|
||||
public class DatabaseSettings : ICloneable
|
||||
public class DatabaseSettings : ICloneable, IComparable
|
||||
{
|
||||
// Public fields
|
||||
public string BenchName;
|
||||
@@ -45,6 +45,12 @@ namespace Config
|
||||
return result;
|
||||
}
|
||||
|
||||
public int CompareTo(object dbs2)
|
||||
{
|
||||
if (!(dbs2 is DatabaseSettings)) return 0;
|
||||
return String.Compare(BenchName, (dbs2 as DatabaseSettings).BenchName);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} config={1} results={2} events={3} users={4}",
|
||||
|
||||
@@ -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.26.1447.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1447.0")]
|
||||
[assembly: AssemblyVersion("2.26.1458.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1458.0")]
|
||||
|
||||
@@ -118,15 +118,15 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>NiO</value>
|
||||
<value>Nicht OK</value>
|
||||
</data>
|
||||
<data name="Passed" xml:space="preserve">
|
||||
<value>iO</value>
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Fehler</value>
|
||||
</data>
|
||||
<data name="Cannot_open_DB_Cause_0" xml:space="preserve">
|
||||
<value>Datenbank kann nicht geöffnet.\\r\\nUrsache:\\r\\n{0}</value>
|
||||
<value>Datenbank kann nicht geöffnet werden.\\r\\nUrsache:\\r\\n{0}</value>
|
||||
</data>
|
||||
</root>
|
||||
+32
-12
@@ -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%
|
||||
|
||||
@@ -68,6 +69,8 @@ namespace Config
|
||||
[Description("kWh")] kWh, /// 1 kWh = 3600000 J
|
||||
[Description("MWh")] MWh, /// 1 MWh = 3600000000 J
|
||||
|
||||
[Description("uS/cm")] uSpcm, /// * 1 uS/cm
|
||||
|
||||
#if LANG_PL
|
||||
[Description("imp/l")] ppl, /// * 1 pulse/l
|
||||
[Description("imp/dm3")] ppdm3, /// * 1 pulse/dm3
|
||||
@@ -112,12 +115,14 @@ namespace Config
|
||||
[Description("Impulse")] Pulses,
|
||||
[Description("Impulse/l")] PulsePerLtr,
|
||||
[Description("Impulse/kWh")] PulsePerKWh,
|
||||
[Description("Leitfähigkeit")] Conductivity,
|
||||
|
||||
/// Quantities without units and conversions
|
||||
[Description("Nummer")] Number,
|
||||
[Description("Text")] String,
|
||||
[Description("Boolean")] Boolean,
|
||||
[Description("Datum und Uhrzeit")] DateTime,
|
||||
[Description("Aufgezählt")] Enumerated,
|
||||
#elif LANG_PL
|
||||
[Description("Objętość")] Volume,
|
||||
[Description("Przepływ")] Flow,
|
||||
@@ -133,12 +138,14 @@ namespace Config
|
||||
[Description("Impulsy")] Pulses,
|
||||
[Description("Impulsy/litr")] PulsePerLtr,
|
||||
[Description("Impulsy/kWh")] PulsePerKWh,
|
||||
[Description("Przewodność")] Conductivity,
|
||||
|
||||
/// Quantities without units and conversions
|
||||
[Description("Numer")] Number,
|
||||
[Description("Tekst")] String,
|
||||
[Description("Boolean")] Boolean,
|
||||
[Description("Data i czas")] DateTime,
|
||||
[Description("Wyliczone")] Enumerated,
|
||||
#elif LANG_CS
|
||||
[Description("Objem")] Volume,
|
||||
[Description("Průtok")] Flow,
|
||||
@@ -154,12 +161,14 @@ namespace Config
|
||||
[Description("Pulzy")] Pulses,
|
||||
[Description("Pulzy/litr")] PulsePerLtr,
|
||||
[Description("Pulzy/kWh")] PulsePerKWh,
|
||||
[Description("Vodivost")] Conductivity,
|
||||
|
||||
/// Quantities without units and conversions
|
||||
[Description("Počet")] Number,
|
||||
[Description("Text")] String,
|
||||
[Description("Boolean")] Boolean,
|
||||
[Description("Datum a čas")] DateTime,
|
||||
[Description("Vyjmenované")] Enumerated,
|
||||
#elif LANG_IT
|
||||
[Description("Volume")] Volume,
|
||||
[Description("Flusso")] Flow,
|
||||
@@ -175,12 +184,14 @@ namespace Config
|
||||
[Description("Impulso")] Pulses,
|
||||
[Description("Impulso/litro")] PulsePerLtr,
|
||||
[Description("Impulso/kWh")] PulsePerKWh,
|
||||
[Description("Conduttività")] Conductivity,
|
||||
|
||||
/// Quantities without units and conversions
|
||||
[Description("Numero")] Number,
|
||||
[Description("Stringa")] String,
|
||||
[Description("Boolean")] Boolean,
|
||||
[Description("Data e ora")] DateTime,
|
||||
[Description("Enumerato")] Enumerated,
|
||||
#else
|
||||
[Description("Volume")] Volume,
|
||||
[Description("Flow")] Flow,
|
||||
@@ -196,13 +207,14 @@ namespace Config
|
||||
[Description("Pulses")] Pulses,
|
||||
[Description("Pulses/liter")] PulsePerLtr,
|
||||
[Description("Pulses/kWh")] PulsePerKWh,
|
||||
[Description("Conductivity")] Conductivity,
|
||||
|
||||
/// Quantities without units and conversions
|
||||
[Description("Number")] Number,
|
||||
[Description("String")] String,
|
||||
[Description("Boolean")] Boolean,
|
||||
[Description("Date and time")] DateTime,
|
||||
[Description("Enum")] Enum,
|
||||
[Description("Enumerated")] Enumerated,
|
||||
#endif
|
||||
Count,
|
||||
}
|
||||
@@ -217,7 +229,7 @@ namespace Config
|
||||
public static bool IsDefaultUnit(Unit unit)
|
||||
{
|
||||
return unit == Unit.l || unit == Unit.m3ph || unit == Unit.kg || unit == Unit.s || unit == Unit.C || unit == Unit.bar || unit == Unit.RPct ||
|
||||
unit == Unit.Pct || unit == Unit.mm || unit == Unit.kgpm3 || unit == Unit.J || unit == Unit.ppl || unit == Unit.ppkWh;
|
||||
unit == Unit.Pct || unit == Unit.mm || unit == Unit.kgpm3 || unit == Unit.J || unit == Unit.ppl || unit == Unit.ppkWh || unit == Unit.uSpcm;
|
||||
}
|
||||
|
||||
public static bool IsQuantity(Unit units, Quantity quantity)
|
||||
@@ -265,10 +277,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;
|
||||
@@ -309,6 +322,9 @@ namespace Config
|
||||
case Unit.kWhpp:
|
||||
return Config.Quantity.PulsePerKWh;
|
||||
|
||||
case Unit.uSpcm:
|
||||
return Config.Quantity.Conductivity;
|
||||
|
||||
default:
|
||||
return Config.Quantity.Number;
|
||||
}
|
||||
@@ -328,6 +344,8 @@ namespace Config
|
||||
public static bool IsPulses(Unit units) { return IsQuantity(units, Config.Quantity.Pulses); }
|
||||
public static bool IsPulsePerLtr(Unit units) { return IsQuantity(units, Config.Quantity.PulsePerLtr); }
|
||||
public static bool IsPulsePerKWh(Unit units) { return IsQuantity(units, Config.Quantity.PulsePerKWh); }
|
||||
public static bool IsConductivity(Unit units) { return IsQuantity(units, Config.Quantity.Conductivity); }
|
||||
|
||||
|
||||
|
||||
public static double ConvertTo(Unit units, double v)
|
||||
@@ -367,9 +385,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 %
|
||||
@@ -440,9 +459,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 %
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace DataStreamInterface
|
||||
{
|
||||
public class DataFrame
|
||||
{
|
||||
public readonly UInt64 ID; /// Frame ID
|
||||
public readonly double Time; /// Time stamp in units of time
|
||||
public readonly double Volume; /// Volume in units of volume
|
||||
public readonly double[] Quantity; /// An array of optional quantities in their respective units
|
||||
|
||||
public DataFrame(UInt64 id, double time, double volume, double[] quantity)
|
||||
{
|
||||
ID = id;
|
||||
Time = time;
|
||||
Volume = volume;
|
||||
Quantity = quantity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?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>{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DataStreamInterface</RootNamespace>
|
||||
<AssemblyName>DataStreamInterface</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<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' ">
|
||||
<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="DataFrame.cs" />
|
||||
<Compile Include="Enums.cs" />
|
||||
<Compile Include="IDataStreamMeter.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Doc\Software interface for datastream water meters.docx">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</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>
|
||||
Binary file not shown.
@@ -0,0 +1,95 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace DataStreamInterface
|
||||
{
|
||||
public enum Unit
|
||||
{
|
||||
None,
|
||||
|
||||
pulse,
|
||||
degree,
|
||||
|
||||
/// Volume
|
||||
ml, /// 0.001 l
|
||||
l, /// * 1 liter = 1 l
|
||||
dm3, /// 1 dm3 = 1 l
|
||||
m3, /// 1000 l
|
||||
gal_UK, /// 1 gal(UK) = 4.54609 l
|
||||
gal_US, /// 1 gal(US) = 3.78541178 l
|
||||
|
||||
/// Flow
|
||||
lph, /// 1 liter/h
|
||||
m3ph, /// * 1 m3/h = 1000 l/h
|
||||
|
||||
/// Mass
|
||||
g, /// 0.001 kg
|
||||
kg, /// * 1 kilogram
|
||||
t, /// 1000 kg
|
||||
lb, /// 0.45359237 kg
|
||||
|
||||
/// Time
|
||||
ms, /// 1 ms = 0.001 s
|
||||
s, /// * 1 second = 1 s
|
||||
min, /// 1 min = 60 s
|
||||
hour, /// 1 hour = 60 min = 3600 s
|
||||
|
||||
/// Temperature
|
||||
C, /// * degree Celsius (°C)
|
||||
F, /// degree Fahrenheit
|
||||
K, /// degree Kelvin
|
||||
|
||||
/// Pressure
|
||||
Pa, /// 1 Pa = 0.01 hPa
|
||||
hPa, /// 1 hPa = 100 Pa
|
||||
mbar, /// 1 mbar = 1 hPa = 100 Pa
|
||||
kPa, /// 1 kPa = 10 HPa
|
||||
inHg, /// 1 inHg = 33.864 hPa
|
||||
bar, /// * 1 Bar = 1000 mbar = 0.1 MPa = 100000 Pa
|
||||
MPa, /// 1 MPa = 10000 hPa
|
||||
|
||||
/// Humidity
|
||||
RPct, /// * 1 R%
|
||||
|
||||
/// Relative error
|
||||
Promile, /// 1 promile = 0.1 %
|
||||
Pct, /// * 1 %
|
||||
|
||||
/// Length
|
||||
mm, /// * 1 millimeter
|
||||
cm, /// 1 cm = 10 mm
|
||||
inch, /// 1 inch = 25.4 mm
|
||||
foot, /// 1 foot = 304.8 mm
|
||||
m, /// 1 m = 1000 mm
|
||||
|
||||
/// Density
|
||||
kgpm3, /// * 1 kg/m3 = 0.001 kg/l
|
||||
kgpl, /// 1 kg/l = 1000 kg/m3
|
||||
|
||||
/// Energy
|
||||
J, /// * 1 Joul
|
||||
kJ, /// 1 kJ = 1000 J
|
||||
MJ, /// 1 MJ = 1000000 J
|
||||
Wh, /// 1 Wh = 3600 J
|
||||
kWh, /// 1 kWh = 3600000 J
|
||||
MWh, /// 1 MWh = 3600000000 J
|
||||
|
||||
/// Meter coefficient - volume
|
||||
ppl, /// * 1 pulse/l
|
||||
ppdm3, /// * 1 pulse/dm3
|
||||
degpl, /// * 1 degree/l
|
||||
degpdm3, /// * 1 degree/dm3
|
||||
lpp, /// * 1 l/pulse
|
||||
dm3pp, /// * 1 dm3/pulse
|
||||
lpdeg, /// * 1 l/degree
|
||||
dm3pdeg, /// * 1 dm3/degree
|
||||
|
||||
/// Meter coefficient - energy
|
||||
ppkWh, /// * 1 pulse/kWh
|
||||
kWhpp, /// * 1 kWh/pulse
|
||||
|
||||
Count
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataStreamInterface
|
||||
{
|
||||
public interface IDataStreamMeter
|
||||
{
|
||||
/// <summary>
|
||||
/// Get state of the connected data stream meter
|
||||
/// </summary>
|
||||
/// <param name="state">Current state of the meter</param>
|
||||
/// <returns>true when successful</returns>
|
||||
bool GetState(out int state, out string parameter);
|
||||
|
||||
/// <summary>
|
||||
/// Set state of the connected data stream meter
|
||||
/// </summary>
|
||||
/// <param name="state">Required state of the meter</param>
|
||||
/// <returns>true when successful</returns>
|
||||
bool SetState(int state, string parameter);
|
||||
|
||||
/// <summary>
|
||||
/// Establish connection with a data stream meter
|
||||
/// </summary>
|
||||
/// <param name="connectionParameters">Connection parameters</param>
|
||||
/// <param name="meterId">Meter ID (e.g. serial number)</param>
|
||||
/// <returns>true when successful</returns>
|
||||
bool OpenConnection(string connectionParameters, out string meterId);
|
||||
|
||||
/// <summary>
|
||||
/// Closes connection with the data stream meter
|
||||
/// </summary>
|
||||
/// <returns>true when successful</returns>
|
||||
bool CloseConnection();
|
||||
|
||||
/// <summary>
|
||||
/// Stars saving measurement results into internal data structures of the component.
|
||||
/// Each data frame obtains a unique ID.
|
||||
/// The very first data fraim obrains ID = 0.
|
||||
/// </summary>
|
||||
/// <returns>true when successful</returns>
|
||||
bool StartMeasurement();
|
||||
|
||||
/// <summary>
|
||||
/// Stops saving measurement results into internal data structures of the component.
|
||||
/// Updates ID of the last date frame received from the meter.
|
||||
/// </summary>
|
||||
/// <param name="lastFrameID">ID of the last date frame</param>
|
||||
/// <returns>true when successful</returns>
|
||||
bool StopMeasurement(out UInt64 lastFrameID);
|
||||
|
||||
///------------------------------------------------
|
||||
/// Units of time, volume and optional quantities
|
||||
///------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Returns time units (s, ms, ...)
|
||||
/// </summary>
|
||||
Unit GetTimeUnits();
|
||||
|
||||
/// <summary>
|
||||
/// Returns units of volume (ml, l, ...)
|
||||
/// </summary>
|
||||
Unit GetVolumeUnits();
|
||||
|
||||
///-----------------------------------------------
|
||||
/// Ooptional quantities: count, units, captions
|
||||
///-----------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Returns count of optional quantities in each data frame
|
||||
/// </summary>
|
||||
/// <returns>Count of optional quantities</returns>
|
||||
int GetQuantitiesCount();
|
||||
|
||||
/// <summary>
|
||||
/// Returns units of the specified quantity
|
||||
/// </summary>
|
||||
/// <param name="quanityNr">Zero based quantity number 0 .. quantites count-1</param>
|
||||
Unit GetQuantityUnits(int quanityNr);
|
||||
|
||||
/// <summary>
|
||||
/// Returns caption of the specified quantity
|
||||
/// </summary>
|
||||
/// <param name="quanityNr">Zero based quantity number 0 .. quantites count-1</param>
|
||||
string GetQuantityCaption(int quanityNr);
|
||||
|
||||
///---------------------------
|
||||
/// Datastream data exchange
|
||||
///---------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Retuns 'count' data frames starting with data frame with ID = 'id'
|
||||
/// </summary>
|
||||
/// <param name="id">First frame ID</param>
|
||||
/// <param name="count">Frames count</param>
|
||||
/// <returns>Selected data frames</returns>
|
||||
DataFrame[] GetFrames(UInt64 id, int count);
|
||||
|
||||
/// <summary>
|
||||
/// Returns ID of the data frame where time equals or exceeds the specified time.
|
||||
/// When time of the first frame (ID=0) is larger then specified time, function returns 0.
|
||||
/// </summary>
|
||||
/// <param name="time">Time</param>
|
||||
/// <returns>ID of the data frame at or after the pecified time</returns>
|
||||
UInt64 GetID(double time);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Resources;
|
||||
|
||||
// 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("DataStreamInterface")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DataStreamInterface")]
|
||||
[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("e44458ee-b635-4d7c-a763-20054399e817")]
|
||||
|
||||
// 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")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
@@ -1,525 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<diagram program="umlet" version="12.2">
|
||||
<zoom_level>8</zoom_level>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>0</y>
|
||||
<w>40</w>
|
||||
<h>64</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;48;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.InitialState</type>
|
||||
<coordinates>
|
||||
<x>416</x>
|
||||
<y>8</y>
|
||||
<w>16</w>
|
||||
<h>16</h>
|
||||
</coordinates>
|
||||
<panel_attributes>i</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>328</x>
|
||||
<y>48</y>
|
||||
<w>192</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>'Test Start' transition sequence</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>56</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.RegionEndState</type>
|
||||
<coordinates>
|
||||
<x>416</x>
|
||||
<y>96</y>
|
||||
<w>16</w>
|
||||
<h>16</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>88</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>344</x>
|
||||
<y>128</y>
|
||||
<w>160</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Initialize (single) test results</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>136</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.Decision</type>
|
||||
<coordinates>
|
||||
<x>408</x>
|
||||
<y>176</y>
|
||||
<w>32</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>184</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.Decision</type>
|
||||
<coordinates>
|
||||
<x>408</x>
|
||||
<y>224</y>
|
||||
<w>32</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.RegionEndState</type>
|
||||
<coordinates>
|
||||
<x>416</x>
|
||||
<y>272</y>
|
||||
<w>16</w>
|
||||
<h>16</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>232</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>264</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>344</x>
|
||||
<y>304</y>
|
||||
<w>160</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Make the water tank empty</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>312</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.RegionEndState</type>
|
||||
<coordinates>
|
||||
<x>416</x>
|
||||
<y>352</y>
|
||||
<w>16</w>
|
||||
<h>16</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>344</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>272</x>
|
||||
<y>168</y>
|
||||
<w>160</w>
|
||||
<h>128</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-
|
||||
m2=[Emptying always]</panel_attributes>
|
||||
<additional_attributes>144;112;24;112;24;24;136;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>408</x>
|
||||
<y>216</y>
|
||||
<w>176</w>
|
||||
<h>160</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-
|
||||
m2=[Enough room in tank]</panel_attributes>
|
||||
<additional_attributes>24;144;160;144;160;24;32;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>344</x>
|
||||
<y>384</y>
|
||||
<w>160</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Set the required water flow</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>392</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>328</x>
|
||||
<y>432</y>
|
||||
<w>192</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Measure the 'start' mass of water</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>440</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>344</x>
|
||||
<y>480</y>
|
||||
<w>160</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Start the test (diverter, etc.)</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>488</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.RegionEndState</type>
|
||||
<coordinates>
|
||||
<x>416</x>
|
||||
<y>528</y>
|
||||
<w>16</w>
|
||||
<h>16</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>344</x>
|
||||
<y>560</y>
|
||||
<w>160</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Read intermediate results</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>520</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>568</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.Decision</type>
|
||||
<coordinates>
|
||||
<x>408</x>
|
||||
<y>608</y>
|
||||
<w>32</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>272</x>
|
||||
<y>512</y>
|
||||
<w>160</w>
|
||||
<h>128</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-
|
||||
m2=[Test in progress]</panel_attributes>
|
||||
<additional_attributes>144;24;24;24;24;112;136;112</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>616</y>
|
||||
<w>40</w>
|
||||
<h>64</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;48;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.Text</type>
|
||||
<coordinates>
|
||||
<x>424</x>
|
||||
<y>640</y>
|
||||
<w>104</w>
|
||||
<h>24</h>
|
||||
</coordinates>
|
||||
<panel_attributes>[Test completed]</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>328</x>
|
||||
<y>664</y>
|
||||
<w>192</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Measure the 'end' mass of water</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>328</x>
|
||||
<y>712</y>
|
||||
<w>192</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Calculate and save this test results</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>672</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>720</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.Decision</type>
|
||||
<coordinates>
|
||||
<x>408</x>
|
||||
<y>760</y>
|
||||
<w>32</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>768</y>
|
||||
<w>40</w>
|
||||
<h>64</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;48;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>408</x>
|
||||
<y>80</y>
|
||||
<w>216</w>
|
||||
<h>712</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-
|
||||
m2=[More repetitions to be done]</panel_attributes>
|
||||
<additional_attributes>24;24;200;24;200;696;32;696</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.Text</type>
|
||||
<coordinates>
|
||||
<x>264</x>
|
||||
<y>792</y>
|
||||
<w>160</w>
|
||||
<h>24</h>
|
||||
</coordinates>
|
||||
<panel_attributes>[All test repetitions completed]</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>328</x>
|
||||
<y>816</y>
|
||||
<w>192</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Stop any running tests, etc. (?)</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>328</x>
|
||||
<y>864</y>
|
||||
<w>192</w>
|
||||
<h>32</h>
|
||||
</coordinates>
|
||||
<panel_attributes>'Test End' transition sequence</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>824</y>
|
||||
<w>40</w>
|
||||
<h>56</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;40;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>872</y>
|
||||
<w>40</w>
|
||||
<h>64</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>24;48;24;24</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.FinalState</type>
|
||||
<coordinates>
|
||||
<x>416</x>
|
||||
<y>920</y>
|
||||
<w>16</w>
|
||||
<h>16</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
</diagram>
|
||||
-261
@@ -1,261 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<diagram program="umlet" version="12.2">
|
||||
<zoom_level>10</zoom_level>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>120</y>
|
||||
<w>120</w>
|
||||
<h>40</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Load the default
|
||||
procedure
|
||||
</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>430</x>
|
||||
<y>40</y>
|
||||
<w>50</w>
|
||||
<h>100</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>30;80;30;30</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.InitialState</type>
|
||||
<coordinates>
|
||||
<x>450</x>
|
||||
<y>60</y>
|
||||
<w>20</w>
|
||||
<h>20</h>
|
||||
</coordinates>
|
||||
<panel_attributes>i</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>190</y>
|
||||
<w>120</w>
|
||||
<h>40</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Reset valves,
|
||||
pumps, etc.
|
||||
</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>430</x>
|
||||
<y>130</y>
|
||||
<w>50</w>
|
||||
<h>80</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>30;60;30;30</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>260</y>
|
||||
<w>120</w>
|
||||
<h>40</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Detect cameras</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>430</x>
|
||||
<y>200</y>
|
||||
<w>50</w>
|
||||
<h>80</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>30;60;30;30</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>370</x>
|
||||
<y>550</y>
|
||||
<w>180</w>
|
||||
<h>110</h>
|
||||
</coordinates>
|
||||
<panel_attributes>complex
|
||||
state
|
||||
--
|
||||
some more...
|
||||
|
||||
|
||||
-.</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>370</x>
|
||||
<y>390</y>
|
||||
<w>180</w>
|
||||
<h>60</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Display prompt, enable
|
||||
'Cycle' and 'Test' buttons
|
||||
and wait for a selection</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>430</x>
|
||||
<y>320</y>
|
||||
<w>50</w>
|
||||
<h>90</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>30;70;30;30</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.RegionEndState</type>
|
||||
<coordinates>
|
||||
<x>450</x>
|
||||
<y>330</y>
|
||||
<w>20</w>
|
||||
<h>20</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>430</x>
|
||||
<y>270</y>
|
||||
<w>50</w>
|
||||
<h>80</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>30;60;30;30</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.Decision</type>
|
||||
<coordinates>
|
||||
<x>440</x>
|
||||
<y>480</y>
|
||||
<w>40</w>
|
||||
<h>40</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>430</x>
|
||||
<y>420</y>
|
||||
<w>50</w>
|
||||
<h>80</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>30;60;30;30</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>430</x>
|
||||
<y>490</y>
|
||||
<w>50</w>
|
||||
<h>80</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>30;60;30;30</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>620</x>
|
||||
<y>430</y>
|
||||
<w>160</w>
|
||||
<h>40</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Disable 'Cycle'
|
||||
and 'Test' buttons</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.State</type>
|
||||
<coordinates>
|
||||
<x>620</x>
|
||||
<y>360</y>
|
||||
<w>160</w>
|
||||
<h>40</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Empty the tank</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>450</x>
|
||||
<y>440</y>
|
||||
<w>270</w>
|
||||
<h>80</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>250;30;250;60;30;60</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>670</x>
|
||||
<y>370</y>
|
||||
<w>50</w>
|
||||
<h>80</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>30;30;30;60</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.Relation</type>
|
||||
<coordinates>
|
||||
<x>440</x>
|
||||
<y>310</y>
|
||||
<w>280</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<-</panel_attributes>
|
||||
<additional_attributes>30;30;260;30;260;50</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.Text</type>
|
||||
<coordinates>
|
||||
<x>490</x>
|
||||
<y>480</y>
|
||||
<w>180</w>
|
||||
<h>20</h>
|
||||
</coordinates>
|
||||
<panel_attributes>'Empty a tank' selected
|
||||
</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<type>com.umlet.element.custom.Text</type>
|
||||
<coordinates>
|
||||
<x>290</x>
|
||||
<y>520</y>
|
||||
<w>160</w>
|
||||
<h>20</h>
|
||||
</coordinates>
|
||||
<panel_attributes>'Cycle' or 'Test' selected
|
||||
</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
</diagram>
|
||||
@@ -1,73 +0,0 @@
|
||||
Otazky:
|
||||
-------
|
||||
- ako pouzit T6
|
||||
- co je 'T to Open' pri RV
|
||||
- na co sluzia VI2P, VI3P a VI4P
|
||||
|
||||
|
||||
TODO:
|
||||
-----
|
||||
- nefunguje pumpa P3
|
||||
- nahlad na cestu v procedure
|
||||
- purgeStart a purgeEnd --> transitionSteps/Sequences
|
||||
- horeuvedene pre RegulValve
|
||||
- volba procedury nie je zablokovana pocas testov
|
||||
- vsetky Target... v Process tabe
|
||||
- Hmotnosti:
|
||||
1 netarovat, merat okamzitu,
|
||||
2 nulovacia procedura na tlacitko manualne,
|
||||
3 pri starte sa spytat ci vynulovat vahy
|
||||
- Preco sa nenacitaju zmeny v Test-e ???
|
||||
|
||||
|
||||
- pouzit oneskorenie na ventily
|
||||
- skontrolovat doc (freq v Hz)
|
||||
|
||||
Demo version:
|
||||
|
||||
- pouzit progress bary na vyber testu
|
||||
- vycistit Measurement
|
||||
- simulacia skonci pri druhom 'start_measurement'
|
||||
- pri simulacii sa meni mass pri merani end-mass (klapka by mala byt vypnuta!)
|
||||
|
||||
- otvorit Proceduru (v dalsom okne v zamknutom stave) aj ked je okno Procedures zamknute
|
||||
- pridat seriove cisla do parametrov komponentov
|
||||
- zapamatavat si sirky stlpcov v PathsDlg, ... (aj inde)
|
||||
- skontroluj vsetky ListViewEx-y + skorsie spracovanie vysledkov (dolezite aj pre spravnu tvorbu noveho mena)
|
||||
- preco posledne okno skace
|
||||
- chyba spracovanie procedure / metrology2 Tol.Abzug, Fehl.Korr -+
|
||||
- vsetky mena stlpcov a tabov do Strings.xxx
|
||||
|
||||
Testovanie na stanici:
|
||||
|
||||
- pouzivat skutocne 'rvalves'
|
||||
- ked vyberiem priamo Q1, Q2, Q3 (poskonceni predchadzajuceho testu), neprepise sa obsah combo boxu
|
||||
- prislusne EtPulses by mali ist cez RegisterReader komponent + common RegisterReader pre Master
|
||||
- ako je to s WM0 ...
|
||||
- na zaciatku zmerat vahu a dovolit vypustit tanky
|
||||
- updatovat vahu - obrazok = je nespravna kapacita vahy
|
||||
- spracovanie vysledkov podla excelu: corr. na hustotu vzduchu (zavazie), corr. na hustotu vody v zav. od teploty
|
||||
- podpora pre zbieranie vysledkov
|
||||
- logovanie vysledkov do excelu
|
||||
- zastavit vodu na konci skusky
|
||||
- Pri nastavovani prietoku nie je nic vidno
|
||||
- pouzivat skutocne 'rvalves'
|
||||
- pri vytvarani testov vyberat cesty podla prietoku
|
||||
- ked sa zada cesta napisanim mena = skontrolovat
|
||||
- zapamatat si stav ventilu pri prietoku
|
||||
- nulovanie = nulovanie vahy
|
||||
- zmenit text: tarovanie -> vypustanie
|
||||
|
||||
- pripravit IDC100: !ReadRegisterOp, Idc100.GetValue-SetValue (na konci), GetState a ukoncenie operacie
|
||||
- sub-sekvencie pre Q-set a metody
|
||||
- zobrazit typizovanu schemu
|
||||
|
||||
Neskor:
|
||||
|
||||
- nevidno ci su neulozene zmeny
|
||||
- upozornenie pri cancel ak su neulozene zmeny
|
||||
- spravne updatovat tlacitka ked su FixedItems (FixedRows)
|
||||
- ked odomknem Komponenty tak sa zrusi vyber
|
||||
- vaha ToString - prve zobrazit capacity
|
||||
- moznost menenia poradia aj v components
|
||||
- rozdelit ventily podla ciest?
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB |
@@ -1,91 +0,0 @@
|
||||
Assumption
|
||||
----------
|
||||
The installation consists of one or more similar test benches. Each test bench is controlled by one PC-based computer. In addition, one or more PC-s can run the same application and manipulated data shared by the test benches (e.g. PC located in offices). All PC-s run the same version of software (this is a must now - Munich - in the future we can try to deal with backward/forward compatibility issues).
|
||||
|
||||
Development environment
|
||||
-----------------------
|
||||
- Visual Studio 2012 Professional
|
||||
- Database: MySQL (???)
|
||||
|
||||
User iterface
|
||||
-------------
|
||||
- WindowsFormsApplication
|
||||
- Main part of the window occupies a tab control with hidden tabs
|
||||
(see http://weblogs.asp.net/kdente/archive/2005/11/14/430591.aspx)
|
||||
Tabs swithing is done programatically
|
||||
|
||||
Tabs:
|
||||
|
||||
Procedure
|
||||
- Procedure Info (summary, header)
|
||||
- Procedure History (changes)
|
||||
- Procedure Metrology
|
||||
- Procedure Technical
|
||||
- Procedure Purge
|
||||
- Procedure End
|
||||
- Procedure Adjustment
|
||||
- Procedure View
|
||||
- Procedure Inputs
|
||||
Home
|
||||
Insert
|
||||
Results
|
||||
- Results
|
||||
- Results D
|
||||
- Meters Ch
|
||||
- Temp Ch
|
||||
- Pressure
|
||||
Bench parameters
|
||||
- Technical
|
||||
- Balance
|
||||
- Temperature
|
||||
- Pressure
|
||||
- Flowmeter
|
||||
- Density
|
||||
Logs
|
||||
|
||||
|
||||
|
||||
Sensus Testbench Framework application settings consist of
|
||||
----------------------------------------------------------
|
||||
S1. Local settings stored on each PC
|
||||
S1.1 language settings, appearance, etc. (no other impact on the system function)
|
||||
S1.2 specification of databases used to store other settings (see 2.)
|
||||
There might be several sets of DB settings (1.2) when one should be able to access more test benches. When starting the system, this is indicated on the login screen as 'Test bench'/'Pruefstation'.
|
||||
|
||||
S2. Settings stored in databases:
|
||||
S2.1 'users' (typically shared between all benches - centralized access control)
|
||||
S2.2 'watermeter_types' info (typically shared between more benches)
|
||||
S2.3 'test_procedures' (typically shared between more identical benches)
|
||||
S2.4 'metrological_parameters' of the system (always unique for each system, not shared)
|
||||
S2.5 'watermeters' info (typically centralized / shared)
|
||||
S2.6 'test_results' (typically centralized / shared)
|
||||
etc.
|
||||
The databases might be running either on the local PC or remote,
|
||||
each database might be used by a single bench, or shared by more test benches. This configured in 1.2.
|
||||
|
||||
Application can be used to:
|
||||
---------------------------
|
||||
A1. Change local settings (S1.1, S1.2)
|
||||
A2. Change settings stored in the databases
|
||||
A3. Control system and run test procedures - this is only possible on PC-s controlling the benches. When procedure is started, local copy of necessary information from the DB-s is made to avoid problems.
|
||||
|
||||
User access control:
|
||||
--------------------
|
||||
U1. Access to
|
||||
U1.1 information read
|
||||
U1.2 information write/modify
|
||||
U1.3 action start
|
||||
is controlled by an access control mechanism.
|
||||
U2. Users
|
||||
U3. Groups
|
||||
Each user is a member of one or more groups. In case needed, a group with a single user is created. Access to information/actions is granted to groups.
|
||||
Muenich: Grooups are 'Tester',
|
||||
'Testing specialist',
|
||||
'Head of lab'
|
||||
'Maintenance specialist'
|
||||
'Metrologist'
|
||||
'Calibration specialist'
|
||||
U4. When necessary, system prompts user to authenticate himself/herself (login dialog). Authentication is invalidated as follows (optional):
|
||||
U4.1 When user closes the dialog, which was protected.
|
||||
U4.2 After certain time period
|
||||
U4.3 Never
|
||||
@@ -1,25 +0,0 @@
|
||||
<log4net>
|
||||
<!-- A1 is set to be a ConsoleAppender -->
|
||||
<appender name="A1" type="log4net.Appender.ConsoleAppender">
|
||||
<!-- A1 uses PatternLayout -->
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<!-- Print the date in ISO 8601 format -->
|
||||
<conversionPattern value="%date [%thread] %-5level %logger %ndc - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Set root logger level to DEBUG and its only appender to A1 -->
|
||||
<root>
|
||||
<level value="DEBUG" />
|
||||
<appender-ref ref="A1" />
|
||||
</root>
|
||||
|
||||
<!-- Print only messages of level WARN or above in the package NHibernate -->
|
||||
<logger name="NHibernate">
|
||||
<level value="WARN" />
|
||||
</logger>
|
||||
<logger name="TestBenchFramework.BenchControl.StateMachine">
|
||||
<level value="WARN" />
|
||||
</logger>
|
||||
|
||||
</log4net>
|
||||
@@ -1,27 +0,0 @@
|
||||
foreach (var device in devices) device.RunDeviceBefore(); . . . . . . in StateMachine.Worker()
|
||||
State.Create(...).AddOperation(...).AddOperation(...).EnterState() . . in the sequence in Execute(...)
|
||||
|
||||
foreach (var device in devices) device.RunDeviceAfter(); . . . . . . . in WaitRunDevsRunOps()
|
||||
WaitNextTick() (may throw QuitStateMachineException) . . . . . . . . in WaitRunDevsRunOps()
|
||||
foreach (var device in devices) device.RunDeviceBefore(); . . . . . . in WaitRunDevsRunOps()
|
||||
IList<Event> events = State.RunOperations(); . . . . . . . . . . . . . in WaitRunDevsRunOps()
|
||||
|
||||
foreach (var device in devices) device.RunDeviceAfter(); . . . . . . . in WaitRunDevsRunOps()
|
||||
WaitNextTick() (may throw QuitStateMachineException) . . . . . . . . in WaitRunDevsRunOps()
|
||||
foreach (var device in devices) device.RunDeviceBefore(); . . . . . . in WaitRunDevsRunOps()
|
||||
IList<Event> events = State.RunOperations(); . . . . . . . . . . . . . in WaitRunDevsRunOps()
|
||||
|
||||
State.Create(...).AddOperation(...).AddOperation(...).EnterState() . . in the sequence in Execute(...)
|
||||
|
||||
foreach (var device in devices) device.RunDeviceAfter(); . . . . . . . in WaitRunDevsRunOps()
|
||||
WaitNextTick() (may throw QuitStateMachineException) . . . . . . . . in WaitRunDevsRunOps()
|
||||
foreach (var device in devices) device.RunDeviceBefore(); . . . . . . in WaitRunDevsRunOps()
|
||||
IList<Event> events = State.RunOperations(); . . . . . . . . . . . . . in WaitRunDevsRunOps()
|
||||
|
||||
foreach (var device in devices) device.RunDeviceAfter(); . . . . . . . in WaitRunDevsRunOps()
|
||||
WaitNextTick() (assume QuitStateMachineException thrown) . . . . . . in WaitRunDevsRunOps()
|
||||
foreach (var device in devices) device.RunDeviceBefore(); . . . . . . in StateMachine.Worker() catch()
|
||||
State.RunOperations(); . . . . . . . . . . . . . . . . . . . . . . . . in StateMachine.Worker() catch()
|
||||
State.Empty.EnterState(); . . . . . . . . . . . . . . . . . . . . . . in StateMachine.Worker() catch()
|
||||
foreach (var device in devices) device.RunDeviceAfter(); . . . . . . . in StateMachine.Worker() catch()
|
||||
foreach (var device in devices) device.StopDevice(); . . . . . . . . . in StateMachine.Worker() catch()
|
||||
@@ -1,11 +0,0 @@
|
||||
Showing tabs in the designer:
|
||||
- select mainTabControl
|
||||
- in Properies change SizeMode to normal
|
||||
- in Properies change ItemSize to 0; 20
|
||||
|
||||
Hiding tabs in the designer:
|
||||
- select mainTabControl
|
||||
- in Properies change SizeMode to Fixed
|
||||
- in Poperties change ItemSize to 0; 1
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
af242843887f3bdcc52e485483356eaccd37ba67a35941530bd195a8310fc7d5aca8560576dfb62ad5a4bd2df789a5e8be068e62e7c976d6eeed8d63abbd9909
|
||||
|
||||
|
||||
= staratura
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")]
|
||||
@@ -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
@@ -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.
@@ -320,6 +320,13 @@ namespace Results
|
||||
|
||||
ThreeState, /// 272
|
||||
|
||||
Conduct, /// 273
|
||||
Conduct_start, /// 274
|
||||
Conduct_end, /// 275
|
||||
Conduct_avg, /// 276
|
||||
Conduct_min, /// 277
|
||||
Conduct_max, /// 278
|
||||
|
||||
Count,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.26.1447.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1447.0")]
|
||||
[assembly: AssemblyVersion("2.26.1458.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1458.0")]
|
||||
|
||||
Generated
+9
@@ -1977,6 +1977,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Conduct..
|
||||
/// </summary>
|
||||
internal static string VName_Conduct {
|
||||
get {
|
||||
return ResourceManager.GetString("VName_Conduct", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Ro.
|
||||
/// </summary>
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<value>Ergebnisse</value>
|
||||
</data>
|
||||
<data name="Batch_nr" xml:space="preserve">
|
||||
<value>Stapel Nr.</value>
|
||||
<value>Los Nr.</value>
|
||||
</data>
|
||||
<data name="Bench" xml:space="preserve">
|
||||
<value>Prüfstand</value>
|
||||
@@ -154,13 +154,13 @@
|
||||
<value>Endzeit</value>
|
||||
</data>
|
||||
<data name="EndState_aux" xml:space="preserve">
|
||||
<value>Eindstand Nebenz.</value>
|
||||
<value>Endstand Nebenzähler</value>
|
||||
</data>
|
||||
<data name="EndState_main" xml:space="preserve">
|
||||
<value>Eindstand Hauptz.</value>
|
||||
<value>Endstand Hauptzähler</value>
|
||||
</data>
|
||||
<data name="End_state" xml:space="preserve">
|
||||
<value>Eindstand</value>
|
||||
<value>Endstand</value>
|
||||
</data>
|
||||
<data name="ErrLimHi" xml:space="preserve">
|
||||
<value>Fehlergrenze hoch</value>
|
||||
@@ -175,10 +175,10 @@
|
||||
<value>Referenzfehler</value>
|
||||
</data>
|
||||
<data name="Err_aux" xml:space="preserve">
|
||||
<value>Fehler Nebenz.</value>
|
||||
<value>Fehler Nebenzähler</value>
|
||||
</data>
|
||||
<data name="Err_main" xml:space="preserve">
|
||||
<value>Fehler Hauptz.</value>
|
||||
<value>Fehler Hauptzähler</value>
|
||||
</data>
|
||||
<data name="Flow" xml:space="preserve">
|
||||
<value>Durchfluss</value>
|
||||
@@ -187,13 +187,13 @@
|
||||
<value>Format</value>
|
||||
</data>
|
||||
<data name="H_amb" xml:space="preserve">
|
||||
<value>H umgebung</value>
|
||||
<value>Luftfeuchte Umgebung</value>
|
||||
</data>
|
||||
<data name="Item" xml:space="preserve">
|
||||
<value>Posten</value>
|
||||
<value>Objekt</value>
|
||||
</data>
|
||||
<data name="MClass" xml:space="preserve">
|
||||
<value>Metr. Klasse</value>
|
||||
<value>Metrologische Klasse</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
@@ -220,34 +220,34 @@
|
||||
<value>Impulse/l</value>
|
||||
</data>
|
||||
<data name="P_amb" xml:space="preserve">
|
||||
<value>Dr umgebung</value>
|
||||
<value>Druck amb. (Umgebungsdruck)</value>
|
||||
</data>
|
||||
<data name="P_dn_end" xml:space="preserve">
|
||||
<value>Dr aus ende</value>
|
||||
<value>Druck Eingang Prüfungsende</value>
|
||||
</data>
|
||||
<data name="P_dn" xml:space="preserve">
|
||||
<value>Dr aus</value>
|
||||
<value>Druck Eingang</value>
|
||||
</data>
|
||||
<data name="P_dn_start" xml:space="preserve">
|
||||
<value>Dr aus start</value>
|
||||
<value>Druck Eingang Prüfungsbeginn</value>
|
||||
</data>
|
||||
<data name="P_up_end" xml:space="preserve">
|
||||
<value>Dr ein ende</value>
|
||||
<value>Druck Ausgang Prüfungsende</value>
|
||||
</data>
|
||||
<data name="P_up" xml:space="preserve">
|
||||
<value>Dr ein</value>
|
||||
<value>Druck Ausgang</value>
|
||||
</data>
|
||||
<data name="P_up_start" xml:space="preserve">
|
||||
<value>Dr ein start</value>
|
||||
<value>Druck Ausgang Prüfungsanfang</value>
|
||||
</data>
|
||||
<data name="Q_fall" xml:space="preserve">
|
||||
<value>Q fall</value>
|
||||
<value>Q Fall </value>
|
||||
</data>
|
||||
<data name="Q_from" xml:space="preserve">
|
||||
<value>Q von</value>
|
||||
</data>
|
||||
<data name="Q_rise" xml:space="preserve">
|
||||
<value>Q steig</value>
|
||||
<value>Q Steig</value>
|
||||
</data>
|
||||
<data name="Q_to" xml:space="preserve">
|
||||
<value>Q bis</value>
|
||||
@@ -292,13 +292,13 @@
|
||||
<value>Prüfvolumen</value>
|
||||
</data>
|
||||
<data name="T_amb" xml:space="preserve">
|
||||
<value>T umgebung</value>
|
||||
<value>T Umgebung</value>
|
||||
</data>
|
||||
<data name="T_div" xml:space="preserve">
|
||||
<value>T div</value>
|
||||
<value>T Umschaltung</value>
|
||||
</data>
|
||||
<data name="T_end" xml:space="preserve">
|
||||
<value>Endzeit</value>
|
||||
<value>T Ende</value>
|
||||
</data>
|
||||
<data name="T_in" xml:space="preserve">
|
||||
<value>T ein</value>
|
||||
@@ -364,13 +364,13 @@
|
||||
<value>Hersteller</value>
|
||||
</data>
|
||||
<data name="Meter_type" xml:space="preserve">
|
||||
<value>Typ</value>
|
||||
<value>WZ-Typ</value>
|
||||
</data>
|
||||
<data name="Compound" xml:space="preserve">
|
||||
<value>Verbund</value>
|
||||
<value>Verbundzähler</value>
|
||||
</data>
|
||||
<data name="Heat_meter" xml:space="preserve">
|
||||
<value />
|
||||
<value>Wärmezähler</value>
|
||||
</data>
|
||||
<data name="Single" xml:space="preserve">
|
||||
<value>Einzel</value>
|
||||
@@ -382,16 +382,16 @@
|
||||
<value>Größe</value>
|
||||
</data>
|
||||
<data name="Page" xml:space="preserve">
|
||||
<value>Blz.</value>
|
||||
<value>Seite</value>
|
||||
</data>
|
||||
<data name="Water_Meter" xml:space="preserve">
|
||||
<value>Wasserzähler</value>
|
||||
</data>
|
||||
<data name="aux" xml:space="preserve">
|
||||
<value>Nebenz.</value>
|
||||
<value>Nebenzähler</value>
|
||||
</data>
|
||||
<data name="main" xml:space="preserve">
|
||||
<value>Hauptz.</value>
|
||||
<value>Hauptzähler</value>
|
||||
</data>
|
||||
<data name="fall" xml:space="preserve">
|
||||
<value>fall</value>
|
||||
@@ -409,6 +409,420 @@
|
||||
<value>Masse</value>
|
||||
</data>
|
||||
<data name="Density_correction" xml:space="preserve">
|
||||
<value>Dichtekorektur</value>
|
||||
<value>Dichtekorrektur</value>
|
||||
</data>
|
||||
<data name="Energy" xml:space="preserve">
|
||||
<value>Energie</value>
|
||||
</data>
|
||||
<data name="Energy_ref" xml:space="preserve">
|
||||
<value>Energie ref.</value>
|
||||
</data>
|
||||
<data name="P_delta" xml:space="preserve">
|
||||
<value>Druckdifferenz </value>
|
||||
</data>
|
||||
<data name="P_delta_end" xml:space="preserve">
|
||||
<value>Druckdifferenz Ende Prüfung</value>
|
||||
</data>
|
||||
<data name="P_delta_mean" xml:space="preserve">
|
||||
<value>Druckdifferenz Delta Prüfung </value>
|
||||
</data>
|
||||
<data name="P_delta_start" xml:space="preserve">
|
||||
<value>Druckdifferenz Beginn Prüfung</value>
|
||||
</data>
|
||||
<data name="End_volume" xml:space="preserve">
|
||||
<value>Ende Volumen</value>
|
||||
</data>
|
||||
<data name="Start_volume" xml:space="preserve">
|
||||
<value>Start Volumen</value>
|
||||
</data>
|
||||
<data name="End_volume_aux" xml:space="preserve">
|
||||
<value>Ende Volumen Nebenzähler</value>
|
||||
</data>
|
||||
<data name="End_volume_main" xml:space="preserve">
|
||||
<value>Ende Volumen Hauptzähler</value>
|
||||
</data>
|
||||
<data name="Start_volume_aux" xml:space="preserve">
|
||||
<value>Start Volumen Nebenzähler</value>
|
||||
</data>
|
||||
<data name="Start_volume_main" xml:space="preserve">
|
||||
<value>Start Volumen Hauptzähler</value>
|
||||
</data>
|
||||
<data name="Volume_aux" xml:space="preserve">
|
||||
<value>Volumen Nebenzähler</value>
|
||||
</data>
|
||||
<data name="Volume_main" xml:space="preserve">
|
||||
<value>Volumen Hauptzähler</value>
|
||||
</data>
|
||||
<data name="End_mass" xml:space="preserve">
|
||||
<value>End Prüfung</value>
|
||||
</data>
|
||||
<data name="Start_mass" xml:space="preserve">
|
||||
<value>Start Prüfung</value>
|
||||
</data>
|
||||
<data name="VName_Flow" xml:space="preserve">
|
||||
<value>Q</value>
|
||||
</data>
|
||||
<data name="VName_Press" xml:space="preserve">
|
||||
<value>Druck</value>
|
||||
</data>
|
||||
<data name="VName_Temp" xml:space="preserve">
|
||||
<value>Temperatur</value>
|
||||
</data>
|
||||
<data name="VName_Dens" xml:space="preserve">
|
||||
<value>Ro</value>
|
||||
</data>
|
||||
<data name="VName_Humi" xml:space="preserve">
|
||||
<value>Hu</value>
|
||||
</data>
|
||||
<data name="VName_TstTime" xml:space="preserve">
|
||||
<value>Tau</value>
|
||||
</data>
|
||||
<data name="VName_Vol" xml:space="preserve">
|
||||
<value>Vol.</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_de_ac" xml:space="preserve">
|
||||
<value>Druckdifferenz gemessen von Druckgeber aktuell</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_de_avg" xml:space="preserve">
|
||||
<value>Druckdifferenz gemessen von Druckgeber Mittelwert</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_de_en" xml:space="preserve">
|
||||
<value>Druckdifferenz gemessen von Druckgeber am Prüfungsende</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_de_me" xml:space="preserve">
|
||||
<value>Druckdifferenz gemessen von Druckgeber-Durchschnitt </value>
|
||||
</data>
|
||||
<data name="Tooltip_P_de_st" xml:space="preserve">
|
||||
<value>Druckdifferenz gemessen von Druckgeber am Prüfungsbeginn</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_dw_ac" xml:space="preserve">
|
||||
<value>Druck am Prüfstreckenausgang aktuell</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_dw_avg" xml:space="preserve">
|
||||
<value>Druck Mittelwert am Prüfstreckenausgang</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_dw_en" xml:space="preserve">
|
||||
<value>Druck am Prüfstreckenausgang am Ende der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_dw_me" xml:space="preserve">
|
||||
<value>Druck Durchnschnitt am Prüfstreckenausgang</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_dw_st" xml:space="preserve">
|
||||
<value>Hauptdruck am Ausgang bei Prüfbeginn</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_up_ac" xml:space="preserve">
|
||||
<value>Hauptdruck am Eingang aktuell</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_up_avg" xml:space="preserve">
|
||||
<value>Druck Mittelwert am Prüfstreckeneingang</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_up_en" xml:space="preserve">
|
||||
<value>Druck am Prüfstreckeneingang am Ende der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_up_me" xml:space="preserve">
|
||||
<value>Druck Durchnschnitt am Prüfstreckeneingang</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_up_st" xml:space="preserve">
|
||||
<value>Druck am Prüfstreckeneingang bei Prüfbeginn</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_m_r" xml:space="preserve">
|
||||
<value>Durchfluss berechnet von Masse der Waage und Zeit </value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_riac" xml:space="preserve">
|
||||
<value>Durchfluss angezeigt von NHO/ aktuell</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_rim" xml:space="preserve">
|
||||
<value>Durchfluss von aktuellem NHO/ Durchnschnitt</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_v_r" xml:space="preserve">
|
||||
<value>Durchfluss von aktuellem Refferenzzähler</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_di_ac" xml:space="preserve">
|
||||
<value>Temperatur aktuell an der Umschaltung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_di_avg" xml:space="preserve">
|
||||
<value>Temperatur-Mittelwert an der Umschaltung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_di_en" xml:space="preserve">
|
||||
<value>Temperatur Umschaltung am Prüfungsende (4 letzten Messungen)</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_di_me" xml:space="preserve">
|
||||
<value>Temperatur-Durchschnitt an der Umschaltung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_di_st" xml:space="preserve">
|
||||
<value>Temperatur Umschaltung am Prüfungsanfang (4 ersten Messungen)</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_dw_ac" xml:space="preserve">
|
||||
<value>Temperatur aktuell am Prüfstreckenausgang</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_dw_avg" xml:space="preserve">
|
||||
<value>Temperatur-Mittelwert am Prüstreckenausgang</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_dw_en" xml:space="preserve">
|
||||
<value>Temperatur Prüfstreckenausgang am Prüfungsende ( 4 letzten Messungen)</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_dw_me" xml:space="preserve">
|
||||
<value>Temperatur-Durchschnitt am Prüstreckenausgang</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_dw_st" xml:space="preserve">
|
||||
<value>Temperatur Prüfstreckenausgang am Prüfungsanfang( 4 ersten Messungen)</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_ac" xml:space="preserve">
|
||||
<value>Temperatur aktuell am Prüfstreckeneingang</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_avg" xml:space="preserve">
|
||||
<value>Temperatur-Mittelwert am Prüstreckeneingang während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_en" xml:space="preserve">
|
||||
<value>Temperatur Prüfstreckeneingang und -Ausgang am Prüfungsanfang( 4 Messungen bevor Ende)</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_me" xml:space="preserve">
|
||||
<value>Temperatur-Durchschnitt am Prüfstreckeneingang wärend der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_st" xml:space="preserve">
|
||||
<value>Temperatur Prüstreckeneingang am Prüfungsbeginn (4 Messungen nach Beginn)</value>
|
||||
</data>
|
||||
<data name="Tooltip_E_rel" xml:space="preserve">
|
||||
<value>Relative Messabweichung eines WZ</value>
|
||||
</data>
|
||||
<data name="Tooltip_E_rel_ref" xml:space="preserve">
|
||||
<value>Relative Messabweichung des NHO</value>
|
||||
</data>
|
||||
<data name="Tooltip_sn" xml:space="preserve">
|
||||
<value>Serie Nr. des WZ</value>
|
||||
</data>
|
||||
<data name="Tooltip_sn_aux" xml:space="preserve">
|
||||
<value>Serie Nr. des Nebenzählers (Verbundzähler)</value>
|
||||
</data>
|
||||
<data name="Tooltip_sn_main" xml:space="preserve">
|
||||
<value>Serie Nr. des Hauptzählers (Verbundzähler)</value>
|
||||
</data>
|
||||
<data name="Tooltip_Vol_Mt" xml:space="preserve">
|
||||
<value>Volumen gemessen vom geprüften WZ</value>
|
||||
</data>
|
||||
<data name="Tooltip_Vol_rm" xml:space="preserve">
|
||||
<value>Refferenz-Volumen vom geprüften WZ</value>
|
||||
</data>
|
||||
<data name="VName_Error" xml:space="preserve">
|
||||
<value>E</value>
|
||||
</data>
|
||||
<data name="Tooltip_Hu_Amb_M" xml:space="preserve">
|
||||
<value>Umgebungs-Luftfeuchtigkeit während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_Amb_M" xml:space="preserve">
|
||||
<value>Umgebungs-Druck während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_Amb_M" xml:space="preserve">
|
||||
<value>Umgebungs-Temperatur während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Test_done" xml:space="preserve">
|
||||
<value>Prüfung erledigt</value>
|
||||
</data>
|
||||
<data name="Test_passed" xml:space="preserve">
|
||||
<value>Prüfung beendet</value>
|
||||
</data>
|
||||
<data name="No" xml:space="preserve">
|
||||
<value>Nein</value>
|
||||
</data>
|
||||
<data name="Yes" xml:space="preserve">
|
||||
<value>Ja</value>
|
||||
</data>
|
||||
<data name="Error_flags" xml:space="preserve">
|
||||
<value>Fehlerflags</value>
|
||||
</data>
|
||||
<data name="Legalizator" xml:space="preserve">
|
||||
<value>Prüfstellenleiter</value>
|
||||
</data>
|
||||
<data name="User_description" xml:space="preserve">
|
||||
<value>Benutzerbeschreibung</value>
|
||||
</data>
|
||||
<data name="Failed_meters_count" xml:space="preserve">
|
||||
<value>WZ-Prüfung nicht bestanden</value>
|
||||
</data>
|
||||
<data name="Passed_meters_count" xml:space="preserve">
|
||||
<value>WZ-Prüfung bestanden</value>
|
||||
</data>
|
||||
<data name="sensitivity" xml:space="preserve">
|
||||
<value>Empfindlichkeit</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_end" xml:space="preserve">
|
||||
<value>Durchflusswert vom NHO-am Prüfungsende</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_max" xml:space="preserve">
|
||||
<value>Durchflusswert vom NHO-max</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_min" xml:space="preserve">
|
||||
<value>Durchflusswert vom NHO-min</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_start" xml:space="preserve">
|
||||
<value>Durchflusswert vom NHO-am Prüfungsanfang</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_dw_max" xml:space="preserve">
|
||||
<value>Druck max. am Prüfstandsausgang während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_dw_min" xml:space="preserve">
|
||||
<value>Druck min. am Prüfstandsausgang während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_up_max" xml:space="preserve">
|
||||
<value>Druck max. am Prüfstandseingang während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_up_min" xml:space="preserve">
|
||||
<value>Druck min. am Prüfstandseingang während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_di_max" xml:space="preserve">
|
||||
<value>Temp. max. an der Umschaltung während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_di_min" xml:space="preserve">
|
||||
<value>Temp. min. an der Umschaltung während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_dw_max" xml:space="preserve">
|
||||
<value>Temp. max am Prüfstandsausgang während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_dw_min" xml:space="preserve">
|
||||
<value>Temp. min. am Prüfstandsausgang während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_max" xml:space="preserve">
|
||||
<value>Temp. max am Prüfstandseingang während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_min" xml:space="preserve">
|
||||
<value>Temp. min am Prüfstandseingang während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_de_max" xml:space="preserve">
|
||||
<value>Druckdifferenz gemessen von Delta P /WZ max. während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_de_min" xml:space="preserve">
|
||||
<value>Druckdifferenz gemessen von Delta P /WZ min. während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_Rho_Wa_calc" xml:space="preserve">
|
||||
<value>Dichte vom Wasser aus Tabelle oder Formel</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_rho_0" xml:space="preserve">
|
||||
<value>Temperatur von der Wasserprobe bei der Dichtekalibrierung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_ln_ac" xml:space="preserve">
|
||||
<value>Temperatur aktuell in der Prüfstrecke</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_ln_avg" xml:space="preserve">
|
||||
<value>Temperatur-Mittelwert in der Prüfstrecke während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_ln_en" xml:space="preserve">
|
||||
<value>Temperatur in der Prüfstrecke am Ende der Prüfung -4 letzten Messungen</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_ln_max" xml:space="preserve">
|
||||
<value>Temperatur max. in der Prüfstrecke während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_ln_me" xml:space="preserve">
|
||||
<value>Temperatur-Durchschnitt in der Prüfstrecke während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_ln_min" xml:space="preserve">
|
||||
<value>Temperatur min. in der Prüfstrecke während der Prüfung</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_ln_st" xml:space="preserve">
|
||||
<value>Temperatur in der Prüfstrecke am Anfang der Prüfung -4 ersten Messungen</value>
|
||||
</data>
|
||||
<data name="Unit" xml:space="preserve">
|
||||
<value>Einheit</value>
|
||||
</data>
|
||||
<data name="Procedure_description" xml:space="preserve">
|
||||
<value>Prüfprozess Beschreibung</value>
|
||||
</data>
|
||||
<data name="Bench_ID" xml:space="preserve">
|
||||
<value>Prüfstand ID</value>
|
||||
</data>
|
||||
<data name="Bench_name" xml:space="preserve">
|
||||
<value>Prüfstamdsname</value>
|
||||
</data>
|
||||
<data name="Address" xml:space="preserve">
|
||||
<value>Adresse</value>
|
||||
</data>
|
||||
<data name="Tooltip_E_rel_last" xml:space="preserve">
|
||||
<value>Relativer Fehler vom WZ in vorheriger Prüfung/ in Produktion</value>
|
||||
</data>
|
||||
<data name="Batch" xml:space="preserve">
|
||||
<value>Zälerlos</value>
|
||||
</data>
|
||||
<data name="repetition" xml:space="preserve">
|
||||
<value>Wiederholung</value>
|
||||
</data>
|
||||
<data name="Invalid_Q2_correction_factors" xml:space="preserve">
|
||||
<value>Fehlerhafter Q2 Korrektur-Faktor</value>
|
||||
</data>
|
||||
<data name="Previous_step_is_missing_or_NOK" xml:space="preserve">
|
||||
<value>Vorgehender Schritt fehlt oder nicht OK</value>
|
||||
</data>
|
||||
<data name="Test_repetition_count_exceeded_upper_limit" xml:space="preserve">
|
||||
<value>Prüfungswiederholung Anzahl überschritten!</value>
|
||||
</data>
|
||||
<data name="Wrong_iPerl_counting_direction" xml:space="preserve">
|
||||
<value>Falsche iPERL Durchflussrichtung</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>Nicht OK</value>
|
||||
</data>
|
||||
<data name="Passed" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Test_in_progress" xml:space="preserve">
|
||||
<value>Prüfung läuft</value>
|
||||
</data>
|
||||
<data name="Counter_0" xml:space="preserve">
|
||||
<value>Zähler {0}</value>
|
||||
</data>
|
||||
<data name="Date_and_time" xml:space="preserve">
|
||||
<value>Datum und Zeit</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="Step" xml:space="preserve">
|
||||
<value>Schritt</value>
|
||||
</data>
|
||||
<data name="Workplace" xml:space="preserve">
|
||||
<value>Arbeitsplatz</value>
|
||||
</data>
|
||||
<data name="Workflow" xml:space="preserve">
|
||||
<value>Arbeitsablauf</value>
|
||||
</data>
|
||||
<data name="Production_tracing_results" xml:space="preserve">
|
||||
<value>Produktion Ergebnisse verfolgen</value>
|
||||
</data>
|
||||
<data name="Code" xml:space="preserve">
|
||||
<value>Code</value>
|
||||
</data>
|
||||
<data name="Part" xml:space="preserve">
|
||||
<value>Teil</value>
|
||||
</data>
|
||||
<data name="All_results" xml:space="preserve">
|
||||
<value>Alle Ergebnisse</value>
|
||||
</data>
|
||||
<data name="Graphs" xml:space="preserve">
|
||||
<value>Graphiken</value>
|
||||
</data>
|
||||
<data name="No_water_meter" xml:space="preserve">
|
||||
<value>Kein WZ</value>
|
||||
</data>
|
||||
<data name="Serial_number_is_missing" xml:space="preserve">
|
||||
<value>Serie Nr. fehlt.</value>
|
||||
</data>
|
||||
<data name="Lower_limit" xml:space="preserve">
|
||||
<value>Untere Grenze</value>
|
||||
</data>
|
||||
<data name="Upper_limit" xml:space="preserve">
|
||||
<value>Obere Grenze</value>
|
||||
</data>
|
||||
<data name="Water_meter_results" xml:space="preserve">
|
||||
<value>WZ Ergebnisse</value>
|
||||
</data>
|
||||
<data name="Relative_error" xml:space="preserve">
|
||||
<value>Relativer Fehler</value>
|
||||
</data>
|
||||
<data name="This_position_is_disabled" xml:space="preserve">
|
||||
<value>Position nicht aktiviert.</value>
|
||||
</data>
|
||||
<data name="Available_items" xml:space="preserve">
|
||||
<value>Verfügbare Positionen</value>
|
||||
</data>
|
||||
<data name="Selected_items" xml:space="preserve">
|
||||
<value>Ausgewählte Objekte</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -825,4 +825,7 @@
|
||||
<data name="Selected_items" xml:space="preserve">
|
||||
<value>Selected item</value>
|
||||
</data>
|
||||
<data name="VName_Conduct" xml:space="preserve">
|
||||
<value>Conduct.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -19,7 +19,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;GELSENWASSER;LANG_DE</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;GELSENWASSER;LANG_DE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -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)))));
|
||||
@@ -297,6 +297,16 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_mean_from_up_down_per_mtr, string.Format("{0} UP-DW ME per mtr ()", Strings.VName_Press), "P delta mean from UP/DW per one meter", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).PressUpMean - w.GetTestRslt(t).PressDownMean) / Math.Max(1, w.GetTestRslt(t).Batch.WaterMeters.Count))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_PMax_test_mean, string.Format("{0} PMax mean ()", Strings.VName_Press), "Mean PMax test pressure", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null || !w.GetTestRslt(t).IsPMaxTest()) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).PressUpMean + w.GetTestRslt(t).PressDownMean) / 2)));
|
||||
|
||||
///
|
||||
/// Electrical conductivity of water
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Conduct, string.Format("{0} ME ()", Strings.VName_Conduct), Quantity.Conductivity, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).ConductMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Conduct_start, string.Format("{0} ST ()", Strings.VName_Conduct), Quantity.Conductivity, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).ConductStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Conduct_end, string.Format("{0} EN ()", Strings.VName_Conduct), Quantity.Conductivity, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).ConductEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Conduct_avg, string.Format("{0} avg ()", Strings.VName_Conduct), Quantity.Conductivity, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).ConductStart + w.GetTestRslt(t).ConductEnd) / 2)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Conduct_min, string.Format("{0} min ()", Strings.VName_Conduct), Quantity.Conductivity, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).ConductMin)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Conduct_max, string.Format("{0} max ()", Strings.VName_Conduct), Quantity.Conductivity, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).ConductMax)));
|
||||
|
||||
///
|
||||
/// Ambient temperature/pressure/humidity/Buoyancy
|
||||
///
|
||||
@@ -326,7 +336,7 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result, Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? w.PassedColorStr(f)
|
||||
: ((w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr(f))));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ThreeState, "Three state result", Quantity.Enum, ItemCategory.MeterResult, (w, t, u, f, p) => FormatThreeState(f, w.ThreeStateFromTests())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ThreeState, "Three state result", Quantity.Enumerated, ItemCategory.MeterResult, (w, t, u, f, p) => FormatThreeState(f, w.ThreeStateFromTests())));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.RefFlowmeter, "Ref. flowmeter", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null) ? FormatStr(f, w.GetTestRslt(t).RefFlowmeter()) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ResultOrErrorFlags, "Winiki lub E", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.PassedOrErrorFlagsStr()))); /// PL specific result
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -20,11 +20,18 @@ namespace ResultsBrowser
|
||||
public DateTime End;
|
||||
public int HydrPruefung;
|
||||
public double AdjErr;
|
||||
public double Q4Err;
|
||||
public double Q3Err;
|
||||
public double Q2AdjErr;
|
||||
public double Q2Err;
|
||||
public double Q1Err;
|
||||
public double AdjErrA4;
|
||||
public double Q3RlErr;
|
||||
public double Q3LrErr;
|
||||
public double Q2RlErr;
|
||||
public double Q2LrErr;
|
||||
public double Q2acRlErr;
|
||||
public double Q2acLrErr;
|
||||
public double Q1RlErr;
|
||||
public double Q1LrErr;
|
||||
public int CalibFactor;
|
||||
|
||||
@@ -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.1498.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1498.0")]
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Print_query_results" xml:space="preserve">
|
||||
<value>Ergebnise drucken</value>
|
||||
<value>Ergebnisse Abfrage Drucken</value>
|
||||
</data>
|
||||
<data name="Procedure" xml:space="preserve">
|
||||
<value>Prüfvorlage</value>
|
||||
@@ -172,7 +172,7 @@
|
||||
<value>Protokoll</value>
|
||||
</data>
|
||||
<data name="Query_results" xml:space="preserve">
|
||||
<value>Ergebnisse</value>
|
||||
<value>Abfrageergebnisse</value>
|
||||
</data>
|
||||
<data name="Results_Browser" xml:space="preserve">
|
||||
<value>Analyse der Ergebnisse</value>
|
||||
@@ -199,7 +199,7 @@
|
||||
<value>Statistiken</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>Prüfpunkt</value>
|
||||
<value>Prüfung</value>
|
||||
</data>
|
||||
<data name="Test_bench" xml:space="preserve">
|
||||
<value>Prüfstand</value>
|
||||
@@ -231,4 +231,76 @@
|
||||
<data name="Print" xml:space="preserve">
|
||||
<value>Drucken</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="ConfigureDatabaseText" xml:space="preserve">
|
||||
<value>Password für Prüfstand configurieren</value>
|
||||
</data>
|
||||
<data name="ExitBtnText" xml:space="preserve">
|
||||
<value>Exit</value>
|
||||
</data>
|
||||
<data name="Component" xml:space="preserve">
|
||||
<value>Komponenten</value>
|
||||
</data>
|
||||
<data name="Configure" xml:space="preserve">
|
||||
<value>Konfigurieren</value>
|
||||
</data>
|
||||
<data name="Printer" xml:space="preserve">
|
||||
<value>Drucker</value>
|
||||
</data>
|
||||
<data name="Question" xml:space="preserve">
|
||||
<value>Fragen</value>
|
||||
</data>
|
||||
<data name="Add" xml:space="preserve">
|
||||
<value>&Hinzufügen</value>
|
||||
</data>
|
||||
<data name="Message" xml:space="preserve">
|
||||
<value>Nachricht</value>
|
||||
</data>
|
||||
<data name="Data" xml:space="preserve">
|
||||
<value>Daten</value>
|
||||
</data>
|
||||
<data name="All_files" xml:space="preserve">
|
||||
<value>Alle Dateien</value>
|
||||
</data>
|
||||
<data name="Query_files" xml:space="preserve">
|
||||
<value>Abfragedateien</value>
|
||||
</data>
|
||||
<data name="No_program_settings_found" xml:space="preserve">
|
||||
<value>Programmeinstellungen nicht gefunden</value>
|
||||
</data>
|
||||
<data name="Using_default_settings" xml:space="preserve">
|
||||
<value>Einstellungen Vorgaben benutzen.</value>
|
||||
</data>
|
||||
<data name="Selected_language_not_supported" xml:space="preserve">
|
||||
<value>Ausgewählte Sprache wird nicht unterstützt.</value>
|
||||
</data>
|
||||
<data name="Using_English" xml:space="preserve">
|
||||
<value>Englische Sprache benutzen!</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Warnung</value>
|
||||
</data>
|
||||
<data name="Format" xml:space="preserve">
|
||||
<value>Formatieren</value>
|
||||
</data>
|
||||
<data name="Configure_printer" xml:space="preserve">
|
||||
<value>Drucker konfigurieren.</value>
|
||||
</data>
|
||||
<data name="No_printer_defined" xml:space="preserve">
|
||||
<value>Kein Drucker ausgewählt.</value>
|
||||
</data>
|
||||
<data name="Printing_failed" xml:space="preserve">
|
||||
<value>Druck fehlgeschlagen</value>
|
||||
</data>
|
||||
<data name="Printing_completed" xml:space="preserve">
|
||||
<value>Druck vollständig</value>
|
||||
</data>
|
||||
<data name="Error_exporting_results" xml:space="preserve">
|
||||
<value>Fehler beim exportieren der Ergebnisse!</value>
|
||||
</data>
|
||||
<data name="Histograms" xml:space="preserve">
|
||||
<value>Histogramm</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -21,7 +21,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;GELSENWASSER;LANG_DE</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;GELSENWASSER;LANG_DE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
+254
-122
@@ -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)
|
||||
{
|
||||
@@ -609,12 +609,22 @@ namespace ResultsBrowser
|
||||
while (dr.Read())
|
||||
{
|
||||
int i = 0;
|
||||
string queryResult = dr.GetString(i++);
|
||||
|
||||
string queryResult;
|
||||
try { queryResult = dr.GetString(i++); }
|
||||
catch { queryResult = string.Empty; }
|
||||
|
||||
int maxPruefIx = dr.GetInt32(i++);
|
||||
int testBenchId = maxPruefIx / 100;
|
||||
maxPruefIx = maxPruefIx % 100;
|
||||
string prefix = dr.GetString(i++);
|
||||
int sn = dr.GetInt32(i++);
|
||||
|
||||
string prefix;
|
||||
try { prefix = dr.GetString(i++); }
|
||||
catch { prefix = string.Empty; }
|
||||
|
||||
int sn;
|
||||
try { sn = dr.GetInt32(i++); }
|
||||
catch { sn = -1; }
|
||||
|
||||
if (sn == -1) continue;
|
||||
|
||||
@@ -639,7 +649,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);
|
||||
}
|
||||
@@ -730,25 +739,35 @@ namespace ResultsBrowser
|
||||
double flow = dr.GetDouble(i++); /// Q_WZ
|
||||
double error = dr.GetDouble(i++); /// Q_FEHLER
|
||||
bool testPassed = (dr.GetInt32(i++) != 0);
|
||||
|
||||
#if true
|
||||
/// 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 1: oraD.Q1LrErr = error; break;
|
||||
case 2: oraD.Q2acLrErr = error; break;
|
||||
case 3: oraD.Q2LrErr = error; break;
|
||||
case 5: oraD.Q3LrErr = error; break;
|
||||
case 6: oraD.Q1RlErr = error; break;
|
||||
case 7: oraD.Q2acRlErr = error; break;
|
||||
case 8: oraD.Q2RlErr = error; break;
|
||||
case 10: oraD.Q3RlErr = error; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
#else /// DEWA specific
|
||||
switch (testId)
|
||||
{
|
||||
case -1: oraD.AdjErr = error; break;
|
||||
case 1: oraD.Q1Err = error; break;
|
||||
case 2: oraD.Q2Err = error; break;
|
||||
case 3: oraD.Q2AdjErr = error; break;
|
||||
case 4: oraD.Q3Err = error; break;
|
||||
case 5: oraD.Q4Err = error; break;
|
||||
default: break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
dr.Close();
|
||||
} /// end of foreach (var oraD in OraDatas)
|
||||
@@ -756,6 +775,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 +886,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,18 +946,19 @@ namespace ResultsBrowser
|
||||
consoleTextBox.Text += Environment.NewLine;
|
||||
|
||||
if (session != null) session.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
consoleTextBox.Text += "End reading additional data from MySQL\r\n";
|
||||
|
||||
consoleTextBox.Text += "CSV data begin\r\n";
|
||||
using (TextWriter writer = new StreamWriter(dlg.DestinationFile))
|
||||
{
|
||||
writer.WriteLine(string.Format("PO; prefix; S/N; PcbNr; Bench; Batch; Start; Start; End; End; Pos; AdjA0; AdjA4; Q3RL; Q3LR; CalF; CAlF_LNA; HP; Q2cRL; Q2cLR"));
|
||||
#if true
|
||||
writer.WriteLine(string.Format("PO; prefix; S/N; PcbNr; Bench; Batch; Start; Start; End; End; Pos; AdjA0; AdjA4; Q3RL; Q3LR; Q2RL; Q2LR; Q2acRL; Q2acLR; Q1RL; Q1LR; CalF; CAlF_LNA; HP; Q2cRL; Q2cLR"));
|
||||
//Console.WriteLine(string.Format("s/n;PCB nr.;bench;batch;position;Err. at 640 l/h;Err. LNA at 640 l/h;Err. Q3 RL;Err. Q3 LR;Cal.f.;Cal.f.LNA;Q2 corr.f. RL;Q2 corr.f. LR"));
|
||||
foreach (var oraD in oraDatas)
|
||||
{
|
||||
writer.WriteLine(string.Format("{0}; {1}; {2}; =(\"{3}\"); {4}; {5}; {7}; {8}; {9}; {10};{11};{12};{13};{14};{15};{16};{17};{18};{19};{20}",
|
||||
writer.WriteLine(string.Format("{0}; {1}; {2}; =(\"{3}\"); {4}; {5}; {7}; {8}; {9}; {10};{11};{12};{13};{14};{15};{16};{17};{18};{19};{20};{21};{22};{23};{24};{25};{26};{27};{28}",
|
||||
//Console.WriteLine(string.Format("{2};=(\"{3}\"); {4};{5};{11};{12};{13};{14};{15};{16};{17};{19};{20}",
|
||||
/* 0 */ oraD.PO,
|
||||
/* 1 */ oraD.Prefix,
|
||||
@@ -879,18 +972,57 @@ namespace ResultsBrowser
|
||||
/* 9 */ oraD.End.ToShortDateString(),
|
||||
/* 10 */ oraD.End.ToShortTimeString(),
|
||||
/* 11 */ oraD.WMPosition,
|
||||
/* 12 */ oraD.AdjErr.ToString("F2"),
|
||||
/* 13 */ oraD.AdjErrA4.ToString("F2"),
|
||||
/* 14 */ oraD.Q3RlErr.ToString("F2"),
|
||||
/* 15 */ oraD.Q3LrErr.ToString("F2"),
|
||||
/* 16 */ oraD.CalibFactor,
|
||||
/* 17 */ oraD.CalibFactorLNA,
|
||||
/* 18 */ oraD.HydrPruefung,
|
||||
/* 19 */ oraD.Q2CorrectionRl,
|
||||
/* 20 */ oraD.Q2CorrectionLr,
|
||||
/* 21 */ oraD.WMTypeId,
|
||||
/* 22 */ oraD.WMTypeRev));
|
||||
/* 12 */ oraD.AdjErr.ToString("F3"),
|
||||
/* 13 */ oraD.AdjErrA4.ToString("F3"),
|
||||
/* 14 */ oraD.Q3RlErr.ToString("F3"),
|
||||
/* 15 */ oraD.Q3LrErr.ToString("F3"),
|
||||
/* 16 */ oraD.Q2RlErr.ToString("F3"),
|
||||
/* 17 */ oraD.Q2LrErr.ToString("F3"),
|
||||
/* 18 */ oraD.Q2acRlErr.ToString("F3"),
|
||||
/* 19 */ oraD.Q2acLrErr.ToString("F3"),
|
||||
/* 20 */ oraD.Q1RlErr.ToString("F3"),
|
||||
/* 21 */ oraD.Q1LrErr.ToString("F3"),
|
||||
/* 22 */ oraD.CalibFactor,
|
||||
/* 23 */ oraD.CalibFactorLNA,
|
||||
/* 24 */ oraD.HydrPruefung,
|
||||
/* 25 */ oraD.Q2CorrectionRl,
|
||||
/* 26 */ oraD.Q2CorrectionLr,
|
||||
/* 27 */ oraD.WMTypeId,
|
||||
/* 28 */ oraD.WMTypeRev));
|
||||
}
|
||||
#else
|
||||
writer.WriteLine(string.Format("PO; prefix; S/N; PcbNr; Bench; Batch; Start; Start; End; End; Pos; AdjA0; Q4; Q3; Q2Adj; Q2; Q1; CalF; HP; Q2cRL; Q2cLR"));
|
||||
//Console.WriteLine(string.Format("s/n;PCB nr.;bench;batch;position;Err. at 640 l/h;Err. LNA at 640 l/h;Err. Q3 RL;Err. Q3 LR;Cal.f.;Cal.f.LNA;Q2 corr.f. RL;Q2 corr.f. LR"));
|
||||
foreach (var oraD in oraDatas)
|
||||
{
|
||||
writer.WriteLine(string.Format("{0}; {1}; {2}; =(\"{3}\"); {4}; {5}; {7}; {8}; {9}; {10};{11};{12};{13};{14};{15};{16};{17};{18};{19};{20};{21}",
|
||||
//Console.WriteLine(string.Format("{2};=(\"{3}\"); {4};{5};{11};{12};{13};{14};{15};{16};{17};{19};{20}",
|
||||
/* 0 */ oraD.PO,
|
||||
/* 1 */ oraD.Prefix,
|
||||
/* 2 */ oraD.SN,
|
||||
/* 3 */ oraD.PcbNr,
|
||||
/* 4 */ GetBenchName(oraD.TestBenchId),
|
||||
/* 5 */ oraD.BatchNr,
|
||||
/* 6 */ oraD.ProgramVer,
|
||||
/* 7 */ oraD.Start.ToShortDateString(),
|
||||
/* 8 */ oraD.Start.ToShortTimeString(),
|
||||
/* 9 */ oraD.End.ToShortDateString(),
|
||||
/* 10 */ oraD.End.ToShortTimeString(),
|
||||
/* 11 */ oraD.WMPosition,
|
||||
/* 12 */ oraD.AdjErr.ToString("F3"),
|
||||
/* 13 */ oraD.Q4Err.ToString("F3"),
|
||||
/* 14 */ oraD.Q3Err.ToString("F3"),
|
||||
/* 15 */ oraD.Q2AdjErr.ToString("F3"),
|
||||
/* 16 */ oraD.Q2Err.ToString("F3"),
|
||||
/* 17 */ oraD.Q1Err.ToString("F3"),
|
||||
/* 18 */ oraD.CalibFactor,
|
||||
/* 19 */ oraD.HydrPruefung,
|
||||
/* 20 */ oraD.Q2CorrectionRl,
|
||||
/* 21 */ oraD.Q2CorrectionLr,
|
||||
/* 22 */ oraD.WMTypeId,
|
||||
/* 23 */ oraD.WMTypeRev));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
consoleTextBox.Text += "CSV data end\r\n";
|
||||
|
||||
|
||||
@@ -67,6 +67,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventViewer", "EventViewer\
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csproj", "{C8939821-BA5C-4988-A3D0-BF53B74865C7}"
|
||||
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
|
||||
@@ -291,6 +295,26 @@ Global
|
||||
{C8939821-BA5C-4988-A3D0-BF53B74865C7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{C8939821-BA5C-4988-A3D0-BF53B74865C7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{C8939821-BA5C-4988-A3D0-BF53B74865C7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{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
|
||||
|
||||
@@ -8,13 +8,14 @@ using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase, GenericDevices.IBenchInfo
|
||||
public class Component : ComponentBase, GenericDevices.IBenchInfo, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("BenchInfo.iPerl({0})", Cfg.ToString(1)); }
|
||||
@@ -43,5 +44,37 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
|
||||
Events.DB.SetBenchName(myCfg.TestBenchName);
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = myCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -13,7 +13,7 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -37,6 +37,27 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
|
||||
public Side Side;
|
||||
public int MaxTestIndex; /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Buoyancy
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds measured (true) buoyancy value.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase
|
||||
public class Component : ComponentBase, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), Cfg.ToString(1)); }
|
||||
@@ -35,5 +37,36 @@ namespace TBF.BenchControl.DataContainers.Buoyancy
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = myCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataContainers.Buoyancy
|
||||
/// <summary>
|
||||
/// Holds backup and security options - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -24,6 +24,27 @@ namespace TBF.BenchControl.DataContainers.Buoyancy
|
||||
///
|
||||
public double Buoyancy;
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Density
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds measured (true) density value.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase
|
||||
public class Component : ComponentBase, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), Cfg.ToString(1)); }
|
||||
@@ -38,5 +40,36 @@ namespace TBF.BenchControl.DataContainers.Density
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = myCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataContainers.Density
|
||||
/// <summary>
|
||||
/// Holds backup and security options - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -25,6 +25,27 @@ namespace TBF.BenchControl.DataContainers.Density
|
||||
public double RealDensity;
|
||||
public double AtTemperature;
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
{
|
||||
public class Component : ComponentBase, IEvaporation, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||
}
|
||||
|
||||
readonly EvaporationCfg myCfg;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For a given temperature in [°C] returns an evaporation rate in [kg/s]
|
||||
/// </summary>
|
||||
public double EvaporationRate(double temperature)
|
||||
{
|
||||
return Config.Formulas.GetCorrection(temperature, Corrections) / 3600.0; /// Converted from kg/h to kg/s
|
||||
}
|
||||
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
myCfg = cfg as EvaporationCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = myCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds backup and security options - serializable configuration.
|
||||
/// </summary>
|
||||
public class EvaporationCfg : ComponentCfgBase, Generic.IComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EvaporationCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EvaporationCfgCtrl(); }
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EvaporationCfg() {}
|
||||
|
||||
public EvaporationCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
}
|
||||
public string ToString(int i)
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
{
|
||||
public partial class EvaporationCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EvaporationCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as EvaporationCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public EvaporationCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
{
|
||||
partial class EvaporationCfgCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(27, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// BasicPrinterCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "BasicPrinterCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+4
-5
@@ -1,11 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.Configs.NameOnly;
|
||||
|
||||
namespace TBF.BenchControl.Various.Evaporation
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
@@ -17,11 +16,11 @@ namespace TBF.BenchControl.Various.Evaporation
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new TestMethodCfg(this.GetType().Namespace.Substring(25), this); }
|
||||
public IComponentCfg DefaultConfig() { return new EvaporationCfg(this.GetType().Namespace.Substring(32), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
|
||||
return ComponentCfgBase.CreateFromDbEntity(EvaporationCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,7 +11,7 @@ using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.Diverter
|
||||
{
|
||||
public class Diverter : ComponentBase, IDevice, GenericDevices.IDiverter, GenericDevices.ISequenceCondition
|
||||
public class Diverter : ComponentBase, IDevice, GenericDevices.IDiverter, GenericDevices.ISequenceCondition, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Diverter));
|
||||
public override string ToString() { return string.Format("Diverter({0})", Cfg.ToString(1)); }
|
||||
@@ -69,50 +69,52 @@ namespace TBF.BenchControl.Elde.Diverter
|
||||
{
|
||||
diverterCfg = cfg as DiverterCfg;
|
||||
|
||||
controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
if (diverterCfg.BitPosition < 0 || diverterCfg.BitPosition >= 64) throw new ArgumentOutOfRangeException("position");
|
||||
this.mask = (((UInt128)1) << diverterCfg.BitPosition);
|
||||
|
||||
switchTimeStart = new FloatBox(diverterCfg.DfltSwithTimeStartMs / 1000.0f);
|
||||
switchTimeEnd = new FloatBox(diverterCfg.DfltSwithTimeEndMs / 1000.0f);
|
||||
|
||||
diverterNr0 = nextIdx++;
|
||||
///
|
||||
if (Diverters == null || Diverters.Length < nextIdx)
|
||||
{
|
||||
GenericDevices.IDiverter[] divertersSoFar = Diverters;
|
||||
|
||||
Diverters = new GenericDevices.IDiverter[nextIdx];
|
||||
|
||||
if (divertersSoFar != null)
|
||||
{
|
||||
for (int i = 0; i < divertersSoFar.Length; i++) Diverters[i] = divertersSoFar[i];
|
||||
|
||||
}
|
||||
|
||||
Diverters[nextIdx - 1] = this;
|
||||
}
|
||||
|
||||
/// Prepare arguments of SendCalibData()
|
||||
if (diverterCfg.AdcNr >= 0 && diverterCfg.AdcNr < controlBoard.RegValveCalib.GetLength(0))
|
||||
{
|
||||
controlBoard.RegValveCalib[diverterCfg.AdcNr, 0] = (uint)diverterCfg.AdcValueToSink;
|
||||
controlBoard.RegValveCalib[diverterCfg.AdcNr, 1] = (uint)diverterCfg.AdcValueToTank;
|
||||
}
|
||||
else
|
||||
{
|
||||
log.ErrorFormat("Unable to set {0} ADC levels: RegValveCalib array size={1}, diverter AdcNr={2}",
|
||||
Name, controlBoard.RegValveCalib.GetLength(0), diverterCfg.AdcNr);
|
||||
}
|
||||
|
||||
|
||||
int divNrFromName;
|
||||
if (!int.TryParse(Name.Substring(3), out divNrFromName))
|
||||
if (cfg.DebugLevel != Config.Entities.DebugMode.Off)
|
||||
{
|
||||
divNrFromName = nextIdx;
|
||||
}
|
||||
controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
if (diverterCfg.BitPosition < 0 || diverterCfg.BitPosition >= 64) throw new ArgumentOutOfRangeException("position");
|
||||
this.mask = (((UInt128)1) << diverterCfg.BitPosition);
|
||||
|
||||
switchTimeStart = new FloatBox(diverterCfg.DfltSwithTimeStartMs / 1000.0f);
|
||||
switchTimeEnd = new FloatBox(diverterCfg.DfltSwithTimeEndMs / 1000.0f);
|
||||
|
||||
diverterNr0 = nextIdx++;
|
||||
///
|
||||
if (Diverters == null || Diverters.Length < nextIdx)
|
||||
{
|
||||
GenericDevices.IDiverter[] divertersSoFar = Diverters;
|
||||
|
||||
Diverters = new GenericDevices.IDiverter[nextIdx];
|
||||
|
||||
if (divertersSoFar != null)
|
||||
{
|
||||
for (int i = 0; i < divertersSoFar.Length; i++) Diverters[i] = divertersSoFar[i];
|
||||
|
||||
}
|
||||
|
||||
Diverters[nextIdx - 1] = this;
|
||||
}
|
||||
|
||||
/// Prepare arguments of SendCalibData()
|
||||
if (diverterCfg.AdcNr >= 0 && diverterCfg.AdcNr < controlBoard.RegValveCalib.GetLength(0))
|
||||
{
|
||||
controlBoard.RegValveCalib[diverterCfg.AdcNr, 0] = (uint)diverterCfg.AdcValueToSink;
|
||||
controlBoard.RegValveCalib[diverterCfg.AdcNr, 1] = (uint)diverterCfg.AdcValueToTank;
|
||||
}
|
||||
else
|
||||
{
|
||||
log.ErrorFormat("Unable to set {0} ADC levels: RegValveCalib array size={1}, diverter AdcNr={2}",
|
||||
Name, controlBoard.RegValveCalib.GetLength(0), diverterCfg.AdcNr);
|
||||
}
|
||||
|
||||
|
||||
int divNrFromName;
|
||||
if (!int.TryParse(Name.Substring(3), out divNrFromName))
|
||||
{
|
||||
divNrFromName = nextIdx;
|
||||
}
|
||||
#if GENESIS || PETERSBURG_50 || PETERSBURG_200 || FUZHOU_50 || FUZHOU_150 || FUZHOU_300 || ROMA_200
|
||||
flowMtrNr4Cmd = divNrFromName + 1;
|
||||
#elif BADGER_STREDNA_TRAT
|
||||
@@ -130,24 +132,58 @@ namespace TBF.BenchControl.Elde.Diverter
|
||||
#elif FILIPINY_50
|
||||
flowMtrNr4Cmd = (divNrFromName == 1) ? 1 : 7;
|
||||
#elif GELSENWASSER
|
||||
switch (divNrFromName)
|
||||
{
|
||||
default:
|
||||
case 1: flowMtrNr4Cmd = 1; break;
|
||||
case 2: flowMtrNr4Cmd = 0x12; break;
|
||||
case 3: flowMtrNr4Cmd = 3; break;
|
||||
case 4: flowMtrNr4Cmd = 5; break;
|
||||
}
|
||||
switch (divNrFromName)
|
||||
{
|
||||
default:
|
||||
case 1: flowMtrNr4Cmd = 1; break;
|
||||
case 2: flowMtrNr4Cmd = 0x12; break;
|
||||
case 3: flowMtrNr4Cmd = 3; break;
|
||||
case 4: flowMtrNr4Cmd = 5; break;
|
||||
}
|
||||
#else
|
||||
flowMtrNr4Cmd = (divNrFromName == 1) ? 1 : 3;
|
||||
#endif
|
||||
diverterToTankOp = new SwitchDiverterOp(controlBoard, true, flowMtrNr4Cmd);
|
||||
diverterToSinkOp = new SwitchDiverterOp(controlBoard, false, flowMtrNr4Cmd);
|
||||
diverterToTankOp = new SwitchDiverterOp(controlBoard, true, flowMtrNr4Cmd);
|
||||
diverterToSinkOp = new SwitchDiverterOp(controlBoard, false, flowMtrNr4Cmd);
|
||||
|
||||
|
||||
log.Debug(this.ToString());
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Calendar support
|
||||
///
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = diverterCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// IDevice interface implementation
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
||||
DateTime calibrationDue = flowMeterCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > DateTime.MinValue.AddDays(36))
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeter
|
||||
{
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(PressureMeter));
|
||||
public override string ToString() { return string.Format("PressureMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -52,6 +53,38 @@ namespace TBF.BenchControl.Elde.PressureMeter
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = pressureMeterCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the water pressure
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2018 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeter
|
||||
{
|
||||
public class PressureMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PressureMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -24,6 +24,26 @@ namespace TBF.BenchControl.Elde.PressureMeter
|
||||
public MeretProtocol Protocol; /// Meret or Modbus
|
||||
public byte RS485Address; /// 0..255
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
PressureMeterCfg()
|
||||
{
|
||||
|
||||
@@ -7,10 +7,11 @@ using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
{
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(PressureMeter));
|
||||
public override string ToString() { return string.Format("PressureMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -44,6 +45,39 @@ namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = pressureMeterCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Events: PressureDone, Error
|
||||
/// </summary>
|
||||
|
||||
@@ -9,7 +9,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
{
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PressureMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -27,6 +27,26 @@ namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
public float A4;
|
||||
public float A5;
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
PressureMeterCfg()
|
||||
{
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeter
|
||||
{
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("TempMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -47,6 +48,38 @@ namespace TBF.BenchControl.Elde.TempMeter
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = tempMtrCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
public double ReadTemperature()
|
||||
{
|
||||
if (Cfg.DebugLevel == Config.Entities.DebugMode.Normal)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -9,7 +9,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeter
|
||||
{
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -27,6 +27,26 @@ namespace TBF.BenchControl.Elde.TempMeter
|
||||
public double A5;
|
||||
public double DefaultTemperature;
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TempMeterCfg()
|
||||
{
|
||||
|
||||
@@ -6,10 +6,11 @@ using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
{
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("TempMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -42,6 +43,39 @@ namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = tempMtrCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
public double ReadTemperature()
|
||||
{
|
||||
return Config.Formulas.CorrectedValue((double)ControlBoard.Temperature(Idx0), Corrections);
|
||||
|
||||
@@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
{
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -28,6 +28,27 @@ namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
public float A4;
|
||||
public float A5;
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TempMeterCfg()
|
||||
{
|
||||
|
||||
@@ -5,10 +5,11 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeterMeret
|
||||
{
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("TempMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -33,6 +34,39 @@ namespace TBF.BenchControl.Elde.TempMeterMeret
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = tempMtrCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
public double ReadTemperature()
|
||||
{
|
||||
return Config.Formulas.CorrectedValue((double)ControlBoard.Temperature(tempMtrCfg.TempIdx0), Corrections);
|
||||
|
||||
@@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeterMeret
|
||||
{
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, Config.Entities.IParamsProvider
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, Config.Entities.IParamsProvider, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -41,6 +41,27 @@ namespace TBF.BenchControl.Elde.TempMeterMeret
|
||||
public byte ModbusAddress; /// 1..247
|
||||
public int MeretIdx0; /// Meter pressure meters count .. (Meter pressure meters count + Meter temperature meters count - 1)
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TempMeterCfg()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl
|
||||
{
|
||||
@@ -95,6 +95,7 @@ namespace TBF.BenchControl
|
||||
TempOutDone,
|
||||
TempDivDone,
|
||||
LevelDone,
|
||||
ConductivityDone,
|
||||
VolumeDone,
|
||||
FlowMeasurementDone,
|
||||
FlowReached,
|
||||
@@ -154,6 +155,8 @@ namespace TBF.BenchControl
|
||||
ResultsProcessed, /// Event triggers
|
||||
ErrorProcessingResults,
|
||||
|
||||
StatisticsProcessed, /// Statistics monitoring (Event triggers)
|
||||
|
||||
/// Timer events
|
||||
TimerExpired,
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
using Results.Entities;
|
||||
|
||||
namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
public interface IStatisticsMonitoring : IComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Process recent results and monitor obtained statistics
|
||||
/// (failure rates of hardware components, etc.)
|
||||
/// </summary>
|
||||
/// <param name="lastBatchNr">Number of the last saved batch</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
IOperation ProcessStatisticsOp(int lastBatchNr);
|
||||
}
|
||||
}
|
||||
@@ -9,13 +9,14 @@ using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Boxes;
|
||||
using TBF.BenchControl.Hart.Common;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Hart.Nivotrack
|
||||
{
|
||||
/// <summary>
|
||||
/// Root component for Modbus communication via serial port (RS485)
|
||||
/// </summary>
|
||||
public class Nivotrack : ComponentBase, IDevice, ILevelMeter, IOperation
|
||||
public class Nivotrack : ComponentBase, IDevice, ILevelMeter, IOperation, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
const int StableReadingsCount = 9;
|
||||
|
||||
@@ -71,6 +72,40 @@ namespace TBF.BenchControl.Hart.Nivotrack
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
///
|
||||
/// Calendar support
|
||||
///
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = nivotrackCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
if (nivotrackCfg.DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2016-2020 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -7,10 +7,11 @@ using Config;
|
||||
using log4net;
|
||||
using TBF.Boxes;
|
||||
using TBF.BenchControl.Keithley.Multimeter_2010_RS232;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Keithley.TempMeter
|
||||
{
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("Keithley.TempMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -45,6 +46,40 @@ namespace TBF.BenchControl.Keithley.TempMeter
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
///
|
||||
/// Calendar support
|
||||
///
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = tempMtrCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
public double ReadTemperature()
|
||||
{
|
||||
double resistance = Multimeter.ReadResistance(tempMtrCfg.Channel);
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
{
|
||||
drainValveComboBox.Items.Add(cmpnt.Name);
|
||||
}
|
||||
else if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Various.Evaporation.Factory)
|
||||
else if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is DataContainers.Evaporation.Factory)
|
||||
{
|
||||
evaporationComboBox.Items.Add(cmpnt.Name);
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
DateTime calibrationDue = balanceCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > DateTime.MinValue.AddDays(36))
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
|
||||
@@ -25,10 +25,10 @@ namespace TBF.BenchControl.Modbus.WaterAnalyzer
|
||||
///
|
||||
/// Measured values when MsrmntState == MsrmntState.Valid
|
||||
///
|
||||
double conductivity; /// [???]
|
||||
double temperature; /// [°C]
|
||||
float conductivity; /// [uS/cm] electrical conductivity of water
|
||||
double temperature; /// [°C] water temperature
|
||||
|
||||
public double Level { get { return conductivity; } }
|
||||
public float Conductivity { get { return conductivity; } }
|
||||
|
||||
/// <summary>Measurement time stamp when MsrmntState == MsrmntState.Valid</summary>
|
||||
int msrmntTimeStamp;
|
||||
@@ -57,7 +57,7 @@ namespace TBF.BenchControl.Modbus.WaterAnalyzer
|
||||
{
|
||||
if (myCfg.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
conductivity = 0.0;
|
||||
conductivity = 0.0F;
|
||||
temperature = 0.0;
|
||||
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
@@ -71,10 +71,10 @@ namespace TBF.BenchControl.Modbus.WaterAnalyzer
|
||||
}
|
||||
|
||||
|
||||
public double ReadLevel() { return conductivity; } /// Returns water level in mm
|
||||
public double ReadTemperature() { return temperature; } /// Returns temperature in °C
|
||||
public float ReadConductivity() { return conductivity; } /// Returns electrical conductivity of water in [uS/cm]
|
||||
public double ReadTemperature() { return temperature; } /// Returns water temperature in [°C]
|
||||
|
||||
public ReadConductivityOp ReadLevelOp(ref DoubleBox level) { return new ReadConductivityOp(this, ref level); }
|
||||
public ReadConductivityOp ReadConductivityOp(ref FloatBox conduct) { return new ReadConductivityOp(this, ref conduct); }
|
||||
public IOperation ReadTempOp(ref DoubleBox temperature) { return new ReadTempOp(this, ref temperature); }
|
||||
public IOperation ReadTempOp(ref DoubleBox temperature, Event eventDone) { return new ReadTempOp(this, ref temperature, eventDone); }
|
||||
|
||||
@@ -98,14 +98,11 @@ namespace TBF.BenchControl.Modbus.WaterAnalyzer
|
||||
///
|
||||
/// Telegram with values
|
||||
///
|
||||
byte[] conductBytes = new byte[] { telegram[4], telegram[3], telegram[6], telegram[5] };
|
||||
float _conductivity = System.BitConverter.ToSingle(conductBytes, 0);
|
||||
string line = string.Format("conductivity = {0} uS/cm", _conductivity);
|
||||
if (true)
|
||||
{
|
||||
conductivity = _conductivity;
|
||||
}
|
||||
byte[] conductBytes = new byte[] { telegram[4], telegram[3], telegram[6], telegram[5] };
|
||||
conductivity = System.BitConverter.ToSingle(conductBytes, 0);
|
||||
UpdateProcessData(conductivity);
|
||||
|
||||
string line = string.Format("conductivity = {0} uS/cm", conductivity);
|
||||
log.Debug(line);
|
||||
Debug.WriteLine(line);
|
||||
}
|
||||
@@ -137,5 +134,10 @@ namespace TBF.BenchControl.Modbus.WaterAnalyzer
|
||||
public void RunDeviceAfter() { }
|
||||
public void StopDevice() { }
|
||||
public void StopDevice2() { }
|
||||
}
|
||||
|
||||
void UpdateProcessData(float conduct)
|
||||
{
|
||||
TBF.BenchControl.Sequences.ProcessData.Conductivity.Val = conduct;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,19 +16,19 @@ namespace TBF.BenchControl.Modbus.WaterAnalyzer
|
||||
readonly Analyzer analyzer;
|
||||
|
||||
/// Measured value
|
||||
DoubleBox conductivity;
|
||||
FloatBox conductivity; /// [uS/cm] electrical conductivity of water
|
||||
|
||||
/// <summary>
|
||||
/// Events: LevelDone or Error
|
||||
/// </summary>
|
||||
/// <param name="analyzer">Water level meter reference</param>
|
||||
/// <param name="level">Reference to the measured level variable, value is in mm</param>
|
||||
/// <param name="conduct">Reference to the measured level variable, value is in mm</param>
|
||||
/// <param name="eventDone">Event to be returned by Run() when completed OK</param>
|
||||
public ReadConductivityOp(Analyzer analyzer, ref DoubleBox level)
|
||||
public ReadConductivityOp(Analyzer analyzer, ref FloatBox conduct)
|
||||
{
|
||||
if (analyzer == null) throw new ArgumentNullException("analyzer");
|
||||
this.analyzer = analyzer;
|
||||
this.conductivity = level;
|
||||
this.conductivity = conduct;
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
@@ -37,17 +37,17 @@ namespace TBF.BenchControl.Modbus.WaterAnalyzer
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
conductivity.Val = analyzer.ReadLevel();
|
||||
conductivity.Val = analyzer.ReadConductivity();
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>
|
||||
/// Event.LevelDone
|
||||
/// Event.ConductivityDone
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
conductivity.Val = analyzer.ReadLevel();
|
||||
return Event.LevelDone;
|
||||
conductivity.Val = analyzer.ReadConductivity();
|
||||
return Event.ConductivityDone;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
|
||||
@@ -10,6 +10,7 @@ using NHibernate;
|
||||
using NHibernate.Criterion;
|
||||
using Config.Entities;
|
||||
using TracingDB.Entities;
|
||||
using Events.Entities;
|
||||
|
||||
namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
{
|
||||
@@ -284,11 +285,56 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
log.WarnFormat("{0} : Run() : currentOp = {1}", Name, currentOpState);
|
||||
opCompleted = true;
|
||||
if (SaveTracingRecords(batch) != Retv.OK) anyError = true;
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
|
||||
if (anyError)
|
||||
{
|
||||
try
|
||||
{
|
||||
NHibernate.ISession session = Events.DB.CreateSession();
|
||||
Events.DB.LoadSubscribers(session);
|
||||
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, Name, EventClass.ComputerResources, Severity.Error,
|
||||
string.Format("Nepodarilo sa uložiť výsledky do sledovacej DB: Číslo dávky={0}", batch.BatchNr),
|
||||
string.Format("Nepodarilo sa uložiť výsledky do sledovacej DB\r\nČíslo dávky = {0}", batch.BatchNr),
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance | SubscriberGroup.Production);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Triggering event(s) failed: {0}", exc.Message);
|
||||
}
|
||||
|
||||
return Event.ErrorProcessingResults;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
if (anyError)
|
||||
{
|
||||
try
|
||||
{
|
||||
NHibernate.ISession session = Events.DB.CreateSession();
|
||||
Events.DB.LoadSubscribers(session);
|
||||
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, Name, EventClass.ComputerResources, Severity.Error,
|
||||
string.Format("Nepodarilo sa uložiť výsledky do sledovacej DB: Číslo dávky={0}", batch.BatchNr),
|
||||
string.Format("Nepodarilo sa uložiť výsledky do sledovacej DB\r\nČíslo dávky = {0}", batch.BatchNr),
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance | SubscriberGroup.Production);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Triggering event(s) failed: {0}", exc.Message);
|
||||
}
|
||||
|
||||
return Event.ErrorProcessingResults;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -11,6 +11,7 @@ using Config;
|
||||
using Config.Entities;
|
||||
using Results.Output;
|
||||
using System.Text;
|
||||
using Events.Entities;
|
||||
|
||||
namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
{
|
||||
@@ -314,7 +315,29 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
opCompleted = true;
|
||||
}
|
||||
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
if (anyError)
|
||||
{
|
||||
try
|
||||
{
|
||||
NHibernate.ISession session = Events.DB.CreateSession();
|
||||
Events.DB.LoadSubscribers(session);
|
||||
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, Name, EventClass.ComputerResources, Severity.Error,
|
||||
string.Format("Nepodarilo sa uložiť výsledky do Oracle: Číslo dávky={0}", batch.BatchNr),
|
||||
string.Format("Nepodarilo sa uložiť výsledky do Oracle\r\nČíslo dávky = {0}", batch.BatchNr),
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance | SubscriberGroup.Production);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Triggering event(s) failed: {0}", exc.Message);
|
||||
}
|
||||
|
||||
return Event.ErrorProcessingResults;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -52,24 +52,29 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
triggerCfg.EventSource = newCfg.EventSource;
|
||||
triggerCfg.FailedWMsPct = newCfg.FailedWMsPct;
|
||||
triggerCfg.Mid1Name = newCfg.Mid1Name;
|
||||
triggerCfg.Mid1RelErr = newCfg.Mid1RelErr;
|
||||
triggerCfg.Mid1ErrAfterCorr = newCfg.Mid1ErrAfterCorr;
|
||||
triggerCfg.Mid1Err = newCfg.Mid1Err;
|
||||
triggerCfg.Mid2Name = newCfg.Mid2Name;
|
||||
triggerCfg.Mid2RelErr = newCfg.Mid2RelErr;
|
||||
triggerCfg.Mid2ErrAfterCorr = newCfg.Mid2ErrAfterCorr;
|
||||
triggerCfg.Mid2Err = newCfg.Mid2Err;
|
||||
triggerCfg.Mid3Name = newCfg.Mid3Name;
|
||||
triggerCfg.Mid3RelErr = newCfg.Mid3RelErr;
|
||||
triggerCfg.Mid3ErrAfterCorr = newCfg.Mid3ErrAfterCorr;
|
||||
triggerCfg.Mid3Err = newCfg.Mid3Err;
|
||||
triggerCfg.Mid4Name = newCfg.Mid4Name;
|
||||
triggerCfg.Mid4RelErr = newCfg.Mid4RelErr;
|
||||
triggerCfg.Mid4ErrAfterCorr = newCfg.Mid4ErrAfterCorr;
|
||||
triggerCfg.Mid4Err = newCfg.Mid4Err;
|
||||
triggerCfg.Mid5Name = newCfg.Mid5Name;
|
||||
triggerCfg.Mid5RelErr = newCfg.Mid5RelErr;
|
||||
triggerCfg.E1 = newCfg.E1;
|
||||
triggerCfg.E2 = newCfg.E2;
|
||||
triggerCfg.E3 = newCfg.E3;
|
||||
triggerCfg.E4 = newCfg.E4;
|
||||
triggerCfg.E5 = newCfg.E5;
|
||||
triggerCfg.E6 = newCfg.E6;
|
||||
triggerCfg.E7 = newCfg.E7;
|
||||
triggerCfg.E8 = newCfg.E8;
|
||||
triggerCfg.E9 = newCfg.E9;
|
||||
triggerCfg.Mid5ErrAfterCorr = newCfg.Mid5ErrAfterCorr;
|
||||
triggerCfg.Mid5Err = newCfg.Mid5Err;
|
||||
triggerCfg.E1 = newCfg.E1;
|
||||
triggerCfg.E2 = newCfg.E2;
|
||||
triggerCfg.E3 = newCfg.E3;
|
||||
triggerCfg.E4 = newCfg.E4;
|
||||
triggerCfg.E5 = newCfg.E5;
|
||||
triggerCfg.E6 = newCfg.E6;
|
||||
triggerCfg.E7 = newCfg.E7;
|
||||
triggerCfg.E8 = newCfg.E8;
|
||||
triggerCfg.E9 = newCfg.E9;
|
||||
triggerCfg.E10 = newCfg.E10;
|
||||
triggerCfg.E11 = newCfg.E11;
|
||||
triggerCfg.E12 = newCfg.E12;
|
||||
@@ -78,6 +83,7 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
triggerCfg.E15 = newCfg.E15;
|
||||
triggerCfg.E16 = newCfg.E16;
|
||||
triggerCfg.E21 = newCfg.E21;
|
||||
triggerCfg.E36 = newCfg.E36;
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
triggerCfg.E26 = newCfg.E26;
|
||||
triggerCfg.E27 = newCfg.E27;
|
||||
@@ -162,26 +168,48 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
triggerCfg.Mid3Name,
|
||||
triggerCfg.Mid4Name,
|
||||
triggerCfg.Mid5Name };
|
||||
double[] maxMidRelErr = new double[] { triggerCfg.Mid1RelErr,
|
||||
triggerCfg.Mid2RelErr,
|
||||
triggerCfg.Mid3RelErr,
|
||||
triggerCfg.Mid4RelErr,
|
||||
triggerCfg.Mid5RelErr };
|
||||
|
||||
double[] maxMidErr = new double[] { triggerCfg.Mid1Err,
|
||||
triggerCfg.Mid2Err,
|
||||
triggerCfg.Mid3Err,
|
||||
triggerCfg.Mid4Err,
|
||||
triggerCfg.Mid5Err };
|
||||
|
||||
double[] maxMidErrAfterCorr = new double[] { triggerCfg.Mid1ErrAfterCorr,
|
||||
triggerCfg.Mid2ErrAfterCorr,
|
||||
triggerCfg.Mid3ErrAfterCorr,
|
||||
triggerCfg.Mid4ErrAfterCorr,
|
||||
triggerCfg.Mid5ErrAfterCorr };
|
||||
for (int i = 0; i < midName.Length; i++)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(midName[i]))
|
||||
{
|
||||
/// MIDx enabled
|
||||
/// This MID# enabled
|
||||
|
||||
foreach (var tr in batch.TestRslts)
|
||||
{
|
||||
if (tr.RefFlowmeter() == midName[i] && tr.ErrorMaster >= maxMidRelErr[i])
|
||||
if (tr.RefFlowmeter() == midName[i])
|
||||
{
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, src, EventClass.EquipmentHW, Severity.Error,
|
||||
string.Format("Príliš veľká relatívna chyba merača prietoku {0} oproti váhe", midName[i]),
|
||||
string.Format("Číslo dávky: {0}\r\nPrietokomer: {1}\r\nRelatívna chyba: {2}%\r\nMax. dovolená chyba: {3}%",
|
||||
batch.BatchNr, midName[i], Utils.DoubleToStr(tr.ErrorMaster, 3), maxMidRelErr[i]),
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance | SubscriberGroup.Production);
|
||||
break; /// For each MID just one event is triggered
|
||||
/// This test result was obtained using MID#
|
||||
|
||||
double midErrAfterCorr = Config.Formulas.ErrorFromVolumes(tr.ConstMasterCorr, tr.ConstMaster);
|
||||
if (midErrAfterCorr >= maxMidErrAfterCorr[i])
|
||||
{
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, src, EventClass.EquipmentHW, Severity.Error,
|
||||
string.Format("Príliš veľká chyba merača prietoku {0} po KOREKCII oproti váhe", midName[i]),
|
||||
string.Format("Číslo dávky: {0}\r\nPrietokomer: {1}\r\nRelatívna chyba po korekcii: {2}%\r\nMax. dovolená chyba: {3}%",
|
||||
batch.BatchNr, midName[i], Utils.DoubleToStr(midErrAfterCorr, 3), maxMidErrAfterCorr[i]),
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance | SubscriberGroup.Production);
|
||||
}
|
||||
|
||||
if (tr.ErrorMaster >= maxMidErr[i])
|
||||
{
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, src, EventClass.EquipmentHW, Severity.Error,
|
||||
string.Format("Príliš veľká chyba merača prietoku {0} oproti váhe", midName[i]),
|
||||
string.Format("Číslo dávky: {0}\r\nPrietokomer: {1}\r\nRelatívna chyba: {2}%\r\nMax. dovolená chyba: {3}%",
|
||||
batch.BatchNr, midName[i], Utils.DoubleToStr(tr.ErrorMaster, 3), maxMidErr[i]),
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance | SubscriberGroup.Production);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,15 +221,15 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
long eFlags = batch.ErrorFlags();
|
||||
long iFlags = batch.InfoFlags();
|
||||
///
|
||||
if (triggerCfg.E1) OnExTriggerEvent(session, eFlags, iFlags, 1);
|
||||
if (triggerCfg.E2) OnExTriggerEvent(session, eFlags, iFlags, 2);
|
||||
if (triggerCfg.E3) OnExTriggerEvent(session, eFlags, iFlags, 3);
|
||||
if (triggerCfg.E4) OnExTriggerEvent(session, eFlags, iFlags, 4);
|
||||
if (triggerCfg.E5) OnExTriggerEvent(session, eFlags, iFlags, 5);
|
||||
if (triggerCfg.E6) OnExTriggerEvent(session, eFlags, iFlags, 6);
|
||||
if (triggerCfg.E7) OnExTriggerEvent(session, eFlags, iFlags, 7);
|
||||
if (triggerCfg.E8) OnExTriggerEvent(session, eFlags, iFlags, 8);
|
||||
if (triggerCfg.E9) OnExTriggerEvent(session, eFlags, iFlags, 9);
|
||||
if (triggerCfg.E1) OnExTriggerEvent(session, eFlags, iFlags, 1);
|
||||
if (triggerCfg.E2) OnExTriggerEvent(session, eFlags, iFlags, 2);
|
||||
if (triggerCfg.E3) OnExTriggerEvent(session, eFlags, iFlags, 3);
|
||||
if (triggerCfg.E4) OnExTriggerEvent(session, eFlags, iFlags, 4);
|
||||
if (triggerCfg.E5) OnExTriggerEvent(session, eFlags, iFlags, 5);
|
||||
if (triggerCfg.E6) OnExTriggerEvent(session, eFlags, iFlags, 6);
|
||||
if (triggerCfg.E7) OnExTriggerEvent(session, eFlags, iFlags, 7);
|
||||
if (triggerCfg.E8) OnExTriggerEvent(session, eFlags, iFlags, 8);
|
||||
if (triggerCfg.E9) OnExTriggerEvent(session, eFlags, iFlags, 9);
|
||||
if (triggerCfg.E10) OnExTriggerEvent(session, eFlags, iFlags, 10);
|
||||
if (triggerCfg.E11) OnExTriggerEvent(session, eFlags, iFlags, 11);
|
||||
if (triggerCfg.E12) OnExTriggerEvent(session, eFlags, iFlags, 12);
|
||||
@@ -210,6 +238,7 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
if (triggerCfg.E15) OnExTriggerEvent(session, eFlags, iFlags, 15);
|
||||
if (triggerCfg.E16) OnExTriggerEvent(session, eFlags, iFlags, 16);
|
||||
if (triggerCfg.E21) OnExTriggerEvent(session, eFlags, iFlags, 21);
|
||||
if (triggerCfg.E36) OnExTriggerEvent(session, eFlags, iFlags, 36);
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
if (triggerCfg.E26) OnExTriggerEvent(session, eFlags, iFlags, 26);
|
||||
if (triggerCfg.E27) OnExTriggerEvent(session, eFlags, iFlags, 27);
|
||||
|
||||
@@ -24,17 +24,22 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string EventSource;
|
||||
public int FailedWMsPct; /// 0 = off, 1..100% event is triggered when percentage reaches this level
|
||||
public int FailedWMsPct; /// 0 = off, 1..100% event is triggered when percentage reaches this level
|
||||
public string Mid1Name;
|
||||
public double Mid1RelErr; /// [%] Event is triggered when relative error of reference flowmeter against a scale reaches this level
|
||||
public string Mid2Name;
|
||||
public double Mid2RelErr; /// [%] Event is triggered when relative error of reference flowmeter against a scale reaches this level
|
||||
public string Mid3Name;
|
||||
public double Mid3RelErr; /// [%] Event is triggered when relative error of reference flowmeter against a scale reaches this level
|
||||
public string Mid4Name;
|
||||
public double Mid4RelErr; /// [%] Event is triggered when relative error of reference flowmeter against a scale reaches this level
|
||||
public string Mid5Name;
|
||||
public double Mid5RelErr; /// [%] Event is triggered when relative error of reference flowmeter against a scale reaches this level
|
||||
public double Mid1ErrAfterCorr; /// [%] Event triggered when rel. error of MID1 against a scale after a correction reached this level
|
||||
public double Mid1Err; /// [%] Event triggered when rel. error of MID1 against a scale reached this level
|
||||
public string Mid2Name;
|
||||
public double Mid2ErrAfterCorr; /// [%] Event triggered when rel. error of MID2 against a scale after a correction reached this level
|
||||
public double Mid2Err; /// [%] Event triggered when rel. error of MID2 against a scale reached this level
|
||||
public string Mid3Name;
|
||||
public double Mid3ErrAfterCorr; /// [%] Event triggered when rel. error of MID3 against a scale after a correction reached this level
|
||||
public double Mid3Err; /// [%] Event triggered when rel. error of MID3 against a scale reached this level
|
||||
public string Mid4Name;
|
||||
public double Mid4ErrAfterCorr; /// [%] Event triggered when rel. error of MID4 against a scale after a correction reached this level
|
||||
public double Mid4Err; /// [%] Event triggered when rel. error of MID4 against a scale reached this level
|
||||
public string Mid5Name;
|
||||
public double Mid5ErrAfterCorr; /// [%] Event triggered when rel. error of MID5 against a scale after a correction reached this level
|
||||
public double Mid5Err; /// [%] Event triggered when rel. error of MID5 against a scale reached this level
|
||||
public bool E1;
|
||||
public bool E2;
|
||||
public bool E3;
|
||||
@@ -57,8 +62,9 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
public bool E27;
|
||||
public bool E28;
|
||||
#endif
|
||||
public bool E36;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TriggerCfg() {}
|
||||
|
||||
public TriggerCfg(string name, IComponentFactory factory)
|
||||
@@ -74,78 +80,90 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
|
||||
public void InitializeAll()
|
||||
{
|
||||
EventSource = "Results"; /// 0
|
||||
FailedWMsPct = 20; /// 1
|
||||
Mid1Name = "I1"; /// 2
|
||||
Mid1RelErr = 0.5; /// 3
|
||||
Mid2Name = "I2"; /// 4
|
||||
Mid2RelErr = 0.5; /// 5
|
||||
Mid3Name = "I3"; /// 6
|
||||
Mid3RelErr = 0.5; /// 7
|
||||
Mid4Name = ""; /// 8
|
||||
Mid4RelErr = 0.5; /// 9
|
||||
Mid5Name = ""; /// 10
|
||||
Mid5RelErr = 0.5; /// 11
|
||||
E1 = false; /// 12
|
||||
E2 = false; /// 13
|
||||
E3 = false; /// 14
|
||||
E4 = false; /// 15
|
||||
E5 = false; /// 16
|
||||
E6 = false; /// 17
|
||||
E7 = false; /// 18
|
||||
E8 = false; /// 19
|
||||
E9 = false; /// 20
|
||||
E10 = false; /// 21
|
||||
E11 = false; /// 22
|
||||
E12 = false; /// 23
|
||||
E13 = false; /// 24
|
||||
E14 = false; /// 25
|
||||
E15 = false; /// 26
|
||||
E16 = false; /// 27
|
||||
E21 = false; /// 28
|
||||
EventSource = "Výsledky"; /// 0
|
||||
FailedWMsPct = 20; /// 1
|
||||
Mid1Name = "I1"; /// 2
|
||||
Mid1ErrAfterCorr = 0.3; /// 3
|
||||
Mid1Err = 0.6; /// 4
|
||||
Mid2Name = "I2"; /// 5
|
||||
Mid2ErrAfterCorr = 0.3; /// 6
|
||||
Mid2Err = 0.6; /// 7
|
||||
Mid3Name = "I3"; /// 8
|
||||
Mid3ErrAfterCorr = 0.3; /// 9
|
||||
Mid3Err = 0.6; /// 10
|
||||
Mid4Name = ""; /// 11
|
||||
Mid4ErrAfterCorr = 0.3; /// 12
|
||||
Mid4Err = 0.6; /// 13
|
||||
Mid5Name = ""; /// 14
|
||||
Mid5ErrAfterCorr = 0.3; /// 15
|
||||
Mid5Err = 0.6; /// 16
|
||||
E1 = false; /// 17
|
||||
E2 = false; /// 18
|
||||
E3 = false; /// 19
|
||||
E4 = false; /// 20
|
||||
E5 = false; /// 21
|
||||
E6 = false; /// 22
|
||||
E7 = false; /// 23
|
||||
E8 = false; /// 24
|
||||
E9 = false; /// 25
|
||||
E10 = false; /// 26
|
||||
E11 = false; /// 27
|
||||
E12 = false; /// 28
|
||||
E13 = false; /// 29
|
||||
E14 = false; /// 30
|
||||
E15 = false; /// 31
|
||||
E16 = false; /// 32
|
||||
E21 = false; /// 33
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
E26 = false; /// 29
|
||||
E27 = false; /// 30
|
||||
E28 = false; /// 31
|
||||
E26 = false; /// 34
|
||||
E27 = false; /// 35
|
||||
E28 = false; /// 36
|
||||
#endif
|
||||
E36 = true; /// 34 or 37
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
"Event source", /// 0
|
||||
"Percentage of failed meters", /// 1
|
||||
"MID 1 name", /// 2
|
||||
"MID 1 rel. error", /// 3
|
||||
"MID 2 name", /// 4
|
||||
"MID 2 rel. error", /// 5
|
||||
"MID 3 name", /// 6
|
||||
"MID 3 rel. error", /// 7
|
||||
"MID 4 name", /// 8
|
||||
"MID 4 rel. error", /// 9
|
||||
"MID 5 name", /// 10
|
||||
"MID 5 rel. error", /// 11
|
||||
"E1", /// 12
|
||||
"E2", /// 13
|
||||
"E3", /// 14
|
||||
"E4", /// 15
|
||||
"E5", /// 16
|
||||
"E6", /// 17
|
||||
"E7", /// 18
|
||||
"E8", /// 19
|
||||
"E9", /// 20
|
||||
"E10", /// 21
|
||||
"E11", /// 22
|
||||
"E12", /// 23
|
||||
"E13", /// 24
|
||||
"E14", /// 25
|
||||
"E15", /// 26
|
||||
"E16", /// 27
|
||||
"E21", /// 28
|
||||
"Event source", /// 0
|
||||
"Percentage of failed meters", /// 1
|
||||
"MID 1 name", /// 2
|
||||
"MID 1 rel.err.after corr.", /// 3
|
||||
"MID 1 rel.error", /// 4
|
||||
"MID 2 name", /// 5
|
||||
"MID 2 rel.err.after corr.", /// 6
|
||||
"MID 2 rel.error", /// 7
|
||||
"MID 3 name", /// 8
|
||||
"MID 3 rel.err.after corr.", /// 9
|
||||
"MID 3 rel.error", /// 10
|
||||
"MID 4 name", /// 11
|
||||
"MID 4 rel.err.after corr.", /// 12
|
||||
"MID 4 rel.error", /// 13
|
||||
"MID 5 name", /// 14
|
||||
"MID 5 rel.err.after corr.", /// 15
|
||||
"MID 5 rel.error", /// 16
|
||||
"E1", /// 17
|
||||
"E2", /// 18
|
||||
"E3", /// 19
|
||||
"E4", /// 20
|
||||
"E5", /// 21
|
||||
"E6", /// 22
|
||||
"E7", /// 23
|
||||
"E8", /// 24
|
||||
"E9", /// 25
|
||||
"E10", /// 26
|
||||
"E11", /// 27
|
||||
"E12", /// 28
|
||||
"E13", /// 29
|
||||
"E14", /// 30
|
||||
"E15", /// 31
|
||||
"E16", /// 32
|
||||
"E21", /// 33
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
"E26", /// 29
|
||||
"E27", /// 30
|
||||
"E28", /// 31
|
||||
"E26", /// 34
|
||||
"E27", /// 35
|
||||
"E28", /// 36
|
||||
#endif
|
||||
"E36", /// 34 or 37
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
@@ -173,36 +191,44 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
case 0: return EventSource;
|
||||
case 1: return FailedWMsPct.ToString();
|
||||
case 2: return Mid1Name;
|
||||
case 3: return Mid1RelErr.ToString();
|
||||
case 4: return Mid2Name;
|
||||
case 5: return Mid2RelErr.ToString();
|
||||
case 6: return Mid3Name;
|
||||
case 7: return Mid3RelErr.ToString();
|
||||
case 8: return Mid4Name;
|
||||
case 9: return Mid4RelErr.ToString();
|
||||
case 10: return Mid5Name;
|
||||
case 11: return Mid5RelErr.ToString();
|
||||
case 12: return E1 ? Strings.yes : Strings.no;
|
||||
case 13: return E2 ? Strings.yes : Strings.no;
|
||||
case 14: return E3 ? Strings.yes : Strings.no;
|
||||
case 15: return E4 ? Strings.yes : Strings.no;
|
||||
case 16: return E5 ? Strings.yes : Strings.no;
|
||||
case 17: return E6 ? Strings.yes : Strings.no;
|
||||
case 18: return E7 ? Strings.yes : Strings.no;
|
||||
case 19: return E8 ? Strings.yes : Strings.no;
|
||||
case 20: return E9 ? Strings.yes : Strings.no;
|
||||
case 21: return E10 ? Strings.yes : Strings.no;
|
||||
case 22: return E11 ? Strings.yes : Strings.no;
|
||||
case 23: return E12 ? Strings.yes : Strings.no;
|
||||
case 24: return E13 ? Strings.yes : Strings.no;
|
||||
case 25: return E14 ? Strings.yes : Strings.no;
|
||||
case 26: return E15 ? Strings.yes : Strings.no;
|
||||
case 27: return E16 ? Strings.yes : Strings.no;
|
||||
case 28: return E21 ? Strings.yes : Strings.no;
|
||||
case 3: return Mid1ErrAfterCorr.ToString();
|
||||
case 4: return Mid1Err.ToString();
|
||||
case 5: return Mid2Name;
|
||||
case 6: return Mid2ErrAfterCorr.ToString();
|
||||
case 7: return Mid2Err.ToString();
|
||||
case 8: return Mid3Name;
|
||||
case 9: return Mid3ErrAfterCorr.ToString();
|
||||
case 10: return Mid3Err.ToString();
|
||||
case 11: return Mid4Name;
|
||||
case 12: return Mid4ErrAfterCorr.ToString();
|
||||
case 13: return Mid4Err.ToString();
|
||||
case 14: return Mid5Name;
|
||||
case 15: return Mid5ErrAfterCorr.ToString();
|
||||
case 16: return Mid5Err.ToString();
|
||||
case 17: return E1 ? Strings.yes : Strings.no;
|
||||
case 18: return E2 ? Strings.yes : Strings.no;
|
||||
case 19: return E3 ? Strings.yes : Strings.no;
|
||||
case 20: return E4 ? Strings.yes : Strings.no;
|
||||
case 21: return E5 ? Strings.yes : Strings.no;
|
||||
case 22: return E6 ? Strings.yes : Strings.no;
|
||||
case 23: return E7 ? Strings.yes : Strings.no;
|
||||
case 24: return E8 ? Strings.yes : Strings.no;
|
||||
case 25: return E9 ? Strings.yes : Strings.no;
|
||||
case 26: return E10 ? Strings.yes : Strings.no;
|
||||
case 27: return E11 ? Strings.yes : Strings.no;
|
||||
case 28: return E12 ? Strings.yes : Strings.no;
|
||||
case 29: return E13 ? Strings.yes : Strings.no;
|
||||
case 30: return E14 ? Strings.yes : Strings.no;
|
||||
case 31: return E15 ? Strings.yes : Strings.no;
|
||||
case 32: return E16 ? Strings.yes : Strings.no;
|
||||
case 33: return E21 ? Strings.yes : Strings.no;
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
case 29: return E26 ? Strings.yes : Strings.no;
|
||||
case 30: return E27 ? Strings.yes : Strings.no;
|
||||
case 31: return E28 ? Strings.yes : Strings.no;
|
||||
case 34: return E26 ? Strings.yes : Strings.no;
|
||||
case 35: return E27 ? Strings.yes : Strings.no;
|
||||
case 36: return E28 ? Strings.yes : Strings.no;
|
||||
case 37: return E36 ? Strings.yes : Strings.no;
|
||||
#else
|
||||
case 34: return E36 ? Strings.yes : Strings.no;
|
||||
#endif
|
||||
default: return string.Empty;
|
||||
}
|
||||
@@ -212,39 +238,47 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: EventSource = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 1: FailedWMsPct = int.Parse(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 2: Mid1Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 3: Mid1RelErr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 4: Mid2Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 5: Mid2RelErr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 6: Mid3Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 7: Mid3RelErr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 8: Mid4Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 9: Mid4RelErr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 10: Mid5Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 11: Mid5RelErr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 12: E1 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 13: E2 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 14: E3 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 15: E4 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 16: E5 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 17: E6 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 18: E7 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 19: E8 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 20: E9 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 21: E10 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 22: E11 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 23: E12 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 24: E12 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 25: E14 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 26: E15 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 27: E16 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 28: E21 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 0: EventSource = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 1: FailedWMsPct = int.Parse(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 2: Mid1Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 3: Mid1ErrAfterCorr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 4: Mid1Err = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 5: Mid2Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 6: Mid2ErrAfterCorr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 7: Mid2Err = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 8: Mid3Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 9: Mid3ErrAfterCorr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 10: Mid3Err = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 11: Mid4Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 12: Mid4ErrAfterCorr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 13: Mid4Err = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 14: Mid5Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 15: Mid5ErrAfterCorr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 16: Mid5Err = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 17: E1 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 18: E2 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 19: E3 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 20: E4 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 21: E5 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 22: E6 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 23: E7 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 24: E8 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 25: E9 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 26: E10 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 27: E11 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 28: E12 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 29: E12 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 30: E14 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 31: E15 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 32: E16 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 33: E21 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
case 29: E26 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 30: E27 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 31: E28 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 34: E26 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 35: E27 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 36: E28 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 37: E36 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
#else
|
||||
case 34: E36 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
#endif
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
@@ -267,28 +301,28 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
{
|
||||
case 0:
|
||||
case 2:
|
||||
case 4:
|
||||
case 6:
|
||||
case 5:
|
||||
case 8:
|
||||
case 10:
|
||||
case 11:
|
||||
case 14:
|
||||
return true;
|
||||
case 1:
|
||||
if (int.TryParse(strValue, out percentage) && (0 <= percentage) && (percentage <= 100)) return true;
|
||||
message = "Percentage of failed meters is invalid, should be 1..100, 0 = off";
|
||||
return false;
|
||||
case 3:
|
||||
case 5:
|
||||
case 4:
|
||||
case 6:
|
||||
case 7:
|
||||
case 9:
|
||||
case 11:
|
||||
case 10:
|
||||
case 12:
|
||||
case 13:
|
||||
case 15:
|
||||
case 16:
|
||||
if (Utils.TryParseUDouble(strValue, out relError)) return true;
|
||||
message = "relative error of MID is invalid or less then 0";
|
||||
return false;
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
@@ -301,10 +335,16 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
case 26:
|
||||
case 27:
|
||||
case 28:
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
case 29:
|
||||
case 30:
|
||||
case 31:
|
||||
case 32:
|
||||
case 33:
|
||||
case 34:
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
case 35:
|
||||
case 36:
|
||||
case 37:
|
||||
#endif
|
||||
if (strValue == Strings.yes || strValue == Strings.no) return true;
|
||||
break;
|
||||
@@ -320,40 +360,46 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
|
||||
void CopyContentTo(TriggerCfg prms)
|
||||
{
|
||||
prms.EventSource = this.EventSource; /// 0
|
||||
prms.FailedWMsPct = this.FailedWMsPct; /// 1
|
||||
prms.Mid1Name = this.Mid1Name; /// 2
|
||||
prms.Mid1RelErr = this.Mid1RelErr; /// 3
|
||||
prms.Mid2Name = this.Mid2Name; /// 4
|
||||
prms.Mid2RelErr = this.Mid2RelErr; /// 5
|
||||
prms.Mid3Name = this.Mid3Name; /// 6
|
||||
prms.Mid3RelErr = this.Mid3RelErr; /// 7
|
||||
prms.Mid4Name = this.Mid4Name; /// 8
|
||||
prms.Mid4RelErr = this.Mid4RelErr; /// 9
|
||||
prms.Mid5Name = this.Mid5Name; /// 10
|
||||
prms.Mid5RelErr = this.Mid5RelErr; /// 11
|
||||
prms.E1 = this.E1; /// 12
|
||||
prms.E2 = this.E2; /// 13
|
||||
prms.E3 = this.E3; /// 14
|
||||
prms.E4 = this.E4; /// 15
|
||||
prms.E5 = this.E5; /// 16
|
||||
prms.E6 = this.E6; /// 17
|
||||
prms.E7 = this.E7; /// 18
|
||||
prms.E8 = this.E8; /// 19
|
||||
prms.E9 = this.E9; /// 20
|
||||
prms.E10 = this.E10; /// 21
|
||||
prms.E11 = this.E11; /// 22
|
||||
prms.E12 = this.E12; /// 23
|
||||
prms.E13 = this.E13; /// 24
|
||||
prms.E14 = this.E14; /// 25
|
||||
prms.E15 = this.E15; /// 26
|
||||
prms.E16 = this.E16; /// 27
|
||||
prms.E21 = this.E21; /// 28
|
||||
prms.EventSource = this.EventSource; /// 0
|
||||
prms.FailedWMsPct = this.FailedWMsPct; /// 1
|
||||
prms.Mid1Name = this.Mid1Name; /// 2
|
||||
prms.Mid1ErrAfterCorr = this.Mid1ErrAfterCorr; /// 3
|
||||
prms.Mid1Err = this.Mid1Err; /// 4
|
||||
prms.Mid2Name = this.Mid2Name; /// 5
|
||||
prms.Mid2ErrAfterCorr = this.Mid2ErrAfterCorr; /// 6
|
||||
prms.Mid2Err = this.Mid2Err; /// 7
|
||||
prms.Mid3Name = this.Mid3Name; /// 8
|
||||
prms.Mid3ErrAfterCorr = this.Mid3ErrAfterCorr; /// 9
|
||||
prms.Mid3Err = this.Mid3Err; /// 10
|
||||
prms.Mid4Name = this.Mid4Name; /// 11
|
||||
prms.Mid4ErrAfterCorr = this.Mid4ErrAfterCorr; /// 12
|
||||
prms.Mid4Err = this.Mid4Err; /// 13
|
||||
prms.Mid5Name = this.Mid5Name; /// 14
|
||||
prms.Mid5ErrAfterCorr = this.Mid5ErrAfterCorr; /// 15
|
||||
prms.Mid5Err = this.Mid5Err; /// 16
|
||||
prms.E1 = this.E1; /// 17
|
||||
prms.E2 = this.E2; /// 18
|
||||
prms.E3 = this.E3; /// 19
|
||||
prms.E4 = this.E4; /// 20
|
||||
prms.E5 = this.E5; /// 21
|
||||
prms.E6 = this.E6; /// 22
|
||||
prms.E7 = this.E7; /// 23
|
||||
prms.E8 = this.E8; /// 24
|
||||
prms.E9 = this.E9; /// 25
|
||||
prms.E10 = this.E10; /// 26
|
||||
prms.E11 = this.E11; /// 27
|
||||
prms.E12 = this.E12; /// 28
|
||||
prms.E13 = this.E13; /// 29
|
||||
prms.E14 = this.E14; /// 30
|
||||
prms.E15 = this.E15; /// 31
|
||||
prms.E16 = this.E16; /// 32
|
||||
prms.E21 = this.E21; /// 33
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
prms.E26 = this.E26; /// 29
|
||||
prms.E27 = this.E27; /// 30
|
||||
prms.E28 = this.E28; /// 31
|
||||
prms.E26 = this.E26; /// 34
|
||||
prms.E27 = this.E27; /// 35
|
||||
prms.E28 = this.E28; /// 36
|
||||
#endif
|
||||
prms.E36 = this.E36; /// 34 or 37
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Statistics
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||
|
||||
public void ResetStaticProperties() { Trigger.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Trigger(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Trigger(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new TriggerCfg(this.GetType().Namespace.Substring(24), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(TriggerCfg.Serializer, component, this);;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using log4net;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Statistics
|
||||
{
|
||||
public class Trigger : ComponentBase, IOperation, GenericDevices.IEventTrigger
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Trigger));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(1)); }
|
||||
|
||||
readonly TriggerCfg triggerCfg;
|
||||
|
||||
Results.Entities.Batch batch;
|
||||
|
||||
|
||||
public Trigger() {}
|
||||
|
||||
public Trigger(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
triggerCfg = cfg as TriggerCfg;
|
||||
ApplyConfig();
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
void ApplyConfig()
|
||||
{
|
||||
}
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
public static void OnCfgChange(object sender, CfgChangeArgs args)
|
||||
{
|
||||
if (CfgChangeHandler == null) return;
|
||||
try { CfgChangeHandler(sender, args); }
|
||||
catch (Exception e) { log.Error("CfgChangeHandler(...) failed", e); }
|
||||
}
|
||||
|
||||
public static event EventHandler<CfgChangeArgs> CfgChangeHandler;
|
||||
|
||||
public override void StartChangeHandler()
|
||||
{
|
||||
CfgChangeHandler += delegate(object sender, CfgChangeArgs args)
|
||||
{
|
||||
TriggerCfg newCfg = args.Cfg as TriggerCfg;
|
||||
if (newCfg != null && newCfg.Name.Equals(Name))
|
||||
{
|
||||
if (args.Command == CfgChangeCmd.CfgChange)
|
||||
{
|
||||
triggerCfg.EventSource = newCfg.EventSource;
|
||||
triggerCfg.Culture = newCfg.Culture;
|
||||
triggerCfg.EliminateSpaces = newCfg.EliminateSpaces;
|
||||
triggerCfg.PrintCaption = newCfg.PrintCaption;
|
||||
|
||||
ApplyConfig();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endregion Configuration Change Handling
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file
|
||||
/// Events:
|
||||
/// Event.ResultsWritten
|
||||
/// Event.Busy
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into a file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
Process(batch);
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsProcessed</returns>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.ResultsProcessed;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Process(Results.Entities.Batch batch)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Statistics
|
||||
{
|
||||
/// <summary>
|
||||
/// Serializable configuration of Output.EventTriggers.Standard component.
|
||||
/// </summary>
|
||||
public class TriggerCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TriggerCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new Configs.ParamsProvider.ComponentCfgCtrl(this, null); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string EventSource;
|
||||
public Culture Culture;
|
||||
public bool EliminateSpaces;
|
||||
public bool PrintCaption;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TriggerCfg() {}
|
||||
|
||||
public TriggerCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
InitializeAll();
|
||||
}
|
||||
|
||||
public string ComponentName { get { return Name; } }
|
||||
|
||||
public void InitializeAll()
|
||||
{
|
||||
EventSource = "Štatistiky výsledkov";
|
||||
Culture = Culture.EN;
|
||||
EliminateSpaces = false;
|
||||
PrintCaption = false;
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
"Event source",
|
||||
"Culture",
|
||||
"Eliminate spaces",
|
||||
"Print caption",
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
|
||||
public IList<string> ParamValues(int i)
|
||||
{
|
||||
IList<string> listOfValues = new List<string>();
|
||||
if (i == 1)
|
||||
{
|
||||
for (Culture cu = 0; cu < Culture.Count; cu++) listOfValues.Add(cu.ToString());
|
||||
return listOfValues;
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
listOfValues.Add(Strings.yes);
|
||||
listOfValues.Add(Strings.no);
|
||||
return listOfValues;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case -1: return string.Format("Name={0}, FNameFmt={1}, NoSpaces={2}", Name, EventSource, EliminateSpaces);
|
||||
case 0: return EventSource;
|
||||
case 1: return Culture.ToString();
|
||||
case 2: return EliminateSpaces ? Strings.yes : Strings.no;
|
||||
case 3: return PrintCaption ? Strings.yes : Strings.no;
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateParam(int i, string strValue)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: EventSource = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 1:
|
||||
for (Culture cu = 0; cu < Culture.Count; cu++)
|
||||
{
|
||||
if (strValue == cu.ToString())
|
||||
{
|
||||
if (Culture != cu)
|
||||
{
|
||||
Culture = cu;
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
return CfgUpdateFlags.Error;
|
||||
case 2: EliminateSpaces = (strValue == Strings.yes); return CfgUpdateFlags.RestartRqrd;
|
||||
case 3: PrintCaption = (strValue == Strings.yes); return CfgUpdateFlags.RestartRqrd;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ValidateParam(int i, string strValue, out string message)
|
||||
{
|
||||
message = string.Empty;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: return true;
|
||||
case 1:
|
||||
for (Culture cu = 0; cu < Culture.Count; cu++)
|
||||
{
|
||||
if (strValue == cu.ToString()) return true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
if (strValue == Strings.yes || strValue == Strings.no) return true;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
}
|
||||
|
||||
message = ParamName(i) + " is invalid";
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(TriggerCfg prms)
|
||||
{
|
||||
prms.EventSource = this.EventSource;
|
||||
prms.Culture = this.Culture;
|
||||
prms.EliminateSpaces = this.EliminateSpaces;
|
||||
prms.PrintCaption = this.PrintCaption;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
{
|
||||
TriggerCfg pars = new TriggerCfg();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public bool UpdateEmbeddedDbEntity()
|
||||
{
|
||||
return true; /// =OK, do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ using log4net;
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using Results.Output;
|
||||
using Events.Entities;
|
||||
|
||||
namespace TBF.BenchControl.Output.FileWriters.IperlLogger
|
||||
{
|
||||
@@ -155,9 +156,28 @@ namespace TBF.BenchControl.Output.FileWriters.IperlLogger
|
||||
}
|
||||
|
||||
if (anyError)
|
||||
{
|
||||
try
|
||||
{
|
||||
NHibernate.ISession session = Events.DB.CreateSession();
|
||||
Events.DB.LoadSubscribers(session);
|
||||
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, Name, EventClass.ComputerResources, Severity.Error,
|
||||
string.Format("Nepodarilo sa uložiť logy pre WZ Datenbank: Číslo dávky={0}", batch.BatchNr),
|
||||
string.Format("Nepodarilo sa uložiť logy pre WZ Datenbank\r\nČíslo dávky = {0}", batch.BatchNr),
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance | SubscriberGroup.Production);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Triggering event(s) failed: {0}", exc.Message);
|
||||
}
|
||||
|
||||
return Event.ErrorProcessingResults;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1233,6 +1233,7 @@ namespace TBF.BenchControl.Sequences
|
||||
string[] writers = (StateMachine.Procedure.ResultsWriter != null) ? StateMachine.Procedure.ResultsWriter.Split(new char[] { '~' }) : new string[0];
|
||||
string[] printers = (StateMachine.Procedure.ResultsPrinter != null) ? StateMachine.Procedure.ResultsPrinter.Split(new char[] { '~' }) : new string[0];
|
||||
string[] eventTriggers = (StateMachine.Procedure.EventTriggers != null) ? StateMachine.Procedure.EventTriggers.Split(new char[] { '~' }) : new string[0];
|
||||
///
|
||||
string[] rsltProcessors = new string[writers.Length + printers.Length + eventTriggers.Length];
|
||||
writers.CopyTo(rsltProcessors, 0);
|
||||
printers.CopyTo(rsltProcessors, writers.Length);
|
||||
@@ -1294,14 +1295,29 @@ namespace TBF.BenchControl.Sequences
|
||||
ProcessData.BatchRslts.Batch.ProcedureName,
|
||||
Program.LocalSettings.BatchNr);
|
||||
|
||||
evacuation:
|
||||
|
||||
/// Evacuation is similar to 'Abort session' (no results are saved), but the evacuation is done as well.
|
||||
|
||||
StateMachine.ControlBoard.ManualUIAllowed = true;
|
||||
Event evacRetv = DoEvacuation(purgeEnd);
|
||||
Bridge.OnProcedureCompleted(this, new ProcedureCompletedEventArgs(StateMachine.Procedure));
|
||||
|
||||
///
|
||||
/// Process statistics (in each regular cycle after evacuation when ProcessData.StatisticsMonitoringComp is defined)
|
||||
///
|
||||
if (ProcessData.StatisticsMonitoringComp is IStatisticsMonitoring)
|
||||
{
|
||||
State.Create("MainSeq : Processing statistics")
|
||||
.AddOperation((ProcessData.StatisticsMonitoringComp as IStatisticsMonitoring).ProcessStatisticsOp(ProcessData.BatchRslts.Batch.BatchNr))
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.UiCmdStop)) goto stop;
|
||||
}
|
||||
while (e.Contains(Event.Busy));
|
||||
}
|
||||
|
||||
///
|
||||
/// Procedure completed, branch depending on the result of evacuation
|
||||
///
|
||||
Bridge.OnProcedureCompleted(this, new ProcedureCompletedEventArgs(StateMachine.Procedure));
|
||||
switch (evacRetv)
|
||||
{
|
||||
case Event.Error: goto error;
|
||||
|
||||
@@ -657,7 +657,7 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
if (oriBatch == null) return;
|
||||
|
||||
batchResults.Batch.StartTime = oriBatch.StartTime;
|
||||
batchResults.Batch.StartTime = oriBatch.StartTime.AddMinutes(1);
|
||||
batchResults.Batch.TestBenchId = (BenchInfo != null) ? BenchInfo.TestBenchId : 1;
|
||||
batchResults.Batch.TestBenchName = (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench";
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace TBF.BenchControl.Sequences
|
||||
///
|
||||
public static IBenchInfo BenchInfo;
|
||||
public static IErrorFlags ErrorFlagsComp;
|
||||
public static IStatisticsMonitoring StatisticsMonitoringComp;
|
||||
public static Output.DB.SensusOracle.Database OracleDB;
|
||||
|
||||
///
|
||||
@@ -181,6 +182,7 @@ namespace TBF.BenchControl.Sequences
|
||||
public static FloatBox PressUp = new FloatBox() { Name = "Pressure Up", Format = "F2" }; /// [bar]
|
||||
public static FloatBox PressDown = new FloatBox() { Name = "Pressure Dn", Format = "F2" }; /// [bar]
|
||||
public static FloatBox PressDelta = new FloatBox() { Name = "Pressure Delta", Format = "F2" }; /// [bar]
|
||||
public static FloatBox Conductivity = new FloatBox(750) { Name = "Conductivity", Format = "F0" }; /// [uS/cm], default is 750
|
||||
|
||||
public static double LtrPerRefPulse; /// to calculate the ref.volume
|
||||
public static int RefPulses;
|
||||
@@ -238,6 +240,7 @@ namespace TBF.BenchControl.Sequences
|
||||
public static Statistics PressUpStat = new Statistics(3, 4, true, new Plotter("Pressure up"));
|
||||
public static Statistics PressDownStat = new Statistics(3, 4, true, new Plotter("Pressure down"));
|
||||
public static Statistics PressDeltaStat = new Statistics(3, 4, true);
|
||||
public static Statistics ConductStat = new Statistics(0, 4, true, new Plotter("Conductivity"));
|
||||
public static Statistics RefFlowStat = new Statistics(5, 7, true, new Plotter("Flow"));
|
||||
|
||||
public static Statistics TempRefHiStat = new Statistics();
|
||||
@@ -268,6 +271,7 @@ namespace TBF.BenchControl.Sequences
|
||||
PressUpStat.Start (batchNr, testName, repetition, skippedSamplesCount);
|
||||
PressDownStat.Start (batchNr, testName, repetition, skippedSamplesCount);
|
||||
PressDeltaStat.Start(batchNr, testName, repetition, skippedSamplesCount);
|
||||
ConductStat.Start (batchNr, testName, repetition, skippedSamplesCount);
|
||||
RefFlowStat.Start (batchNr, testName, repetition, skippedSamplesCount);
|
||||
|
||||
TempRefHiStat.Start (batchNr, testName, repetition);
|
||||
@@ -292,6 +296,7 @@ namespace TBF.BenchControl.Sequences
|
||||
PressUpStat.Update(PressUp);
|
||||
PressDownStat.Update(PressDown);
|
||||
PressDeltaStat.Update(PressDelta);
|
||||
ConductStat.Update(Conductivity);
|
||||
RefFlowStat.Update(RefFlow);
|
||||
|
||||
if (BatchRslts.Batch.HeatMeter)
|
||||
@@ -316,6 +321,7 @@ namespace TBF.BenchControl.Sequences
|
||||
PressUpStat.Stop();
|
||||
PressDownStat.Stop();
|
||||
PressDeltaStat.Stop();
|
||||
ConductStat.Stop();
|
||||
RefFlowStat.Stop();
|
||||
|
||||
TempRefHiStat.Stop();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -1145,6 +1145,11 @@ namespace TBF.BenchControl.Sequences
|
||||
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
|
||||
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
|
||||
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
|
||||
tstRslt.ConductMean = (float)ConductStat.Average;
|
||||
tstRslt.ConductStart = (float)ConductStat.First;
|
||||
tstRslt.ConductEnd = (float)ConductStat.Last;
|
||||
tstRslt.ConductMin = (float)ConductStat.Min;
|
||||
tstRslt.ConductMax = (float)ConductStat.Max;
|
||||
tstRslt.TempUpMean = (float)TempUpStat.Average;
|
||||
tstRslt.TempUpStart = (float)TempUpStat.First;
|
||||
tstRslt.TempUpEnd = (float)TempUpStat.Last;
|
||||
@@ -1498,6 +1503,8 @@ namespace TBF.BenchControl.Sequences
|
||||
tstRslt.TempUpMax = 20.0f;
|
||||
tstRslt.TempDownMax = 20.0f;
|
||||
tstRslt.TempDivMax = 20.0f;
|
||||
tstRslt.ConductMin = Conductivity.Val;
|
||||
tstRslt.ConductMax = Conductivity.Val;
|
||||
|
||||
tstRslt.DensityIn = Config.Formulas.RealDensity();
|
||||
tstRslt.DensityLine = Config.Formulas.RealDensity();
|
||||
@@ -1633,6 +1640,8 @@ namespace TBF.BenchControl.Sequences
|
||||
tstRslt.TempUpMax = 20.0f;
|
||||
tstRslt.TempDownMax = 20.0f;
|
||||
tstRslt.TempDivMax = 20.0f;
|
||||
tstRslt.ConductMin = Conductivity.Val;
|
||||
tstRslt.ConductMax = Conductivity.Val;
|
||||
|
||||
tstRslt.FlowMean = (float)RefFlowStat.Average;
|
||||
tstRslt.FlowStart = (float)RefFlowStat.First;
|
||||
@@ -1762,6 +1771,8 @@ namespace TBF.BenchControl.Sequences
|
||||
tstRslt.TempUpMax = 20.0f;
|
||||
tstRslt.TempDownMax = 20.0f;
|
||||
tstRslt.TempDivMax = 20.0f;
|
||||
tstRslt.ConductMin = Conductivity.Val;
|
||||
tstRslt.ConductMax = Conductivity.Val;
|
||||
|
||||
tstRslt.FlowMean = 0; /// TODO
|
||||
tstRslt.FlowMax = 0; /// TODO
|
||||
|
||||
@@ -232,6 +232,8 @@ namespace TBF.BenchControl
|
||||
if (cmpnt is Elde.ControlBoardDev) ControlBoard = cmpnt as Elde.ControlBoardDev;
|
||||
if (cmpnt is IBenchInfo) ProcessData.BenchInfo = cmpnt as IBenchInfo;
|
||||
if (cmpnt is IErrorFlags) ProcessData.ErrorFlagsComp = cmpnt as IErrorFlags;
|
||||
if (cmpnt is IStatisticsMonitoring) ProcessData.StatisticsMonitoringComp = cmpnt as IStatisticsMonitoring;
|
||||
|
||||
if ((cmpnt is Output.DB.SensusOracle.Database) && (ProcessData.OracleDB == null))
|
||||
{
|
||||
ProcessData.OracleDB = cmpnt as Output.DB.SensusOracle.Database;
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace TBF.BenchControl
|
||||
Factories.Add(new DataContainers.BenchInfo.iPerl.ComponentFactory());
|
||||
Factories.Add(new DataContainers.Buoyancy.ComponentFactory());
|
||||
Factories.Add(new DataContainers.Density.ComponentFactory());
|
||||
Factories.Add(new DataContainers.Evaporation.Factory());
|
||||
Factories.Add(new Elde.ControlBoardFactory());
|
||||
Factories.Add(new Elde.CoverTest.Factory());
|
||||
Factories.Add(new DataEntry.Combined.EntryFormFactory());
|
||||
@@ -133,7 +134,6 @@ namespace TBF.BenchControl
|
||||
Factories.Add(new Output.DB.SensusOracle.Factory());
|
||||
Factories.Add(new Output.EventTriggers.Iperl.Factory());
|
||||
Factories.Add(new Output.EventTriggers.Standard.Factory());
|
||||
Factories.Add(new Output.EventTriggers.Statistics.Factory());
|
||||
Factories.Add(new Output.FileWriters.Basic.FactorySingle());
|
||||
Factories.Add(new Output.FileWriters.Basic.FactoryCompound());
|
||||
Factories.Add(new Output.FileWriters.Basic.FactoryHeatMeters());
|
||||
@@ -184,8 +184,8 @@ namespace TBF.BenchControl
|
||||
Factories.Add(new Elde.Valve.ValveFactory());
|
||||
Factories.Add(new Elde.ValveEx.ValveFactory());
|
||||
Factories.Add(new Various.ErrorFlags.Factory());
|
||||
Factories.Add(new Various.Evaporation.Factory());
|
||||
Factories.Add(new Various.TankWithLevelMsrmnt.Factory());
|
||||
Factories.Add(new Various.StatisticsMonitoring.Factory());
|
||||
Factories.Add(new Various.TankWithLevelMsrmnt.Factory());
|
||||
Factories.Add(new WaterMeters.Munich.WaterMeterFactory()); /// 'WaterMeters.Munich'
|
||||
Factories.Add(new WaterMeters.WaterMeter.WaterMeterFactory()); /// 'WaterMeter'
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
+10
-9
@@ -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));
|
||||
}
|
||||
|
||||
+10
-9
@@ -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));
|
||||
}
|
||||
|
||||
+9
-8
@@ -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));
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user