Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2610e72943 |
+1
-2
@@ -2,8 +2,6 @@ Common/bin/
|
||||
Common/obj/
|
||||
Config/bin/
|
||||
Config/obj/
|
||||
DataStreamInterface/bin/
|
||||
DataStreamInterface/obj/
|
||||
Decrypt/bin/
|
||||
Decrypt/obj/
|
||||
DeviceTest/bin/
|
||||
@@ -42,6 +40,7 @@ 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;TURA_IPERL_NEW;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -30,7 +30,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;TURA_IPERL_NEW;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -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.1458.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1458.0")]
|
||||
[assembly: AssemblyVersion("2.26.1447.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1447.0")]
|
||||
|
||||
+1
-13
@@ -68,8 +68,6 @@ 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
|
||||
@@ -114,7 +112,6 @@ 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,
|
||||
@@ -136,7 +133,6 @@ namespace Config
|
||||
[Description("Impulsy")] Pulses,
|
||||
[Description("Impulsy/litr")] PulsePerLtr,
|
||||
[Description("Impulsy/kWh")] PulsePerKWh,
|
||||
[Description("Przewodność")] Conductivity,
|
||||
|
||||
/// Quantities without units and conversions
|
||||
[Description("Numer")] Number,
|
||||
@@ -158,7 +154,6 @@ 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,
|
||||
@@ -180,7 +175,6 @@ namespace Config
|
||||
[Description("Impulso")] Pulses,
|
||||
[Description("Impulso/litro")] PulsePerLtr,
|
||||
[Description("Impulso/kWh")] PulsePerKWh,
|
||||
[Description("Conduttività")] Conductivity,
|
||||
|
||||
/// Quantities without units and conversions
|
||||
[Description("Numero")] Number,
|
||||
@@ -202,7 +196,6 @@ namespace Config
|
||||
[Description("Pulses")] Pulses,
|
||||
[Description("Pulses/liter")] PulsePerLtr,
|
||||
[Description("Pulses/kWh")] PulsePerKWh,
|
||||
[Description("Conductivity")] Conductivity,
|
||||
|
||||
/// Quantities without units and conversions
|
||||
[Description("Number")] Number,
|
||||
@@ -224,7 +217,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.uSpcm;
|
||||
unit == Unit.Pct || unit == Unit.mm || unit == Unit.kgpm3 || unit == Unit.J || unit == Unit.ppl || unit == Unit.ppkWh;
|
||||
}
|
||||
|
||||
public static bool IsQuantity(Unit units, Quantity quantity)
|
||||
@@ -316,9 +309,6 @@ namespace Config
|
||||
case Unit.kWhpp:
|
||||
return Config.Quantity.PulsePerKWh;
|
||||
|
||||
case Unit.uSpcm:
|
||||
return Config.Quantity.Conductivity;
|
||||
|
||||
default:
|
||||
return Config.Quantity.Number;
|
||||
}
|
||||
@@ -338,8 +328,6 @@ 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)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
///
|
||||
/// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
<?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.
@@ -1,95 +0,0 @@
|
||||
///
|
||||
/// 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
|
||||
}
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
///
|
||||
/// 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);
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
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")]
|
||||
@@ -0,0 +1,525 @@
|
||||
<?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
@@ -0,0 +1,261 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,73 @@
|
||||
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.
|
After Width: | Height: | Size: 64 KiB |
@@ -0,0 +1,91 @@
|
||||
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
|
||||
@@ -0,0 +1,25 @@
|
||||
<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>
|
||||
@@ -0,0 +1,27 @@
|
||||
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()
|
||||
@@ -0,0 +1,11 @@
|
||||
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
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
af242843887f3bdcc52e485483356eaccd37ba67a35941530bd195a8310fc7d5aca8560576dfb62ad5a4bd2df789a5e8be068e62e7c976d6eeed8d63abbd9909
|
||||
|
||||
|
||||
= staratura
|
||||
@@ -320,13 +320,6 @@ 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.1458.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1458.0")]
|
||||
[assembly: AssemblyVersion("2.26.1447.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1447.0")]
|
||||
|
||||
Generated
-9
@@ -1977,15 +1977,6 @@ 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>
|
||||
|
||||
@@ -825,7 +825,4 @@
|
||||
<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;TURA_IPERL_NEW;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -29,7 +29,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;TURA_IPERL_NEW;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -297,16 +297,6 @@ 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
|
||||
///
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_IPERL_NEW;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -32,7 +32,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;TURA_IPERL_NEW;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -67,8 +67,6 @@ 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
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -293,16 +291,6 @@ 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
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -8,14 +8,13 @@ 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, GenericDevices.IHasCalendarEvents
|
||||
public class Component : ComponentBase, GenericDevices.IBenchInfo
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("BenchInfo.iPerl({0})", Cfg.ToString(1)); }
|
||||
@@ -44,37 +43,5 @@ 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-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018 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, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -37,27 +37,6 @@ 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,17 +1,15 @@
|
||||
///
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019 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, GenericDevices.IHasCalendarEvents
|
||||
public class Component : ComponentBase
|
||||
{
|
||||
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)); }
|
||||
@@ -37,36 +35,5 @@ 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-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019 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, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -24,27 +24,6 @@ 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,17 +1,15 @@
|
||||
///
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019 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, GenericDevices.IHasCalendarEvents
|
||||
public class Component : ComponentBase
|
||||
{
|
||||
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)); }
|
||||
@@ -40,36 +38,5 @@ 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-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019 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, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -25,27 +25,6 @@ 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() {}
|
||||
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
///
|
||||
/// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
///
|
||||
/// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
///
|
||||
/// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
///
|
||||
/// 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;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2018 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, GenericDevices.IHasCalendarEvents
|
||||
public class Diverter : ComponentBase, IDevice, GenericDevices.IDiverter, GenericDevices.ISequenceCondition
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Diverter));
|
||||
public override string ToString() { return string.Format("Diverter({0})", Cfg.ToString(1)); }
|
||||
@@ -148,40 +148,6 @@ namespace TBF.BenchControl.Elde.Diverter
|
||||
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 > TBF.UI.Constants.MinDate)
|
||||
if (calibrationDue > DateTime.MinValue.AddDays(36))
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
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, GenericDevices.IHasCalendarEvents
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(PressureMeter));
|
||||
public override string ToString() { return string.Format("PressureMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -53,38 +52,6 @@ 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-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2018 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeter
|
||||
{
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
public class PressureMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PressureMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -24,26 +24,6 @@ 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,11 +7,10 @@ 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, GenericDevices.IHasCalendarEvents
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(PressureMeter));
|
||||
public override string ToString() { return string.Format("PressureMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -45,39 +44,6 @@ 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, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PressureMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -27,26 +27,6 @@ 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,16 +1,15 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
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, GenericDevices.IHasCalendarEvents
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("TempMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -48,38 +47,6 @@ 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-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2019 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, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -27,26 +27,6 @@ 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,11 +6,10 @@ 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, GenericDevices.IHasCalendarEvents
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("TempMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -43,39 +42,6 @@ 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, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -28,27 +28,6 @@ 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,11 +5,10 @@ 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, GenericDevices.IHasCalendarEvents
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("TempMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -34,39 +33,6 @@ 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, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, Config.Entities.IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -41,27 +41,6 @@ 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-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl
|
||||
{
|
||||
@@ -95,7 +95,6 @@ namespace TBF.BenchControl
|
||||
TempOutDone,
|
||||
TempDivDone,
|
||||
LevelDone,
|
||||
ConductivityDone,
|
||||
VolumeDone,
|
||||
FlowMeasurementDone,
|
||||
FlowReached,
|
||||
@@ -155,8 +154,6 @@ namespace TBF.BenchControl
|
||||
ResultsProcessed, /// Event triggers
|
||||
ErrorProcessingResults,
|
||||
|
||||
StatisticsProcessed, /// Statistics monitoring (Event triggers)
|
||||
|
||||
/// Timer events
|
||||
TimerExpired,
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
///
|
||||
/// 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,14 +9,13 @@ 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, GenericDevices.IHasCalendarEvents
|
||||
public class Nivotrack : ComponentBase, IDevice, ILevelMeter, IOperation
|
||||
{
|
||||
const int StableReadingsCount = 9;
|
||||
|
||||
@@ -72,40 +71,6 @@ 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-2020 Sensus Metering Systems
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -7,11 +7,10 @@ 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, GenericDevices.IHasCalendarEvents
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("Keithley.TempMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -46,40 +45,6 @@ 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 DataContainers.Evaporation.Factory)
|
||||
else if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Various.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 > TBF.UI.Constants.MinDate)
|
||||
if (calibrationDue > DateTime.MinValue.AddDays(36))
|
||||
{
|
||||
/// 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
|
||||
///
|
||||
float conductivity; /// [uS/cm] electrical conductivity of water
|
||||
double temperature; /// [°C] water temperature
|
||||
double conductivity; /// [???]
|
||||
double temperature; /// [°C]
|
||||
|
||||
public float Conductivity { get { return conductivity; } }
|
||||
public double Level { 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.0F;
|
||||
conductivity = 0.0;
|
||||
temperature = 0.0;
|
||||
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
@@ -71,10 +71,10 @@ namespace TBF.BenchControl.Modbus.WaterAnalyzer
|
||||
}
|
||||
|
||||
|
||||
public float ReadConductivity() { return conductivity; } /// Returns electrical conductivity of water in [uS/cm]
|
||||
public double ReadTemperature() { return temperature; } /// Returns water temperature in [°C]
|
||||
public double ReadLevel() { return conductivity; } /// Returns water level in mm
|
||||
public double ReadTemperature() { return temperature; } /// Returns temperature in °C
|
||||
|
||||
public ReadConductivityOp ReadConductivityOp(ref FloatBox conduct) { return new ReadConductivityOp(this, ref conduct); }
|
||||
public ReadConductivityOp ReadLevelOp(ref DoubleBox level) { return new ReadConductivityOp(this, ref level); }
|
||||
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,11 +98,14 @@ namespace TBF.BenchControl.Modbus.WaterAnalyzer
|
||||
///
|
||||
/// Telegram with values
|
||||
///
|
||||
byte[] conductBytes = new byte[] { telegram[4], telegram[3], telegram[6], telegram[5] };
|
||||
conductivity = System.BitConverter.ToSingle(conductBytes, 0);
|
||||
UpdateProcessData(conductivity);
|
||||
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;
|
||||
}
|
||||
|
||||
string line = string.Format("conductivity = {0} uS/cm", conductivity);
|
||||
log.Debug(line);
|
||||
Debug.WriteLine(line);
|
||||
}
|
||||
@@ -134,10 +137,5 @@ 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
|
||||
FloatBox conductivity; /// [uS/cm] electrical conductivity of water
|
||||
DoubleBox conductivity;
|
||||
|
||||
/// <summary>
|
||||
/// Events: LevelDone or Error
|
||||
/// </summary>
|
||||
/// <param name="analyzer">Water level meter reference</param>
|
||||
/// <param name="conduct">Reference to the measured level variable, value is in mm</param>
|
||||
/// <param name="level">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 FloatBox conduct)
|
||||
public ReadConductivityOp(Analyzer analyzer, ref DoubleBox level)
|
||||
{
|
||||
if (analyzer == null) throw new ArgumentNullException("analyzer");
|
||||
this.analyzer = analyzer;
|
||||
this.conductivity = conduct;
|
||||
this.conductivity = level;
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
@@ -37,17 +37,17 @@ namespace TBF.BenchControl.Modbus.WaterAnalyzer
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
conductivity.Val = analyzer.ReadConductivity();
|
||||
conductivity.Val = analyzer.ReadLevel();
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>
|
||||
/// Event.ConductivityDone
|
||||
/// Event.LevelDone
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
conductivity.Val = analyzer.ReadConductivity();
|
||||
return Event.ConductivityDone;
|
||||
conductivity.Val = analyzer.ReadLevel();
|
||||
return Event.LevelDone;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
|
||||
@@ -10,7 +10,6 @@ using NHibernate;
|
||||
using NHibernate.Criterion;
|
||||
using Config.Entities;
|
||||
using TracingDB.Entities;
|
||||
using Events.Entities;
|
||||
|
||||
namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
{
|
||||
@@ -285,56 +284,11 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
log.WarnFormat("{0} : Run() : currentOp = {1}", Name, currentOpState);
|
||||
opCompleted = true;
|
||||
if (SaveTracingRecords(batch) != Retv.OK) anyError = true;
|
||||
|
||||
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;
|
||||
}
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
}
|
||||
else
|
||||
{
|
||||
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;
|
||||
}
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -11,7 +11,6 @@ using Config;
|
||||
using Config.Entities;
|
||||
using Results.Output;
|
||||
using System.Text;
|
||||
using Events.Entities;
|
||||
|
||||
namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
{
|
||||
@@ -315,29 +314,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
opCompleted = true;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -52,29 +52,24 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
triggerCfg.EventSource = newCfg.EventSource;
|
||||
triggerCfg.FailedWMsPct = newCfg.FailedWMsPct;
|
||||
triggerCfg.Mid1Name = newCfg.Mid1Name;
|
||||
triggerCfg.Mid1ErrAfterCorr = newCfg.Mid1ErrAfterCorr;
|
||||
triggerCfg.Mid1Err = newCfg.Mid1Err;
|
||||
triggerCfg.Mid1RelErr = newCfg.Mid1RelErr;
|
||||
triggerCfg.Mid2Name = newCfg.Mid2Name;
|
||||
triggerCfg.Mid2ErrAfterCorr = newCfg.Mid2ErrAfterCorr;
|
||||
triggerCfg.Mid2Err = newCfg.Mid2Err;
|
||||
triggerCfg.Mid2RelErr = newCfg.Mid2RelErr;
|
||||
triggerCfg.Mid3Name = newCfg.Mid3Name;
|
||||
triggerCfg.Mid3ErrAfterCorr = newCfg.Mid3ErrAfterCorr;
|
||||
triggerCfg.Mid3Err = newCfg.Mid3Err;
|
||||
triggerCfg.Mid3RelErr = newCfg.Mid3RelErr;
|
||||
triggerCfg.Mid4Name = newCfg.Mid4Name;
|
||||
triggerCfg.Mid4ErrAfterCorr = newCfg.Mid4ErrAfterCorr;
|
||||
triggerCfg.Mid4Err = newCfg.Mid4Err;
|
||||
triggerCfg.Mid4RelErr = newCfg.Mid4RelErr;
|
||||
triggerCfg.Mid5Name = newCfg.Mid5Name;
|
||||
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.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.E10 = newCfg.E10;
|
||||
triggerCfg.E11 = newCfg.E11;
|
||||
triggerCfg.E12 = newCfg.E12;
|
||||
@@ -83,7 +78,6 @@ 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;
|
||||
@@ -168,48 +162,26 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
triggerCfg.Mid3Name,
|
||||
triggerCfg.Mid4Name,
|
||||
triggerCfg.Mid5Name };
|
||||
|
||||
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 };
|
||||
double[] maxMidRelErr = new double[] { triggerCfg.Mid1RelErr,
|
||||
triggerCfg.Mid2RelErr,
|
||||
triggerCfg.Mid3RelErr,
|
||||
triggerCfg.Mid4RelErr,
|
||||
triggerCfg.Mid5RelErr };
|
||||
for (int i = 0; i < midName.Length; i++)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(midName[i]))
|
||||
{
|
||||
/// This MID# enabled
|
||||
|
||||
/// MIDx enabled
|
||||
foreach (var tr in batch.TestRslts)
|
||||
{
|
||||
if (tr.RefFlowmeter() == midName[i])
|
||||
if (tr.RefFlowmeter() == midName[i] && tr.ErrorMaster >= maxMidRelErr[i])
|
||||
{
|
||||
/// 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);
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,15 +193,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);
|
||||
@@ -238,7 +210,6 @@ 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,22 +24,17 @@ 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 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 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 bool E1;
|
||||
public bool E2;
|
||||
public bool E3;
|
||||
@@ -62,9 +57,8 @@ 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)
|
||||
@@ -80,90 +74,78 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
|
||||
public void InitializeAll()
|
||||
{
|
||||
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
|
||||
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
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
E26 = false; /// 34
|
||||
E27 = false; /// 35
|
||||
E28 = false; /// 36
|
||||
E26 = false; /// 29
|
||||
E27 = false; /// 30
|
||||
E28 = false; /// 31
|
||||
#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.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
|
||||
"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
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
"E26", /// 34
|
||||
"E27", /// 35
|
||||
"E28", /// 36
|
||||
"E26", /// 29
|
||||
"E27", /// 30
|
||||
"E28", /// 31
|
||||
#endif
|
||||
"E36", /// 34 or 37
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
@@ -191,44 +173,36 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
case 0: return EventSource;
|
||||
case 1: return FailedWMsPct.ToString();
|
||||
case 2: return Mid1Name;
|
||||
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;
|
||||
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;
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
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;
|
||||
case 29: return E26 ? Strings.yes : Strings.no;
|
||||
case 30: return E27 ? Strings.yes : Strings.no;
|
||||
case 31: return E28 ? Strings.yes : Strings.no;
|
||||
#endif
|
||||
default: return string.Empty;
|
||||
}
|
||||
@@ -238,47 +212,39 @@ 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: 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;
|
||||
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;
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
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;
|
||||
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;
|
||||
#endif
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
@@ -301,28 +267,28 @@ namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
{
|
||||
case 0:
|
||||
case 2:
|
||||
case 5:
|
||||
case 4:
|
||||
case 6:
|
||||
case 8:
|
||||
case 11:
|
||||
case 14:
|
||||
case 10:
|
||||
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 4:
|
||||
case 6:
|
||||
case 5:
|
||||
case 7:
|
||||
case 9:
|
||||
case 10:
|
||||
case 12:
|
||||
case 13:
|
||||
case 15:
|
||||
case 16:
|
||||
case 11:
|
||||
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:
|
||||
@@ -335,16 +301,10 @@ 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;
|
||||
@@ -360,46 +320,40 @@ 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.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
|
||||
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
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
prms.E26 = this.E26; /// 34
|
||||
prms.E27 = this.E27; /// 35
|
||||
prms.E28 = this.E28; /// 36
|
||||
prms.E26 = this.E26; /// 29
|
||||
prms.E27 = this.E27; /// 30
|
||||
prms.E28 = this.E28; /// 31
|
||||
#endif
|
||||
prms.E36 = this.E36; /// 34 or 37
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
///
|
||||
/// 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);;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
///
|
||||
/// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
///
|
||||
/// 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,7 +8,6 @@ using log4net;
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using Results.Output;
|
||||
using Events.Entities;
|
||||
|
||||
namespace TBF.BenchControl.Output.FileWriters.IperlLogger
|
||||
{
|
||||
@@ -156,28 +155,9 @@ 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,7 +1233,6 @@ 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);
|
||||
@@ -1295,29 +1294,14 @@ 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);
|
||||
|
||||
///
|
||||
/// 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.AddMinutes(1);
|
||||
batchResults.Batch.StartTime = oriBatch.StartTime;
|
||||
batchResults.Batch.TestBenchId = (BenchInfo != null) ? BenchInfo.TestBenchId : 1;
|
||||
batchResults.Batch.TestBenchName = (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench";
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ namespace TBF.BenchControl.Sequences
|
||||
///
|
||||
public static IBenchInfo BenchInfo;
|
||||
public static IErrorFlags ErrorFlagsComp;
|
||||
public static IStatisticsMonitoring StatisticsMonitoringComp;
|
||||
public static Output.DB.SensusOracle.Database OracleDB;
|
||||
|
||||
///
|
||||
@@ -182,7 +181,6 @@ 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;
|
||||
@@ -240,7 +238,6 @@ 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();
|
||||
@@ -271,7 +268,6 @@ 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);
|
||||
@@ -296,7 +292,6 @@ namespace TBF.BenchControl.Sequences
|
||||
PressUpStat.Update(PressUp);
|
||||
PressDownStat.Update(PressDown);
|
||||
PressDeltaStat.Update(PressDelta);
|
||||
ConductStat.Update(Conductivity);
|
||||
RefFlowStat.Update(RefFlow);
|
||||
|
||||
if (BatchRslts.Batch.HeatMeter)
|
||||
@@ -321,7 +316,6 @@ namespace TBF.BenchControl.Sequences
|
||||
PressUpStat.Stop();
|
||||
PressDownStat.Stop();
|
||||
PressDeltaStat.Stop();
|
||||
ConductStat.Stop();
|
||||
RefFlowStat.Stop();
|
||||
|
||||
TempRefHiStat.Stop();
|
||||
|
||||
@@ -1145,11 +1145,6 @@ 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;
|
||||
@@ -1503,8 +1498,6 @@ 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();
|
||||
@@ -1640,8 +1633,6 @@ 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;
|
||||
@@ -1771,8 +1762,6 @@ 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,8 +232,6 @@ 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,7 +20,6 @@ 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());
|
||||
@@ -134,6 +133,7 @@ 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.StatisticsMonitoring.Factory());
|
||||
Factories.Add(new Various.TankWithLevelMsrmnt.Factory());
|
||||
Factories.Add(new Various.Evaporation.Factory());
|
||||
Factories.Add(new Various.TankWithLevelMsrmnt.Factory());
|
||||
Factories.Add(new WaterMeters.Munich.WaterMeterFactory()); /// 'WaterMeters.Munich'
|
||||
Factories.Add(new WaterMeters.WaterMeter.WaterMeterFactory()); /// 'WaterMeter'
|
||||
}
|
||||
|
||||
@@ -853,8 +853,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
else if (currentActivity.ToLower() == NormalizeCalibrationV4FactorsStr.ToLower()) error = NormalizeCalibrationV4Factors(threadID, ihead, wm, ref resultStr);
|
||||
else if (currentActivity.ToLower() == ReadQ2CorrectionStr.ToLower()) error = ReadQ2Correction(threadID, ihead, wm, ref resultStr);
|
||||
else if (currentActivity.ToLower() == ResetQ2CorrectionStr.ToLower()) error = ResetQ2Correction(threadID, ihead, wm, ref resultStr);
|
||||
else if (currentActivity.ToLower() == WriteDefaultQ2CorrectionsStr.ToLower()) error = WriteDefaultQ2Corrections(threadID, ihead, wm, ref resultStr);
|
||||
else if (currentActivity.ToLower() == InitOrReadQ2CorrectionsStr.ToLower()) error = InitOrReadQ2Corrections(threadID, ihead, wm, ref resultStr);
|
||||
else if (currentActivity.ToLower() == WriteDefaultQ2CorrectionsStr.ToLower()) error = WriteDefaultQ2Corrections(threadID, ihead, wm, ref resultStr);
|
||||
else if (currentActivity.ToLower() == InitOrReadQ2CorrectionsStr.ToLower()) error = InitOrReadQ2Corrections(threadID, ihead, wm, ref resultStr);
|
||||
else if (currentActivity.ToLower() == WriteQ2CorrectionStr.ToLower()) error = WriteQ2Correction(threadID, ihead, wm, currentTest, ref resultStr, Q2CorrType.Standard, null);
|
||||
else if (currentActivity.ToLower() == WriteQ2CorrectionAltStr.ToLower()) error = WriteQ2Correction(threadID, ihead, wm, currentTest, ref resultStr, Q2CorrType.Dewa, null);
|
||||
else if (currentActivity.ToLower().Contains(WriteQ2CorrectionGreeceStr.ToLower())) error = WriteQ2Correction(threadID, ihead, wm, currentTest, ref resultStr, Q2CorrType.Greece, currentActivity.Substring(WriteQ2CorrectionGreeceStr.Length).Trim());
|
||||
|
||||
@@ -493,11 +493,6 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
tstRslt.PressDeltaEnd = oriTestRslt.PressDeltaEnd;
|
||||
tstRslt.PressDeltaMin = oriTestRslt.PressDeltaMin;
|
||||
tstRslt.PressDeltaMax = oriTestRslt.PressDeltaMax;
|
||||
tstRslt.ConductMean = oriTestRslt.ConductMean;
|
||||
tstRslt.ConductStart = oriTestRslt.ConductStart;
|
||||
tstRslt.ConductEnd = oriTestRslt.ConductEnd;
|
||||
tstRslt.ConductMin = oriTestRslt.ConductMin;
|
||||
tstRslt.ConductMax = oriTestRslt.ConductMax;
|
||||
tstRslt.TempUpMean = oriTestRslt.TempUpMean;
|
||||
tstRslt.TempUpStart = oriTestRslt.TempUpStart;
|
||||
tstRslt.TempUpEnd = oriTestRslt.TempUpEnd;
|
||||
@@ -643,11 +638,6 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
tstRslt.PressDeltaEnd = testRsltQ2ac.PressDeltaEnd;
|
||||
tstRslt.PressDeltaMin = testRsltQ2ac.PressDeltaMin;
|
||||
tstRslt.PressDeltaMax = testRsltQ2ac.PressDeltaMax;
|
||||
tstRslt.ConductMean = testRsltQ2ac.ConductMean;
|
||||
tstRslt.ConductStart = testRsltQ2ac.ConductStart;
|
||||
tstRslt.ConductEnd = testRsltQ2ac.ConductEnd;
|
||||
tstRslt.ConductMin = testRsltQ2ac.ConductMin;
|
||||
tstRslt.ConductMax = testRsltQ2ac.ConductMax;
|
||||
tstRslt.TempUpMean = testRsltQ2ac.TempUpMean;
|
||||
tstRslt.TempUpStart = testRsltQ2ac.TempUpStart;
|
||||
tstRslt.TempUpEnd = testRsltQ2ac.TempUpEnd;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2017-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -97,49 +97,43 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
bool E21 = ProcessData.RefFlowStat.Min < testRslt.Qfrom()
|
||||
|| ProcessData.RefFlowStat.Max > testRslt.Qto();
|
||||
|
||||
/// Electrical conductivity of water
|
||||
bool E36 = ProcessData.ConductStat.Min < errorsCfg.TestParams.Conductivity_min
|
||||
|| ProcessData.ConductStat.Max > errorsCfg.TestParams.Conductivity_max;
|
||||
|
||||
long errorFlags = 0;
|
||||
sbyte on = (sbyte)ErrorFlagsMode.On;
|
||||
if (E1 && (errorsCfg.TestParams.E1 == on)) errorFlags |= (long)ErrorFlagMask.E1;
|
||||
if (E2 && (errorsCfg.TestParams.E2 == on)) errorFlags |= (long)ErrorFlagMask.E2;
|
||||
if (E3 && (errorsCfg.TestParams.E3 == on)) errorFlags |= (long)ErrorFlagMask.E3;
|
||||
if (E4 && (errorsCfg.TestParams.E4 == on)) errorFlags |= (long)ErrorFlagMask.E4;
|
||||
if (E5 && (errorsCfg.TestParams.E5 == on)) errorFlags |= (long)ErrorFlagMask.E5;
|
||||
if (E6 && (errorsCfg.TestParams.E6 == on)) errorFlags |= (long)ErrorFlagMask.E6;
|
||||
if (E7 && (errorsCfg.TestParams.E7 == on)) errorFlags |= (long)ErrorFlagMask.E7;
|
||||
if (E8 && (errorsCfg.TestParams.E8 == on)) errorFlags |= (long)ErrorFlagMask.E8;
|
||||
if (E9 && (errorsCfg.TestParams.E9 == on)) errorFlags |= (long)ErrorFlagMask.E9;
|
||||
if (E10 && (errorsCfg.TestParams.E10 == on)) errorFlags |= (long)ErrorFlagMask.E10;
|
||||
if (E11 && (errorsCfg.TestParams.E11 == on)) errorFlags |= (long)ErrorFlagMask.E11;
|
||||
if (E12 && (errorsCfg.TestParams.E12 == on)) errorFlags |= (long)ErrorFlagMask.E12;
|
||||
if (E13 && (errorsCfg.TestParams.E13 == on)) errorFlags |= (long)ErrorFlagMask.E13;
|
||||
if (E14 && (errorsCfg.TestParams.E14 == on)) errorFlags |= (long)ErrorFlagMask.E14;
|
||||
if (E1 && (errorsCfg.TestParams.E1 == on)) errorFlags |= (int)ErrorFlagMask.E1;
|
||||
if (E2 && (errorsCfg.TestParams.E2 == on)) errorFlags |= (int)ErrorFlagMask.E2;
|
||||
if (E3 && (errorsCfg.TestParams.E3 == on)) errorFlags |= (int)ErrorFlagMask.E3;
|
||||
if (E4 && (errorsCfg.TestParams.E4 == on)) errorFlags |= (int)ErrorFlagMask.E4;
|
||||
if (E5 && (errorsCfg.TestParams.E5 == on)) errorFlags |= (int)ErrorFlagMask.E5;
|
||||
if (E6 && (errorsCfg.TestParams.E6 == on)) errorFlags |= (int)ErrorFlagMask.E6;
|
||||
if (E7 && (errorsCfg.TestParams.E7 == on)) errorFlags |= (int)ErrorFlagMask.E7;
|
||||
if (E8 && (errorsCfg.TestParams.E8 == on)) errorFlags |= (int)ErrorFlagMask.E8;
|
||||
if (E9 && (errorsCfg.TestParams.E9 == on)) errorFlags |= (int)ErrorFlagMask.E9;
|
||||
if (E10 && (errorsCfg.TestParams.E10 == on)) errorFlags |= (int)ErrorFlagMask.E10;
|
||||
if (E11 && (errorsCfg.TestParams.E11 == on)) errorFlags |= (int)ErrorFlagMask.E11;
|
||||
if (E12 && (errorsCfg.TestParams.E12 == on)) errorFlags |= (int)ErrorFlagMask.E12;
|
||||
if (E13 && (errorsCfg.TestParams.E13 == on)) errorFlags |= (int)ErrorFlagMask.E13;
|
||||
if (E14 && (errorsCfg.TestParams.E14 == on)) errorFlags |= (int)ErrorFlagMask.E14;
|
||||
/// E15, E16, E17, E18, E19, E20 skipped
|
||||
if (E21 && (errorsCfg.TestParams.E21 == on)) errorFlags |= (long)ErrorFlagMask.E21;
|
||||
if (E36 && (errorsCfg.TestParams.E36 == on)) errorFlags |= (long)ErrorFlagMask.E36;
|
||||
if (E21 && (errorsCfg.TestParams.E21 == on)) errorFlags |= (int)ErrorFlagMask.E21;
|
||||
|
||||
long _infoFlags = 0;
|
||||
sbyte info = (sbyte)ErrorFlagsMode.Info;
|
||||
if (E1 && (errorsCfg.TestParams.E1 == info)) _infoFlags |= (long)ErrorFlagMask.E1;
|
||||
if (E2 && (errorsCfg.TestParams.E2 == info)) _infoFlags |= (long)ErrorFlagMask.E2;
|
||||
if (E3 && (errorsCfg.TestParams.E3 == info)) _infoFlags |= (long)ErrorFlagMask.E3;
|
||||
if (E4 && (errorsCfg.TestParams.E4 == info)) _infoFlags |= (long)ErrorFlagMask.E4;
|
||||
if (E5 && (errorsCfg.TestParams.E5 == info)) _infoFlags |= (long)ErrorFlagMask.E5;
|
||||
if (E6 && (errorsCfg.TestParams.E6 == info)) _infoFlags |= (long)ErrorFlagMask.E6;
|
||||
if (E7 && (errorsCfg.TestParams.E7 == info)) _infoFlags |= (long)ErrorFlagMask.E7;
|
||||
if (E8 && (errorsCfg.TestParams.E8 == info)) _infoFlags |= (long)ErrorFlagMask.E8;
|
||||
if (E9 && (errorsCfg.TestParams.E9 == info)) _infoFlags |= (long)ErrorFlagMask.E9;
|
||||
if (E10 && (errorsCfg.TestParams.E10 == info)) _infoFlags |= (long)ErrorFlagMask.E10;
|
||||
if (E11 && (errorsCfg.TestParams.E11 == info)) _infoFlags |= (long)ErrorFlagMask.E11;
|
||||
if (E12 && (errorsCfg.TestParams.E12 == info)) _infoFlags |= (long)ErrorFlagMask.E12;
|
||||
if (E13 && (errorsCfg.TestParams.E13 == info)) _infoFlags |= (long)ErrorFlagMask.E13;
|
||||
if (E14 && (errorsCfg.TestParams.E14 == info)) _infoFlags |= (long)ErrorFlagMask.E14;
|
||||
if (E1 && (errorsCfg.TestParams.E1 == info)) _infoFlags |= (int)ErrorFlagMask.E1;
|
||||
if (E2 && (errorsCfg.TestParams.E2 == info)) _infoFlags |= (int)ErrorFlagMask.E2;
|
||||
if (E3 && (errorsCfg.TestParams.E3 == info)) _infoFlags |= (int)ErrorFlagMask.E3;
|
||||
if (E4 && (errorsCfg.TestParams.E4 == info)) _infoFlags |= (int)ErrorFlagMask.E4;
|
||||
if (E5 && (errorsCfg.TestParams.E5 == info)) _infoFlags |= (int)ErrorFlagMask.E5;
|
||||
if (E6 && (errorsCfg.TestParams.E6 == info)) _infoFlags |= (int)ErrorFlagMask.E6;
|
||||
if (E7 && (errorsCfg.TestParams.E7 == info)) _infoFlags |= (int)ErrorFlagMask.E7;
|
||||
if (E8 && (errorsCfg.TestParams.E8 == info)) _infoFlags |= (int)ErrorFlagMask.E8;
|
||||
if (E9 && (errorsCfg.TestParams.E9 == info)) _infoFlags |= (int)ErrorFlagMask.E9;
|
||||
if (E10 && (errorsCfg.TestParams.E10 == info)) _infoFlags |= (int)ErrorFlagMask.E10;
|
||||
if (E11 && (errorsCfg.TestParams.E11 == info)) _infoFlags |= (int)ErrorFlagMask.E11;
|
||||
if (E12 && (errorsCfg.TestParams.E12 == info)) _infoFlags |= (int)ErrorFlagMask.E12;
|
||||
if (E13 && (errorsCfg.TestParams.E13 == info)) _infoFlags |= (int)ErrorFlagMask.E13;
|
||||
if (E14 && (errorsCfg.TestParams.E14 == info)) _infoFlags |= (int)ErrorFlagMask.E14;
|
||||
/// E15, E16, E17, E18, E19, E20 skipped
|
||||
if (E21 && (errorsCfg.TestParams.E21 == info)) _infoFlags |= (long)ErrorFlagMask.E21;
|
||||
if (E36 && (errorsCfg.TestParams.E36 == info)) _infoFlags |= (long)ErrorFlagMask.E36;
|
||||
if (E21 && (errorsCfg.TestParams.E21 == info)) _infoFlags |= (int)ErrorFlagMask.E21;
|
||||
|
||||
infoFlags = _infoFlags;
|
||||
return errorFlags;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2017-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
@@ -31,7 +31,6 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
public sbyte E15; ///
|
||||
public sbyte E16; ///
|
||||
public sbyte E21; ///
|
||||
public sbyte E36; ///
|
||||
|
||||
public double Delta_Q_pct; /// [%] max deviation from the mean flow
|
||||
public double Delta_T; /// [°C] max. T_up or T_down deviation from the mean temperature
|
||||
@@ -42,8 +41,6 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
public double AmbTemp_max; /// [°C] max. ambient temperature
|
||||
public double Pressure_min; /// [bar] min. water pressure
|
||||
public double Pressure_max; /// [bar] max. water pressure
|
||||
public double Conductivity_min; /// [uS/cm] min. electrical conductivity of water
|
||||
public double Conductivity_max; /// [uS/cm] max. electrical conductivity of water
|
||||
|
||||
public double Coef_E9; /// Coefficient used in E9, default 0.025
|
||||
public double Coef_E10; /// Coefficient used in E10, default 0.04
|
||||
@@ -59,7 +56,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
public sbyte E28; /// Previous workflow step verification
|
||||
#endif
|
||||
|
||||
public override void InitializeAll()
|
||||
public override void InitializeAll()
|
||||
{
|
||||
#if IPERL
|
||||
E1 = (sbyte)ErrorFlagsMode.Info;
|
||||
@@ -79,7 +76,11 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
E15 = (sbyte)ErrorFlagsMode.Off;
|
||||
E16 = (sbyte)ErrorFlagsMode.Off;
|
||||
E21 = (sbyte)ErrorFlagsMode.Info;
|
||||
E36 = (sbyte)ErrorFlagsMode.On;
|
||||
|
||||
E25 = (sbyte)ErrorFlagsMode.Info; /// MaxPruefindex verification
|
||||
E26 = (sbyte)ErrorFlagsMode.Off; /// Q2 factors verification (saved from production == current)
|
||||
E27 = (sbyte)ErrorFlagsMode.Off; /// Direction verification
|
||||
E28 = (sbyte)ErrorFlagsMode.Info; /// Previous workflow step verification
|
||||
#else
|
||||
E1 = (sbyte)ErrorFlagsMode.Info;
|
||||
E2 = (sbyte)ErrorFlagsMode.Info;
|
||||
@@ -98,32 +99,23 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
E15 = (sbyte)ErrorFlagsMode.Info;
|
||||
E16 = (sbyte)ErrorFlagsMode.Info;
|
||||
E21 = (sbyte)ErrorFlagsMode.Info;
|
||||
E36 = (sbyte)ErrorFlagsMode.Off;
|
||||
#endif
|
||||
Delta_Q_pct = 5.0; /// [%]
|
||||
Delta_T = 10.0; /// [°C]
|
||||
Delta_Tup_Tdn = 10.0; /// [°C]
|
||||
TestTime_min = 0; /// [s]
|
||||
TestTime_max = 99999; /// [s]
|
||||
AmbTemp_min = 5.0; /// [°C]
|
||||
AmbTemp_max = 95.0; /// [°C]
|
||||
Pressure_min = 0; /// [bar]
|
||||
Pressure_max = 16.0; /// [bar]
|
||||
Conductivity_min = 600.0; /// [uS/cm]
|
||||
Conductivity_max = 1200.0; /// [uS/cm]
|
||||
Delta_Q_pct = 5.0; /// [%]
|
||||
Delta_T = 10.0; /// [°C]
|
||||
Delta_Tup_Tdn = 10.0; /// [°C]
|
||||
TestTime_min = 0; /// [s]
|
||||
TestTime_max = 99999; /// [s]
|
||||
AmbTemp_min = 5.0; /// [°C]
|
||||
AmbTemp_max = 95.0; /// [°C]
|
||||
Pressure_min = 0; /// [bar]
|
||||
Pressure_max = 16.0; /// [bar]
|
||||
|
||||
Coef_E9 = 0.025;
|
||||
Coef_E10 = 0.04;
|
||||
Coef_E11 = 0.1;
|
||||
Coef_E12 = 1.0;
|
||||
Offset_E9 = 0; /// [s]
|
||||
Offset_E12 = 0; /// [s]
|
||||
#if IPERL
|
||||
E25 = (sbyte)ErrorFlagsMode.Info; /// MaxPruefindex verification
|
||||
E26 = (sbyte)ErrorFlagsMode.Off; /// Q2 factors verification (saved from production == current)
|
||||
E27 = (sbyte)ErrorFlagsMode.Off; /// Direction verification
|
||||
E28 = (sbyte)ErrorFlagsMode.Info; /// Previous workflow step verification
|
||||
#endif
|
||||
Offset_E9 = 0; /// [s]
|
||||
Offset_E12 = 0; /// [s]
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
@@ -145,7 +137,6 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
"E15",
|
||||
"E16",
|
||||
"E21",
|
||||
"E36",
|
||||
|
||||
"Delta Q [%]",
|
||||
"Delta T [°C]",
|
||||
@@ -156,8 +147,6 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
string.Format("max. {0} [°C]", Strings.Air_temperature),
|
||||
string.Format("min. {0} [bar]", Strings.Pressure),
|
||||
string.Format("max. {0} [bar]", Strings.Pressure),
|
||||
"min. conductivity [uS/cm]",
|
||||
"max. conductivity [uS/cm]",
|
||||
|
||||
"Coef.E9",
|
||||
"Coef.E10",
|
||||
@@ -196,32 +185,29 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
case 14: return ((ErrorFlagsMode)E15).ToDescription();
|
||||
case 15: return ((ErrorFlagsMode)E16).ToDescription();
|
||||
case 16: return ((ErrorFlagsMode)E21).ToDescription();
|
||||
case 17: return ((ErrorFlagsMode)E36).ToDescription();
|
||||
|
||||
case 18: return Delta_Q_pct.ToString();
|
||||
case 19: return Delta_T.ToString();
|
||||
case 20: return Delta_Tup_Tdn.ToString();
|
||||
case 21: return TestTime_min.ToString();
|
||||
case 22: return TestTime_max.ToString();
|
||||
case 23: return AmbTemp_min.ToString();
|
||||
case 24: return AmbTemp_max.ToString();
|
||||
case 25: return Pressure_min.ToString();
|
||||
case 26: return Pressure_max.ToString();
|
||||
case 27: return Conductivity_min.ToString();
|
||||
case 28: return Conductivity_max.ToString();
|
||||
case 29: return Coef_E9.ToString();
|
||||
case 30: return Coef_E10.ToString();
|
||||
case 31: return Coef_E11.ToString();
|
||||
case 32: return Coef_E12.ToString();
|
||||
case 33: return Offset_E9.ToString();
|
||||
case 34: return Offset_E12.ToString();
|
||||
case 17: return Delta_Q_pct.ToString();
|
||||
case 18: return Delta_T.ToString();
|
||||
case 19: return Delta_Tup_Tdn.ToString();
|
||||
case 20: return TestTime_min.ToString();
|
||||
case 21: return TestTime_max.ToString();
|
||||
case 22: return AmbTemp_min.ToString();
|
||||
case 23: return AmbTemp_max.ToString();
|
||||
case 24: return Pressure_min.ToString();
|
||||
case 25: return Pressure_max.ToString();
|
||||
case 26: return Coef_E9.ToString();
|
||||
case 27: return Coef_E10.ToString();
|
||||
case 28: return Coef_E11.ToString();
|
||||
case 29: return Coef_E12.ToString();
|
||||
case 30: return Offset_E9.ToString();
|
||||
case 31: return Offset_E12.ToString();
|
||||
#if IPERL
|
||||
case 35: return ((ErrorFlagsMode)E25).ToDescription();
|
||||
case 36: return ((ErrorFlagsMode)E26).ToDescription();
|
||||
case 37: return ((ErrorFlagsMode)E27).ToDescription();
|
||||
case 38: return ((ErrorFlagsMode)E28).ToDescription();
|
||||
case 32: return ((ErrorFlagsMode)E25).ToDescription();
|
||||
case 33: return ((ErrorFlagsMode)E26).ToDescription();
|
||||
case 34: return ((ErrorFlagsMode)E27).ToDescription();
|
||||
case 35: return ((ErrorFlagsMode)E28).ToDescription();
|
||||
#endif
|
||||
default: return string.Empty;
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,32 +233,29 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
case 14: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E15 = (sbyte)m; break; }; break;
|
||||
case 15: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E16 = (sbyte)m; break; }; break;
|
||||
case 16: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E21 = (sbyte)m; break; }; break;
|
||||
case 17: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E36 = (sbyte)m; break; }; break;
|
||||
|
||||
case 18: Delta_Q_pct = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 19: Delta_T = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 20: Delta_Tup_Tdn = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 21: TestTime_min = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 22: TestTime_max = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 23: AmbTemp_min = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 24: AmbTemp_max = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 25: Pressure_min = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 26: Pressure_max = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 27: Conductivity_min = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 28: Conductivity_max = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 29: Coef_E9 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 30: Coef_E10 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 31: Coef_E11 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 32: Coef_E12 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 33: Offset_E9 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 34: Offset_E12 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 17: Delta_Q_pct = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 18: Delta_T = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 19: Delta_Tup_Tdn = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 20: TestTime_min = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 21: TestTime_max = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 22: AmbTemp_min = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 23: AmbTemp_max = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 24: Pressure_min = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 25: Pressure_max = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 26: Coef_E9 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 27: Coef_E10 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 28: Coef_E11 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 29: Coef_E12 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 30: Offset_E9 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 31: Offset_E12 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
#if IPERL
|
||||
case 35: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E25 = (sbyte)m; break; }; break;
|
||||
case 36: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E26 = (sbyte)m; break; }; break;
|
||||
case 37: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E27 = (sbyte)m; break; }; break;
|
||||
case 38: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E28 = (sbyte)m; break; }; break;
|
||||
case 32: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E25 = (sbyte)m; break; }; break;
|
||||
case 33: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E26 = (sbyte)m; break; }; break;
|
||||
case 34: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E27 = (sbyte)m; break; }; break;
|
||||
case 35: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E28 = (sbyte)m; break; }; break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
@@ -302,19 +285,17 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
#if IPERL
|
||||
case 32:
|
||||
case 33:
|
||||
case 34:
|
||||
case 35:
|
||||
case 36:
|
||||
case 37:
|
||||
case 38:
|
||||
#endif
|
||||
for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++)
|
||||
for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++)
|
||||
{
|
||||
if (m.ToDescription() == strValue) return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
case 20:
|
||||
@@ -323,15 +304,12 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
case 23:
|
||||
case 24:
|
||||
case 25:
|
||||
case 26:
|
||||
case 26:
|
||||
case 27:
|
||||
case 28:
|
||||
case 29:
|
||||
case 30:
|
||||
case 31:
|
||||
case 32:
|
||||
case 33:
|
||||
case 34:
|
||||
if (Utils.TryParseUDouble(strValue, out dummy)) return true;
|
||||
break;
|
||||
|
||||
@@ -363,7 +341,6 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
prms.E15 = this.E15;
|
||||
prms.E16 = this.E16;
|
||||
prms.E21 = this.E21;
|
||||
prms.E36 = this.E36;
|
||||
|
||||
prms.Delta_Q_pct = this.Delta_Q_pct;
|
||||
prms.Delta_T = this.Delta_T;
|
||||
@@ -374,9 +351,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
prms.AmbTemp_max = this.AmbTemp_max;
|
||||
prms.Pressure_min = this.Pressure_min;
|
||||
prms.Pressure_max = this.Pressure_max;
|
||||
prms.Conductivity_min = this.Conductivity_min;
|
||||
prms.Conductivity_max = this.Conductivity_max;
|
||||
prms.Coef_E9 = this.Coef_E9;
|
||||
prms.Coef_E9 = this.Coef_E9;
|
||||
prms.Coef_E10 = this.Coef_E10;
|
||||
prms.Coef_E11 = this.Coef_E11;
|
||||
prms.Coef_E12 = this.Coef_E12;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.Various.Evaporation
|
||||
{
|
||||
public class Component : ComponentBase, IEvaporation
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <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
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-4
@@ -1,10 +1,11 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.Configs.NameOnly;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
namespace TBF.BenchControl.Various.Evaporation
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
@@ -16,11 +17,11 @@ namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EvaporationCfg(this.GetType().Namespace.Substring(32), this); }
|
||||
public IComponentCfg DefaultConfig() { return new TestMethodCfg(this.GetType().Namespace.Substring(25), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(EvaporationCfg.Serializer, component, this);
|
||||
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Various.StatisticsMonitoring
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||
|
||||
public void ResetStaticProperties() { ProcessStatistics.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new ProcessStatistics(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new ProcessStatistics(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new StatisticsCfg(this.GetType().Namespace.Substring(25), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(StatisticsCfg.Serializer, component, this);;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,204 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Events.Entities;
|
||||
using Results.Entities;
|
||||
|
||||
namespace TBF.BenchControl.Various.StatisticsMonitoring
|
||||
{
|
||||
public class ProcessStatistics : ComponentBase, IOperation, GenericDevices.IStatisticsMonitoring
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(ProcessStatistics));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(1)); }
|
||||
|
||||
readonly StatisticsCfg statisticsCfg;
|
||||
|
||||
int lastBatchNr;
|
||||
|
||||
|
||||
public ProcessStatistics() {}
|
||||
|
||||
public ProcessStatistics(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
statisticsCfg = cfg as StatisticsCfg;
|
||||
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)
|
||||
{
|
||||
StatisticsCfg newCfg = args.Cfg as StatisticsCfg;
|
||||
if (newCfg != null && newCfg.Name.Equals(Name))
|
||||
{
|
||||
if (args.Command == CfgChangeCmd.CfgChange)
|
||||
{
|
||||
statisticsCfg.EventSource = newCfg.EventSource;
|
||||
statisticsCfg.iPerlHeadFailureRateThreshold = newCfg.iPerlHeadFailureRateThreshold;
|
||||
|
||||
ApplyConfig();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endregion Configuration Change Handling
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file
|
||||
/// Events:
|
||||
/// Event.StatisticsProcessed
|
||||
/// Event.Busy
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into a file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ProcessStatisticsOp(int lastBatchNr)
|
||||
{
|
||||
this.lastBatchNr = lastBatchNr;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public void Start()
|
||||
{
|
||||
Process(lastBatchNr, statisticsCfg);
|
||||
}
|
||||
public Event Run()
|
||||
{
|
||||
return Event.StatisticsProcessed;
|
||||
}
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process recent batch results and calculate statistics of iPERL head failures
|
||||
/// </summary>
|
||||
/// <param name="batchNr">Number of the last saved batch</param>
|
||||
void Process(int batchNr, StatisticsCfg statisticsCfg)
|
||||
{
|
||||
const int RequiredUsages = 10;
|
||||
const int MaxBatches = 20;
|
||||
|
||||
float iperlHeadFailureRateThreshold = (float)statisticsCfg.iPerlHeadFailureRateThreshold / 100.0f;
|
||||
|
||||
int completeBatchesProcessed = 0;
|
||||
|
||||
int[] usages = new int[Config.Data.WMsCount];
|
||||
int[] failures = new int[Config.Data.WMsCount];
|
||||
for (int i = 0; i < Config.Data.WMsCount; i++) usages[i] = failures[i] = 0;
|
||||
|
||||
///
|
||||
/// Read results of recent batches (up to 'MaxBatches')
|
||||
/// Take into account only batches where the 1st test in named 'RFID' and
|
||||
/// at least one water meter completed all tests.
|
||||
///
|
||||
try
|
||||
{
|
||||
ISession session = Results.DB.CreateSession();
|
||||
|
||||
int usagesMin;
|
||||
do
|
||||
{
|
||||
usagesMin = 0;
|
||||
IList<Batch> batches = session.QueryOver<Batch>()
|
||||
.Where(x => x.Id == batchNr)
|
||||
.List();
|
||||
batchNr--;
|
||||
if (batches.Count != 1 || batches[0].TestRslts.Count < 1 || batches[0].TestRslts[0].MethodClass != "TestMethods.iPerlCommunication")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
bool isACompleteBatch = false;
|
||||
foreach (var wm in batches[0].WaterMeters)
|
||||
{
|
||||
int i = wm.WMPosition - 1;
|
||||
if (0 <= i && i < Config.Data.WMsCount && usages[i] < RequiredUsages && !wm.Disabled && wm.CompletedFromTests())
|
||||
{
|
||||
isACompleteBatch = true;
|
||||
usages[i]++;
|
||||
if (!wm.MeterTestRslts[0].Passed) failures[i]++;
|
||||
}
|
||||
}
|
||||
|
||||
usagesMin = int.MaxValue;
|
||||
for (int i = 0; i < Config.Data.WMsCount; i++) if (usagesMin > usages[i]) usagesMin = usages[i];
|
||||
|
||||
if (isACompleteBatch) completeBatchesProcessed++;
|
||||
}
|
||||
while ((usagesMin < RequiredUsages) && (batchNr > 0) && (completeBatchesProcessed < MaxBatches));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Failed to calculate iPERL head usage statistics: {0}", exc.Message);
|
||||
}
|
||||
|
||||
///
|
||||
/// Find out whether at lest one event needs to be triggered
|
||||
///
|
||||
bool doTriggerEvents = false;
|
||||
for (int i = 0; i < Config.Data.WMsCount; i++)
|
||||
{
|
||||
if ((usages[i] > 0) && (iperlHeadFailureRateThreshold > 0) && (float)failures[i] / (float)usages[i] >= iperlHeadFailureRateThreshold)
|
||||
{
|
||||
doTriggerEvents = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (doTriggerEvents)
|
||||
{
|
||||
///
|
||||
/// Trigger events
|
||||
///
|
||||
try
|
||||
{
|
||||
ISession session = Events.DB.CreateSession();
|
||||
Events.DB.LoadSubscribers(session);
|
||||
|
||||
for (int i = 0; i < Config.Data.WMsCount; i++)
|
||||
{
|
||||
if ((usages[i] > 0) && (iperlHeadFailureRateThreshold > 0) && (float)failures[i] / (float)usages[i] >= iperlHeadFailureRateThreshold)
|
||||
{
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session,
|
||||
statisticsCfg.EventSource,
|
||||
EventClass.EquipmentHW,
|
||||
Severity.Error,
|
||||
string.Format("Príliš veľa chýb hlavice č. {0}", i + 1),
|
||||
string.Format("Percento chýb je {0}%", (100 * failures[i]) / usages[i]),
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance | SubscriberGroup.Production);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Failed to trigger events: source = {0}, message = {1}", statisticsCfg.EventSource, exc.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,127 +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.Various.StatisticsMonitoring
|
||||
{
|
||||
/// <summary>
|
||||
/// Serializable configuration of Various.StatisticsMonitoring component.
|
||||
/// </summary>
|
||||
public class StatisticsCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(StatisticsCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new Configs.ParamsProvider.ComponentCfgCtrl(this, null); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string EventSource;
|
||||
public int iPerlHeadFailureRateThreshold; /// 0 = off, 1..100% event is triggered when percentage reaches this level
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
StatisticsCfg() { }
|
||||
|
||||
public StatisticsCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
InitializeAll();
|
||||
}
|
||||
|
||||
public string ComponentName { get { return Name; } }
|
||||
|
||||
public void InitializeAll()
|
||||
{
|
||||
EventSource = "Štatistiky"; /// 0
|
||||
iPerlHeadFailureRateThreshold = 20; /// 1
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
"Event source", /// 0
|
||||
"Threshold for iPERL head failure rate [%] (0=off)", /// 1
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
|
||||
public IList<string> ParamValues(int i)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case -1: return string.Format("Name={0}, EventSource={1}, FailureRatePct={2}, ...", Name, EventSource, iPerlHeadFailureRateThreshold);
|
||||
case 0: return EventSource;
|
||||
case 1: return iPerlHeadFailureRateThreshold.ToString();
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateParam(int i, string strValue)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: EventSource = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 1: iPerlHeadFailureRateThreshold = int.Parse(strValue); return CfgUpdateFlags.AnyChange;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate string form of a parameter value
|
||||
/// </summary>
|
||||
/// <param name="i">Parameter index</param>
|
||||
/// <param name="strValue">String form of a parameter</param>
|
||||
/// <param name="message">Message in case value is not valid</param>
|
||||
/// <returns>true when string form of a parameter is OK</returns>
|
||||
public bool ValidateParam(int i, string strValue, out string message)
|
||||
{
|
||||
message = string.Empty;
|
||||
int percentage;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
return true;
|
||||
case 1:
|
||||
if (int.TryParse(strValue, out percentage) && (0 <= percentage) && (percentage <= 100)) return true;
|
||||
message = "Threshold for iPERL head failure rate in % (0 = off)";
|
||||
return false;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void CopyContentTo(StatisticsCfg prms)
|
||||
{
|
||||
prms.EventSource = this.EventSource; /// 0
|
||||
prms.iPerlHeadFailureRateThreshold = this.iPerlHeadFailureRateThreshold; /// 1
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
{
|
||||
StatisticsCfg pars = new StatisticsCfg();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public bool UpdateEmbeddedDbEntity()
|
||||
{
|
||||
return true; /// =OK, do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -350,8 +350,6 @@ namespace TBF
|
||||
/// Clone() guarantees that current bench settings wont be modified
|
||||
/// when user modifies the database settings in DatabaseSettingsDlg.
|
||||
Config.Data.CurrentBench = (Config.DatabaseSettings)LocalSettings.TestBenches[i].Clone();
|
||||
Results.DB.DbType = Config.Data.CurrentBench.WaterMetersDBSettings.DbType;
|
||||
Results.DB.ConnectionString = Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString;
|
||||
|
||||
/// Save the selection to local settings
|
||||
LocalSettings.LastBenchName = Config.Data.CurrentBench.BenchName;
|
||||
@@ -369,6 +367,8 @@ namespace TBF
|
||||
///
|
||||
/// Connect to Results database and determine the last saved batch number.
|
||||
///
|
||||
Results.DB.DbType = Config.Data.CurrentBench.WaterMetersDBSettings.DbType;
|
||||
Results.DB.ConnectionString = Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString;
|
||||
Results.DB.LoadSharedData();
|
||||
int maxBatchNr = Results.DB.GetMaxSavedBatchNr();
|
||||
if (!Config.Data.CurrentBench.IsRealBench || Program.LocalSettings.BatchNr <= maxBatchNr)
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Sensus")]
|
||||
[assembly: AssemblyProduct("TestBenchFramework")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013 - 2020 Sensus Slovensko, a.s.")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013 - 2019 Sensus Slovensko, a.s.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.26.1463.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1463.0")]
|
||||
[assembly: AssemblyVersion("2.26.1457.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1457.0")]
|
||||
|
||||
@@ -1638,7 +1638,4 @@
|
||||
<data name="All_day" xml:space="preserve">
|
||||
<value>Celý den</value>
|
||||
</data>
|
||||
<data name="Certificate" xml:space="preserve">
|
||||
<value>Certifikát</value>
|
||||
</data>
|
||||
</root>
|
||||
+11
-23
@@ -39,7 +39,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_IPERL_NEW;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
@@ -50,7 +50,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;TURA_IPERL_NEW;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -60,7 +60,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_IPERL_NEW;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
@@ -70,7 +70,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;TURA_IPERL_NEW;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -101,9 +101,8 @@
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ControlComponent3U, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\ControlBoard\iPerlST-new\ControlComponent3U.dll</HintPath>
|
||||
<Reference Include="ControlComponent3U">
|
||||
<HintPath>..\packages\ControlBoard\iPerlST\ControlComponent3U.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
@@ -200,15 +199,6 @@
|
||||
<Compile Include="BenchControl\DataContainers\Density\Component.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Density\ComponentCfg.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Density\ComponentFactory.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Evaporation\Component.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Evaporation\EvaporationCfg.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Evaporation\Factory.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Evaporation\EvaporationCfgCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\DataContainers\Evaporation\EvaporationCfgCtrl.designer.cs">
|
||||
<DependentUpon>EvaporationCfgCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\DataEntry\Combined\TestStartEndForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -636,7 +626,6 @@
|
||||
<Compile Include="BenchControl\GenericDevices\ISequenceCondition.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\ISimultTestMethod.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IDatastreamReader.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IStatisticsMonitoring.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\ITankDraining.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\ITankDrainingCfg.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\ITestMethodWith2ndPass.cs" />
|
||||
@@ -920,6 +909,9 @@
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Iperl\Factory.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Iperl\Trigger.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Iperl\TriggerCfg.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Statistics\Factory.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Statistics\Trigger.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Statistics\TriggerCfg.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Standard\Factory.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Standard\Trigger.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Standard\TriggerCfg.cs" />
|
||||
@@ -1583,6 +1575,8 @@
|
||||
<Compile Include="BenchControl\Various\ErrorFlags\TestParams.cs" />
|
||||
<Compile Include="BenchControl\Various\ErrorFlags\Errors.cs" />
|
||||
<Compile Include="BenchControl\Various\ErrorFlags\ErrorsCfg.cs" />
|
||||
<Compile Include="BenchControl\Various\Evaporation\Component.cs" />
|
||||
<Compile Include="BenchControl\Various\Evaporation\Factory.cs" />
|
||||
<Compile Include="BenchControl\Various\ManualLevelMsrmnt\ManualLevelMsrmnt.cs" />
|
||||
<Compile Include="BenchControl\Various\ManualLevelMsrmnt\Factory.cs" />
|
||||
<Compile Include="BenchControl\Various\ManualLevelMsrmnt\WaterLevelForm.cs">
|
||||
@@ -1591,9 +1585,6 @@
|
||||
<Compile Include="BenchControl\Various\ManualLevelMsrmnt\WaterLevelForm.designer.cs">
|
||||
<DependentUpon>WaterLevelForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\Various\StatisticsMonitoring\Factory.cs" />
|
||||
<Compile Include="BenchControl\Various\StatisticsMonitoring\ProcessStatistics.cs" />
|
||||
<Compile Include="BenchControl\Various\StatisticsMonitoring\StatisticsCfg.cs" />
|
||||
<Compile Include="BenchControl\Various\TankWithLevelMsrmnt\Factory.cs" />
|
||||
<Compile Include="BenchControl\Various\TankWithLevelMsrmnt\Tank.cs" />
|
||||
<Compile Include="BenchControl\Various\TankWithLevelMsrmnt\TankCfg.cs" />
|
||||
@@ -2568,9 +2559,6 @@
|
||||
<EmbeddedResource Include="BenchControl\Danfoss\VLT2800\PumpCfgCtrl.resx">
|
||||
<DependentUpon>PumpCfgCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BenchControl\DataContainers\Evaporation\EvaporationCfgCtrl.resx">
|
||||
<DependentUpon>EvaporationCfgCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BenchControl\DataEntry\Combined\CycleBeginningForm.resx">
|
||||
<DependentUpon>CycleBeginningForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -136,8 +136,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgPressMeterTab uiControl = new MetrologyDlgPressMeterTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.CalibInfoCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.GenericDevices.ICalibInfoCfg;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
metrologyTabControl.TabPages.Add(tabPage);
|
||||
@@ -151,7 +150,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgTempMeterTab uiControl = new MetrologyDlgTempMeterTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.CalibInfoCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.GenericDevices.ICalibInfoCfg;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
@@ -201,7 +199,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
}
|
||||
|
||||
/// Tab-pages for water tank evaporation rates
|
||||
if (factory is BenchControl.DataContainers.Evaporation.Factory)
|
||||
if (factory is BenchControl.Various.Evaporation.Factory)
|
||||
{
|
||||
evaporationsCount++;
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
|
||||
+20
-24
@@ -34,9 +34,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.cmpntNameLabel = new System.Windows.Forms.Label();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
@@ -101,9 +101,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
@@ -114,25 +114,13 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
// calibValidDateTextBox
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(120, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 17;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(120, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 16;
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(120, 59);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
@@ -143,6 +131,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(120, 37);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
@@ -392,11 +388,11 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.TextBox airDensityTextBox;
|
||||
private System.Windows.Forms.Label airDensityLabel;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -52,11 +52,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgBalanceTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
@@ -114,8 +110,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (BalanceCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = BalanceCfg.CalibCertificateNr;
|
||||
calibDateTimePicker.Value = (BalanceCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : BalanceCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (BalanceCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : BalanceCfg.CalibValidDate;
|
||||
calibDateTextBox.Text = BalanceCfg.CalibDate.ToShortDateString();
|
||||
calibValidDateTextBox.Text = BalanceCfg.CalibValidDate.ToShortDateString();
|
||||
|
||||
buoyancyTempTextBox.Text = BalanceCfg.BuoyancyTemp.ToString("F2");
|
||||
buoyancyPressTextBox.Text = BalanceCfg.BuoyancyPress.ToString("F4");
|
||||
@@ -249,8 +245,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
|
||||
buoyancyTempTextBox.Enabled = true;
|
||||
buoyancyPressTextBox.Enabled = true;
|
||||
@@ -273,8 +269,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
BalanceCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
BalanceCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
BalanceCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
BalanceCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
|
||||
BalanceCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
|
||||
|
||||
BalanceCfg.BuoyancyTemp = Utils.ParseSFloat(buoyancyTempTextBox.Text);
|
||||
BalanceCfg.BuoyancyPress = Utils.ParseUFloat(buoyancyPressTextBox.Text);
|
||||
|
||||
+5
-93
@@ -32,23 +32,15 @@ namespace TBF.UI.Bench.Metrology
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
this.densityCorrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.densityCorrLabel = new System.Windows.Forms.Label();
|
||||
this.temperatureTextBox = new System.Windows.Forms.TextBox();
|
||||
this.temperatureLabel = new System.Windows.Forms.Label();
|
||||
this.densityTextBox = new System.Windows.Forms.TextBox();
|
||||
this.densityLabel = new System.Windows.Forms.Label();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.calibrationGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
@@ -61,71 +53,20 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.calibrationGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.densityCorrTextBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.densityCorrLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.temperatureTextBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.temperatureLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.densityTextBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.densityLabel);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(554, 300);
|
||||
this.splitContainer1.SplitterDistance = 110;
|
||||
this.splitContainer1.Size = new System.Drawing.Size(420, 300);
|
||||
this.splitContainer1.SplitterDistance = 120;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
this.calibrationGroupBox.Location = new System.Drawing.Point(323, 16);
|
||||
this.calibrationGroupBox.Name = "calibrationGroupBox";
|
||||
this.calibrationGroupBox.Size = new System.Drawing.Size(208, 86);
|
||||
this.calibrationGroupBox.TabIndex = 7;
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
this.calibValidDateLabel.Location = new System.Drawing.Point(17, 62);
|
||||
this.calibValidDateLabel.Name = "calibValidDateLabel";
|
||||
this.calibValidDateLabel.Size = new System.Drawing.Size(52, 13);
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
this.calibDateLabel.Location = new System.Drawing.Point(17, 40);
|
||||
this.calibDateLabel.Name = "calibDateLabel";
|
||||
this.calibDateLabel.Size = new System.Drawing.Size(30, 13);
|
||||
this.calibDateLabel.TabIndex = 12;
|
||||
this.calibDateLabel.Text = "Date";
|
||||
//
|
||||
// calibCertificateNrTextBox
|
||||
//
|
||||
this.calibCertificateNrTextBox.Enabled = false;
|
||||
this.calibCertificateNrTextBox.Location = new System.Drawing.Point(120, 15);
|
||||
this.calibCertificateNrTextBox.Name = "calibCertificateNrTextBox";
|
||||
this.calibCertificateNrTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibCertificateNrTextBox.TabIndex = 11;
|
||||
//
|
||||
// calibCertificateNrLabel
|
||||
//
|
||||
this.calibCertificateNrLabel.AutoSize = true;
|
||||
this.calibCertificateNrLabel.Location = new System.Drawing.Point(17, 18);
|
||||
this.calibCertificateNrLabel.Name = "calibCertificateNrLabel";
|
||||
this.calibCertificateNrLabel.Size = new System.Drawing.Size(54, 13);
|
||||
this.calibCertificateNrLabel.TabIndex = 10;
|
||||
this.calibCertificateNrLabel.Text = "Certificate";
|
||||
//
|
||||
// densityCorrTextBox
|
||||
//
|
||||
this.densityCorrTextBox.Enabled = false;
|
||||
this.densityCorrTextBox.Location = new System.Drawing.Point(185, 81);
|
||||
this.densityCorrTextBox.Location = new System.Drawing.Point(185, 86);
|
||||
this.densityCorrTextBox.Name = "densityCorrTextBox";
|
||||
this.densityCorrTextBox.Size = new System.Drawing.Size(110, 20);
|
||||
this.densityCorrTextBox.TabIndex = 5;
|
||||
@@ -133,7 +74,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
// densityCorrLabel
|
||||
//
|
||||
this.densityCorrLabel.AutoSize = true;
|
||||
this.densityCorrLabel.Location = new System.Drawing.Point(37, 84);
|
||||
this.densityCorrLabel.Location = new System.Drawing.Point(37, 89);
|
||||
this.densityCorrLabel.Name = "densityCorrLabel";
|
||||
this.densityCorrLabel.Size = new System.Drawing.Size(132, 13);
|
||||
this.densityCorrLabel.TabIndex = 4;
|
||||
@@ -175,40 +116,18 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.densityLabel.TabIndex = 0;
|
||||
this.densityLabel.Text = "Density [kg/m3]";
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(120, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(120, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgDensityTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgDensityTab";
|
||||
this.Size = new System.Drawing.Size(554, 300);
|
||||
this.Size = new System.Drawing.Size(420, 300);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgDensityTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.calibrationGroupBox.ResumeLayout(false);
|
||||
this.calibrationGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -222,12 +141,5 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label densityLabel;
|
||||
private System.Windows.Forms.TextBox densityCorrTextBox;
|
||||
private System.Windows.Forms.Label densityCorrLabel;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,11 +46,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgDensityTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
@@ -60,8 +56,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
parent = ParentForm as MetrologyDlg;
|
||||
|
||||
Localize();
|
||||
|
||||
/// Panel1
|
||||
densityLabel.Text = string.Format("{0} [{1}]", Strings.Density, Config.Unit.kgpm3.ToDescription());
|
||||
temperatureLabel.Text = string.Format("{0} [{1}]", Strings.At_temperature, Config.Unit.C.ToDescription());
|
||||
@@ -72,26 +66,12 @@ namespace TBF.UI.Bench.Metrology
|
||||
RefreshAll();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
calibrationGroupBox.Text = Strings.Calibration;
|
||||
calibCertificateNrLabel.Text = Strings.Certificate;
|
||||
calibDateLabel.Text = Strings.Date;
|
||||
calibValidDateLabel.Text = Strings.Valid_until;
|
||||
}
|
||||
|
||||
void RefreshAll()
|
||||
{
|
||||
if (DensityCfg != null)
|
||||
{
|
||||
densityTextBox.Text = Config.Data.RealDensity.ToString("F4");
|
||||
temperatureTextBox.Text = Config.Data.AtTemperature.ToString("F2");
|
||||
densityCorrTextBox.Text = Config.Formulas.DensityCorrection(Config.Data.RealDensity, Config.Data.AtTemperature).ToString("F5");
|
||||
calibCertificateNrTextBox.Text = DensityCfg.CalibCertificateNr;
|
||||
calibDateTimePicker.Value = (DensityCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : DensityCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (DensityCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : DensityCfg.CalibValidDate;
|
||||
}
|
||||
}
|
||||
densityTextBox.Text = Config.Data.RealDensity.ToString("F4");
|
||||
temperatureTextBox.Text = Config.Data.AtTemperature.ToString("F2");
|
||||
densityCorrTextBox.Text = Config.Formulas.DensityCorrection(Config.Data.RealDensity, Config.Data.AtTemperature).ToString("F5");
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
@@ -99,9 +79,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
densityTextBox.Enabled = true;
|
||||
temperatureTextBox.Enabled = true;
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
}
|
||||
|
||||
public void OkBtnClicked()
|
||||
@@ -118,9 +95,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
Results.WMeterRsltItemSpec.AtTemperature =
|
||||
Config.Data.AtTemperature = DensityCfg.AtTemperature = atTemperature;
|
||||
DensityCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
DensityCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
DensityCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
|
||||
Component modified = DensityCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
|
||||
+24
-28
@@ -33,7 +33,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
@@ -47,8 +49,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.listViewEx = new Results.Forms.ListViewEx();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -81,9 +81,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
@@ -94,6 +94,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateTextBox
|
||||
//
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
@@ -103,6 +111,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
@@ -228,32 +244,12 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgDiverterTab
|
||||
// MetrologyDlgLevelMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgDiverterTab";
|
||||
this.Name = "MetrologyDlgLevelMeterTab";
|
||||
this.Size = new System.Drawing.Size(650, 400);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgDiverterTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
@@ -282,14 +278,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label measuredLabel;
|
||||
private System.Windows.Forms.GroupBox nameGroupBox;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.Label pressFromToLabel;
|
||||
private System.Windows.Forms.Label tempFromToLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,12 +52,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgDiverterTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
private void MetrologyDlgDiverterTab_Load(object sender, System.EventArgs e)
|
||||
@@ -112,8 +107,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = CalibInfoCfg.CalibCertificateNr;
|
||||
calibDateTimePicker.Value = (CalibInfoCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (CalibInfoCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibValidDate;
|
||||
calibDateTextBox.Text = CalibInfoCfg.CalibDate.ToShortDateString();
|
||||
calibValidDateTextBox.Text = CalibInfoCfg.CalibValidDate.ToShortDateString();
|
||||
}
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
@@ -210,8 +205,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
|
||||
if (listViewEx.SelectedItems.Count == 1)
|
||||
{
|
||||
@@ -229,8 +224,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
CalibInfoCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
CalibInfoCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
|
||||
CalibInfoCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
|
||||
|
||||
Component modified = CalibInfoCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
|
||||
+24
-28
@@ -33,7 +33,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
@@ -47,8 +49,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.listViewEx = new Results.Forms.ListViewEx();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -81,9 +81,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
@@ -94,6 +94,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateTextBox
|
||||
//
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
@@ -103,6 +111,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
@@ -228,32 +244,12 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgEvaporationTab
|
||||
// MetrologyDlgLevelMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgEvaporationTab";
|
||||
this.Name = "MetrologyDlgLevelMeterTab";
|
||||
this.Size = new System.Drawing.Size(650, 400);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgEvaporationTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
@@ -282,14 +278,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label measuredLabel;
|
||||
private System.Windows.Forms.GroupBox nameGroupBox;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.Label pressFromToLabel;
|
||||
private System.Windows.Forms.Label tempFromToLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,12 +52,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgEvaporationTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
private void MetrologyDlgEvaporationTab_Load(object sender, System.EventArgs e)
|
||||
@@ -112,8 +107,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = CalibInfoCfg.CalibCertificateNr;
|
||||
calibDateTimePicker.Value = (CalibInfoCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (CalibInfoCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibValidDate;
|
||||
calibDateTextBox.Text = CalibInfoCfg.CalibDate.ToShortDateString();
|
||||
calibValidDateTextBox.Text = CalibInfoCfg.CalibValidDate.ToShortDateString();
|
||||
}
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
@@ -210,8 +205,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
|
||||
if (listViewEx.SelectedItems.Count == 1)
|
||||
{
|
||||
@@ -229,8 +224,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
CalibInfoCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
CalibInfoCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
|
||||
CalibInfoCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
|
||||
|
||||
Component modified = CalibInfoCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
|
||||
+22
-26
@@ -33,7 +33,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
@@ -47,8 +49,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.listViewEx = new Results.Forms.ListViewEx();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -81,9 +81,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
@@ -94,6 +94,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateTextBox
|
||||
//
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
@@ -103,6 +111,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
@@ -228,26 +244,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgFlowMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -282,14 +278,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label measuredLabel;
|
||||
private System.Windows.Forms.GroupBox nameGroupBox;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.Label pressFromToLabel;
|
||||
private System.Windows.Forms.Label tempFromToLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,13 +56,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgFlowMeterTab(int rangeIx1)
|
||||
{
|
||||
InitializeComponent();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
this.rangeIx = rangeIx1;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
private void MetrologyDlgFlowMeterTab_Load(object sender, System.EventArgs e)
|
||||
@@ -126,8 +121,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = CalibInfoCfg.GetCalibCertificate(rangeIx1);
|
||||
calibDateTimePicker.Value = (CalibInfoCfg.GetCalibDate(rangeIx1) < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.GetCalibDate(rangeIx1);
|
||||
calibExpirationDateTimePicker.Value = (CalibInfoCfg.GetCalibValidDate(rangeIx1) < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.GetCalibValidDate(rangeIx1);
|
||||
calibDateTextBox.Text = CalibInfoCfg.GetCalibDate(rangeIx1).ToShortDateString();
|
||||
calibValidDateTextBox.Text = CalibInfoCfg.GetCalibValidDate(rangeIx1).ToShortDateString();
|
||||
}
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
@@ -258,8 +253,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
|
||||
if (listViewEx.SelectedItems.Count == 1)
|
||||
{
|
||||
@@ -277,8 +272,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
CalibInfoCfg.SetCalibCertificate(rangeIx, calibCertificateNrTextBox.Text);
|
||||
CalibInfoCfg.SetCalibDate(rangeIx, calibDateTimePicker.Value.Date);
|
||||
CalibInfoCfg.SetCalibValidDate(rangeIx, calibExpirationDateTimePicker.Value.Date);
|
||||
CalibInfoCfg.SetCalibDate(rangeIx, DateTime.Parse(calibDateTextBox.Text));
|
||||
CalibInfoCfg.SetCalibValidDate(rangeIx, DateTime.Parse(calibValidDateTextBox.Text));
|
||||
|
||||
Component modified = CalibInfoCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
|
||||
+22
-26
@@ -33,7 +33,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
@@ -47,8 +49,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.listViewEx = new Results.Forms.ListViewEx();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -81,9 +81,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
@@ -94,6 +94,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateTextBox
|
||||
//
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
@@ -103,6 +111,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
@@ -228,26 +244,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgLevelMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -282,14 +278,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label measuredLabel;
|
||||
private System.Windows.Forms.GroupBox nameGroupBox;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.Label pressFromToLabel;
|
||||
private System.Windows.Forms.Label tempFromToLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,12 +52,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgLevelMeterTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
private void MetrologyDlgLevelMeterTab_Load(object sender, System.EventArgs e)
|
||||
@@ -112,8 +107,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = CalibInfoCfg.CalibCertificateNr;
|
||||
calibDateTimePicker.Value = (CalibInfoCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (CalibInfoCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibValidDate;
|
||||
calibDateTextBox.Text = CalibInfoCfg.CalibDate.ToShortDateString();
|
||||
calibValidDateTextBox.Text = CalibInfoCfg.CalibValidDate.ToShortDateString();
|
||||
}
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
@@ -210,8 +205,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
|
||||
if (listViewEx.SelectedItems.Count == 1)
|
||||
{
|
||||
@@ -229,8 +224,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
CalibInfoCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
CalibInfoCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
|
||||
CalibInfoCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
|
||||
|
||||
Component modified = CalibInfoCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user